From 1616d508807b819e5c3d25d4e12af53127e89635 Mon Sep 17 00:00:00 2001 From: kolibril13 <44469195+kolibril13@users.noreply.github.com> Date: Wed, 31 Jan 2024 16:36:56 +0100 Subject: [PATCH] tldraw/assets --- package-lock.json | 9 +++++++++ package.json | 1 + src/App.jsx | 8 ++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 55dff05..3b0befe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "tldraw-snapshot", "version": "0.0.0", "dependencies": { + "@tldraw/assets": "^2.0.0-beta.2", "@tldraw/tldraw": "^2.0.0-beta.2", "react": "^18.2.0", "react-dom": "^18.2.0" @@ -1879,6 +1880,14 @@ "@babel/runtime": "^7.13.10" } }, + "node_modules/@tldraw/assets": { + "version": "2.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@tldraw/assets/-/assets-2.0.0-beta.2.tgz", + "integrity": "sha512-7fLE+jhzRQU93sgUuxwwSSRyRLc3pRrvfY+MRENV10ItgWktwmHkZXEuix4oLAd/36jxsLCJi3r3KHYcqcNiQA==", + "dependencies": { + "@tldraw/utils": "2.0.0-beta.2" + } + }, "node_modules/@tldraw/editor": { "version": "2.0.0-beta.2", "resolved": "https://registry.npmjs.org/@tldraw/editor/-/editor-2.0.0-beta.2.tgz", diff --git a/package.json b/package.json index 058d5f8..9e2af8e 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "preview": "vite preview" }, "dependencies": { + "@tldraw/assets": "^2.0.0-beta.2", "@tldraw/tldraw": "^2.0.0-beta.2", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/src/App.jsx b/src/App.jsx index f73c712..fc22eec 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,10 +1,14 @@ // this was installed with `npm i @tldraw/tldraw@2.0.0-beta.2` import { Tldraw } from "@tldraw/tldraw"; +import { getAssetUrls } from "@tldraw/assets/selfHosted"; + +// based on https://discord.com/channels/859816885297741824/1197142604106698933/1202273417357692950 import "@tldraw/tldraw/tldraw.css"; +const assetUrls = getAssetUrls(); + export default function App() { - const assetUrls = "/public" return (
); -} \ No newline at end of file +}