bacb307bad
This PR does the following: - Add `selfHosted.js`, which is a great option for users that wish to self host the assets. Works well for both self hosting from the public folder or via a CDN. - Updates the docs for assets. We now have a dedicated page for assets where all the options are more clearly explained. I also removed the assets explanation from the main docs as the unpkg option should work out of the box and setting up the assets is no longer necessary. - Cleaned up the `refresh-assets` script. We now use common `types.d.ts` file to define our types. All the other options then reuse them. - Pulled out the `formatAssetUrl` into it's own file. It's now static an no longer generated. - `urls.d.ts`, `import.d.ts`, and newly added `selfhosted.d.ts` are now also no longer generated as we can import the types from `types.d.ts`. - You can now pass a subset of `assetUrls` to `<Tldraw />` and it will override the default option with the passed in overrides. This makes it easy to only customizes certain assets (only change the draw font as an example). ### Change Type - [x] `patch` — Bug Fix
62 lines
1.1 KiB
JSON
62 lines
1.1 KiB
JSON
{
|
|
"name": "@tldraw/assets",
|
|
"description": "A tiny little drawing app (assets).",
|
|
"version": "2.0.0-alpha.12",
|
|
"author": {
|
|
"name": "tldraw GB Ltd.",
|
|
"email": "hello@tldraw.com"
|
|
},
|
|
"homepage": "https://tldraw.dev",
|
|
"license": "Apache-2.0",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/tldraw/tldraw"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/tldraw/tldraw/issues"
|
|
},
|
|
"keywords": [
|
|
"tldraw",
|
|
"drawing",
|
|
"app",
|
|
"development",
|
|
"whiteboard",
|
|
"canvas",
|
|
"infinite"
|
|
],
|
|
"files": [
|
|
"embed-icons",
|
|
"icons",
|
|
"fonts",
|
|
"translations",
|
|
"imports.js",
|
|
"imports.d.ts",
|
|
"selfHosted.js",
|
|
"selfHosted.d.ts",
|
|
"types.d.ts",
|
|
"urls.js",
|
|
"urls.d.ts",
|
|
"utils.js",
|
|
"utils.d.ts"
|
|
],
|
|
"scripts": {
|
|
"pack-tarball": "yarn pack",
|
|
"lint": "yarn run -T tsx ../../scripts/lint.ts"
|
|
},
|
|
"dependencies": {
|
|
"@tldraw/utils": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"lazyrepo": "0.0.0-alpha.27",
|
|
"ts-node-dev": "^1.1.8"
|
|
},
|
|
"jest": {
|
|
"preset": "config/jest/node",
|
|
"setupFiles": [
|
|
"raf/polyfill"
|
|
],
|
|
"moduleNameMapper": {
|
|
"^~(.*)": "<rootDir>/src/$1"
|
|
}
|
|
}
|
|
}
|