tldraw 5.3.2 → 5.4.0-canary.042da660fa66

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.
Files changed (93) hide show
  1. package/DOCS.md +2822 -3224
  2. package/RELEASE_NOTES.md +11 -39
  3. package/dist-cjs/index.d.ts +264 -275
  4. package/dist-cjs/index.js +1 -1
  5. package/dist-cjs/lib/defaultExternalContentHandlers.js +2 -2
  6. package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
  7. package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js +2 -2
  8. package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js.map +2 -2
  9. package/dist-cjs/lib/shapes/frame/frameHelpers.js +3 -0
  10. package/dist-cjs/lib/shapes/frame/frameHelpers.js.map +2 -2
  11. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +3 -2
  12. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +2 -2
  13. package/dist-cjs/lib/ui/TldrawUi.js +2 -3
  14. package/dist-cjs/lib/ui/TldrawUi.js.map +2 -2
  15. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js +0 -3
  16. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js.map +2 -2
  17. package/dist-cjs/lib/ui/components/ContextMenu/DefaultContextMenuContent.js +1 -1
  18. package/dist-cjs/lib/ui/components/ContextMenu/DefaultContextMenuContent.js.map +2 -2
  19. package/dist-cjs/lib/ui/components/Dialogs.js +8 -0
  20. package/dist-cjs/lib/ui/components/Dialogs.js.map +2 -2
  21. package/dist-cjs/lib/ui/components/SharePanel/DefaultPeopleMenuItem.js +1 -2
  22. package/dist-cjs/lib/ui/components/SharePanel/DefaultPeopleMenuItem.js.map +2 -2
  23. package/dist-cjs/lib/ui/context/actions.js +0 -1
  24. package/dist-cjs/lib/ui/context/actions.js.map +2 -2
  25. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js +2 -0
  26. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js.map +2 -2
  27. package/dist-cjs/lib/ui/hooks/useFlatten.js +42 -23
  28. package/dist-cjs/lib/ui/hooks/useFlatten.js.map +2 -2
  29. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js +5 -17
  30. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js.map +2 -2
  31. package/dist-cjs/lib/ui/kbd-utils.js +22 -3
  32. package/dist-cjs/lib/ui/kbd-utils.js.map +2 -2
  33. package/dist-cjs/lib/ui/version.js +3 -3
  34. package/dist-cjs/lib/ui/version.js.map +1 -1
  35. package/dist-esm/index.d.mts +264 -275
  36. package/dist-esm/index.mjs +1 -1
  37. package/dist-esm/lib/defaultExternalContentHandlers.mjs +2 -2
  38. package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
  39. package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs +2 -2
  40. package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs.map +2 -2
  41. package/dist-esm/lib/shapes/frame/frameHelpers.mjs +3 -0
  42. package/dist-esm/lib/shapes/frame/frameHelpers.mjs.map +2 -2
  43. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +3 -2
  44. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +2 -2
  45. package/dist-esm/lib/ui/TldrawUi.mjs +2 -3
  46. package/dist-esm/lib/ui/TldrawUi.mjs.map +2 -2
  47. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs +2 -5
  48. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs.map +2 -2
  49. package/dist-esm/lib/ui/components/ContextMenu/DefaultContextMenuContent.mjs +1 -1
  50. package/dist-esm/lib/ui/components/ContextMenu/DefaultContextMenuContent.mjs.map +2 -2
  51. package/dist-esm/lib/ui/components/Dialogs.mjs +9 -1
  52. package/dist-esm/lib/ui/components/Dialogs.mjs.map +2 -2
  53. package/dist-esm/lib/ui/components/SharePanel/DefaultPeopleMenuItem.mjs +1 -2
  54. package/dist-esm/lib/ui/components/SharePanel/DefaultPeopleMenuItem.mjs.map +2 -2
  55. package/dist-esm/lib/ui/context/actions.mjs +0 -1
  56. package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
  57. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs +2 -0
  58. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs.map +2 -2
  59. package/dist-esm/lib/ui/hooks/useFlatten.mjs +42 -23
  60. package/dist-esm/lib/ui/hooks/useFlatten.mjs.map +2 -2
  61. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs +5 -17
  62. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs.map +2 -2
  63. package/dist-esm/lib/ui/kbd-utils.mjs +22 -3
  64. package/dist-esm/lib/ui/kbd-utils.mjs.map +2 -2
  65. package/dist-esm/lib/ui/version.mjs +3 -3
  66. package/dist-esm/lib/ui/version.mjs.map +1 -1
  67. package/package.json +6 -6
  68. package/src/lib/defaultExternalContentHandlers.ts +2 -2
  69. package/src/lib/shapes/draw/DrawShapeTool.test.ts +19 -0
  70. package/src/lib/shapes/draw/toolStates/Drawing.ts +2 -2
  71. package/src/lib/shapes/frame/frameHelpers.ts +10 -1
  72. package/src/lib/shapes/video/VideoShapeUtil.tsx +4 -2
  73. package/src/lib/ui/TldrawUi.tsx +1 -2
  74. package/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx +2 -6
  75. package/src/lib/ui/components/ContextMenu/DefaultContextMenuContent.tsx +5 -1
  76. package/src/lib/ui/components/Dialogs.tsx +17 -1
  77. package/src/lib/ui/components/SharePanel/DefaultPeopleMenuItem.tsx +2 -3
  78. package/src/lib/ui/context/actions.tsx +0 -1
  79. package/src/lib/ui/hooks/useClipboardEvents.ts +2 -0
  80. package/src/lib/ui/hooks/useFlatten.ts +56 -23
  81. package/src/lib/ui/hooks/useKeyboardShortcuts.ts +5 -23
  82. package/src/lib/ui/kbd-utils.test.ts +11 -0
  83. package/src/lib/ui/kbd-utils.ts +27 -4
  84. package/src/lib/ui/version.ts +3 -3
  85. package/src/lib/ui.css +7 -16
  86. package/src/test/TldrawEditor.test.tsx +3 -0
  87. package/src/test/VideoShapeUtil.test.tsx +126 -0
  88. package/src/test/bookmark-shapes.test.ts +110 -0
  89. package/src/test/commands/alignShapes.test.tsx +19 -10
  90. package/src/test/commands/clipboard.test.ts +36 -1
  91. package/src/test/flatten.test.ts +135 -0
  92. package/src/test/modifiers.test.ts +104 -0
  93. package/tldraw.css +7 -16
@@ -10,7 +10,6 @@ import { BindingOnShapeIsolateOptions } from '@tldraw/editor';
10
10
  import { BindingUtil } from '@tldraw/editor';
11
11
  import { Box } from '@tldraw/editor';
12
12
  import { Circle2d } from '@tldraw/editor';
13
- import { ClipboardEvent as ClipboardEvent_2 } from 'react';
14
13
  import { ComponentType } from 'react';
15
14
  import { CSSProperties } from 'react';
16
15
  import { DebugFlag } from '@tldraw/editor';
@@ -30,10 +29,10 @@ import { IndexKey } from '@tldraw/utils';
30
29
  import { IndexKey as IndexKey_2 } from '@tldraw/editor';
31
30
  import { JsonObject } from '@tldraw/utils';
32
31
  import { JSX } from 'react/jsx-runtime';
33
- import { JSX as JSX_2 } from 'react';
34
32
  import { JSXElementConstructor } from 'react';
35
33
  import { LANGUAGES } from '@tldraw/editor';
36
34
  import { MatLike } from '@tldraw/editor';
35
+ import { MemoExoticComponent } from 'react';
37
36
  import { MigrationFailureReason } from '@tldraw/editor';
38
37
  import { MigrationSequence } from '@tldraw/store';
39
38
  import { NamedExoticComponent } from 'react';
@@ -41,7 +40,6 @@ import { Node as Node_2 } from '@tiptap/pm/model';
41
40
  import { OverlayOptionsWithDisplayValues } from '@tldraw/editor';
42
41
  import { OverlayUtil } from '@tldraw/editor';
43
42
  import { PerfectDashTerminal } from '@tldraw/editor';
44
- import { PointerEvent as PointerEvent_2 } from 'react';
45
43
  import { Polygon2d } from '@tldraw/editor';
46
44
  import { Polyline2d } from '@tldraw/editor';
47
45
  import * as React_2 from 'react';
@@ -89,8 +87,14 @@ import { TLContent } from '@tldraw/editor';
89
87
  import { TLCropInfo } from '@tldraw/editor';
90
88
  import { TLCursorType } from '@tldraw/editor';
91
89
  import { TLDefaultColorStyle } from '@tldraw/tlschema';
90
+ import { TLDefaultDashStyle } from '@tldraw/tlschema';
91
+ import { TLDefaultFillStyle } from '@tldraw/tlschema';
92
92
  import { TLDefaultFontStyle } from '@tldraw/tlschema';
93
- import { TLDefaultSizeStyle } from '@tldraw/editor';
93
+ import { TLDefaultHorizontalAlignStyle } from '@tldraw/tlschema';
94
+ import { TLDefaultSizeStyle } from '@tldraw/tlschema';
95
+ import { TLDefaultSizeStyle as TLDefaultSizeStyle_2 } from '@tldraw/editor';
96
+ import { TLDefaultTextAlignStyle } from '@tldraw/tlschema';
97
+ import { TLDefaultVerticalAlignStyle } from '@tldraw/tlschema';
94
98
  import { TldrawEditorBaseProps } from '@tldraw/editor';
95
99
  import { TldrawEditorStoreProps } from '@tldraw/editor';
96
100
  import { TldrawOptions } from '@tldraw/editor';
@@ -112,6 +116,7 @@ import { TLFrameShape } from '@tldraw/editor';
112
116
  import { TLFrameShapeProps } from '@tldraw/editor';
113
117
  import { TLGeometryOpts } from '@tldraw/editor';
114
118
  import { TLGeoShape } from '@tldraw/editor';
119
+ import { TLGeoShapeGeoStyle } from '@tldraw/tlschema';
115
120
  import { TLGeoShapeProps } from '@tldraw/editor';
116
121
  import { TLHandle } from '@tldraw/editor';
117
122
  import { TLHandleDragInfo } from '@tldraw/editor';
@@ -124,15 +129,18 @@ import { TLImageShapeProps } from '@tldraw/editor';
124
129
  import { TLKeyboardEventInfo } from '@tldraw/editor';
125
130
  import { TLLineShape } from '@tldraw/editor';
126
131
  import { TLLineShapePoint } from '@tldraw/editor';
132
+ import { TLLineShapeSplineStyle } from '@tldraw/tlschema';
127
133
  import { TLNoteShape } from '@tldraw/editor';
128
134
  import { TLNoteShapeProps } from '@tldraw/editor';
135
+ import { TLOpacityType } from '@tldraw/tlschema';
129
136
  import { TLOverlay } from '@tldraw/editor';
130
137
  import { TLPageId } from '@tldraw/editor';
131
138
  import { TLParentId } from '@tldraw/tlschema';
132
139
  import { TLPointerEventInfo } from '@tldraw/editor';
133
140
  import { TLPropsMigrations } from '@tldraw/tlschema';
134
141
  import { TLResizeInfo } from '@tldraw/editor';
135
- import { TLRichText } from '@tldraw/editor';
142
+ import { TLRichText } from '@tldraw/tlschema';
143
+ import { TLRichText as TLRichText_2 } from '@tldraw/editor';
136
144
  import { TLSchema } from '@tldraw/editor';
137
145
  import { TLScribble } from '@tldraw/editor';
138
146
  import { TLSelectionHandle } from '@tldraw/editor';
@@ -229,9 +237,9 @@ export declare class ArrowBindingUtil extends BindingUtil<TLArrowBinding> {
229
237
  getDefaultProps(): Partial<TLArrowBindingProps>;
230
238
  onAfterCreate({ binding }: BindingOnCreateOptions<TLArrowBinding>): void;
231
239
  onAfterChange({ bindingAfter }: BindingOnChangeOptions<TLArrowBinding>): void;
232
- onAfterChangeFromShape({ shapeBefore, shapeAfter, reason }: BindingOnShapeChangeOptions<TLArrowBinding>): void;
233
- onAfterChangeToShape({ binding, shapeBefore, shapeAfter, reason }: BindingOnShapeChangeOptions<TLArrowBinding>): void;
234
- onBeforeIsolateFromShape({ binding }: BindingOnShapeIsolateOptions<TLArrowBinding>): void;
240
+ onAfterChangeFromShape({ shapeBefore, shapeAfter, reason, }: BindingOnShapeChangeOptions<TLArrowBinding>): void;
241
+ onAfterChangeToShape({ binding, shapeBefore, shapeAfter, reason, }: BindingOnShapeChangeOptions<TLArrowBinding>): void;
242
+ onBeforeIsolateFromShape({ binding, }: BindingOnShapeIsolateOptions<TLArrowBinding>): void;
235
243
  }
