Tldraw/packages/assets
Mitja Bezenšek bacb307bad
Asset improvements (#1557)
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
2023-06-09 11:43:01 +00:00
..
CHANGELOG.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
LICENSE transfer-out: transfer out 2023-04-25 12:01:25 +01:00
README.md readmes 2023-05-04 13:47:56 +01:00
api-extractor.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
api-report.md [feature] `check-box` geo shape (#1330) 2023-05-09 13:32:04 +00:00
imports.d.ts Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
imports.js Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
modules.d.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
package.json Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
selfHosted.d.ts Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
selfHosted.js Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
tsconfig.json Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
types.d.ts Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
urls.d.ts Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
urls.js Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
utils.d.ts Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
utils.js Asset improvements (#1557) 2023-06-09 11:43:01 +00:00

README.md

@tldraw/assets

License

The source code in this repository (as well as our 2.0+ distributions and releases) are currently licensed under Apache-2.0. These licenses are subject to change in our upcoming 2.0 release. If you are planning to use tldraw in a commercial product, please reach out at hello@tldraw.com.