@tldraw/editor 3.9.0-internal.7f0e15f4f7d9 → 3.10.0-canary.d4dfa96478a4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +90 -0
- package/README.md +1 -1
- package/dist-cjs/index.d.ts +41 -229
- package/dist-cjs/index.js +1 -9
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/TldrawEditor.js +6 -33
- package/dist-cjs/lib/TldrawEditor.js.map +2 -2
- package/dist-cjs/lib/components/LiveCollaborators.js +5 -0
- package/dist-cjs/lib/components/LiveCollaborators.js.map +2 -2
- package/dist-cjs/lib/components/Shape.js +0 -7
- package/dist-cjs/lib/components/Shape.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultBrush.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultCollaboratorHint.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultCursor.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultErrorFallback.js +1 -1
- package/dist-cjs/lib/components/default-components/DefaultErrorFallback.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultScribble.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultShapeIndicator.js.map +2 -2
- package/dist-cjs/lib/editor/Editor.js +435 -308
- package/dist-cjs/lib/editor/Editor.js.map +3 -3
- package/dist-cjs/lib/editor/managers/TextManager.js +17 -23
- package/dist-cjs/lib/editor/managers/TextManager.js.map +2 -2
- package/dist-cjs/lib/editor/shapes/ShapeUtil.js +7 -13
- package/dist-cjs/lib/editor/shapes/ShapeUtil.js.map +2 -2
- package/dist-cjs/lib/editor/types/emit-types.js.map +1 -1
- package/dist-cjs/lib/editor/types/external-content.js.map +1 -1
- package/dist-cjs/lib/exports/FontEmbedder.js +2 -7
- package/dist-cjs/lib/exports/FontEmbedder.js.map +2 -2
- package/dist-cjs/lib/exports/StyleEmbedder.js +1 -1
- package/dist-cjs/lib/exports/StyleEmbedder.js.map +2 -2
- package/dist-cjs/lib/exports/exportToSvg.js +2 -3
- package/dist-cjs/lib/exports/exportToSvg.js.map +2 -2
- package/dist-cjs/lib/exports/getSvgJsx.js +1 -18
- package/dist-cjs/lib/exports/getSvgJsx.js.map +2 -2
- package/dist-cjs/lib/exports/parseCss.js +0 -1
- package/dist-cjs/lib/exports/parseCss.js.map +2 -2
- package/dist-cjs/lib/hooks/useCanvasEvents.js +2 -2
- package/dist-cjs/lib/hooks/useCanvasEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.js +1 -1
- package/dist-cjs/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/usePassThroughWheelEvents.js.map +2 -2
- package/dist-cjs/lib/options.js +1 -2
- package/dist-cjs/lib/options.js.map +2 -2
- package/dist-cjs/lib/utils/dom.js +1 -1
- package/dist-cjs/lib/utils/dom.js.map +2 -2
- package/dist-cjs/version.js +3 -3
- package/dist-cjs/version.js.map +1 -1
- package/dist-esm/index.d.mts +41 -229
- package/dist-esm/index.mjs +1 -13
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/TldrawEditor.mjs +7 -34
- package/dist-esm/lib/TldrawEditor.mjs.map +2 -2
- package/dist-esm/lib/components/LiveCollaborators.mjs +5 -0
- package/dist-esm/lib/components/LiveCollaborators.mjs.map +2 -2
- package/dist-esm/lib/components/Shape.mjs +1 -8
- package/dist-esm/lib/components/Shape.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultBrush.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultCollaboratorHint.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultCursor.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultErrorFallback.mjs +1 -1
- package/dist-esm/lib/components/default-components/DefaultErrorFallback.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultScribble.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultShapeIndicator.mjs.map +2 -2
- package/dist-esm/lib/editor/Editor.mjs +432 -312
- package/dist-esm/lib/editor/Editor.mjs.map +3 -3
- package/dist-esm/lib/editor/managers/TextManager.mjs +17 -23
- package/dist-esm/lib/editor/managers/TextManager.mjs.map +2 -2
- package/dist-esm/lib/editor/shapes/ShapeUtil.mjs +7 -13
- package/dist-esm/lib/editor/shapes/ShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/exports/FontEmbedder.mjs +2 -7
- package/dist-esm/lib/exports/FontEmbedder.mjs.map +2 -2
- package/dist-esm/lib/exports/StyleEmbedder.mjs +1 -1
- package/dist-esm/lib/exports/StyleEmbedder.mjs.map +2 -2
- package/dist-esm/lib/exports/exportToSvg.mjs +2 -3
- package/dist-esm/lib/exports/exportToSvg.mjs.map +2 -2
- package/dist-esm/lib/exports/getSvgJsx.mjs +2 -19
- package/dist-esm/lib/exports/getSvgJsx.mjs.map +2 -2
- package/dist-esm/lib/exports/parseCss.mjs +0 -1
- package/dist-esm/lib/exports/parseCss.mjs.map +2 -2
- package/dist-esm/lib/hooks/useCanvasEvents.mjs +2 -2
- package/dist-esm/lib/hooks/useCanvasEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.mjs +1 -1
- package/dist-esm/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/usePassThroughWheelEvents.mjs.map +2 -2
- package/dist-esm/lib/options.mjs +1 -2
- package/dist-esm/lib/options.mjs.map +2 -2
- package/dist-esm/lib/utils/dom.mjs +1 -1
- package/dist-esm/lib/utils/dom.mjs.map +2 -2
- package/dist-esm/version.mjs +3 -3
- package/dist-esm/version.mjs.map +1 -1
- package/editor.css +13 -127
- package/package.json +7 -10
- package/src/index.ts +2 -15
- package/src/lib/TldrawEditor.tsx +4 -52
- package/src/lib/components/LiveCollaborators.tsx +5 -0
- package/src/lib/components/Shape.tsx +1 -9
- package/src/lib/components/default-components/DefaultBrush.tsx +1 -0
- package/src/lib/components/default-components/DefaultCollaboratorHint.tsx +1 -0
- package/src/lib/components/default-components/DefaultCursor.tsx +1 -0
- package/src/lib/components/default-components/DefaultErrorFallback.tsx +5 -3
- package/src/lib/components/default-components/DefaultScribble.tsx +1 -0
- package/src/lib/components/default-components/DefaultShapeIndicator.tsx +1 -0
- package/src/lib/editor/Editor.ts +561 -362
- package/src/lib/editor/managers/TextManager.ts +17 -42
- package/src/lib/editor/shapes/ShapeUtil.ts +32 -18
- package/src/lib/editor/types/emit-types.ts +0 -1
- package/src/lib/editor/types/external-content.ts +0 -1
- package/src/lib/exports/FontEmbedder.ts +1 -13
- package/src/lib/exports/StyleEmbedder.ts +1 -1
- package/src/lib/exports/exportToSvg.tsx +3 -4
- package/src/lib/exports/getSvgJsx.tsx +3 -22
- package/src/lib/exports/parseCss.ts +0 -1
- package/src/lib/hooks/useCanvasEvents.ts +1 -2
- package/src/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.ts +0 -1
- package/src/lib/hooks/usePassThroughWheelEvents.ts +1 -0
- package/src/lib/options.ts +0 -7
- package/src/lib/utils/dom.ts +1 -1
- package/src/version.ts +3 -3
- package/dist-cjs/lib/editor/managers/FontManager.js +0 -167
- package/dist-cjs/lib/editor/managers/FontManager.js.map +0 -7
- package/dist-cjs/lib/hooks/usePassThroughMouseOverEvents.js +0 -48
- package/dist-cjs/lib/hooks/usePassThroughMouseOverEvents.js.map +0 -7
- package/dist-cjs/lib/hooks/useViewportHeight.js +0 -56
- package/dist-cjs/lib/hooks/useViewportHeight.js.map +0 -7
- package/dist-cjs/lib/utils/richText.js +0 -46
- package/dist-cjs/lib/utils/richText.js.map +0 -7
- package/dist-esm/lib/editor/managers/FontManager.mjs +0 -153
- package/dist-esm/lib/editor/managers/FontManager.mjs.map +0 -7
- package/dist-esm/lib/hooks/usePassThroughMouseOverEvents.mjs +0 -28
- package/dist-esm/lib/hooks/usePassThroughMouseOverEvents.mjs.map +0 -7
- package/dist-esm/lib/hooks/useViewportHeight.mjs +0 -36
- package/dist-esm/lib/hooks/useViewportHeight.mjs.map +0 -7
- package/dist-esm/lib/utils/richText.mjs +0 -26
- package/dist-esm/lib/utils/richText.mjs.map +0 -7
- package/src/lib/editor/managers/FontManager.ts +0 -252
- package/src/lib/hooks/usePassThroughMouseOverEvents.ts +0 -29
- package/src/lib/hooks/useViewportHeight.ts +0 -37
- package/src/lib/utils/richText.ts +0 -72
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,93 @@
|
|
|
1
|
+
# v3.9.0 (Mon Mar 03 2025)
|
|
2
|
+
|
|
3
|
+
### Release Notes
|
|
4
|
+
|
|
5
|
+
#### Fix issue with duplicating bound arrows. ([#5495](https://github.com/tldraw/tldraw/pull/5495))
|
|
6
|
+
|
|
7
|
+
- Fix a bug with duplicating bound arrows.
|
|
8
|
+
|
|
9
|
+
#### Add `AtomMap` & refactor store ([#5496](https://github.com/tldraw/tldraw/pull/5496))
|
|
10
|
+
|
|
11
|
+
- **BREAKING**. `store.createSelectedComputedCache` has been removed. Use `store.createCache` and create your own selector `computed` instead.
|
|
12
|
+
- **BREAKING**. `createComputerCache` no longer accepts a single `isEqual` fn as its 3rd argument. Instead, pass in an options object, with the `isEqual` fn named `areRecordsEqual`. You can now pass `areResultsEqual`, too.
|
|
13
|
+
|
|
14
|
+
#### [botcom] Fix slow export menu in big files ([#5435](https://github.com/tldraw/tldraw/pull/5435))
|
|
15
|
+
|
|
16
|
+
- Fixed a bug with export menu performance.
|
|
17
|
+
|
|
18
|
+
#### Improve / fix layout methods: alignment, distribute, flip, stack. ([#5479](https://github.com/tldraw/tldraw/pull/5479))
|
|
19
|
+
|
|
20
|
+
- Fixes several bugs when aligning / flipping / distributing / stretching / stacking a selection that included with arrows.
|
|
21
|
+
- Fixed a bug with distribution with overlapping shapes
|
|
22
|
+
- Fixed a bug with distribution that could lead to changed selection.
|
|
23
|
+
- Fixed a bug preventing rotated shapes from being stretched.
|
|
24
|
+
|
|
25
|
+
#### Fix text padding, add context to shape geometry ([#5487](https://github.com/tldraw/tldraw/pull/5487))
|
|
26
|
+
|
|
27
|
+
- Improved horizontal padding for arrows bound to text shapes
|
|
28
|
+
|
|
29
|
+
#### Remove canvas size dependency ([#5488](https://github.com/tldraw/tldraw/pull/5488))
|
|
30
|
+
|
|
31
|
+
- API: removes canvas-size dependency.
|
|
32
|
+
|
|
33
|
+
#### fix svg image export mime type ([#5427](https://github.com/tldraw/tldraw/pull/5427))
|
|
34
|
+
|
|
35
|
+
- Fix `<TldrawImage />` not rendering correctly with `format=svg`
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
#### 🐛 Bug Fix
|
|
40
|
+
|
|
41
|
+
- Update discord links [#5500](https://github.com/tldraw/tldraw/pull/5500) ([@SomeHats](https://github.com/SomeHats) [@huppy-bot[bot]](https://github.com/huppy-bot[bot]) [@steveruizok](https://github.com/steveruizok) [@TodePond](https://github.com/TodePond))
|
|
42
|
+
- Consider `https://localhost` to be development [#5471](https://github.com/tldraw/tldraw/pull/5471) ([@jamesbvaughan](https://github.com/jamesbvaughan) [@steveruizok](https://github.com/steveruizok))
|
|
43
|
+
|
|
44
|
+
#### 🐛 Bug Fixes
|
|
45
|
+
|
|
46
|
+
- Fix issue with duplicating bound arrows. [#5495](https://github.com/tldraw/tldraw/pull/5495) ([@MitjaBezensek](https://github.com/MitjaBezensek))
|
|
47
|
+
- [botcom] Fix slow export menu in big files [#5435](https://github.com/tldraw/tldraw/pull/5435) ([@steveruizok](https://github.com/steveruizok))
|
|
48
|
+
- Improve / fix layout methods: alignment, distribute, flip, stack. [#5479](https://github.com/tldraw/tldraw/pull/5479) ([@steveruizok](https://github.com/steveruizok))
|
|
49
|
+
- fix svg image export mime type [#5427](https://github.com/tldraw/tldraw/pull/5427) ([@SomeHats](https://github.com/SomeHats))
|
|
50
|
+
|
|
51
|
+
#### 💄 Product Improvements
|
|
52
|
+
|
|
53
|
+
- Fix text padding, add context to shape geometry [#5487](https://github.com/tldraw/tldraw/pull/5487) ([@steveruizok](https://github.com/steveruizok))
|
|
54
|
+
- Remove canvas size dependency [#5488](https://github.com/tldraw/tldraw/pull/5488) ([@steveruizok](https://github.com/steveruizok))
|
|
55
|
+
|
|
56
|
+
#### 🛠️ API Changes
|
|
57
|
+
|
|
58
|
+
- Add `AtomMap` & refactor store [#5496](https://github.com/tldraw/tldraw/pull/5496) ([@SomeHats](https://github.com/SomeHats))
|
|
59
|
+
|
|
60
|
+
#### Authors: 6
|
|
61
|
+
|
|
62
|
+
- [@huppy-bot[bot]](https://github.com/huppy-bot[bot])
|
|
63
|
+
- alex ([@SomeHats](https://github.com/SomeHats))
|
|
64
|
+
- James Vaughan ([@jamesbvaughan](https://github.com/jamesbvaughan))
|
|
65
|
+
- Lu Wilson ([@TodePond](https://github.com/TodePond))
|
|
66
|
+
- Mitja Bezenšek ([@MitjaBezensek](https://github.com/MitjaBezensek))
|
|
67
|
+
- Steve Ruiz ([@steveruizok](https://github.com/steveruizok))
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
# v3.8.1 (Thu Feb 13 2025)
|
|
72
|
+
|
|
73
|
+
### Release Notes
|
|
74
|
+
|
|
75
|
+
#### 3.8.1 ([#5429](https://github.com/tldraw/tldraw/pull/5429))
|
|
76
|
+
|
|
77
|
+
- Fix `TldrawImage` not working with `format=png`
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
#### 🐛 Bug Fix
|
|
82
|
+
|
|
83
|
+
- 3.8.1 [#5429](https://github.com/tldraw/tldraw/pull/5429) ([@SomeHats](https://github.com/SomeHats))
|
|
84
|
+
|
|
85
|
+
#### Authors: 1
|
|
86
|
+
|
|
87
|
+
- alex ([@SomeHats](https://github.com/SomeHats))
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
1
91
|
# v3.8.0 (Wed Feb 12 2025)
|
|
2
92
|
|
|
3
93
|
### Release Notes
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Please see our [contributing guide](https://github.com/tldraw/tldraw/blob/main/C
|
|
|
24
24
|
|
|
25
25
|
## Community
|
|
26
26
|
|
|
27
|
-
Have questions, comments or feedback? [Join our discord](https://discord.
|
|
27
|
+
Have questions, comments or feedback? [Join our discord](https://discord.tldraw.com/?utm_source=github&utm_medium=social&utm_campaign=sociallink). For the latest news and release notes, visit [tldraw.dev](https://tldraw.dev).
|
|
28
28
|
|
|
29
29
|
## Contact
|
|
30
30
|
|
package/dist-cjs/index.d.ts
CHANGED
|
@@ -7,8 +7,6 @@ import { ComponentType } from 'react';
|
|
|
7
7
|
import { Computed } from '@tldraw/state';
|
|
8
8
|
import { computed } from '@tldraw/state';
|
|
9
9
|
import { Dispatch } from 'react';
|
|
10
|
-
import { Editor as Editor_2 } from '@tiptap/core';
|
|
11
|
-
import { EditorProviderProps } from '@tiptap/react';
|
|
12
10
|
import { EffectScheduler } from '@tldraw/state';
|
|
13
11
|
import { EMPTY_ARRAY } from '@tldraw/state';
|
|
14
12
|
import EventEmitter from 'eventemitter3';
|
|
@@ -20,7 +18,6 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
|
20
18
|
import { LegacyMigrations } from '@tldraw/store';
|
|
21
19
|
import { MigrationSequence } from '@tldraw/store';
|
|
22
20
|
import { NamedExoticComponent } from 'react';
|
|
23
|
-
import { Node as Node_2 } from '@tiptap/pm/model';
|
|
24
21
|
import { PerformanceTracker } from '@tldraw/utils';
|
|
25
22
|
import { PointerEventHandler } from 'react';
|
|
26
23
|
import { react } from '@tldraw/state';
|
|
@@ -69,7 +66,6 @@ import { TLPageId } from '@tldraw/tlschema';
|
|
|
69
66
|
import { TLParentId } from '@tldraw/tlschema';
|
|
70
67
|
import { TLPropsMigrations } from '@tldraw/tlschema';
|
|
71
68
|
import { TLRecord } from '@tldraw/tlschema';
|
|
72
|
-
import { TLRichText } from '@tldraw/tlschema';
|
|
73
69
|
import { TLScribble } from '@tldraw/tlschema';
|
|
74
70
|
import { TLShape } from '@tldraw/tlschema';
|
|
75
71
|
import { TLShapeCrop } from '@tldraw/tlschema';
|
|
@@ -888,7 +884,6 @@ export declare const defaultTldrawOptions: {
|
|
|
888
884
|
readonly longPressDurationMs: 500;
|
|
889
885
|
readonly maxExportDelayMs: 5000;
|
|
890
886
|
readonly maxFilesAtOnce: 100;
|
|
891
|
-
readonly maxFontsToLoadBeforeRender: number;
|
|
892
887
|
readonly maxPages: 40;
|
|
893
888
|
readonly maxShapesPerPage: 4000;
|
|
894
889
|
readonly multiClickDurationMs: 200;
|
|
@@ -984,7 +979,7 @@ export declare class EdgeScrollManager {
|
|
|
984
979
|
|
|
985
980
|
/** @public */
|
|
986
981
|
export declare class Editor extends EventEmitter<TLEventMap> {
|
|
987
|
-
constructor({ store, user, shapeUtils, bindingUtils, tools, getContainer, cameraOptions,
|
|
982
|
+
constructor({ store, user, shapeUtils, bindingUtils, tools, getContainer, cameraOptions, initialState, autoFocus, inferDarkMode, options, isShapeHidden, }: TLEditorOptions);
|
|
988
983
|
private readonly _isShapeHiddenPredicate?;
|
|
989
984
|
private getIsShapeHiddenCache;
|
|
990
985
|
isShapeHidden(shapeOrId: TLShape | TLShapeId): boolean;
|
|
@@ -1045,12 +1040,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1045
1040
|
* @public
|
|
1046
1041
|
*/
|
|
1047
1042
|
readonly textMeasure: TextManager;
|
|
1048
|
-
/**
|
|
1049
|
-
* A utility for managing the set of fonts that should be rendered in the document.
|
|
1050
|
-
*
|
|
1051
|
-
* @public
|
|
1052
|
-
*/
|
|
1053
|
-
readonly fonts: FontManager;
|
|
1054
1043
|
/**
|
|
1055
1044
|
* A manager for the editor's environment.
|
|
1056
1045
|
*
|
|
@@ -1690,26 +1679,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1690
1679
|
* @public
|
|
1691
1680
|
*/
|
|
1692
1681
|
setEditingShape(shape: null | TLShape | TLShapeId): this;
|
|
1693
|
-
private _currentRichTextEditor;
|
|
1694
|
-
/**
|
|
1695
|
-
* The current editing shape's text editor.
|
|
1696
|
-
*
|
|
1697
|
-
* @public
|
|
1698
|
-
*/
|
|
1699
|
-
getRichTextEditor(): null | TiptapEditor;
|
|
1700
|
-
/**
|
|
1701
|
-
* Set the current editing shape's rich text editor.
|
|
1702
|
-
*
|
|
1703
|
-
* @example
|
|
1704
|
-
* ```ts
|
|
1705
|
-
* editor.setRichTextEditor(richTextEditorView)
|
|
1706
|
-
* ```
|
|
1707
|
-
*
|
|
1708
|
-
* @param textEditor - The text editor to set as the current editing shape's text editor.
|
|
1709
|
-
*
|
|
1710
|
-
* @public
|
|
1711
|
-
*/
|
|
1712
|
-
setRichTextEditor(textEditor: null | TiptapEditor): this;
|
|
1713
1682
|
/**
|
|
1714
1683
|
* The current hovered shape id.
|
|
1715
1684
|
*
|
|
@@ -1810,17 +1779,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1810
1779
|
* @public
|
|
1811
1780
|
*/
|
|
1812
1781
|
setCroppingShape(shape: null | TLShape | TLShapeId): this;
|
|
1813
|
-
private _textOptions;
|
|
1814
|
-
/**
|
|
1815
|
-
* Get the current text options.
|
|
1816
|
-
*
|
|
1817
|
-
* @example
|
|
1818
|
-
* ```ts
|
|
1819
|
-
* editor.getTextOptions()
|
|
1820
|
-
* ```
|
|
1821
|
-
*
|
|
1822
|
-
* @public */
|
|
1823
|
-
getTextOptions(): TLTextOptions;
|
|
1824
1782
|
/* Excluded from this release type: _unsafe_getCameraId */
|
|
1825
1783
|
/**
|
|
1826
1784
|
* The current camera.
|
|
@@ -2418,7 +2376,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2418
2376
|
meta?: JsonObject;
|
|
2419
2377
|
src: string;
|
|
2420
2378
|
}>;
|
|
2421
|
-
private
|
|
2379
|
+
private _shapeGeometryCaches;
|
|
2422
2380
|
/**
|
|
2423
2381
|
* Get the geometry of a shape.
|
|
2424
2382
|
*
|
|
@@ -2426,13 +2384,15 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2426
2384
|
* ```ts
|
|
2427
2385
|
* editor.getShapeGeometry(myShape)
|
|
2428
2386
|
* editor.getShapeGeometry(myShapeId)
|
|
2387
|
+
* editor.getShapeGeometry(myShapeId, { context: "arrow" })
|
|
2429
2388
|
* ```
|
|
2430
2389
|
*
|
|
2431
2390
|
* @param shape - The shape (or shape id) to get the geometry for.
|
|
2391
|
+
* @param opts - Additional options about the request for geometry. Passed to {@link ShapeUtil.getGeometry}.
|
|
2432
2392
|
*
|
|
2433
2393
|
* @public
|
|
2434
2394
|
*/
|
|
2435
|
-
getShapeGeometry<T extends Geometry2d>(shape: TLShape | TLShapeId): T;
|
|
2395
|
+
getShapeGeometry<T extends Geometry2d>(shape: TLShape | TLShapeId, opts?: TLGeometryOpts): T;
|
|
2436
2396
|
/* Excluded from this release type: _getShapeHandlesCache */
|
|
2437
2397
|
/**
|
|
2438
2398
|
* Get the handles (if any) for a shape.
|
|
@@ -3100,6 +3060,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3100
3060
|
* @public
|
|
3101
3061
|
*/
|
|
3102
3062
|
bringToFront(shapes: TLShape[] | TLShapeId[]): this;
|
|
3063
|
+
/* Excluded from this release type: collectShapesViaArrowBindings */
|
|
3103
3064
|
/**
|
|
3104
3065
|
* Flip shape positions.
|
|
3105
3066
|
*
|
|
@@ -3225,7 +3186,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3225
3186
|
* @example
|
|
3226
3187
|
* ```ts
|
|
3227
3188
|
* editor.createShape(myShape)
|
|
3228
|
-
* editor.createShape({ id: 'box1', type: 'text', props: {
|
|
3189
|
+
* editor.createShape({ id: 'box1', type: 'text', props: { text: "ok" } })
|
|
3229
3190
|
* ```
|
|
3230
3191
|
*
|
|
3231
3192
|
* @param shape - The shape (or shape partial) to create.
|
|
@@ -3239,7 +3200,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3239
3200
|
* @example
|
|
3240
3201
|
* ```ts
|
|
3241
3202
|
* editor.createShapes([myShape])
|
|
3242
|
-
* editor.createShapes([{ id: 'box1', type: 'text', props: {
|
|
3203
|
+
* editor.createShapes([{ id: 'box1', type: 'text', props: { text: "ok" } }])
|
|
3243
3204
|
* ```
|
|
3244
3205
|
*
|
|
3245
3206
|
* @param shapes - The shapes (or shape partials) to create.
|
|
@@ -3998,27 +3959,6 @@ export declare const EVENT_NAME_MAP: Record<Exclude<TLEventName, TLPinchEventNam
|
|
|
3998
3959
|
|
|
3999
3960
|
/* Excluded from this release type: featureFlags */
|
|
4000
3961
|
|
|
4001
|
-
/** @public */
|
|
4002
|
-
export declare class FontManager {
|
|
4003
|
-
private readonly editor;
|
|
4004
|
-
private readonly assetUrls?;
|
|
4005
|
-
constructor(editor: Editor, assetUrls?: {
|
|
4006
|
-
[key: string]: string | undefined;
|
|
4007
|
-
} | undefined);
|
|
4008
|
-
private readonly shapeFontFacesCache;
|
|
4009
|
-
private readonly shapeFontLoadStateCache;
|
|
4010
|
-
getShapeFontFaces(shape: TLShape | TLShapeId): TLFontFace[];
|
|
4011
|
-
trackFontsForShape(shape: TLShape | TLShapeId): void;
|
|
4012
|
-
loadRequiredFontsForCurrentPage(limit?: number): Promise<void>;
|
|
4013
|
-
private readonly fontStates;
|
|
4014
|
-
private getFontState;
|
|
4015
|
-
ensureFontIsLoaded(font: TLFontFace): Promise<void>;
|
|
4016
|
-
private fontsToLoad;
|
|
4017
|
-
requestFonts(fonts: TLFontFace[]): void;
|
|
4018
|
-
private findOrCreateFontFace;
|
|
4019
|
-
toEmbeddedCssDeclaration(font: TLFontFace): Promise<string>;
|
|
4020
|
-
}
|
|
4021
|
-
|
|
4022
3962
|
/** @public */
|
|
4023
3963
|
export declare interface GapsSnapIndicator {
|
|
4024
3964
|
id: string;
|
|
@@ -4091,9 +4031,6 @@ export declare function getCursor(cursor: TLCursorType, rotation?: number, color
|
|
|
4091
4031
|
/** @public */
|
|
4092
4032
|
export declare function getDefaultCdnBaseUrl(): string;
|
|
4093
4033
|
|
|
4094
|
-
/** @public */
|
|
4095
|
-
export declare function getFontsFromRichText(editor: Editor, richText: TLRichText, initialState: RichTextFontVisitorState): TLFontFace[];
|
|
4096
|
-
|
|
4097
4034
|
/** @public */
|
|
4098
4035
|
export declare function getFreshUserPreferences(): TLUserPreferences;
|
|
4099
4036
|
|
|
@@ -4778,16 +4715,6 @@ export declare function resizeScaled(shape: TLBaseShape<any, {
|
|
|
4778
4715
|
y: number;
|
|
4779
4716
|
};
|
|
4780
4717
|
|
|
4781
|
-
/** @public */
|
|
4782
|
-
export declare type RichTextFontVisitor = (node: TiptapNode, state: RichTextFontVisitorState, addFont: (font: TLFontFace) => void) => RichTextFontVisitorState;
|
|
4783
|
-
|
|
4784
|
-
/** @public */
|
|
4785
|
-
export declare interface RichTextFontVisitorState {
|
|
4786
|
-
readonly family: string;
|
|
4787
|
-
readonly weight: string;
|
|
4788
|
-
readonly style: string;
|
|
4789
|
-
}
|
|
4790
|
-
|
|
4791
4718
|
/** @public */
|
|
4792
4719
|
export declare const ROTATE_CORNER_TO_SELECTION_CORNER: {
|
|
4793
4720
|
readonly bottom_left_rotate: "bottom_left";
|
|
@@ -4952,9 +4879,10 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
|
|
|
4952
4879
|
* Get the shape's geometry.
|
|
4953
4880
|
*
|
|
4954
4881
|
* @param shape - The shape.
|
|
4882
|
+
* @param opts - Additional options for the request.
|
|
4955
4883
|
* @public
|
|
4956
4884
|
*/
|
|
4957
|
-
abstract getGeometry(shape: Shape): Geometry2d;
|
|
4885
|
+
abstract getGeometry(shape: Shape, opts?: TLGeometryOpts): Geometry2d;
|
|
4958
4886
|
/**
|
|
4959
4887
|
* Get a JSX element for the shape (as an HTML element).
|
|
4960
4888
|
*
|
|
@@ -4969,17 +4897,10 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
|
|
|
4969
4897
|
* @public
|
|
4970
4898
|
*/
|
|
4971
4899
|
abstract indicator(shape: Shape): any;
|
|
4972
|
-
/**
|
|
4973
|
-
* Get the font faces that should be rendered in the document in order for this shape to render
|
|
4974
|
-
* correctly.
|
|
4975
|
-
*
|
|
4976
|
-
* @param shape - The shape.
|
|
4977
|
-
* @public
|
|
4978
|
-
*/
|
|
4979
|
-
getFontFaces(shape: Shape): TLFontFace[];
|
|
4980
4900
|
/**
|
|
4981
4901
|
* Whether the shape can be snapped to by another shape.
|
|
4982
4902
|
*
|
|
4903
|
+
* @param shape - The shape.
|
|
4983
4904
|
* @public
|
|
4984
4905
|
*/
|
|
4985
4906
|
canSnap(_shape: Shape): boolean;
|
|
@@ -4994,7 +4915,7 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
|
|
|
4994
4915
|
*
|
|
4995
4916
|
* @public
|
|
4996
4917
|
*/
|
|
4997
|
-
canBind(_opts: TLShapeUtilCanBindOpts
|
|
4918
|
+
canBind(_opts: TLShapeUtilCanBindOpts): boolean;
|
|
4998
4919
|
/**
|
|
4999
4920
|
* Whether the shape can be double clicked to edit.
|
|
5000
4921
|
*
|
|
@@ -5020,11 +4941,15 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
|
|
|
5020
4941
|
*/
|
|
5021
4942
|
canCrop(_shape: Shape): boolean;
|
|
5022
4943
|
/**
|
|
5023
|
-
* Whether the shape
|
|
4944
|
+
* Whether the shape can participate in layout functions such as alignment or distribution.
|
|
4945
|
+
*
|
|
4946
|
+
* @param shape - The shape.
|
|
4947
|
+
* @param info - Additional context information: the type of action causing the layout and the
|
|
4948
|
+
* @public
|
|
5024
4949
|
*
|
|
5025
4950
|
* @public
|
|
5026
4951
|
*/
|
|
5027
|
-
canBeLaidOut(_shape: Shape): boolean;
|
|
4952
|
+
canBeLaidOut(_shape: Shape, _info: TLShapeUtilCanBeLaidOutOpts): boolean;
|
|
5028
4953
|
/* Excluded from this release type: providesBackgroundForChildren */
|
|
5029
4954
|
/**
|
|
5030
4955
|
* Whether the shape should hide its resize handles when selected.
|
|
@@ -5629,24 +5554,6 @@ export declare class TextManager {
|
|
|
5629
5554
|
}): BoxModel & {
|
|
5630
5555
|
scrollWidth: number;
|
|
5631
5556
|
};
|
|
5632
|
-
measureHtml(html: string, opts: {
|
|
5633
|
-
/**
|
|
5634
|
-
* When maxWidth is a number, the text will be wrapped to that maxWidth. When maxWidth
|
|
5635
|
-
* is null, the text will be measured without wrapping, but explicit line breaks and
|
|
5636
|
-
* space are preserved.
|
|
5637
|
-
*/
|
|
5638
|
-
maxWidth: null | number;
|
|
5639
|
-
disableOverflowWrapBreaking?: boolean;
|
|
5640
|
-
fontFamily: string;
|
|
5641
|
-
fontSize: number;
|
|
5642
|
-
fontStyle: string;
|
|
5643
|
-
fontWeight: string;
|
|
5644
|
-
lineHeight: number;
|
|
5645
|
-
minWidth?: null | number;
|
|
5646
|
-
padding: string;
|
|
5647
|
-
}): BoxModel & {
|
|
5648
|
-
scrollWidth: number;
|
|
5649
|
-
};
|
|
5650
5557
|
/**
|
|
5651
5558
|
* Given an html element, measure the position of each span of unbroken
|
|
5652
5559
|
* word/white-space characters within any text nodes it contains.
|
|
@@ -5674,19 +5581,6 @@ export declare class TextManager {
|
|
|
5674
5581
|
}[];
|
|
5675
5582
|
}
|
|
5676
5583
|
|
|
5677
|
-
/**
|
|
5678
|
-
* This is the TipTap editor! Docs are {@link https://tiptap.dev/docs}.
|
|
5679
|
-
*
|
|
5680
|
-
* @public
|
|
5681
|
-
*/
|
|
5682
|
-
export declare type TiptapEditor = Editor_2;
|
|
5683
|
-
|
|
5684
|
-
/**
|
|
5685
|
-
* A TipTap node. See {@link https://tiptap.dev/docs}.
|
|
5686
|
-
* @public
|
|
5687
|
-
*/
|
|
5688
|
-
export declare type TiptapNode = Node_2;
|
|
5689
|
-
|
|
5690
5584
|
/** @public */
|
|
5691
5585
|
export declare type TLAnyBindingUtilConstructor = TLBindingUtilConstructor<any>;
|
|
5692
5586
|
|
|
@@ -5727,6 +5621,7 @@ export declare interface TLBindingUtilConstructor<T extends TLUnknownBinding, U
|
|
|
5727
5621
|
|
|
5728
5622
|
/** @public */
|
|
5729
5623
|
export declare interface TLBrushProps {
|
|
5624
|
+
userId?: string;
|
|
5730
5625
|
brush: BoxModel;
|
|
5731
5626
|
color?: string;
|
|
5732
5627
|
opacity?: number;
|
|
@@ -5854,6 +5749,7 @@ export declare type TLClickState = 'idle' | 'overflow' | 'pendingDouble' | 'pend
|
|
|
5854
5749
|
|
|
5855
5750
|
/** @public */
|
|
5856
5751
|
export declare interface TLCollaboratorHintProps {
|
|
5752
|
+
userId: string;
|
|
5857
5753
|
className?: string;
|
|
5858
5754
|
point: VecModel;
|
|
5859
5755
|
viewport: Box;
|
|
@@ -5900,6 +5796,7 @@ export declare interface TLCropInfo<T extends TLShape> {
|
|
|
5900
5796
|
|
|
5901
5797
|
/** @public */
|
|
5902
5798
|
export declare interface TLCursorProps {
|
|
5799
|
+
userId: string;
|
|
5903
5800
|
className?: string;
|
|
5904
5801
|
point: null | VecModel;
|
|
5905
5802
|
zoom: number;
|
|
@@ -6010,10 +5907,6 @@ export declare interface TldrawEditorBaseProps {
|
|
|
6010
5907
|
* Camera options for the editor.
|
|
6011
5908
|
*/
|
|
6012
5909
|
cameraOptions?: Partial<TLCameraOptions>;
|
|
6013
|
-
/**
|
|
6014
|
-
* Text options for the editor.
|
|
6015
|
-
*/
|
|
6016
|
-
textOptions?: TLTextOptions;
|
|
6017
5910
|
/**
|
|
6018
5911
|
* Options for the editor.
|
|
6019
5912
|
*/
|
|
@@ -6034,14 +5927,6 @@ export declare interface TldrawEditorBaseProps {
|
|
|
6034
5927
|
* remain in the store and participate in all other operations.
|
|
6035
5928
|
*/
|
|
6036
5929
|
isShapeHidden?(shape: TLShape, editor: Editor): boolean;
|
|
6037
|
-
/**
|
|
6038
|
-
* The URLs for the fonts to use in the editor.
|
|
6039
|
-
*/
|
|
6040
|
-
assetUrls?: {
|
|
6041
|
-
fonts?: {
|
|
6042
|
-
[key: string]: string | undefined;
|
|
6043
|
-
};
|
|
6044
|
-
};
|
|
6045
5930
|
}
|
|
6046
5931
|
|
|
6047
5932
|
/**
|
|
@@ -6165,12 +6050,6 @@ export declare interface TldrawOptions {
|
|
|
6165
6050
|
* By default, the toolbar items are accessible via number shortcuts according to their order. To disable this, set this option to false.
|
|
6166
6051
|
*/
|
|
6167
6052
|
readonly enableToolbarKeyboardShortcuts: boolean;
|
|
6168
|
-
/**
|
|
6169
|
-
* The maximum number of fonts that will be loaded while blocking the main rendering of the
|
|
6170
|
-
* canvas. If there are more than this number of fonts needed, we'll just show the canvas right
|
|
6171
|
-
* away and let the fonts load in in the background.
|
|
6172
|
-
*/
|
|
6173
|
-
readonly maxFontsToLoadBeforeRender: number;
|
|
6174
6053
|
}
|
|
6175
6054
|
|
|
6176
6055
|
/** @public */
|
|
@@ -6248,12 +6127,8 @@ export declare interface TLEditorOptions {
|
|
|
6248
6127
|
* Options for the editor's camera.
|
|
6249
6128
|
*/
|
|
6250
6129
|
cameraOptions?: Partial<TLCameraOptions>;
|
|
6251
|
-
textOptions?: TLTextOptions;
|
|
6252
6130
|
options?: Partial<TldrawOptions>;
|
|
6253
6131
|
licenseKey?: string;
|
|
6254
|
-
fontAssetUrls?: {
|
|
6255
|
-
[key: string]: string | undefined;
|
|
6256
|
-
};
|
|
6257
6132
|
/**
|
|
6258
6133
|
* A predicate that should return true if the given shape should be hidden.
|
|
6259
6134
|
* @param shape - The shape to check.
|
|
@@ -6368,13 +6243,6 @@ export declare interface TLEventMap {
|
|
|
6368
6243
|
'select-all-text': [{
|
|
6369
6244
|
shapeId: TLShapeId;
|
|
6370
6245
|
}];
|
|
6371
|
-
'place-caret': [{
|
|
6372
|
-
point: {
|
|
6373
|
-
x: number;
|
|
6374
|
-
y: number;
|
|
6375
|
-
};
|
|
6376
|
-
shapeId: TLShapeId;
|
|
6377
|
-
}];
|
|
6378
6246
|
}
|
|
6379
6247
|
|
|
6380
6248
|
/** @public */
|
|
@@ -6424,70 +6292,13 @@ export declare interface TLFilesExternalContent extends TLBaseExternalContent {
|
|
|
6424
6292
|
ignoreParent: boolean;
|
|
6425
6293
|
}
|
|
6426
6294
|
|
|
6427
|
-
/**
|
|
6428
|
-
*
|
|
6429
|
-
* ones in the
|
|
6430
|
-
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face | css `@font-face` rule}.
|
|
6431
|
-
* @public
|
|
6432
|
-
*/
|
|
6433
|
-
export declare interface TLFontFace {
|
|
6434
|
-
/**
|
|
6435
|
-
* How this font can be referred to in CSS.
|
|
6436
|
-
* See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-family | `font-family`}.
|
|
6437
|
-
*/
|
|
6438
|
-
readonly family: string;
|
|
6439
|
-
/**
|
|
6440
|
-
* The source of the font. This
|
|
6441
|
-
* See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src | `src`}.
|
|
6442
|
-
*/
|
|
6443
|
-
readonly src: TLFontFaceSource;
|
|
6444
|
-
/**
|
|
6445
|
-
* See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/ascent-override | `ascent-override`}.
|
|
6446
|
-
*/
|
|
6447
|
-
readonly ascentOverride?: string;
|
|
6448
|
-
/**
|
|
6449
|
-
* See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/descent-override | `descent-override`}.
|
|
6450
|
-
*/
|
|
6451
|
-
readonly descentOverride?: string;
|
|
6452
|
-
/**
|
|
6453
|
-
* See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-stretch | `font-stretch`}.
|
|
6454
|
-
*/
|
|
6455
|
-
readonly stretch?: string;
|
|
6456
|
-
/**
|
|
6457
|
-
* See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-style | `font-style`}.
|
|
6458
|
-
*/
|
|
6459
|
-
readonly style?: string;
|
|
6460
|
-
/**
|
|
6461
|
-
* See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-weight | `font-weight`}.
|
|
6462
|
-
*/
|
|
6463
|
-
readonly weight?: string;
|
|
6464
|
-
/**
|
|
6465
|
-
* See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-feature-settings | `font-feature-settings`}.
|
|
6466
|
-
*/
|
|
6467
|
-
readonly featureSettings?: string;
|
|
6468
|
-
/**
|
|
6469
|
-
* See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/line-gap-override | `line-gap-override`}.
|
|
6470
|
-
*/
|
|
6471
|
-
readonly lineGapOverride?: string;
|
|
6472
|
-
/**
|
|
6473
|
-
* See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range | `unicode-range`}.
|
|
6474
|
-
*/
|
|
6475
|
-
readonly unicodeRange?: string;
|
|
6476
|
-
}
|
|
6477
|
-
|
|
6478
|
-
/**
|
|
6479
|
-
* Represents the `src` property of a {@link TLFontFace}.
|
|
6480
|
-
* See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src | `src`} for details of the properties here.
|
|
6295
|
+
/** Additional options for the {@link ShapeUtil.getGeometry} method.
|
|
6296
|
+
*
|
|
6481
6297
|
* @public
|
|
6482
6298
|
*/
|
|
6483
|
-
export declare interface
|
|
6484
|
-
/**
|
|
6485
|
-
|
|
6486
|
-
* {@link tldraw#TLEditorAssetUrls.fonts}, the value from there will be used instead.
|
|
6487
|
-
*/
|
|
6488
|
-
url: string;
|
|
6489
|
-
format?: string;
|
|
6490
|
-
tech?: string;
|
|
6299
|
+
export declare interface TLGeometryOpts {
|
|
6300
|
+
/** The context in which the geometry is being requested. */
|
|
6301
|
+
context?: string;
|
|
6491
6302
|
}
|
|
6492
6303
|
|
|
6493
6304
|
/** @public */
|
|
@@ -6888,6 +6699,7 @@ export declare type TLResizeShapeOptions = Partial<{
|
|
|
6888
6699
|
|
|
6889
6700
|
/** @public */
|
|
6890
6701
|
export declare interface TLScribbleProps {
|
|
6702
|
+
userId?: string;
|
|
6891
6703
|
scribble: TLScribble;
|
|
6892
6704
|
zoom: number;
|
|
6893
6705
|
color?: string;
|
|
@@ -6947,6 +6759,7 @@ export declare type TLShapeIndicatorErrorFallbackComponent = ComponentType<{
|
|
|
6947
6759
|
|
|
6948
6760
|
/** @public */
|
|
6949
6761
|
export declare interface TLShapeIndicatorProps {
|
|
6762
|
+
userId?: string;
|
|
6950
6763
|
shapeId: TLShapeId;
|
|
6951
6764
|
color?: string | undefined;
|
|
6952
6765
|
opacity?: number;
|
|
@@ -6954,13 +6767,25 @@ export declare interface TLShapeIndicatorProps {
|
|
|
6954
6767
|
hidden?: boolean;
|
|
6955
6768
|
}
|
|
6956
6769
|
|
|
6770
|
+
/**
|
|
6771
|
+
* Options passed to {@link ShapeUtil.canBeLaidOut}.
|
|
6772
|
+
*
|
|
6773
|
+
* @public
|
|
6774
|
+
*/
|
|
6775
|
+
export declare interface TLShapeUtilCanBeLaidOutOpts {
|
|
6776
|
+
/** The type of action causing the layout. */
|
|
6777
|
+
type?: 'align' | 'distribute' | 'flip' | 'pack' | 'stack' | 'stretch';
|
|
6778
|
+
/** The other shapes being laid out */
|
|
6779
|
+
shapes?: TLShape[];
|
|
6780
|
+
}
|
|
6781
|
+
|
|
6957
6782
|
/**
|
|
6958
6783
|
* Options passed to {@link ShapeUtil.canBind}. A binding that could be made. At least one of
|
|
6959
6784
|
* `fromShapeType` or `toShapeType` will belong to this shape util.
|
|
6960
6785
|
*
|
|
6961
6786
|
* @public
|
|
6962
6787
|
*/
|
|
6963
|
-
export declare interface TLShapeUtilCanBindOpts<Shape extends TLUnknownShape =
|
|
6788
|
+
export declare interface TLShapeUtilCanBindOpts<Shape extends TLUnknownShape = TLUnknownShape> {
|
|
6964
6789
|
/** The type of shape referenced by the `fromId` of the binding. */
|
|
6965
6790
|
fromShapeType: string;
|
|
6966
6791
|
/** The type of shape referenced by the `toId` of the binding. */
|
|
@@ -7119,7 +6944,6 @@ export declare interface TLSvgTextExternalContent extends TLBaseExternalContent
|
|
|
7119
6944
|
export declare interface TLTextExternalContent extends TLBaseExternalContent {
|
|
7120
6945
|
type: 'text';
|
|
7121
6946
|
text: string;
|
|
7122
|
-
html?: string;
|
|
7123
6947
|
}
|
|
7124
6948
|
|
|
7125
6949
|
/** @public */
|
|
@@ -7129,12 +6953,6 @@ export declare interface TLTextExternalContentSource {
|
|
|
7129
6953
|
subtype: 'html' | 'json' | 'text' | 'url';
|
|
7130
6954
|
}
|
|
7131
6955
|
|
|
7132
|
-
/** @public */
|
|
7133
|
-
export declare interface TLTextOptions {
|
|
7134
|
-
tipTapConfig?: EditorProviderProps;
|
|
7135
|
-
addFontsFromNode?: RichTextFontVisitor;
|
|
7136
|
-
}
|
|
7137
|
-
|
|
7138
6956
|
/** @public */
|
|
7139
6957
|
export declare type TLTickEvent = (info: TLTickEventInfo) => void;
|
|
7140
6958
|
|
|
@@ -7306,9 +7124,6 @@ export declare function useMaybeEditor(): Editor | null;
|
|
|
7306
7124
|
|
|
7307
7125
|
/* Excluded from this release type: useOnMount */
|
|
7308
7126
|
|
|
7309
|
-
/** @public */
|
|
7310
|
-
export declare function usePassThroughMouseOverEvents(ref: RefObject<HTMLElement>): void;
|
|
7311
|
-
|
|
7312
7127
|
/** @public */
|
|
7313
7128
|
export declare function usePassThroughWheelEvents(ref: RefObject<HTMLElement>): void;
|
|
7314
7129
|
|
|
@@ -7420,9 +7235,6 @@ export declare function useUniqueSafeId(suffix?: string): SafeId;
|
|
|
7420
7235
|
|
|
7421
7236
|
export { useValue }
|
|
7422
7237
|
|
|
7423
|
-
/** @public */
|
|
7424
|
-
export declare function useViewportHeight(): number;
|
|
7425
|
-
|
|
7426
7238
|
/* Excluded from this release type: ValidLicenseKeyResult */
|
|
7427
7239
|
|
|
7428
7240
|
/** @public */
|