236
244
 
237
245
  /** @public @react */
@@ -283,11 +291,11 @@ export declare interface ArrowShapeOptions extends ShapeOptionsWithDisplayValues
283
291
  /**
284
292
  * How far should elbow arrows expand from the shapes they're targeting?
285
293
  */
286
- readonly expandElbowLegLength: Record<TLDefaultSizeStyle, number>;
294
+ readonly expandElbowLegLength: Record<TLDefaultSizeStyle_2, number>;
287
295
  /**
288
296
  * The minimum length of an elbow arrow's leg.
289
297
  */
290
- readonly minElbowLegLength: Record<TLDefaultSizeStyle, number>;
298
+ readonly minElbowLegLength: Record<TLDefaultSizeStyle_2, number>;
291
299
  /**
292
300
  * The minimum distance, in screen pixels, between two handles on an elbow arrow. If two handles
293
301
  * would be closer than this distance, they're both hidden.
@@ -366,7 +374,7 @@ export declare class ArrowShapeTool extends StateNode {
366
374
 
367
375
  /** @public */
368
376
  export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
369
- static type: "arrow";
377
+ static type: 'arrow';
370
378
  static props: RecordProps<TLArrowShape>;
371
379
  static migrations: MigrationSequence;
372
380
  options: ArrowShapeOptions;
