tldraw/apps/docs/content/releases/v2.0.0-beta.5.mdx
Mime Čuvalo 83544a9ea8
docs: fix missing API entries (#3111)
following up on
https://discord.com/channels/859816885297741824/1162726738774720574/1211715924613275681

several things here:
- `docs/api/.*json` were out-of-date — seems like fetch-api-source
should run automatically? shouldn't `build-api` also override this
directory? in particular, tldraw.api.json still had a ton of references
to the old @tldraw/tldraw package
- the main problem was that `generateApiContent` was failing silently.
we were relying on Promises and this broke silently because we never
handled exceptions. i got rid of the Promise as it was unnecessary and
made the exceptions bubble up
- two things were broken in the docs and those are fixed, so now the
missing entries will resurface

### Change Type

- [x] `documentation` — Changes to the documentation only[^2]

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-03-12 13:36:24 +00:00

264 lines
15 KiB
Text

---
title: v2.0.0-beta.5
description: Examples
author: tldraw
date: 2/29/2024
order: 4
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-beta.5)
#### fix publishing scripts ([#3006](https://github.com/tldraw/tldraw/pull/3006))
- Add a brief release note for your PR here.
#### tldraw_final_v6_final(old version).docx.pdf ([#2998](https://github.com/tldraw/tldraw/pull/2998))
- The `@tldraw/tldraw` package has been renamed to `tldraw`. You can keep using the old version if you want though!
#### Don't add editor / app to window. ([#2995](https://github.com/tldraw/tldraw/pull/2995))
- Remove `window.editor` and `window.app` references to editor.
#### Adding a single E2E test per menu ([#2954](https://github.com/tldraw/tldraw/pull/2954))
- Add a brief release note for your PR here.
#### unbork publish-new ([#2999](https://github.com/tldraw/tldraw/pull/2999))
- Add a brief release note for your PR here.
#### Implement new package publish process ([#2996](https://github.com/tldraw/tldraw/pull/2996))
- Add a brief release note for your PR here.
#### [feature] wrap mode ([#2938](https://github.com/tldraw/tldraw/pull/2938))
- Added `isWrapMode` to user preferences.
- Added Wrap Mode toggle to user preferences menu.
#### Don't allow edge scrolling when camera is frozen. ([#2992](https://github.com/tldraw/tldraw/pull/2992))
- Don't allow edge scrolling when camera is frozen.
#### Setup papercuts ([#2987](https://github.com/tldraw/tldraw/pull/2987))
- Add a brief release note for your PR here.
#### Add external dialog example ([#2887](https://github.com/tldraw/tldraw/pull/2887))
- Dev: Added an example for dialogs that go outside the component.
#### fix document name overlapping people menu ([#2970](https://github.com/tldraw/tldraw/pull/2970))
- Fix people menu overlapping with document name when it grew too large.
#### Make exportToBlob public ([#2983](https://github.com/tldraw/tldraw/pull/2983))
- Exposes the exportToBlob function for library users
#### export default ui items ([#2973](https://github.com/tldraw/tldraw/pull/2973))
- Components within default menu content components are now exported.
#### Show toast on upload error ([#2959](https://github.com/tldraw/tldraw/pull/2959))
- Adds a quick toast to show when image uploads fail.
#### Fix transparency toggle ([#2964](https://github.com/tldraw/tldraw/pull/2964))
- Fixes the Transparent toggle. The condition was accidentally flipped.
#### menu: rework File menu / ensure Export menu is present ([#2783](https://github.com/tldraw/tldraw/pull/2783))
- Composable UI: makes File items be more granularly accessible / usable
- Menu: show Export under the File menu.
#### ui events: prevent sending 2nd event unnecessarily ([#2921](https://github.com/tldraw/tldraw/pull/2921))
- Some cleanup on duplicate UI events being sent.
#### [fix] fit to content shown on groups ([#2946](https://github.com/tldraw/tldraw/pull/2946))
- Fix bug where "fit frame to content" would be shown when a group is selected.
#### fix structured clone reference in drawing ([#2945](https://github.com/tldraw/tldraw/pull/2945))
- Fixes a reference to structuredClone that caused a crash on older browsers.
#### [fix] Corejs imports ([#2940](https://github.com/tldraw/tldraw/pull/2940))
- Fixes a bug effecting some users related to corejs imports.
#### Add example for external UI ([#2846](https://github.com/tldraw/tldraw/pull/2846))
- Docs: Added external UI example.
#### Remove template references ([#2919](https://github.com/tldraw/tldraw/pull/2919))
- changes the doc site so it no longer references the site template
#### Fix keyboard shortcuts bugs ([#2936](https://github.com/tldraw/tldraw/pull/2936))
- [Fix] Keyboard shortcut focus bug
#### E2E Style Panel Tests ([#2878](https://github.com/tldraw/tldraw/pull/2878))
- Add style panel E2E tests
#### Fix undo/redo for Opacity Slider + Style dropdowns. ([#2933](https://github.com/tldraw/tldraw/pull/2933))
- Fixed issues where undo/redo entries were not being set up correctly for the opacity slider or the style dropdown menus.
#### Add custom static assets example, extract preloadFont ([#2932](https://github.com/tldraw/tldraw/pull/2932))
- Docs, added custom static assets example.
#### Fix frames not preserving shape order ([#2928](https://github.com/tldraw/tldraw/pull/2928))
- Fix an issue when framing shapes did not preserve the original order of the shapes.
- You can now frame shapes inside of the frame.
#### Bounds snapping shape ([#2909](https://github.com/tldraw/tldraw/pull/2909))
- Adds a custom bounds snapping shape
#### Improve dialog appearance on small components ([#2884](https://github.com/tldraw/tldraw/pull/2884))
- Dev: Made default dialogs work better when used in small components.
#### Better example intros ([#2912](https://github.com/tldraw/tldraw/pull/2912))
- Adds more info to the examples section of the docs.
#### docs: add star history and contributor list to README. ([#2914](https://github.com/tldraw/tldraw/pull/2914))
add star history and contributor list to README.
`<img width="854" alt="image" src="https://github.com/tldraw/tldraw/assets/42437658/d0c73289-9fb1-4dc0-882a-0593ebc13895">`
- Increases project transparency: This can help other developers understand the popularity and activity level of the project.
- Recognizes contributors: Listing contributors can recognize those who have contributed to the project, which may also motivate more people to participate in the project.
- Provides more information: The star history chart and contributor list provide more information for potential users or contributors, helping them make decisions about whether to use or participate in the project.
- Enhances the project's professionalism: A detailed README file can enhance the professionalism of the
---
#### 💥 Breaking Change
- `@tldraw/editor`
- Don't add editor / app to window. [#2995](https://github.com/tldraw/tldraw/pull/2995) ([@steveruizok](https://github.com/steveruizok))
#### 🚀 Enhancement
- `@tldraw/editor`, `tldraw`
- [feature] wrap mode [#2938](https://github.com/tldraw/tldraw/pull/2938) ([@steveruizok](https://github.com/steveruizok))
- `tldraw`
- Make exportToBlob public [#2983](https://github.com/tldraw/tldraw/pull/2983) ([@ds300](https://github.com/ds300))
- export default ui items [#2973](https://github.com/tldraw/tldraw/pull/2973) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git)
)
- Fix keyboard shortcuts bugs [#2936](https://github.com/tldraw/tldraw/pull/2936) ([@steveruizok](https://github.com/steveruizok) [@ds300](https://github.com/ds300))
- Add custom static assets example, extract preloadFont [#2932](https://github.com/tldraw/tldraw/pull/2932) ([@steveruizok](https://github.com/steveruizok))
- Export history hooks [#2926](https://github.com/tldraw/tldraw/pull/2926) ([@steveruizok](https://github.com/steveruizok))
- Improve dialog appearance on small components [#2884](https://github.com/tldraw/tldraw/pull/2884) ([@TodePond](https://github.com/TodePond))
#### 🐛 Bug Fix
- husky: add +x chmod flag [#2986](https://github.com/tldraw/tldraw/pull/2986) ([@mimecuvalo](https://github.com/mimecuvalo))
- fix document name overlapping people menu [#2970](https://github.com/tldraw/tldraw/pull/2970) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git))
- docs: Adjust max columns of contributor list in README. [#2917](https://github.com/tldraw/tldraw/pull/2917) ([@wangrongding](https://github.com/wangrongding))
- VS Code 2.0.25 [#2911](https://github.com/tldraw/tldraw/pull/2911) ([@MitjaBezensek](https://github.com/MitjaBezensek))
- `tldraw`
- textfields: make them consistent [#2984](https://github.com/tldraw/tldraw/pull/2984) ([@mimecuvalo](https://github.com/mimecuvalo))
- Show toast on upload error [#2959](https://github.com/tldraw/tldraw/pull/2959) ([@ds300](https://github.com/ds300))
- menu: export followup with different semantics for file menu [#2968](https://github.com/tldraw/tldraw/pull/2968) ([@mimecuvalo](https://github.com/mimecuvalo))
- Fix transparency toggle [#2964](https://github.com/tldraw/tldraw/pull/2964) ([@ds300](https://github.com/ds300))
- menu: rework File menu / ensure Export menu is present [#2783](https://github.com/tldraw/tldraw/pull/2783) ([@mimecuvalo](https://github.com/mimecuvalo))
- ui events: prevent sending 2nd event unnecessarily [#2921](https://github.com/tldraw/tldraw/pull/2921) ([@mimecuvalo](https://github.com/mimecuvalo))
- [fix] fit to content shown on groups [#2946](https://github.com/tldraw/tldraw/pull/2946) ([@steveruizok](https://github.com/steveruizok))
- Fix frames not preserving shape order [#2928](https://github.com/tldraw/tldraw/pull/2928) ([@MitjaBezensek](https://github.com/MitjaBezensek))
- `@tldraw/editor`
- Don't allow edge scrolling when camera is frozen. [#2992](https://github.com/tldraw/tldraw/pull/2992) ([@MitjaBezensek](https://github.com/MitjaBezensek))
- migrate shapes / assets as a store on `putContent` [#2971](https://github.com/tldraw/tldraw/pull/2971) ([@steveruizok](https://github.com/steveruizok))
- [fix] double spinner [#2963](https://github.com/tldraw/tldraw/pull/2963) ([@steveruizok](https://github.com/steveruizok))
- [fix] Corejs imports [#2940](https://github.com/tldraw/tldraw/pull/2940) ([@steveruizok](https://github.com/steveruizok))
- `@tldraw/editor`, `@tldraw/tlschema`
- Setup papercuts [#2987](https://github.com/tldraw/tldraw/pull/2987) ([@ds300](https://github.com/ds300))
- `@tldraw/assets`, `@tldraw/editor`, `tldraw`, `@tldraw/tlschema`
- Prevent iframe embedding for dotcom (except on tldraw.com) [#2947](https://github.com/tldraw/tldraw/pull/2947) ([@steveruizok](https://github.com/steveruizok))
- `@tldraw/editor`, `tldraw`
- Expand props [#2948](https://github.com/tldraw/tldraw/pull/2948) ([@steveruizok](https://github.com/steveruizok))
- Fix undo/redo for Opacity Slider + Style dropdowns. [#2933](https://github.com/tldraw/tldraw/pull/2933) ([@ds300](https://github.com/ds300))
- `tldraw`, `@tldraw/tlschema`, `@tldraw/utils`
- fix structured clone reference in drawing [#2945](https://github.com/tldraw/tldraw/pull/2945) ([@steveruizok](https://github.com/steveruizok))
#### ⚠️ Pushed to `main`
- better name for publish-new ([@ds300](https://github.com/ds300))
- remove dry run early return ([@ds300](https://github.com/ds300))
- better error message in publish-new.yml ([@ds300](https://github.com/ds300))
- fix error logging in publish-now.yml ([@ds300](https://github.com/ds300))
- fix bash thing ([@ds300](https://github.com/ds300))
#### 🏠 Internal
- fix publishing scripts [#3006](https://github.com/tldraw/tldraw/pull/3006) ([@ds300](https://github.com/ds300))
- unbork "unbork publish-new" [#3003](https://github.com/tldraw/tldraw/pull/3003) ([@si14](https://github.com/si14))
- unbork publish-new [#2999](https://github.com/tldraw/tldraw/pull/2999) ([@ds300](https://github.com/ds300))
- remove yarn stuff from the templates and ignore it [#2997](https://github.com/tldraw/tldraw/pull/2997) ([@si14](https://github.com/si14))
- Implement new package publish process [#2996](https://github.com/tldraw/tldraw/pull/2996) ([@ds300](https://github.com/ds300))
- Use github actions to mirror templates from monorepo to appropriate repos [#2781](https://github.com/tldraw/tldraw/pull/2781) ([@si14](https://github.com/si14) [@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git))
- tooling: notify team members if package.json/yarn has been updated [#2972](https://github.com/tldraw/tldraw/pull/2972) ([@mimecuvalo](https://github.com/mimecuvalo))
- Open iframe production links in new tab [#2966](https://github.com/tldraw/tldraw/pull/2966) ([@SomeHats](https://github.com/SomeHats))
- [examples] Log out the 'after' values of changes in StoreEventsExample [#2956](https://github.com/tldraw/tldraw/pull/2956) ([@ds300](https://github.com/ds300))
- [dx] Derive vercel routes from react-router config [#2937](https://github.com/tldraw/tldraw/pull/2937) ([@ds300](https://github.com/ds300))
- Update auto [#2952](https://github.com/tldraw/tldraw/pull/2952) ([@ds300](https://github.com/ds300))
- Fix an issue with publishing canary [#2931](https://github.com/tldraw/tldraw/pull/2931) ([@MitjaBezensek](https://github.com/MitjaBezensek))
- Make Vercel URL rewrites precise [#2913](https://github.com/tldraw/tldraw/pull/2913) ([@si14](https://github.com/si14))
- examples: let people copy out code [#2920](https://github.com/tldraw/tldraw/pull/2920) ([@mimecuvalo](https://github.com/mimecuvalo))
- Lokalise: Translations update [#2908](https://github.com/tldraw/tldraw/pull/2908) ([@TodePond](https://github.com/TodePond))
- `@tldraw/editor`, `@tldraw/tldraw`, `tldraw`
- tldraw_final_v6_final(old version).docx.pdf [#2998](https://github.com/tldraw/tldraw/pull/2998) ([@SomeHats](https://github.com/SomeHats))
- `tldraw`
- license: make them not be scrubbed out in code munging [#2976](https://github.com/tldraw/tldraw/pull/2976) ([@mimecuvalo](https://github.com/mimecuvalo))
#### 📝 Documentation
- Add external dialog example [#2887](https://github.com/tldraw/tldraw/pull/2887) ([@TodePond](https://github.com/TodePond))
- speech bubble handle -> tail [#2975](https://github.com/tldraw/tldraw/pull/2975) ([@SomeHats](https://github.com/SomeHats))
- [docs] Fix mailtos [#2961](https://github.com/tldraw/tldraw/pull/2961) ([@steveruizok](https://github.com/steveruizok))
- [docs] content [#2958](https://github.com/tldraw/tldraw/pull/2958) ([@steveruizok](https://github.com/steveruizok))
- Add example for external UI [#2846](https://github.com/tldraw/tldraw/pull/2846) ([@TodePond](https://github.com/TodePond) [@steveruizok](https://github.com/steveruizok))
- Remove template references [#2919](https://github.com/tldraw/tldraw/pull/2919) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git))
- Bounds snapping shape [#2909](https://github.com/tldraw/tldraw/pull/2909) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git))
- Better example intros [#2912](https://github.com/tldraw/tldraw/pull/2912) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git))
- docs: add star history and contributor list to README. [#2914](https://github.com/tldraw/tldraw/pull/2914) ([@wangrongding](https://github.com/wangrongding))
- `tldraw`
- [docs] design shuffle [#2951](https://github.com/tldraw/tldraw/pull/2951) ([@steveruizok](https://github.com/steveruizok))
#### 🧪 Tests
- E2E Style Panel Tests [#2878](https://github.com/tldraw/tldraw/pull/2878) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git) [@steveruizok](https://github.com/steveruizok))
- `tldraw`
- Adding a single E2E test per menu [#2954](https://github.com/tldraw/tldraw/pull/2954) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git) [@steveruizok](https://github.com/steveruizok))
#### 🔩 Dependency Updates
- `@tldraw/assets`, `@tldraw/editor`, `@tldraw/state`, `@tldraw/store`, `tldraw`, `@tldraw/tlschema`, `@tldraw/utils`, `@tldraw/validate`
- bump typescript / api-extractor [#2949](https://github.com/tldraw/tldraw/pull/2949) ([@steveruizok](https://github.com/steveruizok))
#### Authors: 9
- alex ([@SomeHats](https://github.com/SomeHats))
- Dan Groshev ([@si14](https://github.com/si14))
- David Sheldrick ([@ds300](https://github.com/ds300))
- Lu Wilson ([@TodePond](https://github.com/TodePond))
- Mime Čuvalo ([@mimecuvalo](https://github.com/mimecuvalo))
- Mitja Bezenšek ([@MitjaBezensek](https://github.com/MitjaBezensek))
- Steve Ruiz ([@steveruizok](https://github.com/steveruizok))
- Taha ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git))
- 荣顶 ([@wangrongding](https://github.com/wangrongding))