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>
This commit is contained in:
Mime Čuvalo 2024-03-12 13:36:24 +00:00 committed by GitHub
parent 599a6cd484
commit 83544a9ea8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 100034 additions and 95944 deletions

View file

@ -6826,7 +6826,7 @@
},
{
"kind": "Content",
"text": "<{\n name: \"New User\";\n locale: \"ar\" | \"ca\" | \"cs\" | \"da\" | \"de\" | \"en\" | \"es\" | \"fa\" | \"fi\" | \"fr\" | \"gl\" | \"he\" | \"hi-in\" | \"hr\" | \"hu\" | \"it\" | \"ja\" | \"ko-kr\" | \"ku\" | \"my\" | \"ne\" | \"no\" | \"pl\" | \"pt-br\" | \"pt-pt\" | \"ro\" | \"ru\" | \"sl\" | \"sv\" | \"te\" | \"th\" | \"tr\" | \"uk\" | \"vi\" | \"zh-cn\" | \"zh-tw\";\n color: \"#02B1CC\" | \"#11B3A3\" | \"#39B178\" | \"#55B467\" | \"#7B66DC\" | \"#9D5BD2\" | \"#BD54C6\" | \"#E34BA9\" | \"#EC5E41\" | \"#F04F88\" | \"#F2555A\" | \"#FF802B\";\n isDarkMode: false;\n edgeScrollSpeed: 1;\n animationSpeed: 0 | 1;\n isSnapMode: false;\n}>"
"text": "<{\n name: \"New User\";\n locale: \"ar\" | \"ca\" | \"cs\" | \"da\" | \"de\" | \"en\" | \"es\" | \"fa\" | \"fi\" | \"fr\" | \"gl\" | \"he\" | \"hi-in\" | \"hr\" | \"hu\" | \"it\" | \"ja\" | \"ko-kr\" | \"ku\" | \"my\" | \"ne\" | \"no\" | \"pl\" | \"pt-br\" | \"pt-pt\" | \"ro\" | \"ru\" | \"sl\" | \"sv\" | \"te\" | \"th\" | \"tr\" | \"uk\" | \"vi\" | \"zh-cn\" | \"zh-tw\";\n color: \"#02B1CC\" | \"#11B3A3\" | \"#39B178\" | \"#55B467\" | \"#7B66DC\" | \"#9D5BD2\" | \"#BD54C6\" | \"#E34BA9\" | \"#EC5E41\" | \"#F04F88\" | \"#F2555A\" | \"#FF802B\";\n isDarkMode: false;\n edgeScrollSpeed: 1;\n animationSpeed: 0 | 1;\n isSnapMode: false;\n isWrapMode: false;\n}>"
}
],
"fileUrlPath": "packages/editor/src/lib/config/TLUserPreferences.ts",
@ -12182,6 +12182,42 @@
"isAbstract": false,
"name": "getSelectionRotatedPageBounds"
},
{
"kind": "Method",
"canonicalReference": "@tldraw/editor!Editor#getSelectionRotatedScreenBounds:member(1)",
"docComment": "/**\n * The bounds of the selection bounding box in the current page space.\n *\n * @readonly @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "getSelectionRotatedScreenBounds(): "
},
{
"kind": "Reference",
"text": "Box",
"canonicalReference": "@tldraw/editor!Box:class"
},
{
"kind": "Content",
"text": " | undefined"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
},
"releaseTag": "Public",
"isProtected": false,
"overloadIndex": 1,
"parameters": [],
"isOptional": false,
"isAbstract": false,
"name": "getSelectionRotatedScreenBounds"
},
{
"kind": "Method",
"canonicalReference": "@tldraw/editor!Editor#getSelectionRotation:member(1)",
@ -13779,6 +13815,72 @@
"isAbstract": false,
"name": "getStateDescendant"
},
{
"kind": "Method",
"canonicalReference": "@tldraw/editor!Editor#getStyleForNextShape:member(1)",
"docComment": "/**\n * Get the style for the next shape.\n *\n * @param style - The style to get.\n *\n * @example\n * ```ts\n * const color = editor.getStyleForNextShape(DefaultColorStyle)\n * ```\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "getStyleForNextShape<T>(style: "
},
{
"kind": "Reference",
"text": "StyleProp",
"canonicalReference": "@tldraw/tlschema!StyleProp:class"
},
{
"kind": "Content",
"text": "<T>"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "T"
},
{
"kind": "Content",
"text": ";"
}
],
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 0,
"endIndex": 0
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 4,
"endIndex": 5
},
"releaseTag": "Public",
"isProtected": false,
"overloadIndex": 1,
"parameters": [
{
"parameterName": "style",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
},
"isOptional": false
}
],
"isOptional": false,
"isAbstract": false,
"name": "getStyleForNextShape"
},
{
"kind": "Method",
"canonicalReference": "@tldraw/editor!Editor#getSvg:member(1)",
@ -20359,7 +20461,16 @@
},
{
"kind": "Content",
"text": "{\n children: any;\n}"
"text": "{\n children: "
},
{
"kind": "Reference",
"text": "ReactNode",
"canonicalReference": "@types/react!React.ReactNode:type"
},
{
"kind": "Content",
"text": ";\n}"
},
{
"kind": "Content",
@ -20381,8 +20492,8 @@
],
"fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx",
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 5
"startIndex": 5,
"endIndex": 7
},
"releaseTag": "Public",
"overloadIndex": 1,
@ -20391,7 +20502,7 @@
"parameterName": "{ children }",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
"endIndex": 4
},
"isOptional": false
}
@ -24615,7 +24726,16 @@
},
{
"kind": "Content",
"text": "{\n children: any;\n}"
"text": "{\n children: "
},
{
"kind": "Reference",
"text": "ReactNode",
"canonicalReference": "@types/react!React.ReactNode:type"
},
{
"kind": "Content",
"text": ";\n}"
},
{
"kind": "Content",
@ -24637,8 +24757,8 @@
],
"fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx",
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 5
"startIndex": 5,
"endIndex": 7
},
"releaseTag": "Public",
"overloadIndex": 1,
@ -24647,7 +24767,7 @@
"parameterName": "{ children }",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
"endIndex": 4
},
"isOptional": false
}
@ -36208,7 +36328,7 @@
{
"kind": "Interface",
"canonicalReference": "@tldraw/editor!TldrawEditorBaseProps:interface",
"docComment": "/**\n * Base props for the {@link @tldraw/tldraw#Tldraw} and {@link TldrawEditor} components.\n *\n * @public\n */\n",
"docComment": "/**\n * Base props for the {@link tldraw#Tldraw} and {@link TldrawEditor} components.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
@ -36257,8 +36377,9 @@
"text": "children?: "
},
{
"kind": "Content",
"text": "any"
"kind": "Reference",
"text": "ReactNode",
"canonicalReference": "@types/react!React.ReactNode:type"
},
{
"kind": "Content",
@ -36517,7 +36638,7 @@
{
"kind": "TypeAlias",
"canonicalReference": "@tldraw/editor!TldrawEditorProps:type",
"docComment": "/**\n * Props for the {@link @tldraw/tldraw#Tldraw} and {@link TldrawEditor} components.\n *\n * @public\n */\n",
"docComment": "/**\n * Props for the {@link tldraw#Tldraw} and {@link TldrawEditor} components.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
@ -38298,7 +38419,16 @@
},
{
"kind": "Content",
"text": "{\n children: any;\n}"
"text": "{\n children: "
},
{
"kind": "Reference",
"text": "ReactNode",
"canonicalReference": "@types/react!React.ReactNode:type"
},
{
"kind": "Content",
"text": ";\n}"
},
{
"kind": "Content",
@ -38310,7 +38440,7 @@
"name": "TLHandlesProps",
"typeTokenRange": {
"startIndex": 1,
"endIndex": 2
"endIndex": 4
}
},
{
@ -41650,6 +41780,33 @@
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@tldraw/editor!TLUserPreferences#isWrapMode:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "isWrapMode?: "
},
{
"kind": "Content",
"text": "boolean | null"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "isWrapMode",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@tldraw/editor!TLUserPreferences#locale:member",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -3,9 +3,8 @@ title: v2.0.0-alpha.12
description: Examples
author: tldraw
date: 5/9/2023
order: 11
order: 17
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-alpha.12)

View file

@ -3,7 +3,7 @@ title: v2.0.0-alpha.13
description: Examples
author: tldraw
date: 6/28/2023
order: 10
order: 16
status: published
---
@ -296,8 +296,6 @@ n/a
#### Select locked shapes on long press ([#1529](https://github.com/tldraw/tldraw/pull/1529))
#### highlighter fixes ([#1530](https://github.com/tldraw/tldraw/pull/1530))
[aq bug fixes]
@ -455,8 +453,8 @@ Highlighter pen is here! 🎉🎉🎉
#### Update docs links + guides + build ([#1422](https://github.com/tldraw/tldraw/pull/1422))
* [docs] Updated guides to get assets from the new `tldraw/tldraw` repo instead of the old `tldraw/tldraw-examples`.
* [docs] Updated an old CodeSandbox link to the new StackBlitz.
- [docs] Updated guides to get assets from the new `tldraw/tldraw` repo instead of the old `tldraw/tldraw-examples`.
- [docs] Updated an old CodeSandbox link to the new StackBlitz.
#### Create @tldraw/indices package ([#1426](https://github.com/tldraw/tldraw/pull/1426))

View file

@ -3,13 +3,12 @@ title: v2.0.0-alpha.14
description: Examples
author: tldraw
date: 7/4/2023
order: 9
order: 15
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-alpha.14)
#### Disable styles panel button on mobile when using the laser tool. ([#1704](https://github.com/tldraw/tldraw/pull/1704))
- Disable the styles panel button for laser tool on mobile.