@@ -525,7 +533,7 @@ export declare interface BasePathBuilderOpts {
525
533
 
526
534
  /** @public */
527
535
  export declare class BookmarkAssetUtil extends AssetUtil<TLBookmarkAsset> {
528
- static type: "bookmark";
536
+ static type: 'bookmark';
529
537
  static props: {
530
538
  description: Validator<string>;
531
539
  favicon: Validator<string>;
@@ -543,7 +551,7 @@ export declare interface BookmarkShapeOptions extends ShapeOptionsWithDisplayVal
543
551
 
544
552
  /** @public */
545
553
  export declare class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape> {
546
- static type: "bookmark";
554
+ static type: 'bookmark';
547
555
  static props: RecordProps<TLBookmarkShape>;
548
556
  static migrations: TLPropsMigrations;
549
557
  options: BookmarkShapeOptions;
@@ -560,7 +568,7 @@ export declare class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape>
560
568
  index: IndexKey;
561
569
  isLocked: boolean;
562
570
  meta: JsonObject;
563
- opacity: number;
571
+ opacity: TLOpacityType;
564
572
  parentId: TLParentId;
565
573
  props: {
566
574
  assetId: null | TLAssetId;
@@ -570,7 +578,7 @@ export declare class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape>
570
578
  };
571
579
  rotation: number;
572
580
  type: "bookmark";
573
- typeName: "shape";
581
+ typeName: 'shape';
574
582
  x: number;
575
583
  y: number;
576
584
  };
@@ -579,7 +587,7 @@ export declare class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape>
579
587
  index: IndexKey;
580
588
  isLocked: boolean;
581
589
  meta: JsonObject;
582
- opacity: number;
590
+ opacity: TLOpacityType;
583
591
  parentId: TLParentId;
584
592
  props: {
585
593
  assetId: null | TLAssetId;
@@ -589,7 +597,7 @@ export declare class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape>
589
597
  };
590
598
  rotation: number;
591
599
  type: "bookmark";
592
- typeName: "shape";
600
+ typeName: 'shape';
593
601
  x: number;
594
602
  y: number;
595
603
  } | undefined;
@@ -643,7 +651,7 @@ export declare interface BrushOverlayUtilOptions extends OverlayOptionsWithDispl
643
651
  /* Excluded from this release type: buildFromV1Document */
644
652
 
645
653
  /** @public @react */
646
- export declare function CenteredTopPanelContainer({ maxWidth, ignoreRightWidth, stylePanelWidth, marginBetweenZones, squeezeAmount, children }: CenteredTopPanelContainerProps): JSX.Element;
654
+ export declare function CenteredTopPanelContainer({ maxWidth, ignoreRightWidth, stylePanelWidth, marginBetweenZones, squeezeAmount, children, }: CenteredTopPanelContainerProps): JSX.Element;
647
655
 
648
656
  /** @public */
649
657
  export declare interface CenteredTopPanelContainerProps {
@@ -860,7 +868,7 @@ export declare function CopyMenuItem(): JSX.Element;
860
868
  * @returns A Result containing the created bookmark shape or an error
861
869
  * @public
862
870
  */
863
- export declare function createBookmarkFromUrl(editor: Editor, { url, center }: {
871
+ export declare function createBookmarkFromUrl(editor: Editor, { url, center, }: {
864
872
  center?: {
865
873
  x: number;
866
874
  y: number;
@@ -939,9 +947,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
939
947
  readonly overridePermissions: {
940
948
  readonly 'allow-top-navigation': true;
941
949
  };
942
- readonly title: "tldraw";
950
+ readonly title: 'tldraw';
943
951
  readonly toEmbedUrl: (url: string) => string | undefined;
944
- readonly type: "tldraw";
952
+ readonly type: 'tldraw';
945
953
  readonly width: 720;
946
954
  }, {
947
955
  readonly doesResize: true;
@@ -949,9 +957,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
949
957
  readonly fromEmbedUrl: (url: string) => string | undefined;
950
958
  readonly height: 500;
951
959
  readonly hostnames: readonly ["figma.com"];
952
- readonly title: "Figma";
960
+ readonly title: 'Figma';
953
961
  readonly toEmbedUrl: (url: string) => string | undefined;
954
- readonly type: "figma";
962
+ readonly type: 'figma';
955
963
  readonly width: 720;
956
964
  }, {
957
965
  readonly doesResize: true;
@@ -959,9 +967,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
959
967
  readonly fromEmbedUrl: (url: string) => string | undefined;
960
968
  readonly height: 500;
961
969
  readonly hostnames: readonly ["canva.com"];
962
- readonly title: "Canva";
970
+ readonly title: 'Canva';
963
971
  readonly toEmbedUrl: (url: string) => string | undefined;
964
- readonly type: "canva";
972
+ readonly type: 'canva';
965
973
  readonly width: 720;
966
974
  }, {
967
975
  readonly doesResize: true;
@@ -972,9 +980,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
972
980
  readonly overridePermissions: {
973
981
  readonly 'allow-presentation': true;
974
982
  };
975
- readonly title: "Google Maps";
976
- readonly toEmbedUrl: (url: string, config?: GoogleMapsEmbedConfig | undefined) => string | undefined;
977
- readonly type: "google_maps";
983
+ readonly title: 'Google Maps';
984
+ readonly toEmbedUrl: (url: string, config?: GoogleMapsEmbedConfig) => string | undefined;
985
+ readonly type: 'google_maps';
978
986
  readonly width: 720;
979
987
  }, {
980
988
  readonly doesResize: true;
@@ -984,9 +992,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
984
992
  readonly hostnames: readonly ["val.town"];
985
993
  readonly minHeight: 100;
986
994
  readonly minWidth: 260;
987
- readonly title: "Val Town";
995
+ readonly title: 'Val Town';
988
996
  readonly toEmbedUrl: (url: string) => string | undefined;
989
- readonly type: "val_town";
997
+ readonly type: 'val_town';
990
998
  readonly width: 720;
991
999
  }, {
992
1000
  readonly doesResize: true;
@@ -996,9 +1004,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
996
1004
  readonly hostnames: readonly ["codesandbox.io"];
997
1005
  readonly minHeight: 300;
998
1006
  readonly minWidth: 300;
999
- readonly title: "CodeSandbox";
1007
+ readonly title: 'CodeSandbox';
1000
1008
  readonly toEmbedUrl: (url: string) => string | undefined;
1001
- readonly type: "codesandbox";
1009
+ readonly type: 'codesandbox';
1002
1010
  readonly width: 720;
1003
1011
  }, {
1004
1012
  readonly doesResize: true;
@@ -1008,9 +1016,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
1008
1016
  readonly hostnames: readonly ["codepen.io"];
1009
1017
  readonly minHeight: 300;
1010
1018
  readonly minWidth: 300;
1011
- readonly title: "Codepen";
1019
+ readonly title: 'Codepen';
1012
1020
  readonly toEmbedUrl: (url: string) => string | undefined;
1013
- readonly type: "codepen";
1021
+ readonly type: 'codepen';
1014
1022
  readonly width: 520;
1015
1023
  }, {
1016
1024
  readonly doesResize: false;
@@ -1018,9 +1026,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
1018
1026
  readonly fromEmbedUrl: (url: string) => string | undefined;
1019
1027
  readonly height: 400;
1020
1028
  readonly hostnames: readonly ["scratch.mit.edu"];
1021
- readonly title: "Scratch";
1029
+ readonly title: 'Scratch';
1022
1030
  readonly toEmbedUrl: (url: string) => string | undefined;
1023
- readonly type: "scratch";
1031
+ readonly type: 'scratch';
1024
1032
  readonly width: 520;
1025
1033
  }, {
1026
1034
  readonly doesResize: true;
@@ -1033,9 +1041,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
1033
1041
  readonly 'allow-popups-to-escape-sandbox': true;
1034
1042
  readonly 'allow-presentation': true;
1035
1043
  };
1036
- readonly title: "YouTube";
1044
+ readonly title: 'YouTube';
1037
1045
  readonly toEmbedUrl: (url: string) => string | undefined;
1038
- readonly type: "youtube";
1046
+ readonly type: 'youtube';
1039
1047
  readonly width: 800;
1040
1048
  }, {
1041
1049
  readonly doesResize: true;
@@ -1043,15 +1051,15 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
1043
1051
  readonly fromEmbedUrl: (url: string) => string | undefined;
1044
1052
  readonly height: 500;
1045
1053
  readonly hostnames: readonly ["calendar.google.*"];
1046
- readonly instructionLink: "https://support.google.com/calendar/answer/41207?hl=en";
1054
+ readonly instructionLink: 'https://support.google.com/calendar/answer/41207?hl=en';
1047
1055
  readonly minHeight: 360;
1048
1056
  readonly minWidth: 460;
1049
1057
  readonly overridePermissions: {
1050
1058
  readonly 'allow-popups-to-escape-sandbox': true;
1051
1059
  };
1052
- readonly title: "Google Calendar";
1060
+ readonly title: 'Google Calendar';
1053
1061
  readonly toEmbedUrl: (url: string) => string | undefined;
1054
- readonly type: "google_calendar";
1062
+ readonly type: 'google_calendar';
1055
1063
  readonly width: 720;
1056
1064
  }, {
1057
1065
  readonly doesResize: true;
@@ -1064,9 +1072,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
1064
1072
  readonly overridePermissions: {
1065
1073
  readonly 'allow-popups-to-escape-sandbox': true;
1066
1074
  };
1067
- readonly title: "Google Slides";
1075
+ readonly title: 'Google Slides';
1068
1076
  readonly toEmbedUrl: (url: string) => string | undefined;
1069
- readonly type: "google_slides";
1077
+ readonly type: 'google_slides';
1070
1078
  readonly width: 720;
1071
1079
  }, {
1072
1080
  readonly doesResize: true;
@@ -1074,9 +1082,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
1074
1082
  readonly fromEmbedUrl: (url: string) => string | undefined;
1075
1083
  readonly height: 500;
1076
1084
  readonly hostnames: readonly ["gist.github.com"];
1077
- readonly title: "GitHub Gist";
1085
+ readonly title: 'GitHub Gist';
1078
1086
  readonly toEmbedUrl: (url: string) => string | undefined;
1079
- readonly type: "github_gist";
1087
+ readonly type: 'github_gist';
1080
1088
  readonly width: 720;
1081
1089
  }, {
1082
1090
  readonly doesResize: true;
@@ -1084,9 +1092,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
1084
1092
  readonly fromEmbedUrl: (url: string) => string | undefined;
1085
1093
  readonly height: 500;
1086
1094
  readonly hostnames: readonly ["replit.com"];
1087
- readonly title: "Replit";
1095
+ readonly title: 'Replit';
1088
1096
  readonly toEmbedUrl: (url: string) => string | undefined;
1089
- readonly type: "replit";
1097
+ readonly type: 'replit';
1090
1098
  readonly width: 720;
1091
1099
  }, {
1092
1100
  readonly doesResize: true;
@@ -1094,9 +1102,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
1094
1102
  readonly fromEmbedUrl: (url: string) => string | undefined;
1095
1103
  readonly height: 500;
1096
1104
  readonly hostnames: readonly ["felt.com"];
1097
- readonly title: "Felt";
1105
+ readonly title: 'Felt';
1098
1106
  readonly toEmbedUrl: (url: string) => string | undefined;
1099
- readonly type: "felt";
1107
+ readonly type: 'felt';
1100
1108
  readonly width: 720;
1101
1109
  }, {
1102
1110
  readonly doesResize: true;
@@ -1106,9 +1114,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
1106
1114
  readonly hostnames: readonly ["open.spotify.com"];
1107
1115
  readonly minHeight: 500;
1108
1116
  readonly overrideOutlineRadius: 12;
1109
- readonly title: "Spotify";
1117
+ readonly title: 'Spotify';
1110
1118
  readonly toEmbedUrl: (url: string) => string | undefined;
1111
- readonly type: "spotify";
1119
+ readonly type: 'spotify';
1112
1120
  readonly width: 720;
1113
1121
  }, {
1114
1122
  readonly doesResize: true;
@@ -1118,21 +1126,21 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
1118
1126
  readonly hostnames: readonly ["vimeo.com", "player.vimeo.com"];
1119
1127
  readonly isAspectRatioLocked: true;
1120
1128
  readonly sizeToContentAspectRatio: true;
1121
- readonly title: "Vimeo";
1129
+ readonly title: 'Vimeo';
1122
1130
  readonly toEmbedUrl: (url: string) => string | undefined;
1123
- readonly type: "vimeo";
1131
+ readonly type: 'vimeo';
1124
1132
  readonly width: 640;
1125
1133
  }, {
1126
- readonly backgroundColor: "#fff";
1134
+ readonly backgroundColor: '#fff';
1127
1135
  readonly doesResize: true;
1128
1136
  readonly embedOnPaste: true;
1129
1137
  readonly fromEmbedUrl: (url: string) => string | undefined;
1130
1138
  readonly height: 500;
1131
1139
  readonly hostnames: readonly ["observablehq.com"];
1132
1140
  readonly isAspectRatioLocked: false;
1133
- readonly title: "Observable";
1141
+ readonly title: 'Observable';
1134
1142
  readonly toEmbedUrl: (url: string) => string | undefined;
1135
- readonly type: "observable";
1143
+ readonly type: 'observable';
1136
1144
  readonly width: 720;
1137
1145
  }, {
1138
1146
  readonly doesResize: true;
@@ -1140,9 +1148,9 @@ export declare const DEFAULT_EMBED_DEFINITIONS: readonly [{
1140
1148
  readonly fromEmbedUrl: (url: string) => string | undefined;
1141
1149
  readonly height: 450;
1142
1150
  readonly hostnames: readonly ["desmos.com"];
1143
- readonly title: "Desmos";
1151
+ readonly title: 'Desmos';
1144
1152
  readonly toEmbedUrl: (url: string) => string | undefined;
1145
- readonly type: "desmos";
1153
+ readonly type: 'desmos';
1146
1154
  readonly width: 700;
1147
1155
  }];
1148
1156
 
@@ -1159,10 +1167,10 @@ export declare const DEFAULT_MAX_ASSET_SIZE: number;
1159
1167
  export declare const DEFAULT_MAX_IMAGE_DIMENSION = 5000;
1160
1168
 
1161
1169
  /** @public @react */
1162
- export declare const DefaultA11yAnnouncer: NamedExoticComponent<object>;
1170
+ export declare const DefaultA11yAnnouncer: MemoExoticComponent<() => "" | JSX.Element | undefined>;
1163
1171
 
1164
1172
  /** @public @react */
1165
- export declare const DefaultActionsMenu: NamedExoticComponent<TLUiActionsMenuProps>;
1173
+ export declare const DefaultActionsMenu: MemoExoticComponent<({ children, }: TLUiActionsMenuProps) => JSX.Element | undefined>;
1166
1174
 
1167
1175
  /** @public @react */
1168
1176
  export declare function DefaultActionsMenuContent(): JSX.Element;
@@ -1177,7 +1185,7 @@ export declare const defaultAssetUtils: readonly [typeof ImageAssetUtil, typeof
1177
1185
  export declare const defaultBindingUtils: readonly [typeof ArrowBindingUtil];
1178
1186
 
1179
1187
  /** @public @react */
1180
- declare const DefaultContextMenu: NamedExoticComponent<TLUiContextMenuProps>;
1188
+ declare const DefaultContextMenu: MemoExoticComponent<({ children, disabled, }: TLUiContextMenuProps) => JSX.Element>;
1181
1189
  export { DefaultContextMenu as ContextMenu }
1182
1190
  export { DefaultContextMenu }
1183
1191
 
@@ -1188,10 +1196,10 @@ export declare function DefaultContextMenuContent(): JSX.Element;
1188
1196
  export declare function DefaultDebugMenu({ children }: TLUiDebugMenuProps): JSX.Element;
1189
1197
 
1190
1198
  /** @public @react */
1191
- export declare function DefaultDebugMenuContent({ customDebugFlags, customFeatureFlags }: CustomDebugFlags): JSX.Element;
1199
+ export declare function DefaultDebugMenuContent({ customDebugFlags, customFeatureFlags, }: CustomDebugFlags): JSX.Element;
1192
1200
 
1193
1201
  /** @public @react */
1194
- export declare const DefaultDialogs: NamedExoticComponent<object>;
1202
+ export declare const DefaultDialogs: MemoExoticComponent<() => JSX.Element[]>;
1195
1203
 
1196
1204
  /** @public */
1197
1205
  export declare let defaultEditorAssetUrls: TLEditorAssetUrls;
@@ -1231,38 +1239,38 @@ export declare const DefaultFontFaces: TLDefaultFonts;
1231
1239
  export declare const defaultGeoTypeDefinitions: {
1232
1240
  readonly 'arrow-down': {
1233
1241
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1234
- readonly icon: "geo-arrow-down";
1235
- readonly snapType: "polygon";
1242
+ readonly icon: 'geo-arrow-down';
1243
+ readonly snapType: 'polygon';
1236
1244
  };
1237
1245
  readonly 'arrow-left': {
1238
1246
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1239
- readonly icon: "geo-arrow-left";
1240
- readonly snapType: "polygon";
1247
+ readonly icon: 'geo-arrow-left';
1248
+ readonly snapType: 'polygon';
1241
1249
  };
1242
1250
  readonly 'arrow-right': {
1243
1251
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1244
- readonly icon: "geo-arrow-right";
1245
- readonly snapType: "polygon";
1252
+ readonly icon: 'geo-arrow-right';
1253
+ readonly snapType: 'polygon';
1246
1254
  };
1247
1255
  readonly 'arrow-up': {
1248
1256
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1249
- readonly icon: "geo-arrow-up";
1250
- readonly snapType: "polygon";
1257
+ readonly icon: 'geo-arrow-up';
1258
+ readonly snapType: 'polygon';
1251
1259
  };
1252
1260
  readonly 'check-box': {
1253
1261
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1254
- readonly icon: "geo-check-box";
1255
- readonly snapType: "polygon";
1262
+ readonly icon: 'geo-check-box';
1263
+ readonly snapType: 'polygon';
1256
1264
  };
1257
1265
  readonly 'rhombus-2': {
1258
1266
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1259
- readonly icon: "geo-rhombus-2";
1260
- readonly snapType: "polygon";
1267
+ readonly icon: 'geo-rhombus-2';
1268
+ readonly snapType: 'polygon';
1261
1269
  };
1262
1270
  readonly 'x-box': {
1263
1271
  readonly getPath: (w: number, h: number, shape: TLGeoShape, strokeWidth: number) => PathBuilder;
1264
- readonly icon: "geo-x-box";
1265
- readonly snapType: "polygon";
1272
+ readonly icon: 'geo-x-box';
1273
+ readonly snapType: 'polygon';
1266
1274
  };
1267
1275
  readonly cloud: {
1268
1276
  readonly defaultSize: {
@@ -1270,53 +1278,53 @@ export declare const defaultGeoTypeDefinitions: {
1270
1278
  readonly w: 300;
1271
1279
  };
1272
1280
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1273
- readonly icon: "geo-cloud";
1274
- readonly snapType: "blobby";
1281
+ readonly icon: 'geo-cloud';
1282
+ readonly snapType: 'blobby';
1275
1283
  };
1276
1284
  readonly diamond: {
1277
1285
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1278
- readonly icon: "geo-diamond";
1279
- readonly snapType: "polygon";
1286
+ readonly icon: 'geo-diamond';
1287
+ readonly snapType: 'polygon';
1280
1288
  };
1281
1289
  readonly ellipse: {
1282
1290
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1283
- readonly icon: "geo-ellipse";
1284
- readonly snapType: "blobby";
1291
+ readonly icon: 'geo-ellipse';
1292
+ readonly snapType: 'blobby';
1285
1293
  };
1286
1294
  readonly heart: {
1287
1295
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1288
- readonly icon: "geo-heart";
1289
- readonly snapType: "blobby";
1296
+ readonly icon: 'geo-heart';
1297
+ readonly snapType: 'blobby';
1290
1298
  };
1291
1299
  readonly hexagon: {
1292
1300
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1293
- readonly icon: "geo-hexagon";
1294
- readonly snapType: "polygon";
1301
+ readonly icon: 'geo-hexagon';
1302
+ readonly snapType: 'polygon';
1295
1303
  };
1296
1304
  readonly octagon: {
1297
1305
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1298
- readonly icon: "geo-octagon";
1299
- readonly snapType: "polygon";
1306
+ readonly icon: 'geo-octagon';
1307
+ readonly snapType: 'polygon';
1300
1308
  };
1301
1309
  readonly oval: {
1302
1310
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1303
- readonly icon: "geo-oval";
1304
- readonly snapType: "blobby";
1311
+ readonly icon: 'geo-oval';
1312
+ readonly snapType: 'blobby';
1305
1313
  };
1306
1314
  readonly pentagon: {
1307
1315
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1308
- readonly icon: "geo-pentagon";
1309
- readonly snapType: "polygon";
1316
+ readonly icon: 'geo-pentagon';
1317
+ readonly snapType: 'polygon';
1310
1318
  };
1311
1319
  readonly rectangle: {
1312
1320
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1313
- readonly icon: "geo-rectangle";
1314
- readonly snapType: "polygon";
1321
+ readonly icon: 'geo-rectangle';
1322
+ readonly snapType: 'polygon';
1315
1323
  };
1316
1324
  readonly rhombus: {
1317
1325
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1318
- readonly icon: "geo-rhombus";
1319
- readonly snapType: "polygon";
1326
+ readonly icon: 'geo-rhombus';
1327
+ readonly snapType: 'polygon';
1320
1328
  };
1321
1329
  readonly star: {
1322
1330
  readonly defaultSize: {
@@ -1324,18 +1332,18 @@ export declare const defaultGeoTypeDefinitions: {
1324
1332
  readonly w: 200;
1325
1333
  };
1326
1334
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1327
- readonly icon: "geo-star";
1328
- readonly snapType: "polygon";
1335
+ readonly icon: 'geo-star';
1336
+ readonly snapType: 'polygon';
1329
1337
  };
1330
1338
  readonly trapezoid: {
1331
1339
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1332
- readonly icon: "geo-trapezoid";
1333
- readonly snapType: "polygon";
1340
+ readonly icon: 'geo-trapezoid';
1341
+ readonly snapType: 'polygon';
1334
1342
  };
1335
1343
  readonly triangle: {
1336
1344
  readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1337
- readonly icon: "geo-triangle";
1338
- readonly snapType: "polygon";
1345
+ readonly icon: 'geo-triangle';
1346
+ readonly snapType: 'polygon';
1339
1347
  };
1340
1348
  };
1341
1349
 
@@ -1399,7 +1407,7 @@ export declare function DefaultHelperButtons({ children }: TLUiHelperButtonsProp
1399
1407
  export declare function DefaultHelperButtonsContent(): JSX.Element;
1400
1408
 
1401
1409
  /** @public @react */
1402
- export declare const DefaultHelpMenu: NamedExoticComponent<TLUiHelpMenuProps>;
1410
+ export declare const DefaultHelpMenu: MemoExoticComponent<({ children }: TLUiHelpMenuProps) => JSX.Element | null>;
1403
1411
 
1404
1412
  /** @public @react */
1405
1413
  export declare function DefaultHelpMenuContent(): JSX.Element;
@@ -1420,31 +1428,31 @@ export declare interface DefaultImageToolbarContentProps {
1420
1428
  }
1421
1429
 
1422
1430
  /** @public @react */
1423
- export declare const DefaultKeyboardShortcutsDialog: NamedExoticComponent<TLUiKeyboardShortcutsDialogProps>;
1431
+ export declare const DefaultKeyboardShortcutsDialog: MemoExoticComponent<({ children, }: TLUiKeyboardShortcutsDialogProps) => JSX.Element>;
1424
1432
 
1425
1433
  /** @public @react */
1426
1434
  export declare function DefaultKeyboardShortcutsDialogContent(): JSX.Element;
1427
1435
 
1428
1436
  /** @public @react */
1429
- export declare const DefaultMainMenu: NamedExoticComponent<TLUiMainMenuProps>;
1437
+ export declare const DefaultMainMenu: MemoExoticComponent<({ children }: TLUiMainMenuProps) => JSX.Element>;
1430
1438
 
1431
1439
  /** @public @react */
1432
1440
  export declare function DefaultMainMenuContent(): JSX.Element;
1433
1441
 
1434
1442
  /** @public @react */
1435
- export declare const DefaultMenuPanel: NamedExoticComponent<object>;
1443
+ export declare const DefaultMenuPanel: MemoExoticComponent<() => JSX.Element | null>;
1436
1444
 
1437
1445
  /** @public @react */
1438
1446
  export declare function DefaultMinimap(): JSX.Element;
1439
1447
 
1440
1448
  /** @public @react */
1441
- export declare const DefaultNavigationPanel: NamedExoticComponent<object>;
1449
+ export declare const DefaultNavigationPanel: MemoExoticComponent<() => JSX.Element | null>;
1442
1450
 
1443
1451
  /** @public */
1444
1452
  export declare const defaultOverlayUtils: readonly [typeof ArrowBindingHintOverlayUtil, typeof ArrowHintOverlayUtil, typeof BrushOverlayUtil, typeof CollaboratorBrushOverlayUtil, typeof CollaboratorHintOverlayUtil, typeof CollaboratorScribbleOverlayUtil, typeof CollaboratorShapeIndicatorOverlayUtil, typeof ScribbleOverlayUtil, typeof SelectionForegroundOverlayUtil, typeof ShapeHandleOverlayUtil, typeof ShapeIndicatorOverlayUtil, typeof SnapIndicatorOverlayUtil, typeof ZoomBrushOverlayUtil];
1445
1453
 
1446
1454
  /** @public @react */
1447
- export declare const DefaultPageMenu: NamedExoticComponent<object>;
1455
+ export declare const DefaultPageMenu: MemoExoticComponent<() => JSX.Element>;
1448
1456
 
1449
1457
  /** @public @react */
1450
1458
  declare function DefaultPeopleMenu({ children }: DefaultPeopleMenuProps): JSX.Element | null;
@@ -1463,7 +1471,7 @@ export declare interface DefaultPeopleMenuContentProps {
1463
1471
  }
1464
1472
 
1465
1473
  /** @public @react */
1466
- export declare function DefaultPeopleMenuFacePile({ userIds, userName, userColor }: TLUiPeopleMenuFacePileProps): JSX.Element;
1474
+ export declare function DefaultPeopleMenuFacePile({ userIds, userName, userColor, }: TLUiPeopleMenuFacePileProps): JSX.Element;
1467
1475
 
1468
1476
  /** @public @react */
1469
1477
  export declare const DefaultPeopleMenuItem: NamedExoticComponent<TLUiPeopleMenuItemProps>;
@@ -1476,7 +1484,7 @@ export { DefaultPeopleMenuProps }
1476
1484
  export { DefaultPeopleMenuProps as PeopleMenuProps }
1477
1485
 
1478
1486
  /** @public @react */
1479
- export declare const DefaultQuickActions: NamedExoticComponent<TLUiQuickActionsProps>;
1487
+ export declare const DefaultQuickActions: MemoExoticComponent<({ children, }: TLUiQuickActionsProps) => JSX.Element>;
1480
1488
 
1481
1489
  /** @public @react */
1482
1490
  export declare function DefaultQuickActionsContent(): JSX.Element | undefined;
@@ -1493,7 +1501,7 @@ export declare const DefaultRichTextToolbar: React_3.NamedExoticComponent<TLUiRi
1493
1501
  *
1494
1502
  * @public @react
1495
1503
  */
1496
- export declare function DefaultRichTextToolbarContent({ textEditor, onEditLinkStart }: DefaultRichTextToolbarContentProps): JSX.Element[];
1504
+ export declare function DefaultRichTextToolbarContent({ textEditor, onEditLinkStart, }: DefaultRichTextToolbarContentProps): JSX.Element[];
1497
1505
 
1498
1506
  /** @public */
1499
1507
  export declare interface DefaultRichTextToolbarContentProps {
@@ -1511,13 +1519,13 @@ export declare const defaultShapeUtils: readonly [typeof TextShapeUtil, typeof B
1511
1519
  export declare function DefaultSharePanel(): JSX.Element | null;
1512
1520
 
1513
1521
  /** @public @react */
1514
- export declare const DefaultStylePanel: NamedExoticComponent<TLUiStylePanelProps>;
1522
+ export declare const DefaultStylePanel: MemoExoticComponent<({ isMobile, styles, children, }: TLUiStylePanelProps) => JSX.Element | null>;
1515
1523
 
1516
1524
  /** @public @react */
1517
1525
  export declare function DefaultStylePanelContent(): JSX.Element;
1518
1526
 
1519
1527
  /** @public @react */
1520
- export declare const DefaultToasts: NamedExoticComponent<object>;
1528
+ export declare const DefaultToasts: MemoExoticComponent<() => JSX.Element>;
1521
1529
 
1522
1530
  /**
1523
1531
  * The default toolbar for the editor. `children` defaults to the `DefaultToolbarContent` component.
@@ -1527,7 +1535,7 @@ export declare const DefaultToasts: NamedExoticComponent<object>;
1527
1535
  * @public
1528
1536
  * @react
1529
1537
  */
1530
- export declare const DefaultToolbar: NamedExoticComponent<DefaultToolbarProps>;
1538
+ export declare const DefaultToolbar: MemoExoticComponent<({ children, orientation, minItems, minSizePx, maxItems, maxSizePx, }: DefaultToolbarProps) => JSX.Element>;
1531
1539
 
1532
1540
  /** @public @react */
1533
1541
  export declare function DefaultToolbarContent(): JSX.Element;
@@ -1561,7 +1569,7 @@ export declare interface DefaultVideoToolbarContentProps {
1561
1569
  }
1562
1570
 
1563
1571
  /** @public @react */
1564
- export declare const DefaultZoomMenu: NamedExoticComponent<TLUiZoomMenuProps>;
1572
+ export declare const DefaultZoomMenu: MemoExoticComponent<({ children }: TLUiZoomMenuProps) => JSX.Element>;
1565
1573
 
1566
1574
  /** @public @react */
1567
1575
  export declare function DefaultZoomMenuContent(): JSX.Element;
@@ -1594,8 +1602,8 @@ export declare function DistributeMenuItems(): JSX.Element;
1594
1602
  * @public
1595
1603
  */
1596
1604
  export declare function downsizeImage(blob: Blob, width: number, height: number, opts?: {
1597
- quality?: number | undefined;
1598
- type?: string | undefined;
1605
+ quality?: number;
1606
+ type?: string;
1599
1607
  }): Promise<Blob>;
1600
1608
 
1601
1609
  /** @public */
@@ -1635,7 +1643,7 @@ export declare class DrawShapeTool extends StateNode {
1635
1643
 
1636
1644
  /** @public */
1637
1645
  export declare class DrawShapeUtil extends ShapeUtil<TLDrawShape> {
1638
- static type: "draw";
1646
+ static type: 'draw';
1639
1647
  static props: RecordProps<TLDrawShape>;
1640
1648
  static migrations: TLPropsMigrations;
1641
1649
  options: DrawShapeOptions;
@@ -1976,7 +1984,7 @@ export declare const embedShapePermissionDefaults: {
1976
1984
 
1977
1985
  /** @public */
1978
1986
  export declare class EmbedShapeUtil extends BaseBoxShapeUtil<TLEmbedShape> {
1979
- static type: "embed";
1987
+ static type: 'embed';
1980
1988
  static props: RecordProps<TLEmbedShape>;
1981
1989
  static migrations: TLPropsMigrations;
1982
1990
  options: EmbedShapeOptions;
@@ -1994,6 +2002,11 @@ export declare class EmbedShapeUtil extends BaseBoxShapeUtil<TLEmbedShape> {
1994
2002
  * applied without adding to the undo history.
1995
2003
  */
1996
2004
  resolveAspectRatio(shape: TLEmbedShape): Promise<void>;
2005
+ /**
2006
+ * Resolve the content's aspect ratio from the URL's OpenGraph metadata, fetched through the
2007
+ * editor's url asset handler (the "unfurl" service). Returns `undefined` if no usable dimensions
2008
+ * are available (e.g. no unfurl service is configured, or the page reports no image size).
2009
+ */
1997
2010
  private getContentAspectRatio;
1998
2011
  getText(shape: TLEmbedShape): string;
1999
2012
  getAriaDescriptor(shape: TLEmbedShape): string | undefined;
@@ -2028,7 +2041,7 @@ export declare class EraserTool extends StateNode {
2028
2041
  static isLockable: boolean;
2029
2042
  static children(): TLStateNodeConstructor[];
2030
2043
  info: {
2031
- onInteractionEnd?: string | undefined;
2044
+ onInteractionEnd?: string;
2032
2045
  };
2033
2046
  onEnter(info?: {
2034
2047
  onInteractionEnd?: string;
@@ -2047,7 +2060,7 @@ export declare interface EventsProviderProps {
2047
2060
  }
2048
2061
 
2049
2062
  /** @public @react */
2050
- export declare function ExampleDialog({ title, body, cancel, confirm, displayDontShowAgain, maxWidth, onCancel, onContinue }: ExampleDialogProps): JSX.Element;
2063
+ export declare function ExampleDialog({ title, body, cancel, confirm, displayDontShowAgain, maxWidth, onCancel, onContinue, }: ExampleDialogProps): JSX.Element;
2051
2064
 
2052
2065
  /** @public */
2053
2066
  export declare interface ExampleDialogProps {
@@ -2129,13 +2142,13 @@ export declare interface FrameShapeOptions extends ShapeOptionsWithDisplayValues
2129
2142
  export declare class FrameShapeTool extends BaseBoxShapeTool {
2130
2143
  static id: string;
2131
2144
  static initial: string;
2132
- shapeType: "frame";
2145
+ shapeType: 'frame';
2133
2146
  onCreate(shape: null | TLShape): void;
2134
2147
  }
2135
2148
 
2136
2149
  /** @public */
2137
2150
  export declare class FrameShapeUtil extends BaseFrameLikeShapeUtil<TLFrameShape> {
2138
- static type: "frame";
2151
+ static type: 'frame';
2139
2152
  static props: RecordProps<TLFrameShape>;
2140
2153
  static migrations: TLPropsMigrations;
2141
2154
  options: FrameShapeOptions;
@@ -2220,7 +2233,7 @@ export declare class GeoShapeTool extends StateNode {
2220
2233
 
2221
2234
  /** @public */
2222
2235
  export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
2223
- static type: "geo";
2236
+ static type: 'geo';
2224
2237
  static props: RecordProps<TLGeoShape>;
2225
2238
  static migrations: TLPropsMigrations;
2226
2239
  static configure<T extends TLShapeUtilConstructor<any, any>>(this: T, options: T extends new (...args: any[]) => {
@@ -2253,34 +2266,30 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
2253
2266
  index: IndexKey;
2254
2267
  isLocked: boolean;
2255
2268
  meta: JsonObject;
2256
- opacity: number;
2269
+ opacity: TLOpacityType;
2257
2270
  parentId: TLParentId;
2258
2271
  props: {
2259
- align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
2272
+ align: TLDefaultHorizontalAlignStyle;
2260
2273
  color: TLDefaultColorStyle;
2261
- dash: "dashed" | "dotted" | "draw" | "none" | "solid";
2262
- fill: "fill" | "lined-fill" | "none" | "pattern" | "semi" | "solid";
2274
+ dash: TLDefaultDashStyle;
2275
+ fill: TLDefaultFillStyle;
2263
2276
  flipX: boolean;
2264
2277
  flipY: boolean;
2265
2278
  font: TLDefaultFontStyle;
2266
- geo: "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "heart" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box";
2279
+ geo: TLGeoShapeGeoStyle;
2267
2280
  growY: number;
2268
2281
  h: number;
2269
2282
  labelColor: TLDefaultColorStyle;
2270
- richText: {
2271
- attrs?: any;
2272
- content: unknown[];
2273
- type: string;
2274
- };
2283
+ richText: TLRichText;
2275
2284
  scale: number;
2276
- size: "l" | "m" | "s" | "xl";
2285
+ size: TLDefaultSizeStyle;
2277
2286
  url: string;
2278
- verticalAlign: "end" | "middle" | "start";
2287
+ verticalAlign: TLDefaultVerticalAlignStyle;
2279
2288
  w: number;
2280
2289
  };
2281
2290
  rotation: number;
2282
2291
  type: "geo";
2283
- typeName: "shape";
2292
+ typeName: 'shape';
2284
2293
  x: number;
2285
2294
  y: number;
2286
2295
  } | undefined;
@@ -2289,34 +2298,30 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
2289
2298
  index: IndexKey;
2290
2299
  isLocked: boolean;
2291
2300
  meta: JsonObject;
2292
- opacity: number;
2301
+ opacity: TLOpacityType;
2293
2302
  parentId: TLParentId;
2294
2303
  props: {
2295
- align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
2304
+ align: TLDefaultHorizontalAlignStyle;
2296
2305
  color: TLDefaultColorStyle;
2297
- dash: "dashed" | "dotted" | "draw" | "none" | "solid";
2298
- fill: "fill" | "lined-fill" | "none" | "pattern" | "semi" | "solid";
2306
+ dash: TLDefaultDashStyle;
2307
+ fill: TLDefaultFillStyle;
2299
2308
  flipX: boolean;
2300
2309
  flipY: boolean;
2301
2310
  font: TLDefaultFontStyle;
2302
- geo: "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "heart" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box";
2311
+ geo: TLGeoShapeGeoStyle;
2303
2312
  growY: number;
2304
2313
  h: number;
2305
2314
  labelColor: TLDefaultColorStyle;
2306
- richText: {
2307
- attrs?: any;
2308
- content: unknown[];
2309
- type: string;
2310
- };
2315
+ richText: TLRichText;
2311
2316
  scale: number;
2312
- size: "l" | "m" | "s" | "xl";
2317
+ size: TLDefaultSizeStyle;
2313
2318
  url: string;
2314
- verticalAlign: "end" | "middle" | "start";
2319
+ verticalAlign: TLDefaultVerticalAlignStyle;
2315
2320
  w: number;
2316
2321
  };
2317
2322
  rotation: number;
2318
2323
  type: "geo";
2319
- typeName: "shape";
2324
+ typeName: 'shape';
2320
2325
  x: number;
2321
2326
  y: number;
2322
2327
  } | undefined;
@@ -2325,34 +2330,30 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
2325
2330
  index: IndexKey;
2326
2331
  isLocked: boolean;
2327
2332
  meta: JsonObject;
2328
- opacity: number;
2333
+ opacity: TLOpacityType;
2329
2334
  parentId: TLParentId;
2330
2335
  props: {
2331
- align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
2336
+ align: TLDefaultHorizontalAlignStyle;
2332
2337
  color: TLDefaultColorStyle;
2333
- dash: "dashed" | "dotted" | "draw" | "none" | "solid";
2334
- fill: "fill" | "lined-fill" | "none" | "pattern" | "semi" | "solid";
2338
+ dash: TLDefaultDashStyle;
2339
+ fill: TLDefaultFillStyle;
2335
2340
  flipX: boolean;
2336
2341
  flipY: boolean;
2337
2342
  font: TLDefaultFontStyle;
2338
- geo: "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "heart" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box";
2343
+ geo: TLGeoShapeGeoStyle;
2339
2344
  growY: number;
2340
2345
  h: number;
2341
2346
  labelColor: TLDefaultColorStyle;
2342
- richText: {
2343
- attrs?: any;
2344
- content: unknown[];
2345
- type: string;
2346
- };
2347
+ richText: TLRichText;
2347
2348
  scale: number;
2348
- size: "l" | "m" | "s" | "xl";
2349
+ size: TLDefaultSizeStyle;
2349
2350
  url: string;
2350
- verticalAlign: "end" | "middle" | "start";
2351
+ verticalAlign: TLDefaultVerticalAlignStyle;
2351
2352
  w: number;
2352
2353
  };
2353
2354
  rotation: number;
2354
2355
  type: "geo";
2355
- typeName: "shape";
2356
+ typeName: 'shape';
2356
2357
  x: number;
2357
2358
  y: number;
2358
2359
  } | {
@@ -2360,14 +2361,14 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
2360
2361
  index: IndexKey;
2361
2362
  isLocked: boolean;
2362
2363
  meta: JsonObject;
2363
- opacity: number;
2364
+ opacity: TLOpacityType;
2364
2365
  parentId: TLParentId;
2365
2366
  props: {
2366
- geo: "check-box";
2367
+ geo: 'check-box';
2367
2368
  };
2368
2369
  rotation: number;
2369
2370
  type: "geo";
2370
- typeName: "shape";
2371
+ typeName: 'shape';
2371
2372
  x: number;
2372
2373
  y: number;
2373
2374
  } | {
@@ -2375,14 +2376,14 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
2375
2376
  index: IndexKey;
2376
2377
  isLocked: boolean;
2377
2378
  meta: JsonObject;
2378
- opacity: number;
2379
+ opacity: TLOpacityType;
2379
2380
  parentId: TLParentId;
2380
2381
  props: {
2381
- geo: "rectangle";
2382
+ geo: 'rectangle';
2382
2383
  };
2383
2384
  rotation: number;
2384
2385
  type: "geo";
2385
- typeName: "shape";
2386
+ typeName: 'shape';
2386
2387
  x: number;
2387
2388
  y: number;
2388
2389
  } | undefined;
@@ -2708,7 +2709,7 @@ export declare class HighlightShapeTool extends StateNode {
2708
2709
 
2709
2710
  /** @public */
2710
2711
  export declare class HighlightShapeUtil extends ShapeUtil<TLHighlightShape> {
2711
- static type: "highlight";
2712
+ static type: 'highlight';
2712
2713
  static props: RecordProps<TLHighlightShape>;
2713
2714
  static migrations: TLPropsMigrations;
2714
2715
  options: HighlightShapeOptions;
@@ -2743,11 +2744,11 @@ export declare interface HighlightShapeUtilDisplayValues {
2743
2744
  export declare function HighlightToolbarItem(): JSX.Element;
2744
2745
 
2745
2746
  /** @public */
2746
- export declare const iconTypes: readonly ["align-bottom", "align-center-horizontal", "align-center-vertical", "align-left", "align-right", "align-top", "alt", "arrow-arc", "arrow-cycle", "arrow-elbow", "arrow-left", "arrowhead-arrow", "arrowhead-bar", "arrowhead-diamond", "arrowhead-dot", "arrowhead-none", "arrowhead-square", "arrowhead-triangle-inverted", "arrowhead-triangle", "blob", "bold", "bookmark", "bring-forward", "bring-to-front", "broken", "bulletList", "check-circle", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "chevrons-ne", "chevrons-sw", "clipboard-copied", "clipboard-copy", "closed", "code", "color", "comment", "corners", "crop", "cross-2", "cross-circle", "dash-dashed", "dash-dotted", "dash-draw", "dash-solid", "disconnected", "discord", "distribute-horizontal", "distribute-vertical", "dot", "dots-horizontal", "dots-vertical", "download", "drag-handle-dots", "duplicate", "edit", "external-link", "fill-fill", "fill-lined-fill", "fill-none", "fill-pattern", "fill-semi", "fill-solid", "follow", "following", "font-draw", "font-mono", "font-sans", "font-serif", "geo-arrow-down", "geo-arrow-left", "geo-arrow-right", "geo-arrow-up", "geo-check-box", "geo-cloud", "geo-diamond", "geo-ellipse", "geo-heart", "geo-hexagon", "geo-octagon", "geo-oval", "geo-pentagon", "geo-rectangle", "geo-rhombus-2", "geo-rhombus", "geo-star", "geo-trapezoid", "geo-triangle", "geo-x-box", "github", "group", "heading", "help-circle", "highlight", "horizontal-align-end", "horizontal-align-middle", "horizontal-align-start", "info-circle", "italic", "leading", "link", "list", "lock", "manual", "menu", "minus", "mixed", "pack", "plus", "question-mark-circle", "question-mark", "redo", "reset-zoom", "rotate-ccw", "rotate-cw", "send-backward", "send-to-back", "share-1", "size-extra-large", "size-large", "size-medium", "size-small", "spline-cubic", "spline-line", "stack-horizontal", "stack-vertical", "status-offline", "stretch-horizontal", "stretch-vertical", "strike", "text-align-center", "text-align-left", "text-align-right", "toggle-off", "toggle-on", "tool-arrow", "tool-eraser", "tool-frame", "tool-hand", "tool-highlight", "tool-laser", "tool-line", "tool-media", "tool-note", "tool-pencil", "tool-pointer", "tool-screenshot", "tool-text", "trash", "twitter", "underline", "undo", "ungroup", "unlock", "vertical-align-end", "vertical-align-middle", "vertical-align-start", "warning-triangle", "zoom-in", "zoom-out"];
2747
+ export declare const iconTypes: readonly ['align-bottom', 'align-center-horizontal', 'align-center-vertical', 'align-left', 'align-right', 'align-top', 'alt', 'arrow-arc', 'arrow-cycle', 'arrow-elbow', 'arrow-left', 'arrowhead-arrow', 'arrowhead-bar', 'arrowhead-diamond', 'arrowhead-dot', 'arrowhead-none', 'arrowhead-square', 'arrowhead-triangle-inverted', 'arrowhead-triangle', 'blob', 'bold', 'bookmark', 'bring-forward', 'bring-to-front', 'broken', 'bulletList', 'check-circle', 'check', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'chevrons-ne', 'chevrons-sw', 'clipboard-copied', 'clipboard-copy', 'closed', 'code', 'color', 'comment', 'corners', 'crop', 'cross-2', 'cross-circle', 'dash-dashed', 'dash-dotted', 'dash-draw', 'dash-solid', 'disconnected', 'discord', 'distribute-horizontal', 'distribute-vertical', 'dot', 'dots-horizontal', 'dots-vertical', 'download', 'drag-handle-dots', 'duplicate', 'edit', 'external-link', 'fill-fill', 'fill-lined-fill', 'fill-none', 'fill-pattern', 'fill-semi', 'fill-solid', 'follow', 'following', 'font-draw', 'font-mono', 'font-sans', 'font-serif', 'geo-arrow-down', 'geo-arrow-left', 'geo-arrow-right', 'geo-arrow-up', 'geo-check-box', 'geo-cloud', 'geo-diamond', 'geo-ellipse', 'geo-heart', 'geo-hexagon', 'geo-octagon', 'geo-oval', 'geo-pentagon', 'geo-rectangle', 'geo-rhombus-2', 'geo-rhombus', 'geo-star', 'geo-trapezoid', 'geo-triangle', 'geo-x-box', 'github', 'group', 'heading', 'help-circle', 'highlight', 'horizontal-align-end', 'horizontal-align-middle', 'horizontal-align-start', 'info-circle', 'italic', 'leading', 'link', 'list', 'lock', 'manual', 'menu', 'minus', 'mixed', 'pack', 'plus', 'question-mark-circle', 'question-mark', 'redo', 'reset-zoom', 'rotate-ccw', 'rotate-cw', 'send-backward', 'send-to-back', 'share-1', 'size-extra-large', 'size-large', 'size-medium', 'size-small', 'spline-cubic', 'spline-line', 'stack-horizontal', 'stack-vertical', 'status-offline', 'stretch-horizontal', 'stretch-vertical', 'strike', 'text-align-center', 'text-align-left', 'text-align-right', 'toggle-off', 'toggle-on', 'tool-arrow', 'tool-eraser', 'tool-frame', 'tool-hand', 'tool-highlight', 'tool-laser', 'tool-line', 'tool-media', 'tool-note', 'tool-pencil', 'tool-pointer', 'tool-screenshot', 'tool-text', 'trash', 'twitter', 'underline', 'undo', 'ungroup', 'unlock', 'vertical-align-end', 'vertical-align-middle', 'vertical-align-start', 'warning-triangle', 'zoom-in', 'zoom-out'];
2747
2748
 
2748
2749
  /** @public */
2749
2750
  export declare class ImageAssetUtil extends AssetUtil<TLImageAsset> {
2750
- static type: "image";
2751
+ static type: 'image';
2751
2752
  static props: {
2752
2753
  fileSize: Validator<number | undefined>;
2753
2754
  h: Validator<number>;
@@ -2774,10 +2775,10 @@ export declare interface ImageShapeOptions extends ShapeOptionsWithDisplayValues
2774
2775
 
2775
2776
  /** @public */
2776
2777
  export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
2777
- static type: "image";
2778
+ static type: 'image';
2778
2779
  static props: RecordProps<TLImageShape>;
2779
2780
  static migrations: TLPropsMigrations;
2780
- static handledAssetTypes: readonly ["image"];
2781
+ static handledAssetTypes: readonly ['image'];
2781
2782
  options: ImageShapeOptions;
2782
2783
  isAspectRatioLocked(shape: TLImageShape): boolean;
2783
2784
  canCrop(shape: TLImageShape): boolean;
@@ -2843,7 +2844,7 @@ export declare class LineShapeTool extends StateNode {
2843
2844
 
2844
2845
  /** @public */
2845
2846
  export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
2846
- static type: "line";
2847
+ static type: 'line';
2847
2848
  static props: RecordProps<TLLineShape>;
2848
2849
  static migrations: TLPropsMigrations;
2849
2850
  options: LineShapeOptions;
@@ -2873,11 +2874,11 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
2873
2874
  index: IndexKey;
2874
2875
  isLocked: boolean;
2875
2876
  meta: JsonObject;
2876
- opacity: number;
2877
+ opacity: TLOpacityType;
2877
2878
  parentId: TLParentId;
2878
2879
  props: {
2879
2880
  color: TLDefaultColorStyle;
2880
- dash: "dashed" | "dotted" | "draw" | "none" | "solid";
2881
+ dash: TLDefaultDashStyle;
2881
2882
  points: {
2882
2883
  [x: string]: {
2883
2884
  id: string;
@@ -2887,12 +2888,12 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
2887
2888
  } | TLLineShapePoint;
2888
2889
  };
2889
2890
  scale: number;
2890
- size: "l" | "m" | "s" | "xl";
2891
- spline: "cubic" | "line";
2891
+ size: TLDefaultSizeStyle;
2892
+ spline: TLLineShapeSplineStyle;
2892
2893
  };
2893
2894
  rotation: number;
2894
2895
  type: "line";
2895
- typeName: "shape";
2896
+ typeName: 'shape';
2896
2897
  x: number;
2897
2898
  y: number;
2898
2899
  };
@@ -2901,11 +2902,11 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
2901
2902
  index: IndexKey;
2902
2903
  isLocked: boolean;
2903
2904
  meta: JsonObject;
2904
- opacity: number;
2905
+ opacity: TLOpacityType;
2905
2906
  parentId: TLParentId;
2906
2907
  props: {
2907
2908
  color: TLDefaultColorStyle;
2908
- dash: "dashed" | "dotted" | "draw" | "none" | "solid";
2909
+ dash: TLDefaultDashStyle;
2909
2910
  points: {
2910
2911
  [x: string]: {
2911
2912
  id: IndexKey;
@@ -2915,12 +2916,12 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
2915
2916
  } | TLLineShapePoint;
2916
2917
  };
2917
2918
  scale: number;
2918
- size: "l" | "m" | "s" | "xl";
2919
- spline: "cubic" | "line";
2919
+ size: TLDefaultSizeStyle;
2920
+ spline: TLLineShapeSplineStyle;
2920
2921
  };
2921
2922
  rotation: number;
2922
2923
  type: "line";
2923
- typeName: "shape";
2924
+ typeName: 'shape';
2924
2925
  x: number;
2925
2926
  y: number;
2926
2927
  } | undefined;
@@ -2980,7 +2981,7 @@ export declare class NoteShapeTool extends StateNode {
2980
2981
 
2981
2982
  /** @public */
2982
2983
  export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
2983
- static type: "note";
2984
+ static type: 'note';
2984
2985
  static props: RecordProps<TLNoteShape>;
2985
2986
  static migrations: TLPropsMigrations;
2986
2987
  options: NoteShapeOptions;
@@ -3009,29 +3010,25 @@ export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
3009
3010
  index: IndexKey_2;
3010
3011
  isLocked: boolean;
3011
3012
  meta: JsonObject;
3012
- opacity: number;
3013
+ opacity: TLOpacityType;
3013
3014
  parentId: TLParentId;
3014
3015
  props: {
3015
- align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
3016
+ align: TLDefaultHorizontalAlignStyle;
3016
3017
  color: TLDefaultColorStyle;
3017
3018
  font: TLDefaultFontStyle;
3018
3019
  fontSizeAdjustment: number;
3019
3020
  growY: number;
3020
3021
  labelColor: TLDefaultColorStyle;
3021
- richText: {
3022
- attrs?: any;
3023
- content: unknown[];
3024
- type: string;
3025
- };
3022
+ richText: TLRichText;
3026
3023
  scale: number;
3027
- size: "l" | "m" | "s" | "xl";
3024
+ size: TLDefaultSizeStyle;
3028
3025
  textLastEditedBy: null | string;
3029
3026
  url: string;
3030
- verticalAlign: "end" | "middle" | "start";
3027
+ verticalAlign: TLDefaultVerticalAlignStyle;
3031
3028
  };
3032
3029
  rotation: number;
3033
3030
  type: "note";
3034
- typeName: "shape";
3031
+ typeName: 'shape';
3035
3032
  x: number;
3036
3033
  y: number;
3037
3034
  } | undefined;
@@ -3122,7 +3119,7 @@ export declare interface OnDragFromToolbarToCreateShapesOpts {
3122
3119
  export declare function OvalToolbarItem(): JSX.Element;
3123
3120
 
3124
3121
  /** @public @react */
3125
- export declare function OverflowingToolbar({ children, orientation, sizingParentClassName, minItems, minSizePx, maxItems, maxSizePx }: OverflowingToolbarProps): JSX.Element;
3122
+ export declare function OverflowingToolbar({ children, orientation, sizingParentClassName, minItems, minSizePx, maxItems, maxSizePx, }: OverflowingToolbarProps): JSX.Element;
3126
3123
 
3127
3124
  /** @public */
3128
3125
  export declare interface OverflowingToolbarProps {
@@ -3164,7 +3161,7 @@ export declare interface PageItemSubmenuProps {
3164
3161
  /* Excluded from this release type: parseAndLoadDocument */
3165
3162
 
3166
3163
  /** @public */
3167
- export declare function parseTldrawJsonFile({ json, schema }: {
3164
+ export declare function parseTldrawJsonFile({ json, schema, }: {
3168
3165
  json: string;
3169
3166
  schema: TLSchema;
3170
3167
  }): Result<TLStore, TldrawFileParseError>;
@@ -3284,7 +3281,7 @@ export declare const PlainTextArea: React_3.ForwardRefExoticComponent<TextAreaPr
3284
3281
  *
3285
3282
  * @public @react
3286
3283
  */
3287
- export declare const PlainTextLabel: React_3.NamedExoticComponent<PlainTextLabelProps>;
3284
+ export declare const PlainTextLabel: React_3.MemoExoticComponent<({ shapeId, type, text: plaintext, labelColor, fontFamily, fontSize, lineHeight, textAlign, verticalAlign, wrap, isSelected, padding, onKeyDown: handleKeyDownCustom, classNamePrefix, style, textWidth, textHeight, showTextOutline, }: PlainTextLabelProps) => JSX.Element | null>;
3288
3285
 
3289
3286
  /** @public */
3290
3287
  export declare interface PlainTextLabelProps {
@@ -3387,7 +3384,7 @@ export declare function RemoveFrameMenuItem(): JSX.Element | null;
3387
3384
  *
3388
3385
  * @public
3389
3386
  */
3390
- export declare function renderHtmlFromRichText(editor: Editor, richText: TLRichText): string;
3387
+ export declare function renderHtmlFromRichText(editor: Editor, richText: TLRichText_2): string;
3391
3388
 
3392
3389
  /**
3393
3390
  * Renders HTML from a rich text string for measurement.
@@ -3396,7 +3393,7 @@ export declare function renderHtmlFromRichText(editor: Editor, richText: TLRichT
3396
3393
  *
3397
3394
  * @public
3398
3395
  */
3399
- export declare function renderHtmlFromRichTextForMeasurement(editor: Editor, richText: TLRichText): string;
3396
+ export declare function renderHtmlFromRichTextForMeasurement(editor: Editor, richText: TLRichText_2): string;
3400
3397
 
3401
3398
  /**
3402
3399
  * Renders HTML from a rich text string using an explicit set of TipTap extensions, rather than the
@@ -3408,7 +3405,7 @@ export declare function renderHtmlFromRichTextForMeasurement(editor: Editor, ric
3408
3405
  *
3409
3406
  * @public
3410
3407
  */
3411
- export declare function renderHtmlFromRichTextWithExtensions(richText: TLRichText, extensions: Extensions): string;
3408
+ export declare function renderHtmlFromRichTextWithExtensions(richText: TLRichText_2, extensions: Extensions): string;
3412
3409
 
3413
3410
  /**
3414
3411
  * Renders plaintext from a rich text string.
@@ -3417,7 +3414,7 @@ export declare function renderHtmlFromRichTextWithExtensions(richText: TLRichTex
3417
3414
  *
3418
3415
  * @public
3419
3416
  */
3420
- export declare function renderPlaintextFromRichText(editor: Editor, richText: TLRichText): string;
3417
+ export declare function renderPlaintextFromRichText(editor: Editor, richText: TLRichText_2): string;
3421
3418
 
3422
3419
  /**
3423
3420
  * Renders JSONContent from html.
@@ -3426,7 +3423,7 @@ export declare function renderPlaintextFromRichText(editor: Editor, richText: TL
3426
3423
  *
3427
3424
  * @public
3428
3425
  */
3429
- export declare function renderRichTextFromHTML(editor: Editor, html: string): TLRichText;
3426
+ export declare function renderRichTextFromHTML(editor: Editor, html: string): TLRichText_2;
3430
3427
 
3431
3428
  /** @public @react */
3432
3429
  export declare function ReorderMenuItems(): JSX.Element;
@@ -3452,13 +3449,13 @@ export declare const RichTextArea: React_3.ForwardRefExoticComponent<TextAreaPro
3452
3449
  *
3453
3450
  * @public @react
3454
3451
  */
3455
- export declare const RichTextLabel: React_3.NamedExoticComponent<RichTextLabelProps>;
3452
+ export declare const RichTextLabel: React_3.MemoExoticComponent<({ shapeId, type, richText, labelColor, fontFamily, fontSize, lineHeight, textAlign, verticalAlign, wrap, isSelected, padding, onKeyDown: handleKeyDownCustom, classNamePrefix, style, textWidth, textHeight, hasCustomTabBehavior, showTextOutline, }: RichTextLabelProps) => JSX.Element | null>;
3456
3453
 
3457
3454
  /** @public */
3458
3455
  export declare interface RichTextLabelProps {
3459
3456
  shapeId: TLShapeId;
3460
3457
  type: ExtractShapeByProps<{
3461
- richText: TLRichText;
3458
+ richText: TLRichText_2;
3462
3459
  }>['type'];
3463
3460
  fontFamily: string;
3464
3461
  fontSize: number;
@@ -3466,7 +3463,7 @@ export declare interface RichTextLabelProps {
3466
3463
  textAlign: 'center' | 'end' | 'start';
3467
3464
  verticalAlign: 'end' | 'middle' | 'start';
3468
3465
  wrap?: boolean;
3469
- richText?: TLRichText;
3466
+ richText?: TLRichText_2;
3470
3467
  labelColor: string;
3471
3468
  bounds?: Box;
3472
3469
  isSelected: boolean;
@@ -3485,12 +3482,12 @@ export declare interface RichTextLabelProps {
3485
3482
  *
3486
3483
  * @public @react
3487
3484
  */
3488
- export declare function RichTextSVG({ bounds, richText, fontSize, fontFamily, lineHeight, textAlign, verticalAlign, wrap, labelColor, padding, showTextOutline }: RichTextSVGProps): JSX.Element;
3485
+ export declare function RichTextSVG({ bounds, richText, fontSize, fontFamily, lineHeight, textAlign, verticalAlign, wrap, labelColor, padding, showTextOutline, }: RichTextSVGProps): JSX.Element;
3489
3486
 
3490
3487
  /** @public */
3491
3488
  export declare interface RichTextSVGProps {
3492
3489
  bounds: Box;
3493
- richText: TLRichText;
3490
+ richText: TLRichText_2;
3494
3491
  fontSize: number;
3495
3492
  fontFamily: string;
3496
3493
  lineHeight: number;
@@ -3761,10 +3758,10 @@ export declare function StylePanelArrowheadPicker(): JSX.Element | null;
3761
3758
  export declare function StylePanelArrowKindPicker(): JSX.Element | null;
3762
3759
 
3763
3760
  /** @public @react */
3764
- export declare const StylePanelButtonPicker: <T extends string>(props: StylePanelButtonPickerProps<T>) => JSX_2.Element;
3761
+ export declare const StylePanelButtonPicker: <T extends string>(props: StylePanelButtonPickerProps<T>) => React.JSX.Element;
3765
3762
 
3766
3763
  /** @public @react*/
3767
- export declare const StylePanelButtonPickerInline: <T extends string>(props: StylePanelButtonPickerProps<T>) => JSX_2.Element;
3764
+ export declare const StylePanelButtonPickerInline: <T extends string>(props: StylePanelButtonPickerProps<T>) => React.JSX.Element;
3768
3765
 
3769
3766
  /** @public */
3770
3767
  export declare interface StylePanelButtonPickerProps<T extends string> {
@@ -3902,13 +3899,13 @@ export declare interface TextAreaProps {
3902
3899
  isEditing: boolean;
3903
3900
  text?: string;
3904
3901
  shapeId: TLShapeId;
3905
- richText?: TLRichText;
3902
+ richText?: TLRichText_2;
3906
3903
  handleFocus(): void;
3907
3904
  handleBlur(): void;
3908
3905
  handleKeyDown(e: KeyboardEvent): void;
3909
3906
  handleChange(changeInfo: {
3910
3907
  plaintext?: string;
3911
- richText?: TLRichText;
3908
+ richText?: TLRichText_2;
3912
3909
  }): void;
3913
3910
  handleInputPointerDown(e: React_3.PointerEvent<HTMLElement>): void;
3914
3911
  handleDoubleClick(e: any): any;
@@ -3934,7 +3931,7 @@ export declare class TextShapeTool extends StateNode {
3934
3931
 
3935
3932
  /** @public */
3936
3933
  export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
3937
- static type: "text";
3934
+ static type: 'text';
3938
3935
  static props: RecordProps<TLTextShape>;
3939
3936
  static migrations: TLPropsMigrations;
3940
3937
  options: TextShapeOptions;
@@ -3975,25 +3972,21 @@ export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
3975
3972
  index: IndexKey;
3976
3973
  isLocked: boolean;
3977
3974
  meta: JsonObject;
3978
- opacity: number;
3975
+ opacity: TLOpacityType;
3979
3976
  parentId: TLParentId;
3980
3977
  props: {
3981
3978
  autoSize: boolean;
3982
3979
  color: TLDefaultColorStyle;
3983
3980
  font: TLDefaultFontStyle;
3984
- richText: {
3985
- attrs?: any;
3986
- content: unknown[];
3987
- type: string;
3988
- };
3981
+ richText: TLRichText;
3989
3982
  scale: number;
3990
- size: "l" | "m" | "s" | "xl";
3991
- textAlign: "end" | "middle" | "start";
3983
+ size: TLDefaultSizeStyle;
3984
+ textAlign: TLDefaultTextAlignStyle;
3992
3985
  w: number;
3993
3986
  };
3994
3987
  rotation: number;
3995
3988
  type: "text";
3996
- typeName: "shape";
3989
+ typeName: 'shape';
3997
3990
  x: number;
3998
3991
  y: number;
3999
3992
  } | undefined;
@@ -4223,7 +4216,7 @@ export declare interface TLDefaultFonts {
4223
4216
  export declare function Tldraw(props: TldrawProps): JSX.Element;
4224
4217
 
4225
4218
  /** @public */
4226
- export declare const TLDRAW_FILE_EXTENSION: ".tldr";
4219
+ export declare const TLDRAW_FILE_EXTENSION: '.tldr';
4227
4220
 
4228
4221
  /** @public */
4229
4222
  export declare interface TldrawBaseProps extends TldrawUiProps, TldrawEditorBaseProps, TLExternalContentProps {
@@ -4308,7 +4301,7 @@ export declare type TldrawFileParseError = {
4308
4301
  * @public
4309
4302
  * @react
4310
4303
  */
4311
- export declare const TldrawImage: NamedExoticComponent<TldrawImageProps>;
4304
+ export declare const TldrawImage: MemoExoticComponent<(props: TldrawImageProps) => JSX.Element>;
4312
4305
 
4313
4306
  /** @public */
4314
4307
  export declare interface TldrawImageProps extends TLImageExportOptions {
@@ -4365,7 +4358,7 @@ export declare type TldrawProps = TldrawBaseProps & TldrawEditorStoreProps;
4365
4358
  * @public
4366
4359
  * @react
4367
4360
  */
4368
- export declare const TldrawUi: React_3.NamedExoticComponent<TldrawUiProps>;
4361
+ export declare const TldrawUi: React_3.MemoExoticComponent<({ renderDebugMenuItems, children, hideUi, components, ...rest }: TldrawUiProps) => JSX.Element>;
4369
4362
 
4370
4363
  /** @public @react */
4371
4364
  export declare function TldrawUiA11yProvider({ children }: A11yProviderProps): JSX.Element;
@@ -4390,7 +4383,7 @@ export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps):
4390
4383
  export declare const TldrawUiColumn: ForwardRefExoticComponent<TLUiLayoutProps & RefAttributes<HTMLDivElement>>;
4391
4384
 
4392
4385
  /** @public @react */
4393
- export declare function TldrawUiComponentsProvider({ overrides, children }: TLUiComponentsProviderProps): JSX.Element;
4386
+ export declare function TldrawUiComponentsProvider({ overrides, children, }: TLUiComponentsProviderProps): JSX.Element;
4394
4387
 
4395
4388
  /** @public @react */
4396
4389
  export declare const TldrawUiContextProvider: NamedExoticComponent<TLUiContextProviderProps>;
@@ -4401,7 +4394,7 @@ export declare const TldrawUiContextProvider: NamedExoticComponent<TLUiContextPr
4401
4394
  *
4402
4395
  * @public @react
4403
4396
  */
4404
- export declare function TldrawUiContextualToolbar({ children, className, isMousingDown, getSelectionBounds, changeOnlyWhenYChanges, label }: TLUiContextualToolbarProps): JSX.Element;
4397
+ export declare function TldrawUiContextualToolbar({ children, className, isMousingDown, getSelectionBounds, changeOnlyWhenYChanges, label, }: TLUiContextualToolbarProps): JSX.Element;
4405
4398
 
4406
4399
  /** @public @react */
4407
4400
  export declare function TldrawUiDialogBody({ className, children, style }: TLUiDialogBodyProps): JSX.Element;
@@ -4425,7 +4418,7 @@ export declare function TldrawUiDialogTitle({ className, children, style }: TLUi
4425
4418
  export declare function TldrawUiDropdownMenuCheckboxItem({ children, onSelect, ...rest }: TLUiDropdownMenuCheckboxItemProps): JSX.Element;
4426
4419
 
4427
4420
  /** @public @react */
4428
- export declare function TldrawUiDropdownMenuContent({ className, side, align, sideOffset, alignOffset, collisionPadding, children }: TLUiDropdownMenuContentProps): JSX.Element;
4421
+ export declare function TldrawUiDropdownMenuContent({ className, side, align, sideOffset, alignOffset, collisionPadding, children, }: TLUiDropdownMenuContentProps): JSX.Element;
4429
4422
 
4430
4423
  /** @public @react */
4431
4424
  export declare function TldrawUiDropdownMenuGroup({ className, children }: TLUiDropdownMenuGroupProps): JSX.Element;
@@ -4437,16 +4430,16 @@ export declare function TldrawUiDropdownMenuIndicator(): JSX.Element;
4437
4430
  export declare function TldrawUiDropdownMenuItem({ noClose, children }: TLUiDropdownMenuItemProps): JSX.Element;
4438
4431
 
4439
4432
  /** @public @react */
4440
- export declare function TldrawUiDropdownMenuRoot({ id, children, modal, debugOpen }: TLUiDropdownMenuRootProps): JSX.Element;
4433
+ export declare function TldrawUiDropdownMenuRoot({ id, children, modal, debugOpen, }: TLUiDropdownMenuRootProps): JSX.Element;
4441
4434
 
4442
4435
  /** @public @react */
4443
4436
  export declare function TldrawUiDropdownMenuSub({ id, children }: TLUiDropdownMenuSubProps): JSX.Element;
4444
4437
 
4445
4438
  /** @public @react */
4446
- export declare function TldrawUiDropdownMenuSubContent({ id, alignOffset, sideOffset, size, children }: TLUiDropdownMenuSubContentProps): JSX.Element;
4439
+ export declare function TldrawUiDropdownMenuSubContent({ id, alignOffset, sideOffset, size, children, }: TLUiDropdownMenuSubContentProps): JSX.Element;
4447
4440
 
4448
4441
  /** @public @react */
4449
- export declare function TldrawUiDropdownMenuSubTrigger({ id, label, title, disabled }: TLUiDropdownMenuSubTriggerProps): JSX.Element;
4442
+ export declare function TldrawUiDropdownMenuSubTrigger({ id, label, title, disabled, }: TLUiDropdownMenuSubTriggerProps): JSX.Element;
4450
4443
 
4451
4444
  /** @public @react */
4452
4445
  export declare function TldrawUiDropdownMenuTrigger({ children, ...rest }: TLUiDropdownMenuTriggerProps): JSX.Element;
@@ -4462,7 +4455,7 @@ export declare function TldrawUiEventsProvider({ onEvent, children }: EventsProv
4462
4455
  export declare const TldrawUiGrid: ForwardRefExoticComponent<TLUiLayoutProps & RefAttributes<HTMLDivElement>>;
4463
4456
 
4464
4457
  /** @public @react */
4465
- export declare const TldrawUiIcon: NamedExoticComponent<TLUiIconProps>;
4458
+ export declare const TldrawUiIcon: MemoExoticComponent<({ label, small, invertIcon, icon, tiny, color, className, ...props }: TLUiIconProps) => JSX.Element>;
4466
4459
 
4467
4460
  /** @public @react */
4468
4461
  export declare function TldrawUiInFrontOfTheCanvas(): JSX.Element;
@@ -4480,19 +4473,19 @@ export declare function TldrawUiMenuActionCheckboxItem({ actionId, ...rest }: TL
4480
4473
  export declare function TldrawUiMenuActionItem({ actionId, ...rest }: TLUiMenuActionItemProps): JSX.Element | null;
4481
4474
 
4482
4475
  /** @public @react */
4483
- export declare function TldrawUiMenuCheckboxItem<TranslationKey extends string = string, IconType extends string = string>({ id, kbd, label, lang, readonlyOk, onSelect, toggle, disabled, checked }: TLUiMenuCheckboxItemProps<TranslationKey, IconType>): JSX.Element | null;
4476
+ export declare function TldrawUiMenuCheckboxItem<TranslationKey extends string = string, IconType extends string = string>({ id, kbd, label, lang, readonlyOk, onSelect, toggle, disabled, checked, }: TLUiMenuCheckboxItemProps<TranslationKey, IconType>): JSX.Element | null;
4484
4477
 
4485
4478
  /** @public @react */
4486
- export declare function TldrawUiMenuContextProvider({ type, sourceId, children }: TLUiMenuContextProviderProps): JSX.Element;
4479
+ export declare function TldrawUiMenuContextProvider({ type, sourceId, children, }: TLUiMenuContextProviderProps): JSX.Element;
4487
4480
 
4488
4481
  /** @public @react */
4489
4482
  export declare function TldrawUiMenuGroup({ id, label, className, children }: TLUiMenuGroupProps): bigint | boolean | JSX.Element | Iterable<ReactNode> | null | number | Promise<bigint | boolean | ReactElement<unknown, JSXElementConstructor<any> | string> | ReactPortal | Iterable<ReactNode> | null | number | string | undefined> | string | undefined;
4490
4483
 
4491
4484
  /** @public @react */
4492
- export declare function TldrawUiMenuItem<TranslationKey extends string = string, IconType extends string = string>({ disabled, spinner, readonlyOk, id, kbd, label, icon, iconLeft, onSelect, noClose, isSelected, onDragStart }: TLUiMenuItemProps<TranslationKey, IconType>): JSX.Element | null;
4485
+ export declare function TldrawUiMenuItem<TranslationKey extends string = string, IconType extends string = string>({ disabled, spinner, readonlyOk, id, kbd, label, icon, iconLeft, onSelect, noClose, isSelected, onDragStart, }: TLUiMenuItemProps<TranslationKey, IconType>): JSX.Element | null;
4493
4486
 
4494
4487
  /** @public @react */
4495
- export declare function TldrawUiMenuSubmenu<Translation extends string = string>({ id, disabled, label, size, children }: TLUiMenuSubmenuProps<Translation>): bigint | boolean | JSX.Element | Iterable<ReactNode> | null | number | Promise<bigint | boolean | ReactElement<unknown, JSXElementConstructor<any> | string> | ReactPortal | Iterable<ReactNode> | null | number | string | undefined> | string | undefined;
4488
+ export declare function TldrawUiMenuSubmenu<Translation extends string = string>({ id, disabled, label, size, children, }: TLUiMenuSubmenuProps<Translation>): bigint | boolean | JSX.Element | Iterable<ReactNode> | null | number | Promise<bigint | boolean | ReactElement<unknown, JSXElementConstructor<any> | string> | ReactPortal | Iterable<ReactNode> | null | number | string | undefined> | string | undefined;
4496
4489
 
4497
4490
  /** @public @react */
4498
4491
  export declare function TldrawUiMenuToolItem({ toolId, ...rest }: TLUiMenuToolItemProps): JSX.Element | null;
@@ -4504,7 +4497,7 @@ export declare interface TldrawUiOrientationContext {
4504
4497
  }
4505
4498
 
4506
4499
  /** @public @react */
4507
- export declare function TldrawUiOrientationProvider({ children, orientation, tooltipSide }: TldrawUiOrientationProviderProps): JSX.Element;
4500
+ export declare function TldrawUiOrientationProvider({ children, orientation, tooltipSide, }: TldrawUiOrientationProviderProps): JSX.Element;
4508
4501
 
4509
4502
  /** @public */
4510
4503
  export declare interface TldrawUiOrientationProviderProps {
@@ -4517,7 +4510,7 @@ export declare interface TldrawUiOrientationProviderProps {
4517
4510
  export declare function TldrawUiPopover({ id, children, onOpenChange, open, className }: TLUiPopoverProps): JSX.Element;
4518
4511
 
4519
4512
  /** @public @react */
4520
- export declare function TldrawUiPopoverContent({ side, children, align, sideOffset, alignOffset, collisionPadding, disableEscapeKeyDown, autoFocusFirstButton }: TLUiPopoverContentProps): JSX.Element;
4513
+ export declare function TldrawUiPopoverContent({ side, children, align, sideOffset, alignOffset, collisionPadding, disableEscapeKeyDown, autoFocusFirstButton, }: TLUiPopoverContentProps): JSX.Element;
4521
4514
 
4522
4515
  /** @public @react */
4523
4516
  export declare function TldrawUiPopoverTrigger({ children }: TLUiPopoverTriggerProps): JSX.Element;
@@ -4570,7 +4563,7 @@ export declare const TldrawUiRow: ForwardRefExoticComponent<TLUiLayoutProps & Re
4570
4563
  * @public
4571
4564
  * @react
4572
4565
  */
4573
- export declare function TldrawUiSelect({ id, value, onValueChange, onOpenChange, disabled, className, children, 'data-testid': dataTestId, 'aria-label': ariaLabel }: TLUiSelectProps): JSX.Element;
4566
+ export declare function TldrawUiSelect({ id, value, onValueChange, onOpenChange, disabled, className, children, 'data-testid': dataTestId, 'aria-label': ariaLabel, }: TLUiSelectProps): JSX.Element;
4574
4567
 
4575
4568
  /**
4576
4569
  * The dropdown content container for select items.
@@ -4578,7 +4571,7 @@ export declare function TldrawUiSelect({ id, value, onValueChange, onOpenChange,
4578
4571
  * @public
4579
4572
  * @react
4580
4573
  */
4581
- export declare function TldrawUiSelectContent({ children, side, align, className }: TLUiSelectContentProps): JSX.Element;
4574
+ export declare function TldrawUiSelectContent({ children, side, align, className, }: TLUiSelectContentProps): JSX.Element;
4582
4575
 
4583
4576
  /**
4584
4577
  * An item in the select dropdown. Styled to match TldrawUiMenuCheckboxItem.
@@ -4586,7 +4579,7 @@ export declare function TldrawUiSelectContent({ children, side, align, className
4586
4579
  * @public
4587
4580
  * @react
4588
4581
  */
4589
- export declare function TldrawUiSelectItem({ value, label, icon, disabled, className }: TLUiSelectItemProps): JSX.Element;
4582
+ export declare function TldrawUiSelectItem({ value, label, icon, disabled, className, }: TLUiSelectItemProps): JSX.Element;
4590
4583
 
4591
4584
  /**
4592
4585
  * The trigger button for the select dropdown.
@@ -4651,7 +4644,7 @@ export declare interface TldrawUiTooltipProviderProps {
4651
4644
  *
4652
4645
  * @public @react
4653
4646
  */
4654
- export declare function TldrawUiTranslationProvider({ overrides, locale, children }: TLUiTranslationProviderProps): JSX.Element;
4647
+ export declare function TldrawUiTranslationProvider({ overrides, locale, children, }: TLUiTranslationProviderProps): JSX.Element;
4655
4648
 
4656
4649
  /** @public */
4657
4650
  export declare interface TLEditorAssetUrls {
@@ -5923,7 +5916,7 @@ export declare function unwrapLabel(label?: TLUiActionItem['label'], menuType?:
5923
5916
  *
5924
5917
  * @public
5925
5918
  */
5926
- export declare function updateArrowTargetState({ editor, pointInPageSpace, arrow, isPrecise, currentBinding, oppositeBinding }: UpdateArrowTargetStateOpts): ArrowTargetState | null;
5919
+ export declare function updateArrowTargetState({ editor, pointInPageSpace, arrow, isPrecise, currentBinding, oppositeBinding, }: UpdateArrowTargetStateOpts): ArrowTargetState | null;
5927
5920
 
5928
5921
  /**
5929
5922
  * Options passed to {@link updateArrowTargetState}.
@@ -5976,11 +5969,11 @@ export declare function useCurrentTranslation(): TLUiTranslation;
5976
5969
 
5977
5970
  /** @public */
5978
5971
  export declare function useDefaultHelpers(): {
5979
- addDialog: (dialog: Omit<TLUiDialog, "id"> & {
5980
- id?: string | undefined;
5972
+ addDialog: (dialog: Omit<TLUiDialog, 'id'> & {
5973
+ id?: string;
5981
5974
  }) => string;
5982
- addToast: (toast: Omit<TLUiToast, "id"> & {
5983
- id?: string | undefined;
5975
+ addToast: (toast: Omit<TLUiToast, 'id'> & {
5976
+ id?: string;
5984
5977
  }) => string;
5985
5978
  clearDialogs: () => void;
5986
5979
  clearToasts: () => void;
@@ -5988,18 +5981,18 @@ export declare function useDefaultHelpers(): {
5988
5981
  copyAs: (ids: TLShapeId_2[], format?: TLCopyType) => void;
5989
5982
  cut: (source: TLUiEventSource) => Promise<void>;
5990
5983
  exportAs: (ids: TLShapeId_2[], opts?: {
5991
- format?: TLExportType | undefined;
5992
- name?: string | undefined;
5993
- scale?: number | undefined;
5984
+ format?: TLExportType;
5985
+ name?: string;
5986
+ scale?: number;
5994
5987
  }) => void;
5995
5988
  getEmbedDefinition: (url: string) => TLEmbedResult;
5996
5989
  insertMedia: () => Promise<void>;
5997
5990
  isMobile: boolean;
5998
- msg: (id?: string | undefined) => string;
5999
- paste: (data: ClipboardItem[] | DataTransfer, source: TLUiEventSource, point?: VecLike | undefined) => Promise<void>;
5991
+ msg: (id?: Exclude<string, TLUiTranslationKey> | string) => string;
5992
+ paste: (data: ClipboardItem[] | DataTransfer, source: TLUiEventSource, point?: VecLike) => Promise<void>;
6000
5993
  printSelectionOrPages: () => Promise<void>;
6001
5994
  removeDialog: (id: string) => string;
6002
- removeToast: (id: string) => string;
5995
+ removeToast: (id: TLUiToast['id']) => string;
6003
5996
  replaceImage: () => Promise<void>;
6004
5997
  replaceVideo: () => Promise<void>;
6005
5998
  };
@@ -6026,7 +6019,7 @@ export declare function useEditablePlainText(shapeId: TLShapeId, type: ExtractSh
6026
6019
  nativeEvent: Event;
6027
6020
  } | Event) => void;
6028
6021
  handleFocus: () => void;
6029
- handleInputPointerDown: (e: React_3.PointerEvent<Element>) => void;
6022
+ handleInputPointerDown: (e: React_3.PointerEvent) => void;
6030
6023
  handleKeyDown: (e: KeyboardEvent) => void;
6031
6024
  handlePaste: (e: ClipboardEvent | React_3.ClipboardEvent<HTMLTextAreaElement>) => void;
6032
6025
  isEditing: boolean;
@@ -6037,23 +6030,19 @@ export declare function useEditablePlainText(shapeId: TLShapeId, type: ExtractSh
6037
6030
 
6038
6031
  /** @public */
6039
6032
  export declare function useEditableRichText(shapeId: TLShapeId, type: ExtractShapeByProps<{
6040
- richText: TLRichText;
6041
- }>['type'], richText?: TLRichText): {
6033
+ richText: TLRichText_2;
6034
+ }>['type'], richText?: TLRichText_2): {
6042
6035
  handleBlur: () => void;
6043
6036
  handleChange: ({ richText }: {
6044
- richText: {
6045
- attrs?: any;
6046
- content: unknown[];
6047
- type: string;
6048
- };
6037
+ richText: TLRichText_2;
6049
6038
  }) => void;
6050
6039
  handleDoubleClick: (e: {
6051
6040
  nativeEvent: Event;
6052
6041
  } | Event) => void;
6053
6042
  handleFocus: () => void;
6054
- handleInputPointerDown: (e: PointerEvent_2<Element>) => void;
6043
+ handleInputPointerDown: (e: React.PointerEvent) => void;
6055
6044
  handleKeyDown: (e: KeyboardEvent) => void;
6056
- handlePaste: (e: ClipboardEvent | ClipboardEvent_2<HTMLTextAreaElement>) => void;
6045
+ handlePaste: (e: ClipboardEvent | React.ClipboardEvent<HTMLTextAreaElement>) => void;
6057
6046
  isEditing: boolean;
6058
6047
  isEmpty: boolean | undefined;
6059
6048
  isReadyForEditing: boolean;
@@ -6062,9 +6051,9 @@ export declare function useEditableRichText(shapeId: TLShapeId, type: ExtractSha
6062
6051
 
6063
6052
  /** @public */
6064
6053
  export declare function useExportAs(): (ids: TLShapeId[], opts?: {
6065
- format?: TLExportType | undefined;
6066
- name?: string | undefined;
6067
- scale?: number | undefined;
6054
+ format?: TLExportType;
6055
+ name?: string;
6056
+ scale?: number;
6068
6057
  }) => void;
6069
6058
 
6070
6059
  /**
@@ -6079,7 +6068,7 @@ export declare function useExportAs(): (ids: TLShapeId[], opts?: {
6079
6068
  * @public
6080
6069
  */
6081
6070
  export declare function useImageOrVideoAsset({ shapeId, assetId, width }: UseImageOrVideoAssetOptions): {
6082
- asset: null | TLImageAsset | TLVideoAsset;
6071
+ asset: (TLImageAsset | TLVideoAsset) | null;
6083
6072
  url: null | string;
6084
6073
  };
6085
6074
 
@@ -6123,7 +6112,7 @@ export declare function useMaybeCurrentTranslation(): null | TLUiTranslation;
6123
6112
  export declare function useMenuClipboardEvents(): {
6124
6113
  copy: (source: TLUiEventSource) => Promise<void>;
6125
6114
  cut: (source: TLUiEventSource) => Promise<void>;
6126
- paste: (data: ClipboardItem[] | DataTransfer, source: TLUiEventSource, point?: undefined | VecLike) => Promise<void>;
6115
+ paste: (data: ClipboardItem[] | DataTransfer, source: TLUiEventSource, point?: VecLike) => Promise<void>;
6127
6116
  };
6128
6117
 
6129
6118
  /** @public */
@@ -6174,7 +6163,7 @@ export declare function useTools(): TLUiToolsContextType;
6174
6163
  *
6175
6164
  * @public
6176
6165
  */
6177
- export declare function useTranslation(): (id?: string | undefined) => string;
6166
+ export declare function useTranslation(): (id?: Exclude<string, TLUiTranslationKey> | string) => string;
6178
6167
 
6179
6168
  /** @public */
6180
6169
  export declare function useUiEvents(): TLUiEventContextType;
@@ -6187,7 +6176,7 @@ export declare function useUnlockedSelectedShapesCount(min?: number, max?: numbe
6187
6176
 
6188
6177
  /** @public */
6189
6178
  export declare class VideoAssetUtil extends AssetUtil<TLVideoAsset> {
6190
- static type: "video";
6179
+ static type: 'video';
6191
6180
  static props: {
6192
6181
  fileSize: Validator<number | undefined>;
6193
6182
  h: Validator<number>;
@@ -6216,10 +6205,10 @@ export declare interface VideoShapeOptions extends ShapeOptionsWithDisplayValues
6216
6205
 
6217
6206
  /** @public */
6218
6207
  export declare class VideoShapeUtil extends BaseBoxShapeUtil<TLVideoShape> {
6219
- static type: "video";
6208
+ static type: 'video';
6220
6209
  static props: RecordProps<TLVideoShape>;
6221
6210
  static migrations: TLPropsMigrations;
6222
- static handledAssetTypes: readonly ["video"];
6211
+ static handledAssetTypes: readonly ['video'];
6223
6212
  options: VideoShapeOptions;
6224
6213
  canEdit(shape: TLVideoShape): boolean;
6225
6214
  isAspectRatioLocked(shape: TLVideoShape): boolean;
@@ -6274,7 +6263,7 @@ export declare class ZoomTool extends StateNode {
6274
6263
  static children(): TLStateNodeConstructor[];
6275
6264
  static isLockable: boolean;
6276
6265
  info: TLPointerEventInfo & {
6277
- onInteractionEnd?: string | undefined;
6266
+ onInteractionEnd?: string;
6278
6267
  };
6279
6268
  onEnter(info: TLPointerEventInfo & {
6280
6269
  onInteractionEnd: string;