···
49
49
"@fastify/cors": "^11.0.1",
50
50
"@fastify/static": "^8.2.0",
51
51
"@fastify/websocket": "^11.0.1",
52
52
+
"@tldraw/assets": "^4.0.2",
52
53
"@tldraw/sync-core": "4.0.2",
53
54
"fastify": "5.4.0",
54
55
"unfurl.js": "^6.4.0",
···
7
7
Tldraw,
8
8
uniqueId,
9
9
} from 'tldraw'
10
10
+
import {getAssetUrlsByMetaUrl} from '@tldraw/assets/urls'
10
11
import { useParams } from 'react-router-dom'
11
12
import { ReactNode, useEffect, useState } from 'react'
13
13
+
14
14
+
const assetUrls = getAssetUrlsByMetaUrl();
12
15
13
16
let WORKER_URL = import.meta.env.VITE_WORKER_URL ?? 'http://localhost:5858';
14
17
if(import.meta.env.MODE === 'production') {
···
35
38
// we can pass the connected store into the Tldraw component which will handle
36
39
// loading states & enable multiplayer UX like cursors & a presence menu
37
40
store={store}
41
41
+
assetUrls={assetUrls}
38
42
deepLinks
39
43
onMount={(editor) => {
40
44
// @ts-expect-error
···
1463
1463
"@tiptap/extension-text-style" "^2.26.1"
1464
1464
"@tiptap/pm" "^2.26.1"
1465
1465
1466
1466
+
"@tldraw/assets@^4.0.2":
1467
1467
+
version "4.0.2"
1468
1468
+
resolved "https://registry.yarnpkg.com/@tldraw/assets/-/assets-4.0.2.tgz#7344c3a6e8ee33c48645a7a7fb1bc681f78c13ba"
1469
1469
+
integrity sha512-vA7M8V47iUqC7CMIezKtNLk4jP3y5a7FBOz9B4MEIkTAQ+Qqm/NHz8CALgtFdMqDthcFo7ltGrgFyIoxsfrZXQ==
1470
1470
+
dependencies:
1471
1471
+
"@tldraw/utils" "4.0.2"
1472
1472
+
1466
1473
"@tldraw/editor@4.0.2":
1467
1474
version "4.0.2"
1468
1475
resolved "https://registry.yarnpkg.com/@tldraw/editor/-/editor-4.0.2.tgz#d350e78471acb246b9a42f73019115980e4f7fb2"