View file

@ -3,13 +3,12 @@ title: v2.0.0-alpha.15
description: Examples
author: tldraw
date: 10/6/2023
order: 8
order: 14
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-alpha.15)
#### frame label fix ([#2016](https://github.com/tldraw/tldraw/pull/2016))
- Add a brief release note for your PR here.
@ -36,8 +35,14 @@ This pr add the custom defined shapes that's being passed to Tldraw
Before/After
<img width="300" src="https://github.com/tldraw/tldraw/assets/98838967/91ea55c8-0fcc-4f73-b61e-565829a5f25e" />
<img width="300" src="https://github.com/tldraw/tldraw/assets/98838967/ee4070fe-e236-4818-8fb4-43520210102b" />
<img
width="300"
src="https://github.com/tldraw/tldraw/assets/98838967/91ea55c8-0fcc-4f73-b61e-565829a5f25e"
/>
<img
width="300"
src="https://github.com/tldraw/tldraw/assets/98838967/ee4070fe-e236-4818-8fb4-43520210102b"
/>
#### [fix] pinch events ([#1979](https://github.com/tldraw/tldraw/pull/1979))
@ -49,8 +54,14 @@ Before/After
Before/After
<image width="350" src="https://github.com/tldraw/tldraw/assets/98838967/320171b4-61e0-4a41-b8d3-830bd90bea65" />
<image width="350" src="https://github.com/tldraw/tldraw/assets/98838967/b42d7156-0ce9-4894-9692-9338dc931b79" />
<image
width="350"
src="https://github.com/tldraw/tldraw/assets/98838967/320171b4-61e0-4a41-b8d3-830bd90bea65"
/>
<image
width="350"
src="https://github.com/tldraw/tldraw/assets/98838967/b42d7156-0ce9-4894-9692-9338dc931b79"
/>
#### Remove focus management ([#1953](https://github.com/tldraw/tldraw/pull/1953))
@ -71,8 +82,14 @@ Before/After
Before & After:
<image width="250" src="https://github.com/tldraw/tldraw/assets/98838967/e0ca7d54-506f-4014-b65a-6b61a98e3665" />
<image width="250" src="https://github.com/tldraw/tldraw/assets/98838967/90c9fa12-1bcb-430d-80c7-97e1faacea16" />
<image
width="250"
src="https://github.com/tldraw/tldraw/assets/98838967/e0ca7d54-506f-4014-b65a-6b61a98e3665"
/>
<image
width="250"
src="https://github.com/tldraw/tldraw/assets/98838967/90c9fa12-1bcb-430d-80c7-97e1faacea16"
/>
#### Allow right clicking selection backgrounds ([#1968](https://github.com/tldraw/tldraw/pull/1968))
@ -88,7 +105,7 @@ Before & After:
#### Lokalise: Translations update ([#1964](https://github.com/tldraw/tldraw/pull/1964))
* Updated community translations for German and Galician
- Updated community translations for German and Galician
#### [improvement] improve arrows (for real) ([#1957](https://github.com/tldraw/tldraw/pull/1957))
@ -450,10 +467,12 @@ Removed a feature to reset the viewport back to a shape that is being edited.
- `@tldraw/editor`, `@tldraw/store`, `@tldraw/tldraw`, `@tldraw/tlschema`
- Migrate snapshot [#1843](https://github.com/tldraw/tldraw/pull/1843) ([@steveruizok](https://github.com/steveruizok))
- `@tldraw/tldraw`
- export asset stuff [#1829](https://github.com/tldraw/tldraw/pull/1829) ([@steveruizok](https://github.com/steveruizok))
- export asset stuff [#1829](https://github.com/tldraw/tldraw/pull/1829) ([@steveruizok](https://github.com/steveruizok)
)
- [feature] Asset props [#1824](https://github.com/tldraw/tldraw/pull/1824) ([@steveruizok](https://github.com/steveruizok))
- [feature] unlock all action [#1820](https://github.com/tldraw/tldraw/pull/1820) ([@steveruizok](https://github.com/steveruizok))
- export `UiEventsProvider` [#1774](https://github.com/tldraw/tldraw/pull/1774) ([@steveruizok](https://github.com/steveruizok))
- export `UiEventsProvider` [#1774](https://github.com/tldraw/tldraw/pull/1774) ([@steveruizok](https://github.com/steveruizok)
)
- `@tldraw/editor`
- Add className as prop to Canvas [#1827](https://github.com/tldraw/tldraw/pull/1827) ([@steveruizok](https://github.com/steveruizok))
- refactor `parentsToChildrenWithIndexes` [#1764](https://github.com/tldraw/tldraw/pull/1764) ([@steveruizok](https://github.com/steveruizok))

View file

@ -3,13 +3,12 @@ title: v2.0.0-alpha.16
description: Examples
author: tldraw
date: 10/11/2023
order: 7
order: 13
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-alpha.16)
#### Fix shape opacity when erasing ([#2055](https://github.com/tldraw/tldraw/pull/2055))
- Fixes opacity of shapes while erasing in a group or frame.
@ -24,9 +23,15 @@ status: published
Before/after:
<image width="250" src="https://github.com/tldraw/tldraw/assets/98838967/763a93eb-ffaa-405c-9255-e68ba88ed9a2" />
<image
width="250"
src="https://github.com/tldraw/tldraw/assets/98838967/763a93eb-ffaa-405c-9255-e68ba88ed9a2"
/>
<image width="250" src="https://github.com/tldraw/tldraw/assets/98838967/dc9d3f77-c1c5-40f2-a9fe-10c723b6a21c" />
<image
width="250"
src="https://github.com/tldraw/tldraw/assets/98838967/dc9d3f77-c1c5-40f2-a9fe-10c723b6a21c"
/>
#### fix: proper label for opacity tooltip on hover ([#2044](https://github.com/tldraw/tldraw/pull/2044))

View file

@ -3,13 +3,12 @@ title: v2.0.0-alpha.17
description: Examples
author: tldraw
date: 10/17/2023
order: 6
order: 12
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-alpha.17)
#### Firefox, Touch: Fix not being able to open style dropdowns ([#2092](https://github.com/tldraw/tldraw/pull/2092))
- Firefox Mobile: Fixed a bug where you couldn't open some style dropdown options.
@ -49,8 +48,8 @@ status: published
#### [fix] locked shape of opacity problem with eraser.pointing ([#2073](https://github.com/tldraw/tldraw/pull/2073))
- locked shape of opacity problem with eraser.pointing
Before/after:
![A](https://github.com/tldraw/tldraw/assets/59823089/7483506c-72ac-45cc-93aa-f2a794ea8ff0) ![B](https://github.com/tldraw/tldraw/assets/59823089/ef0f988c-83f5-46a2-b891-0a391bca2f87)
Before/after:
![A](https://github.com/tldraw/tldraw/assets/59823089/7483506c-72ac-45cc-93aa-f2a794ea8ff0) ![B](https://github.com/tldraw/tldraw/assets/59823089/ef0f988c-83f5-46a2-b891-0a391bca2f87)
---

View file

@ -3,13 +3,12 @@ title: v2.0.0-alpha.18
description: Examples
author: tldraw
date: 11/10/2023
order: 5
order: 11
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-alpha.18)
#### Fix an error when using context menu. ([#2186](https://github.com/tldraw/tldraw/pull/2186))
- Fixes the console error when opening the context menu for the first time.

View file

@ -3,13 +3,12 @@ title: v2.0.0-alpha.19
description: Examples
author: tldraw
date: 12/12/2023
order: 4
order: 10
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-alpha.19)
#### zoom to affected shapes after undo/redo ([#2293](https://github.com/tldraw/tldraw/pull/2293))
- Make sure affected shapes are visible after undo/redo

View file

@ -3,13 +3,12 @@ title: v2.0.0-beta.1
description: Examples
author: tldraw
date: 12/20/2023
order: 3
order: 9
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-beta.1)
#### add speech bubble example ([#2362](https://github.com/tldraw/tldraw/pull/2362))
- Add an example for making a custom shape with handles, this one is a speech bubble with a movable tail.

View file

@ -3,13 +3,12 @@ title: v2.0.0-beta.2
description: Examples
author: tldraw
date: 1/10/2024
order: 2
order: 8
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-beta.2)
#### Fix validation when pasting images. ([#2436](https://github.com/tldraw/tldraw/pull/2436))
- Fixes url validations.

View file

@ -3,13 +3,12 @@ title: v2.0.0-beta.3
description: Examples
author: tldraw
date: 2/13/2024
order: 1
order: 7
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-beta.3)
#### Fix camera. ([#2818](https://github.com/tldraw/tldraw/pull/2818))
- Fixes an issue with the camera and zooming.

View file

@ -3,13 +3,12 @@ title: v2.0.0-beta.4
description: Examples
author: tldraw
date: 2/21/2024
order: 0
order: 6
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-beta.4)
#### menu fixes: add company links in general; add tracking to lang menu ([#2902](https://github.com/tldraw/tldraw/pull/2902))
- Add company menu links back in and make sure the Language menu is updated on change.

View file

@ -0,0 +1,264 @@
---
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))

View file

@ -0,0 +1,30 @@
---
title: v2.0.0-beta.6
description: Examples
author: tldraw
date: 2/29/2024
order: 3
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-beta.6)
#### fix setAllVersions ([#3009](https://github.com/tldraw/tldraw/pull/3009))
- Add a brief release note for your PR here.
#### Fix publishing scripts ([#3008](https://github.com/tldraw/tldraw/pull/3008))
- Add a brief release note for your PR here.
---
#### 🏠 Internal
- fix setAllVersions [#3009](https://github.com/tldraw/tldraw/pull/3009) ([@ds300](https://github.com/ds300))
- `@tldraw/editor`, `tldraw`
- Fix publishing scripts [#3008](https://github.com/tldraw/tldraw/pull/3008) ([@ds300](https://github.com/ds300))
#### Authors: 1
- David Sheldrick ([@ds300](https://github.com/ds300))

View file

@ -0,0 +1,25 @@
---
title: v2.0.0-beta.7
description: Examples
author: tldraw
date: 2/29/2024
order: 2
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-beta.7)
#### Fix publish script one more time ([#3010](https://github.com/tldraw/tldraw/pull/3010))
- Add a brief release note for your PR here.
---
#### 🏠 Internal
- `@tldraw/editor`, `tldraw`
- Fix publish script one more time [#3010](https://github.com/tldraw/tldraw/pull/3010) ([@ds300](https://github.com/ds300))
#### Authors: 1
- David Sheldrick ([@ds300](https://github.com/ds300))

View file

@ -0,0 +1,19 @@
---
title: v2.0.0-beta.8
description: Examples
author: tldraw
date: 2/29/2024
order: 1
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-beta.8)
#### ⚠️ Pushed to `main`
- `@tldraw/editor`, `tldraw`
- use glob to pick up version files? ([@ds300](https://github.com/ds300))
#### Authors: 1
- David Sheldrick ([@ds300](https://github.com/ds300))

View file

@ -0,0 +1,20 @@
---
title: v2.0.0-beta.9
description: Examples
author: tldraw
date: 2/29/2024
order: 0
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0-beta.9)
#### ⚠️ Pushed to `main`
- allow changes ([@ds300](https://github.com/ds300))
- `@tldraw/editor`, `tldraw`
- fix refresh-assets cache inputs ([@ds300](https://github.com/ds300))
#### Authors: 1
- David Sheldrick ([@ds300](https://github.com/ds300))

View file

@ -0,0 +1,24 @@
---
title: v2.0.0
description: Examples
author: tldraw
date: 2/29/2024
order: 5
status: published
---
[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0)
#### ⚠️ Pushed to `main`
- `@tldraw/tldraw`, `tldraw`
- updatereadmes ([@steveruizok](https://github.com/steveruizok))
#### 📝 Documentation
- `@tldraw/tldraw`
- Update readmes / docs for 2.0 [#3011](https://github.com/tldraw/tldraw/pull/3011) ([@steveruizok](https://github.com/steveruizok))
#### Authors: 1
- Steve Ruiz ([@steveruizok](https://github.com/steveruizok))

View file

@ -99,7 +99,7 @@
},
{
"id": "tldraw",
"title": "@tldraw/tldraw",
"title": "tldraw",
"description": "",
"groups": [
{

View file

@ -43,8 +43,7 @@ export async function createApiMarkdown() {
packageModels.push(apiModel)
}
await Promise.allSettled(
packageModels.map(async (packageModel) => {
for (const packageModel of packageModels) {
const categoryName = packageModel.name.replace(`@tldraw/`, '')
if (!addedCategories.has(categoryName)) {
@ -71,8 +70,7 @@ export async function createApiMarkdown() {
nicelog(`${outputFileName}`)
fs.writeFileSync(path.join(OUTPUT_DIR, outputFileName), result.markdown)
}
})
)
}
// Add the API section to the sections.json file

View file

@ -4,7 +4,7 @@ import path from 'path'
import { TLDRAW_PACKAGES_TO_INCLUDE_IN_DOCS } from './package-list'
const octokit = new Octokit({
auth: process.env.GITHUB_ACCESS_TOKEN,
auth: process.env.ACCESS_TOKEN,
})
const { log: nicelog } = console

View file

@ -3,7 +3,7 @@ import { Octokit } from 'octokit'
import path from 'path'
const octokit = new Octokit({
auth: process.env.GITHUB_ACCESS_TOKEN,
auth: process.env.ACCESS_TOKEN,
})
const { log: nicelog } = console

View file

@ -1,17 +1,18 @@
import { getVectorDb } from '@/utils/ContentVectorDatabase'
import { nicelog } from '@/utils/nicelog'
;(async function () {
nicelog('• Refreshing vector db content...')
nicelog('✔ Skipping vector db content!')
const db = await getVectorDb({
rebuildIndex: false,
updateContent: true,
})
// nicelog('• Refreshing vector db content...')
const results = await db.query('editor')
// const db = await getVectorDb({
// rebuildIndex: false,
// updateContent: true,
// })
nicelog(results)
// const results = await db.query('editor')
nicelog('✔ Complete!')
// nicelog(results)
// nicelog('✔ Complete!')
process.exit()
})()

View file

@ -87,13 +87,18 @@ export async function formatWithPrettier(
throw new Error(`Unknown language: ${languageTag}`)
}
const prettierConfig = await prettierConfigPromise
const formattedCode = await prettier.format(code, {
let formattedCode = code
try {
formattedCode = await prettier.format(code, {
...prettierConfig,
parser: language,
printWidth,
tabWidth: 2,
useTabs: false,
})
} catch (e) {
console.warn(`☢️ Could not format code: ${code}`)
}
return formattedCode.trimEnd()
}
@ -166,7 +171,8 @@ export class MarkdownWriter {
)
if (refResult.errorMessage) {
throw new Error(refResult.errorMessage)
console.warn(`☢️ Error processing API: ${refResult.errorMessage}`)
return
}
const linkedItem = refResult.resolvedApiItem!
const path = getPath(linkedItem)

View file

@ -15704,7 +15704,7 @@
{
"kind": "Variable",
"canonicalReference": "tldraw!TldrawImage:var",
"docComment": "/**\n * A renderered SVG image of a Tldraw snapshot.\n *\n * @example\n * ```tsx\n * <TldrawImage snapshot={snapshot} />\n * \tsnapshot={snapshot}\n * \tpageId={pageId}\n * \tbackground={false}\n * darkMode={true}\n * bounds={new Box(0,0,600,400)}\n * scale={1}\n * />\n * ```\n *\n * @public\n */\n",
"docComment": "/**\n * A renderered SVG image of a Tldraw snapshot.\n *\n * @example\n * ```tsx\n * <TldrawImage\n * \tsnapshot={snapshot}\n * \tpageId={pageId}\n * \tbackground={false}\n * darkMode={true}\n * bounds={new Box(0,0,600,400)}\n * scale={1}\n * />\n * ```\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
@ -19142,7 +19142,7 @@
{
"kind": "TypeAlias",
"canonicalReference": "tldraw!TldrawUiProps:type",
"docComment": "/**\n * Props for the {@link @tldraw/tldraw#Tldraw} and {@link TldrawUi} components.\n *\n * @public\n */\n",
"docComment": "/**\n * Props for the {@link tldraw#Tldraw} and {@link TldrawUi} components.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",

View file

@ -51,7 +51,7 @@ export type TldrawImageProps = Expand<
*
* @example
* ```tsx
* <TldrawImage snapshot={snapshot} />
* <TldrawImage
* snapshot={snapshot}
* pageId={pageId}
* background={false}

View file

@ -54,7 +54,7 @@ export interface TldrawUiBaseProps {
}
/**
* Props for the {@link @tldraw/tldraw#Tldraw} and {@link TldrawUi} components.
* Props for the {@link tldraw#Tldraw} and {@link TldrawUi} components.
*
* @public
*/