tldraw 5.1.0-next.d7c83ba698ae → 5.1.0

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 (109) hide show
  1. package/dist-cjs/index.d.ts +27 -5
  2. package/dist-cjs/index.js +1 -1
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/overlays/SelectionForegroundOverlayUtil.js +13 -10
  5. package/dist-cjs/lib/overlays/SelectionForegroundOverlayUtil.js.map +2 -2
  6. package/dist-cjs/lib/shapes/shared/defaultStyleDefs.js +1 -1
  7. package/dist-cjs/lib/shapes/shared/defaultStyleDefs.js.map +2 -2
  8. package/dist-cjs/lib/tools/SelectTool/childStates/Brushing.js +2 -1
  9. package/dist-cjs/lib/tools/SelectTool/childStates/Brushing.js.map +2 -2
  10. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +3 -3
  11. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +2 -2
  12. package/dist-cjs/lib/tools/SelectTool/childStates/ScribbleBrushing.js +1 -1
  13. package/dist-cjs/lib/tools/SelectTool/childStates/ScribbleBrushing.js.map +2 -2
  14. package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js +1 -0
  15. package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js.map +2 -2
  16. package/dist-cjs/lib/tools/selection-logic/selectOnCanvasPointerUp.js +3 -1
  17. package/dist-cjs/lib/tools/selection-logic/selectOnCanvasPointerUp.js.map +2 -2
  18. package/dist-cjs/lib/tools/selection-logic/updateHoveredShapeId.js +1 -0
  19. package/dist-cjs/lib/tools/selection-logic/updateHoveredShapeId.js.map +2 -2
  20. package/dist-cjs/lib/ui/TldrawUi.js +1 -0
  21. package/dist-cjs/lib/ui/TldrawUi.js.map +2 -2
  22. package/dist-cjs/lib/ui/components/DebugMenu/DefaultDebugMenu.js +12 -0
  23. package/dist-cjs/lib/ui/components/DebugMenu/DefaultDebugMenu.js.map +2 -2
  24. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js +56 -15
  25. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js.map +3 -3
  26. package/dist-cjs/lib/ui/components/PageMenu/PageItemSubmenu.js +1 -1
  27. package/dist-cjs/lib/ui/components/PageMenu/PageItemSubmenu.js.map +2 -2
  28. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +4 -2
  29. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
  30. package/dist-cjs/lib/ui/components/StylePanel/StylePanelDropdownPicker.js +3 -2
  31. package/dist-cjs/lib/ui/components/StylePanel/StylePanelDropdownPicker.js.map +2 -2
  32. package/dist-cjs/lib/ui/context/asset-urls.js +3 -6
  33. package/dist-cjs/lib/ui/context/asset-urls.js.map +2 -2
  34. package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js.map +1 -1
  35. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +1 -0
  36. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
  37. package/dist-cjs/lib/ui/hooks/useTranslation/useTranslation.js +4 -1
  38. package/dist-cjs/lib/ui/hooks/useTranslation/useTranslation.js.map +2 -2
  39. package/dist-cjs/lib/ui/version.js +3 -3
  40. package/dist-cjs/lib/ui/version.js.map +1 -1
  41. package/dist-esm/index.d.mts +27 -5
  42. package/dist-esm/index.mjs +5 -2
  43. package/dist-esm/index.mjs.map +2 -2
  44. package/dist-esm/lib/overlays/SelectionForegroundOverlayUtil.mjs +13 -11
  45. package/dist-esm/lib/overlays/SelectionForegroundOverlayUtil.mjs.map +2 -2
  46. package/dist-esm/lib/shapes/shared/defaultStyleDefs.mjs +2 -1
  47. package/dist-esm/lib/shapes/shared/defaultStyleDefs.mjs.map +2 -2
  48. package/dist-esm/lib/tools/SelectTool/childStates/Brushing.mjs +2 -1
  49. package/dist-esm/lib/tools/SelectTool/childStates/Brushing.mjs.map +2 -2
  50. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +3 -3
  51. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +2 -2
  52. package/dist-esm/lib/tools/SelectTool/childStates/ScribbleBrushing.mjs +1 -1
  53. package/dist-esm/lib/tools/SelectTool/childStates/ScribbleBrushing.mjs.map +2 -2
  54. package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs +1 -0
  55. package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs.map +2 -2
  56. package/dist-esm/lib/tools/selection-logic/selectOnCanvasPointerUp.mjs +3 -1
  57. package/dist-esm/lib/tools/selection-logic/selectOnCanvasPointerUp.mjs.map +2 -2
  58. package/dist-esm/lib/tools/selection-logic/updateHoveredShapeId.mjs +1 -0
  59. package/dist-esm/lib/tools/selection-logic/updateHoveredShapeId.mjs.map +2 -2
  60. package/dist-esm/lib/ui/TldrawUi.mjs +1 -0
  61. package/dist-esm/lib/ui/TldrawUi.mjs.map +2 -2
  62. package/dist-esm/lib/ui/components/DebugMenu/DefaultDebugMenu.mjs +12 -0
  63. package/dist-esm/lib/ui/components/DebugMenu/DefaultDebugMenu.mjs.map +2 -2
  64. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs +56 -15
  65. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs.map +3 -3
  66. package/dist-esm/lib/ui/components/PageMenu/PageItemSubmenu.mjs +1 -1
  67. package/dist-esm/lib/ui/components/PageMenu/PageItemSubmenu.mjs.map +2 -2
  68. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +4 -2
  69. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
  70. package/dist-esm/lib/ui/components/StylePanel/StylePanelDropdownPicker.mjs +3 -2
  71. package/dist-esm/lib/ui/components/StylePanel/StylePanelDropdownPicker.mjs.map +2 -2
  72. package/dist-esm/lib/ui/context/asset-urls.mjs +4 -7
  73. package/dist-esm/lib/ui/context/asset-urls.mjs.map +2 -2
  74. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +1 -0
  75. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
  76. package/dist-esm/lib/ui/hooks/useTranslation/useTranslation.mjs +4 -1
  77. package/dist-esm/lib/ui/hooks/useTranslation/useTranslation.mjs.map +2 -2
  78. package/dist-esm/lib/ui/version.mjs +3 -3
  79. package/dist-esm/lib/ui/version.mjs.map +1 -1
  80. package/package.json +4 -4
  81. package/src/index.ts +5 -1
  82. package/src/lib/overlays/SelectionForegroundOverlayUtil.ts +15 -14
  83. package/src/lib/shapes/shared/defaultStyleDefs.tsx +2 -1
  84. package/src/lib/tools/SelectTool/childStates/Brushing.ts +4 -1
  85. package/src/lib/tools/SelectTool/childStates/Idle.ts +3 -3
  86. package/src/lib/tools/SelectTool/childStates/ScribbleBrushing.ts +3 -2
  87. package/src/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.ts +1 -0
  88. package/src/lib/tools/selection-logic/selectOnCanvasPointerUp.ts +3 -1
  89. package/src/lib/tools/selection-logic/updateHoveredShapeId.ts +1 -0
  90. package/src/lib/ui/TldrawUi.tsx +6 -0
  91. package/src/lib/ui/components/DebugMenu/DefaultDebugMenu.tsx +16 -1
  92. package/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx +71 -28
  93. package/src/lib/ui/components/PageMenu/PageItemSubmenu.tsx +1 -1
  94. package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +2 -0
  95. package/src/lib/ui/components/StylePanel/StylePanelDropdownPicker.tsx +4 -1
  96. package/src/lib/ui/context/asset-urls.tsx +15 -10
  97. package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +1 -0
  98. package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +1 -0
  99. package/src/lib/ui/hooks/useTranslation/useTranslation.tsx +8 -3
  100. package/src/lib/ui/version.ts +3 -3
  101. package/src/lib/ui.css +36 -6
  102. package/src/test/Editor.test.tsx +24 -0
  103. package/src/test/commands/getSvgString.test.ts +19 -0
  104. package/src/test/commands/lockShapes.test.ts +64 -0
  105. package/src/test/groups.test.tsx +16 -0
  106. package/src/test/notVisibleShapes.test.ts +79 -0
  107. package/src/test/overlays/OverlayManager.test.ts +45 -7
  108. package/src/test/spatialIndex.test.ts +278 -0
  109. package/tldraw.css +36 -6
@@ -498,7 +498,19 @@ export declare const ASPECT_RATIO_TO_VALUE: Record<ASPECT_RATIO_OPTION, number>;
498
498
  /** @public @react */
499
499
  export declare function AssetToolbarItem(): JSX.Element;
500
500
 
501
- /* Excluded from this release type: AssetUrlsProvider */
501
+ /**
502
+ * Provides asset URLs (icons, fonts, translations, embed icons) to the editor's UI.
503
+ * Required when using `TldrawUiTranslationProvider` without `TldrawUiContextProvider`.
504
+ *
505
+ * @public @react
506
+ */
507
+ export declare function AssetUrlsProvider({ assetUrls, children }: AssetUrlsProviderProps): JSX.Element;
508
+
509
+ /** @public */
510
+ export declare interface AssetUrlsProviderProps {
511
+ assetUrls: TLUiAssetUrls;
512
+ children: React.ReactNode;
513
+ }
502
514
 
503
515
  /** @public */
504
516
  export declare interface BasePathBuilderOpts {
@@ -3441,7 +3453,7 @@ export declare class SelectionForegroundOverlayUtil extends OverlayUtil<TLSelect
3441
3453
  private _getMobileRotateCenter;
3442
3454
  private _getThemeColors;
3443
3455
  private _makeOverlay;
3444
- private _getEdgeLocalPoints;
3456
+ private _getEdgeLocalRect;
3445
3457
  private _getRotateHandleLocalCenter;
3446
3458
  private _getCornerLocalPoint;
3447
3459
  private _localRectToPoints;
@@ -3681,6 +3693,8 @@ export declare interface StylePanelDropdownPickerProps<T extends string> {
3681
3693
  onValueChange?(style: StyleProp<T>, value: T): void;
3682
3694
  /** Override the test ID prefix. Defaults to uiType. */
3683
3695
  testIdType?: string;
3696
+ /** Distance to push the popover left of the trigger so it lands flush with the style panel. */
3697
+ sideOffset?: number;
3684
3698
  }
3685
3699
 
3686
3700
  /** @public @react */
@@ -4466,7 +4480,14 @@ export declare interface TldrawUiTooltipProviderProps {
4466
4480
  children: React_3.ReactNode;
4467
4481
  }
4468
4482
 
4469
- /* Excluded from this release type: TldrawUiTranslationProvider */
4483
+ /**
4484
+ * Provides a translation context to the editor. Wrap this around components that use
4485
+ * `useTranslation` (such as `TldrawSelectionForeground`) when you don't want to use the
4486
+ * full `TldrawUiContextProvider`. Must be rendered inside an `AssetUrlsProvider`.
4487
+ *
4488
+ * @public @react
4489
+ */
4490
+ export declare function TldrawUiTranslationProvider({ overrides, locale, children }: TLUiTranslationProviderProps): JSX.Element;
4470
4491
 
4471
4492
  /** @public */
4472
4493
  export declare interface TLEditorAssetUrls {
@@ -5513,7 +5534,7 @@ export declare interface TLUiTranslation {
5513
5534
  export declare type TLUiTranslationContextType = TLUiTranslation;
5514
5535
 
5515
5536
  /** @public */
5516
- export declare type TLUiTranslationKey = 'a11y.adjust-shape-styles' | 'a11y.enlarge-shape' | 'a11y.enter-leave-container' | 'a11y.move-shape-faster' | 'a11y.move-shape' | 'a11y.multiple-shapes' | 'a11y.open-context-menu' | 'a11y.open-keyboard-shortcuts' | 'a11y.pan-camera' | 'a11y.repeat-shape' | 'a11y.rotate-shape-ccw-fine' | 'a11y.rotate-shape-ccw' | 'a11y.rotate-shape-cw-fine' | 'a11y.rotate-shape-cw' | 'a11y.select-shape-direction' | 'a11y.select-shape' | 'a11y.shape-image' | 'a11y.shape-index' | 'a11y.shape-video' | 'a11y.shrink-shape' | 'a11y.skip-to-main-content' | 'a11y.status' | 'action.align-bottom' | 'action.align-center-horizontal.short' | 'action.align-center-horizontal' | 'action.align-center-vertical.short' | 'action.align-center-vertical' | 'action.align-left' | 'action.align-right' | 'action.align-top' | 'action.back-to-content' | 'action.bring-forward' | 'action.bring-to-front' | 'action.convert-to-bookmark' | 'action.convert-to-embed' | 'action.copy-as-json.short' | 'action.copy-as-json' | 'action.copy-as-png.short' | 'action.copy-as-png' | 'action.copy-as-svg.short' | 'action.copy-as-svg' | 'action.copy' | 'action.cut' | 'action.delete' | 'action.distribute-horizontal.short' | 'action.distribute-horizontal' | 'action.distribute-vertical.short' | 'action.distribute-vertical' | 'action.download-original' | 'action.duplicate' | 'action.edit-link' | 'action.enhanced-a11y-mode.menu' | 'action.enhanced-a11y-mode' | 'action.exit-pen-mode' | 'action.export-all-as-png.short' | 'action.export-all-as-png' | 'action.export-all-as-svg.short' | 'action.export-all-as-svg' | 'action.export-as-png.short' | 'action.export-as-png' | 'action.export-as-svg.short' | 'action.export-as-svg' | 'action.fit-frame-to-content' | 'action.flatten-to-image' | 'action.flip-horizontal.short' | 'action.flip-horizontal' | 'action.flip-vertical.short' | 'action.flip-vertical' | 'action.fork-project-on-tldraw' | 'action.fork-project' | 'action.group' | 'action.insert-embed' | 'action.insert-media' | 'action.leave-shared-project' | 'action.new-project' | 'action.new-shared-project' | 'action.open-cursor-chat' | 'action.open-embed-link' | 'action.open-file' | 'action.open-kbd-shortcuts' | 'action.pack' | 'action.paste-error-description' | 'action.paste-error-title' | 'action.paste' | 'action.print' | 'action.redo' | 'action.remove-frame' | 'action.rename' | 'action.rotate-ccw' | 'action.rotate-cw' | 'action.save-copy' | 'action.select-all' | 'action.select-none' | 'action.select-zoom-tool' | 'action.send-backward' | 'action.send-to-back' | 'action.share-project' | 'action.stack-horizontal.short' | 'action.stack-horizontal' | 'action.stack-vertical.short' | 'action.stack-vertical' | 'action.stop-following' | 'action.stretch-horizontal.short' | 'action.stretch-horizontal' | 'action.stretch-vertical.short' | 'action.stretch-vertical' | 'action.toggle-auto-none' | 'action.toggle-auto-pan' | 'action.toggle-auto-size' | 'action.toggle-auto-zoom' | 'action.toggle-dark-mode.menu' | 'action.toggle-dark-mode' | 'action.toggle-debug-mode.menu' | 'action.toggle-debug-mode' | 'action.toggle-dynamic-size-mode.menu' | 'action.toggle-dynamic-size-mode' | 'action.toggle-edge-scrolling.menu' | 'action.toggle-edge-scrolling' | 'action.toggle-focus-mode.menu' | 'action.toggle-focus-mode' | 'action.toggle-grid.menu' | 'action.toggle-grid' | 'action.toggle-invert-zoom.menu' | 'action.toggle-invert-zoom' | 'action.toggle-keyboard-shortcuts.menu' | 'action.toggle-keyboard-shortcuts' | 'action.toggle-lock' | 'action.toggle-mouse' | 'action.toggle-paste-at-cursor.menu' | 'action.toggle-paste-at-cursor' | 'action.toggle-reduce-motion.menu' | 'action.toggle-reduce-motion' | 'action.toggle-snap-mode.menu' | 'action.toggle-snap-mode' | 'action.toggle-tool-lock.menu' | 'action.toggle-tool-lock' | 'action.toggle-trackpad' | 'action.toggle-transparent.context-menu' | 'action.toggle-transparent.menu' | 'action.toggle-transparent' | 'action.toggle-wrap-mode.menu' | 'action.toggle-wrap-mode' | 'action.undo' | 'action.ungroup' | 'action.unlock-all' | 'action.zoom-in' | 'action.zoom-out' | 'action.zoom-quick' | 'action.zoom-to-100' | 'action.zoom-to-fit' | 'action.zoom-to-selection' | 'actions-menu.title' | 'align-style.end' | 'align-style.justify' | 'align-style.middle' | 'align-style.start' | 'app.loading' | 'arrow-kind-style.arc' | 'arrow-kind-style.elbow' | 'arrowheadEnd-style.arrow' | 'arrowheadEnd-style.bar' | 'arrowheadEnd-style.diamond' | 'arrowheadEnd-style.dot' | 'arrowheadEnd-style.inverted' | 'arrowheadEnd-style.none' | 'arrowheadEnd-style.pipe' | 'arrowheadEnd-style.square' | 'arrowheadEnd-style.triangle' | 'arrowheadStart-style.arrow' | 'arrowheadStart-style.bar' | 'arrowheadStart-style.diamond' | 'arrowheadStart-style.dot' | 'arrowheadStart-style.inverted' | 'arrowheadStart-style.none' | 'arrowheadStart-style.pipe' | 'arrowheadStart-style.square' | 'arrowheadStart-style.triangle' | 'assets.files.amount-too-many' | 'assets.files.maximum-size' | 'assets.files.size-too-big' | 'assets.files.type-not-allowed' | 'assets.files.upload-failed' | 'assets.url.failed' | 'color-style.black' | 'color-style.blue' | 'color-style.green' | 'color-style.grey' | 'color-style.light-blue' | 'color-style.light-green' | 'color-style.light-red' | 'color-style.light-violet' | 'color-style.orange' | 'color-style.red' | 'color-style.violet' | 'color-style.white' | 'color-style.yellow' | 'context-menu.arrange' | 'context-menu.copy-as' | 'context-menu.edit' | 'context-menu.export-all-as' | 'context-menu.export-as' | 'context-menu.move-to-page' | 'context-menu.reorder' | 'context-menu.title' | 'context.pages.new-page' | 'cursor-chat.type-to-chat' | 'dash-style.dashed' | 'dash-style.dotted' | 'dash-style.draw' | 'dash-style.solid' | 'document-name-menu.copy-link' | 'document.default-name' | 'edit-link-dialog.cancel' | 'edit-link-dialog.clear' | 'edit-link-dialog.detail' | 'edit-link-dialog.external-link' | 'edit-link-dialog.invalid-url' | 'edit-link-dialog.save' | 'edit-link-dialog.title' | 'edit-link-dialog.url' | 'embed-dialog.back' | 'embed-dialog.cancel' | 'embed-dialog.create' | 'embed-dialog.instruction' | 'embed-dialog.invalid-url' | 'embed-dialog.title' | 'embed-dialog.url' | 'file-system.confirm-clear.cancel' | 'file-system.confirm-clear.continue' | 'file-system.confirm-clear.description' | 'file-system.confirm-clear.dont-show-again' | 'file-system.confirm-clear.title' | 'file-system.confirm-open.cancel' | 'file-system.confirm-open.description' | 'file-system.confirm-open.dont-show-again' | 'file-system.confirm-open.open' | 'file-system.confirm-open.title' | 'file-system.file-open-error.file-format-version-too-new' | 'file-system.file-open-error.generic-corrupted-file' | 'file-system.file-open-error.not-a-tldraw-file' | 'file-system.file-open-error.title' | 'file-system.shared-document-file-open-error.description' | 'file-system.shared-document-file-open-error.title' | 'fill-style.fill' | 'fill-style.lined-fill' | 'fill-style.none' | 'fill-style.pattern' | 'fill-style.semi' | 'fill-style.solid' | 'focus-mode.toggle-focus-mode' | 'font-style.draw' | 'font-style.mono' | 'font-style.sans' | 'font-style.serif' | 'geo-style.arrow-down' | 'geo-style.arrow-left' | 'geo-style.arrow-right' | 'geo-style.arrow-up' | 'geo-style.check-box' | 'geo-style.cloud' | 'geo-style.diamond' | 'geo-style.ellipse' | 'geo-style.heart' | 'geo-style.hexagon' | 'geo-style.octagon' | 'geo-style.oval' | 'geo-style.pentagon' | 'geo-style.rectangle' | 'geo-style.rhombus-2' | 'geo-style.rhombus' | 'geo-style.star' | 'geo-style.trapezoid' | 'geo-style.triangle' | 'geo-style.x-box' | 'handle.crop.bottom-left' | 'handle.crop.bottom-right' | 'handle.crop.bottom' | 'handle.crop.left' | 'handle.crop.right' | 'handle.crop.top-left' | 'handle.crop.top-right' | 'handle.crop.top' | 'handle.resize-bottom-left' | 'handle.resize-bottom-right' | 'handle.resize-bottom' | 'handle.resize-left' | 'handle.resize-right' | 'handle.resize-top-left' | 'handle.resize-top-right' | 'handle.resize-top' | 'handle.rotate.bottom_left_rotate' | 'handle.rotate.bottom_right_rotate' | 'handle.rotate.mobile_rotate' | 'handle.rotate.top_left_rotate' | 'handle.rotate.top_right_rotate' | 'help-menu.about' | 'help-menu.discord' | 'help-menu.github' | 'help-menu.import-tldr-file' | 'help-menu.keyboard-shortcuts' | 'help-menu.privacy' | 'help-menu.terms' | 'help-menu.title' | 'help-menu.twitter' | 'menu.accessibility' | 'menu.color-theme' | 'menu.copy-as' | 'menu.edit' | 'menu.export-as' | 'menu.file' | 'menu.input-device' | 'menu.language' | 'menu.preferences' | 'menu.theme' | 'menu.title' | 'menu.view' | 'navigation-zone.minimap' | 'navigation-zone.title' | 'navigation-zone.toggle-minimap' | 'navigation-zone.zoom' | 'opacity-style.0.1' | 'opacity-style.0.25' | 'opacity-style.0.5' | 'opacity-style.0.75' | 'opacity-style.1' | 'page-menu.create-new-page' | 'page-menu.edit-done' | 'page-menu.edit-start' | 'page-menu.go-to-page' | 'page-menu.new-page-initial-name' | 'page-menu.resize' | 'page-menu.submenu.delete' | 'page-menu.submenu.duplicate-page' | 'page-menu.submenu.move-down' | 'page-menu.submenu.move-up' | 'page-menu.submenu.rename' | 'page-menu.submenu.title' | 'page-menu.title' | 'people-menu.anonymous-user' | 'people-menu.avatar-color' | 'people-menu.change-color' | 'people-menu.change-name' | 'people-menu.follow' | 'people-menu.following' | 'people-menu.invite' | 'people-menu.leading' | 'people-menu.title' | 'people-menu.user' | 'share-menu.copied' | 'share-menu.copy-link-note' | 'share-menu.copy-link' | 'share-menu.copy-readonly-link-note' | 'share-menu.copy-readonly-link' | 'share-menu.create-snapshot-link' | 'share-menu.creating-project' | 'share-menu.fork-note' | 'share-menu.offline-note' | 'share-menu.project-too-large' | 'share-menu.save-note' | 'share-menu.share-project' | 'share-menu.snapshot-link-note' | 'share-menu.title' | 'share-menu.upload-failed' | 'sharing.confirm-leave.cancel' | 'sharing.confirm-leave.description' | 'sharing.confirm-leave.dont-show-again' | 'sharing.confirm-leave.leave' | 'sharing.confirm-leave.title' | 'shortcuts-dialog.a11y' | 'shortcuts-dialog.collaboration' | 'shortcuts-dialog.edit' | 'shortcuts-dialog.file' | 'shortcuts-dialog.preferences' | 'shortcuts-dialog.text-formatting' | 'shortcuts-dialog.title' | 'shortcuts-dialog.tools' | 'shortcuts-dialog.transform' | 'shortcuts-dialog.view' | 'size-style.l' | 'size-style.m' | 'size-style.s' | 'size-style.xl' | 'spline-style.cubic' | 'spline-style.line' | 'status.offline' | 'style-panel.align' | 'style-panel.arrow-kind' | 'style-panel.arrowhead-end' | 'style-panel.arrowhead-start' | 'style-panel.arrowheads' | 'style-panel.color' | 'style-panel.dash' | 'style-panel.fill' | 'style-panel.font' | 'style-panel.geo' | 'style-panel.label-align' | 'style-panel.mixed' | 'style-panel.opacity' | 'style-panel.position' | 'style-panel.selected' | 'style-panel.size' | 'style-panel.spline' | 'style-panel.title' | 'style-panel.vertical-align' | 'theme.dark' | 'theme.light' | 'theme.system' | 'toast.close' | 'toast.error.copy-fail.desc' | 'toast.error.copy-fail.title' | 'toast.error.export-fail.desc' | 'toast.error.export-fail.title' | 'toast.error' | 'toast.info' | 'toast.success' | 'toast.warning' | 'tool-panel.more' | 'tool-panel.title' | 'tool.arrow-down' | 'tool.arrow-left' | 'tool.arrow-right' | 'tool.arrow-up' | 'tool.arrow' | 'tool.aspect-ratio.circle' | 'tool.aspect-ratio.landscape' | 'tool.aspect-ratio.original' | 'tool.aspect-ratio.portrait' | 'tool.aspect-ratio.square' | 'tool.aspect-ratio.wide' | 'tool.aspect-ratio' | 'tool.bookmark' | 'tool.check-box' | 'tool.cloud' | 'tool.diamond' | 'tool.draw' | 'tool.ellipse' | 'tool.embed' | 'tool.eraser' | 'tool.flip-horz' | 'tool.flip-vert' | 'tool.frame' | 'tool.hand' | 'tool.heart' | 'tool.hexagon' | 'tool.highlight' | 'tool.image-crop-confirm' | 'tool.image-crop' | 'tool.image-toolbar-title' | 'tool.image-zoom' | 'tool.laser' | 'tool.line' | 'tool.media-alt-text-confirm' | 'tool.media-alt-text-desc' | 'tool.media-alt-text' | 'tool.media' | 'tool.note' | 'tool.octagon' | 'tool.oval' | 'tool.pentagon' | 'tool.pointer-down' | 'tool.rectangle' | 'tool.replace-media' | 'tool.rhombus' | 'tool.rich-text-bold' | 'tool.rich-text-bulletList' | 'tool.rich-text-code' | 'tool.rich-text-header' | 'tool.rich-text-highlight' | 'tool.rich-text-italic' | 'tool.rich-text-link-remove' | 'tool.rich-text-link-visit' | 'tool.rich-text-link' | 'tool.rich-text-orderedList' | 'tool.rich-text-strikethrough' | 'tool.rich-text-toolbar-title' | 'tool.rotate-cw' | 'tool.select' | 'tool.star' | 'tool.text' | 'tool.trapezoid' | 'tool.triangle' | 'tool.x-box' | 'ui.checked' | 'ui.close' | 'ui.unchecked' | 'verticalAlign-style.end' | 'verticalAlign-style.middle' | 'verticalAlign-style.start' | 'vscode.file-open.backup-failed' | 'vscode.file-open.backup-saved' | 'vscode.file-open.backup' | 'vscode.file-open.desc' | 'vscode.file-open.dont-show-again' | 'vscode.file-open.open';
5537
+ export declare type TLUiTranslationKey = 'a11y.adjust-shape-styles' | 'a11y.enlarge-shape' | 'a11y.enter-leave-container' | 'a11y.move-shape-faster' | 'a11y.move-shape' | 'a11y.multiple-shapes' | 'a11y.open-context-menu' | 'a11y.open-keyboard-shortcuts' | 'a11y.pan-camera' | 'a11y.repeat-shape' | 'a11y.rotate-shape-ccw-fine' | 'a11y.rotate-shape-ccw' | 'a11y.rotate-shape-cw-fine' | 'a11y.rotate-shape-cw' | 'a11y.select-shape-direction' | 'a11y.select-shape' | 'a11y.shape-image' | 'a11y.shape-index' | 'a11y.shape-video' | 'a11y.shrink-shape' | 'a11y.skip-to-main-content' | 'a11y.status' | 'action.align-bottom' | 'action.align-center-horizontal.short' | 'action.align-center-horizontal' | 'action.align-center-vertical.short' | 'action.align-center-vertical' | 'action.align-left' | 'action.align-right' | 'action.align-top' | 'action.back-to-content' | 'action.bring-forward' | 'action.bring-to-front' | 'action.convert-to-bookmark' | 'action.convert-to-embed' | 'action.copy-as-json.short' | 'action.copy-as-json' | 'action.copy-as-png.short' | 'action.copy-as-png' | 'action.copy-as-svg.short' | 'action.copy-as-svg' | 'action.copy' | 'action.cut' | 'action.delete' | 'action.distribute-horizontal.short' | 'action.distribute-horizontal' | 'action.distribute-vertical.short' | 'action.distribute-vertical' | 'action.download-original' | 'action.duplicate' | 'action.edit-link' | 'action.enhanced-a11y-mode.menu' | 'action.enhanced-a11y-mode' | 'action.exit-pen-mode' | 'action.export-all-as-png.short' | 'action.export-all-as-png' | 'action.export-all-as-svg.short' | 'action.export-all-as-svg' | 'action.export-as-png.short' | 'action.export-as-png' | 'action.export-as-svg.short' | 'action.export-as-svg' | 'action.fit-frame-to-content' | 'action.flatten-to-image' | 'action.flip-horizontal.short' | 'action.flip-horizontal' | 'action.flip-vertical.short' | 'action.flip-vertical' | 'action.fork-project-on-tldraw' | 'action.fork-project' | 'action.group' | 'action.insert-embed' | 'action.insert-media' | 'action.leave-shared-project' | 'action.new-project' | 'action.new-shared-project' | 'action.open-cursor-chat' | 'action.open-embed-link' | 'action.open-file' | 'action.open-kbd-shortcuts' | 'action.pack' | 'action.paste-error-description' | 'action.paste-error-title' | 'action.paste' | 'action.print' | 'action.redo' | 'action.remove-frame' | 'action.rename' | 'action.rotate-ccw' | 'action.rotate-cw' | 'action.save-copy' | 'action.select-all' | 'action.select-none' | 'action.select-zoom-tool' | 'action.send-backward' | 'action.send-to-back' | 'action.share-project' | 'action.stack-horizontal.short' | 'action.stack-horizontal' | 'action.stack-vertical.short' | 'action.stack-vertical' | 'action.stop-following' | 'action.stretch-horizontal.short' | 'action.stretch-horizontal' | 'action.stretch-vertical.short' | 'action.stretch-vertical' | 'action.toggle-auto-none' | 'action.toggle-auto-pan' | 'action.toggle-auto-size' | 'action.toggle-auto-zoom' | 'action.toggle-dark-mode.menu' | 'action.toggle-dark-mode' | 'action.toggle-debug-mode.menu' | 'action.toggle-debug-mode' | 'action.toggle-dynamic-size-mode.menu' | 'action.toggle-dynamic-size-mode' | 'action.toggle-edge-scrolling.menu' | 'action.toggle-edge-scrolling' | 'action.toggle-focus-mode.menu' | 'action.toggle-focus-mode' | 'action.toggle-grid.menu' | 'action.toggle-grid' | 'action.toggle-invert-zoom.menu' | 'action.toggle-invert-zoom' | 'action.toggle-keyboard-shortcuts.menu' | 'action.toggle-keyboard-shortcuts' | 'action.toggle-lock' | 'action.toggle-mouse' | 'action.toggle-paste-at-cursor.menu' | 'action.toggle-paste-at-cursor' | 'action.toggle-reduce-motion.menu' | 'action.toggle-reduce-motion' | 'action.toggle-snap-mode.menu' | 'action.toggle-snap-mode' | 'action.toggle-tool-lock.menu' | 'action.toggle-tool-lock' | 'action.toggle-trackpad' | 'action.toggle-transparent.context-menu' | 'action.toggle-transparent.menu' | 'action.toggle-transparent' | 'action.toggle-wrap-mode.menu' | 'action.toggle-wrap-mode' | 'action.undo' | 'action.ungroup' | 'action.unlock-all' | 'action.zoom-in' | 'action.zoom-out' | 'action.zoom-quick' | 'action.zoom-to-100' | 'action.zoom-to-fit' | 'action.zoom-to-selection' | 'actions-menu.title' | 'align-style.end' | 'align-style.justify' | 'align-style.middle' | 'align-style.start' | 'app.loading' | 'arrow-kind-style.arc' | 'arrow-kind-style.elbow' | 'arrowheadEnd-style.arrow' | 'arrowheadEnd-style.bar' | 'arrowheadEnd-style.diamond' | 'arrowheadEnd-style.dot' | 'arrowheadEnd-style.inverted' | 'arrowheadEnd-style.none' | 'arrowheadEnd-style.pipe' | 'arrowheadEnd-style.square' | 'arrowheadEnd-style.triangle' | 'arrowheadStart-style.arrow' | 'arrowheadStart-style.bar' | 'arrowheadStart-style.diamond' | 'arrowheadStart-style.dot' | 'arrowheadStart-style.inverted' | 'arrowheadStart-style.none' | 'arrowheadStart-style.pipe' | 'arrowheadStart-style.square' | 'arrowheadStart-style.triangle' | 'assets.files.amount-too-many' | 'assets.files.maximum-size' | 'assets.files.size-too-big' | 'assets.files.type-not-allowed' | 'assets.files.upload-failed' | 'assets.url.failed' | 'color-style.black' | 'color-style.blue' | 'color-style.green' | 'color-style.grey' | 'color-style.light-blue' | 'color-style.light-green' | 'color-style.light-red' | 'color-style.light-violet' | 'color-style.orange' | 'color-style.red' | 'color-style.violet' | 'color-style.white' | 'color-style.yellow' | 'context-menu.arrange' | 'context-menu.copy-as' | 'context-menu.edit' | 'context-menu.export-all-as' | 'context-menu.export-as' | 'context-menu.move-to-page' | 'context-menu.reorder' | 'context-menu.title' | 'context.pages.new-page' | 'cursor-chat.type-to-chat' | 'dash-style.dashed' | 'dash-style.dotted' | 'dash-style.draw' | 'dash-style.solid' | 'document-name-menu.copy-link' | 'document.default-name' | 'edit-link-dialog.cancel' | 'edit-link-dialog.clear' | 'edit-link-dialog.detail' | 'edit-link-dialog.external-link' | 'edit-link-dialog.invalid-url' | 'edit-link-dialog.save' | 'edit-link-dialog.title' | 'edit-link-dialog.url' | 'embed-dialog.back' | 'embed-dialog.cancel' | 'embed-dialog.create' | 'embed-dialog.instruction' | 'embed-dialog.invalid-url' | 'embed-dialog.title' | 'embed-dialog.url' | 'file-system.confirm-clear.cancel' | 'file-system.confirm-clear.continue' | 'file-system.confirm-clear.description' | 'file-system.confirm-clear.dont-show-again' | 'file-system.confirm-clear.title' | 'file-system.confirm-open.cancel' | 'file-system.confirm-open.description' | 'file-system.confirm-open.dont-show-again' | 'file-system.confirm-open.open' | 'file-system.confirm-open.title' | 'file-system.file-open-error.file-format-version-too-new' | 'file-system.file-open-error.generic-corrupted-file' | 'file-system.file-open-error.not-a-tldraw-file' | 'file-system.file-open-error.title' | 'file-system.shared-document-file-open-error.description' | 'file-system.shared-document-file-open-error.title' | 'fill-style.fill' | 'fill-style.lined-fill' | 'fill-style.none' | 'fill-style.pattern' | 'fill-style.semi' | 'fill-style.solid' | 'focus-mode.toggle-focus-mode' | 'font-style.draw' | 'font-style.mono' | 'font-style.sans' | 'font-style.serif' | 'geo-style.arrow-down' | 'geo-style.arrow-left' | 'geo-style.arrow-right' | 'geo-style.arrow-up' | 'geo-style.check-box' | 'geo-style.cloud' | 'geo-style.diamond' | 'geo-style.ellipse' | 'geo-style.heart' | 'geo-style.hexagon' | 'geo-style.octagon' | 'geo-style.oval' | 'geo-style.pentagon' | 'geo-style.rectangle' | 'geo-style.rhombus-2' | 'geo-style.rhombus' | 'geo-style.star' | 'geo-style.trapezoid' | 'geo-style.triangle' | 'geo-style.x-box' | 'handle.crop.bottom-left' | 'handle.crop.bottom-right' | 'handle.crop.bottom' | 'handle.crop.left' | 'handle.crop.right' | 'handle.crop.top-left' | 'handle.crop.top-right' | 'handle.crop.top' | 'handle.resize-bottom-left' | 'handle.resize-bottom-right' | 'handle.resize-bottom' | 'handle.resize-left' | 'handle.resize-right' | 'handle.resize-top-left' | 'handle.resize-top-right' | 'handle.resize-top' | 'handle.rotate.bottom_left_rotate' | 'handle.rotate.bottom_right_rotate' | 'handle.rotate.mobile_rotate' | 'handle.rotate.top_left_rotate' | 'handle.rotate.top_right_rotate' | 'help-menu.about' | 'help-menu.discord' | 'help-menu.github' | 'help-menu.import-tldr-file' | 'help-menu.keyboard-shortcuts' | 'help-menu.privacy' | 'help-menu.terms' | 'help-menu.title' | 'help-menu.twitter' | 'menu.accessibility' | 'menu.color-theme' | 'menu.copy-as' | 'menu.edit' | 'menu.export-as' | 'menu.file' | 'menu.input-device' | 'menu.language' | 'menu.preferences' | 'menu.theme' | 'menu.title' | 'menu.view' | 'navigation-zone.minimap' | 'navigation-zone.title' | 'navigation-zone.toggle-minimap' | 'navigation-zone.zoom' | 'opacity-style.0.1' | 'opacity-style.0.25' | 'opacity-style.0.5' | 'opacity-style.0.75' | 'opacity-style.1' | 'page-menu.create-new-page' | 'page-menu.edit-done' | 'page-menu.edit-start' | 'page-menu.go-to-page' | 'page-menu.max-pages-reached' | 'page-menu.new-page-initial-name' | 'page-menu.resize' | 'page-menu.submenu.delete' | 'page-menu.submenu.duplicate-page' | 'page-menu.submenu.move-down' | 'page-menu.submenu.move-up' | 'page-menu.submenu.rename' | 'page-menu.submenu.title' | 'page-menu.title' | 'people-menu.anonymous-user' | 'people-menu.avatar-color' | 'people-menu.change-color' | 'people-menu.change-name' | 'people-menu.follow' | 'people-menu.following' | 'people-menu.invite' | 'people-menu.leading' | 'people-menu.title' | 'people-menu.user' | 'share-menu.copied' | 'share-menu.copy-link-note' | 'share-menu.copy-link' | 'share-menu.copy-readonly-link-note' | 'share-menu.copy-readonly-link' | 'share-menu.create-snapshot-link' | 'share-menu.creating-project' | 'share-menu.fork-note' | 'share-menu.offline-note' | 'share-menu.project-too-large' | 'share-menu.save-note' | 'share-menu.share-project' | 'share-menu.snapshot-link-note' | 'share-menu.title' | 'share-menu.upload-failed' | 'sharing.confirm-leave.cancel' | 'sharing.confirm-leave.description' | 'sharing.confirm-leave.dont-show-again' | 'sharing.confirm-leave.leave' | 'sharing.confirm-leave.title' | 'shortcuts-dialog.a11y' | 'shortcuts-dialog.collaboration' | 'shortcuts-dialog.edit' | 'shortcuts-dialog.file' | 'shortcuts-dialog.preferences' | 'shortcuts-dialog.text-formatting' | 'shortcuts-dialog.title' | 'shortcuts-dialog.tools' | 'shortcuts-dialog.transform' | 'shortcuts-dialog.view' | 'size-style.l' | 'size-style.m' | 'size-style.s' | 'size-style.xl' | 'spline-style.cubic' | 'spline-style.line' | 'status.offline' | 'style-panel.align' | 'style-panel.arrow-kind' | 'style-panel.arrowhead-end' | 'style-panel.arrowhead-start' | 'style-panel.arrowheads' | 'style-panel.color' | 'style-panel.dash' | 'style-panel.fill' | 'style-panel.font' | 'style-panel.geo' | 'style-panel.label-align' | 'style-panel.mixed' | 'style-panel.opacity' | 'style-panel.position' | 'style-panel.selected' | 'style-panel.size' | 'style-panel.spline' | 'style-panel.title' | 'style-panel.vertical-align' | 'theme.dark' | 'theme.light' | 'theme.system' | 'toast.close' | 'toast.error.copy-fail.desc' | 'toast.error.copy-fail.title' | 'toast.error.export-fail.desc' | 'toast.error.export-fail.title' | 'toast.error' | 'toast.info' | 'toast.success' | 'toast.warning' | 'tool-panel.more' | 'tool-panel.title' | 'tool.arrow-down' | 'tool.arrow-left' | 'tool.arrow-right' | 'tool.arrow-up' | 'tool.arrow' | 'tool.aspect-ratio.circle' | 'tool.aspect-ratio.landscape' | 'tool.aspect-ratio.original' | 'tool.aspect-ratio.portrait' | 'tool.aspect-ratio.square' | 'tool.aspect-ratio.wide' | 'tool.aspect-ratio' | 'tool.bookmark' | 'tool.check-box' | 'tool.cloud' | 'tool.diamond' | 'tool.draw' | 'tool.ellipse' | 'tool.embed' | 'tool.eraser' | 'tool.flip-horz' | 'tool.flip-vert' | 'tool.frame' | 'tool.hand' | 'tool.heart' | 'tool.hexagon' | 'tool.highlight' | 'tool.image-crop-confirm' | 'tool.image-crop' | 'tool.image-toolbar-title' | 'tool.image-zoom' | 'tool.laser' | 'tool.line' | 'tool.media-alt-text-confirm' | 'tool.media-alt-text-desc' | 'tool.media-alt-text' | 'tool.media' | 'tool.note' | 'tool.octagon' | 'tool.oval' | 'tool.pentagon' | 'tool.pointer-down' | 'tool.rectangle' | 'tool.replace-media' | 'tool.rhombus' | 'tool.rich-text-bold' | 'tool.rich-text-bulletList' | 'tool.rich-text-code' | 'tool.rich-text-header' | 'tool.rich-text-highlight' | 'tool.rich-text-italic' | 'tool.rich-text-link-remove' | 'tool.rich-text-link-visit' | 'tool.rich-text-link' | 'tool.rich-text-orderedList' | 'tool.rich-text-strikethrough' | 'tool.rich-text-toolbar-title' | 'tool.rotate-cw' | 'tool.select' | 'tool.star' | 'tool.text' | 'tool.trapezoid' | 'tool.triangle' | 'tool.x-box' | 'ui.checked' | 'ui.close' | 'ui.unchecked' | 'verticalAlign-style.end' | 'verticalAlign-style.middle' | 'verticalAlign-style.start' | 'vscode.file-open.backup-failed' | 'vscode.file-open.backup-saved' | 'vscode.file-open.backup' | 'vscode.file-open.desc' | 'vscode.file-open.dont-show-again' | 'vscode.file-open.open';
5517
5538
 
5518
5539
  /** @public */
5519
5540
  export declare interface TLUiTranslationProviderProps {
@@ -5742,7 +5763,8 @@ export declare function useA11y(): TLUiA11yContextType;
5742
5763
  /** @public */
5743
5764
  export declare function useActions(): TLUiActionsContextType;
5744
5765
 
5745
- /* Excluded from this release type: useAssetUrls */
5766
+ /** @public */
5767
+ export declare function useAssetUrls(): TLUiAssetUrls;
5746
5768
 
5747
5769
  /** @public */
5748
5770
  export declare function useBreakpoint(): number;
package/dist-cjs/index.js CHANGED
@@ -648,7 +648,7 @@ var import_buildFromV1Document = require("./lib/utils/tldr/buildFromV1Document")
648
648
  var import_file = require("./lib/utils/tldr/file");
649
649
  (0, import_editor.registerTldrawLibraryVersion)(
650
650
  "tldraw",
651
- "5.1.0-next.d7c83ba698ae",
651
+ "5.1.0",
652
652
  "cjs"
653
653
  );
654
654
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["/// <reference types=\"react\" />\n\nimport { registerTldrawLibraryVersion } from '@tldraw/editor'\nexport { getPointsFromDrawSegment, getPointsFromDrawSegments } from './lib/shapes/draw/getPath'\nexport {\n\tPathBuilder,\n\tPathBuilderGeometry2d,\n\ttype BasePathBuilderOpts,\n\ttype CubicBezierToPathBuilderCommand,\n\ttype DashedPathBuilderOpts,\n\ttype DrawPathBuilderDOpts,\n\ttype DrawPathBuilderOpts,\n\ttype NonePathBuilderOpts,\n\ttype LineToPathBuilderCommand,\n\ttype MoveToPathBuilderCommand,\n\ttype PathBuilderCommand,\n\ttype PathBuilderCommandBase,\n\ttype PathBuilderCommandInfo,\n\ttype PathBuilderCommandOpts,\n\ttype PathBuilderLineOpts,\n\ttype PathBuilderOpts,\n\ttype PathBuilderToDOpts,\n\ttype SolidPathBuilderOpts,\n} from './lib/shapes/shared/PathBuilder'\nexport { usePrefersReducedMotion } from './lib/shapes/shared/usePrefersReducedMotion'\nexport { startEditingShapeWithRichText } from './lib/tools/SelectTool/selectHelpers'\nexport { DefaultA11yAnnouncer, useSelectedShapesAnnouncer } from './lib/ui/components/A11y'\nexport { AccessibilityMenu } from './lib/ui/components/AccessibilityMenu'\nexport { ColorSchemeMenu } from './lib/ui/components/ColorSchemeMenu'\nexport { DefaultFollowingIndicator } from './lib/ui/components/DefaultFollowingIndicator'\nexport { DefaultDialogs } from './lib/ui/components/Dialogs'\nexport {\n\tTldrawUiColumn,\n\tTldrawUiGrid,\n\tTldrawUiOrientationProvider,\n\tTldrawUiRow,\n\tuseTldrawUiOrientation,\n\ttype TldrawUiOrientationContext,\n\ttype TldrawUiOrientationProviderProps,\n\ttype TLUiLayoutProps,\n} from './lib/ui/components/primitives/layout'\nexport {\n\tTldrawUiMenuActionCheckboxItem,\n\ttype TLUiMenuActionCheckboxItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem'\nexport {\n\tTldrawUiMenuActionItem,\n\ttype TLUiMenuActionItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuActionItem'\nexport {\n\tTldrawUiMenuToolItem,\n\ttype TLUiMenuToolItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuToolItem'\nexport { DefaultToasts } from './lib/ui/components/Toasts'\nexport { TldrawUiTranslationProvider } from './lib/ui/hooks/useTranslation/useTranslation'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/editor'\nexport { BookmarkAssetUtil } from './lib/assets/BookmarkAssetUtil'\nexport { ImageAssetUtil } from './lib/assets/ImageAssetUtil'\nexport { VideoAssetUtil } from './lib/assets/VideoAssetUtil'\nexport {\n\tArrowBindingHintOverlayUtil,\n\ttype TLArrowBindingHintOverlay,\n} from './lib/overlays/ArrowBindingHintOverlayUtil'\nexport { ArrowBindingUtil } from './lib/bindings/arrow/ArrowBindingUtil'\nexport { ArrowHintOverlayUtil, type TLArrowHintOverlay } from './lib/overlays/ArrowHintOverlayUtil'\nexport {\n\tBrushOverlayUtil,\n\ttype BrushOverlayUtilDisplayValues,\n\ttype BrushOverlayUtilOptions,\n\ttype TLBrushOverlay,\n} from './lib/overlays/BrushOverlayUtil'\nexport { ZoomBrushOverlayUtil, type TLZoomBrushOverlay } from './lib/overlays/ZoomBrushOverlayUtil'\nexport { ScribbleOverlayUtil, type TLScribbleOverlay } from './lib/overlays/ScribbleOverlayUtil'\nexport {\n\tCollaboratorBrushOverlayUtil,\n\ttype TLCollaboratorBrushOverlay,\n} from './lib/overlays/CollaboratorBrushOverlayUtil'\nexport {\n\tCollaboratorScribbleOverlayUtil,\n\ttype TLCollaboratorScribbleOverlay,\n} from './lib/overlays/CollaboratorScribbleOverlayUtil'\nexport {\n\tCollaboratorHintOverlayUtil,\n\ttype TLCollaboratorHintOverlay,\n} from './lib/overlays/CollaboratorHintOverlayUtil'\nexport {\n\tCollaboratorCursorOverlayUtil,\n\ttype TLCollaboratorCursorOverlay,\n} from './lib/overlays/CollaboratorCursorOverlayUtil'\nexport {\n\tCollaboratorShapeIndicatorOverlayUtil,\n\ttype TLCollaboratorShapeIndicatorOverlay,\n} from './lib/overlays/CollaboratorShapeIndicatorOverlayUtil'\nexport {\n\tShapeHandleOverlayUtil,\n\ttype TLShapeHandleOverlay,\n} from './lib/overlays/ShapeHandleOverlayUtil'\nexport {\n\tSelectionForegroundOverlayUtil,\n\ttype TLSelectionForegroundOverlay,\n} from './lib/overlays/SelectionForegroundOverlayUtil'\nexport {\n\tSnapIndicatorOverlayUtil,\n\ttype TLSnapIndicatorOverlay,\n} from './lib/overlays/SnapIndicatorOverlayUtil'\nexport { defaultAssetUtils } from './lib/defaultAssetUtils'\nexport { defaultBindingUtils } from './lib/defaultBindingUtils'\nexport { defaultOverlayUtils } from './lib/defaultOverlayUtils'\nexport {\n\tDEFAULT_EMBED_DEFINITIONS,\n\tembedShapePermissionDefaults,\n\tunknownEmbedShapePermissionOverrides,\n\ttype CustomEmbedDefinition,\n\ttype DefaultEmbedDefinitionType,\n\ttype EmbedDefinition,\n\ttype TLEmbedDefinition,\n\ttype TLEmbedShapePermissions,\n} from './lib/defaultEmbedDefinitions'\nexport {\n\tcenterSelectionAroundPoint,\n\tcreateEmptyBookmarkShape,\n\tcreateShapesForAssets,\n\tDEFAULT_MAX_ASSET_SIZE,\n\tDEFAULT_MAX_IMAGE_DIMENSION,\n\tdefaultHandleExternalEmbedContent,\n\tdefaultHandleExternalExcalidrawContent,\n\tdefaultHandleExternalFileAsset,\n\tdefaultHandleExternalFileContent,\n\tdefaultHandleExternalFileReplaceContent,\n\tdefaultHandleExternalSvgTextContent,\n\tdefaultHandleExternalTextContent,\n\tdefaultHandleExternalTldrawContent,\n\tdefaultHandleExternalUrlAsset,\n\tdefaultHandleExternalUrlContent,\n\tgetAssetInfo,\n\tnotifyIfFileNotAllowed,\n\tregisterDefaultExternalContentHandlers,\n\ttype TLDefaultExternalContentHandlerOpts,\n\ttype TLExternalContentProps,\n} from './lib/defaultExternalContentHandlers'\nexport { defaultShapeTools } from './lib/defaultShapeTools'\nexport { defaultShapeUtils } from './lib/defaultShapeUtils'\nexport { registerDefaultSideEffects } from './lib/defaultSideEffects'\nexport { defaultTools } from './lib/defaultTools'\nexport {\n\ttype ArrowShapeOptions,\n\ttype ArrowShapeUtilDisplayValues,\n\ttype TLArcArrowInfo,\n\ttype TLArcInfo,\n\ttype TLArrowInfo,\n\ttype TLArrowPoint,\n\ttype TLElbowArrowInfo,\n\ttype TLStraightArrowInfo,\n} from './lib/shapes/arrow/arrow-types'\nexport { ArrowShapeTool } from './lib/shapes/arrow/ArrowShapeTool'\nexport { ArrowShapeUtil } from './lib/shapes/arrow/ArrowShapeUtil'\nexport {\n\tclearArrowTargetState,\n\tgetArrowTargetState,\n\tupdateArrowTargetState,\n\ttype ArrowTargetState,\n\ttype UpdateArrowTargetStateOpts,\n} from './lib/shapes/arrow/arrowTargetState'\nexport {\n\ttype ElbowArrowBox,\n\ttype ElbowArrowBoxEdges,\n\ttype ElbowArrowBoxes,\n\ttype ElbowArrowEdge,\n\ttype ElbowArrowInfo,\n\ttype ElbowArrowInfoWithoutRoute,\n\ttype ElbowArrowMidpointHandle,\n\ttype ElbowArrowOptions,\n\ttype ElbowArrowRange,\n\ttype ElbowArrowRoute,\n\ttype ElbowArrowSide,\n\ttype ElbowArrowSideReason,\n\ttype ElbowArrowTargetBox,\n} from './lib/shapes/arrow/elbow/definitions'\nexport { getArrowInfo } from './lib/shapes/arrow/getArrowInfo'\nexport {\n\tgetArrowBindings,\n\tgetArrowTerminalsInArrowSpace,\n\ttype TLArrowBindings,\n} from './lib/shapes/arrow/shared'\nexport { createBookmarkFromUrl } from './lib/shapes/bookmark/bookmarks'\nexport {\n\tBookmarkShapeUtil,\n\ttype BookmarkShapeOptions,\n\ttype BookmarkShapeUtilDisplayValues,\n} from './lib/shapes/bookmark/BookmarkShapeUtil'\nexport { DrawShapeTool } from './lib/shapes/draw/DrawShapeTool'\nexport {\n\tDrawShapeUtil,\n\ttype DrawShapeOptions,\n\ttype DrawShapeUtilDisplayValues,\n} from './lib/shapes/draw/DrawShapeUtil'\nexport {\n\tEmbedShapeUtil,\n\ttype EmbedShapeOptions,\n\ttype EmbedShapeUtilDisplayValues,\n} from './lib/shapes/embed/EmbedShapeUtil'\nexport { FrameShapeTool } from './lib/shapes/frame/FrameShapeTool'\nexport {\n\tFrameShapeUtil,\n\ttype FrameShapeOptions,\n\ttype FrameShapeUtilDisplayValues,\n} from './lib/shapes/frame/FrameShapeUtil'\nexport { GeoShapeTool } from './lib/shapes/geo/GeoShapeTool'\nexport {\n\tGeoShapeUtil,\n\ttype GeoShapeOptions,\n\ttype GeoShapeUtilDisplayValues,\n} from './lib/shapes/geo/GeoShapeUtil'\nexport {\n\tdefaultGeoTypeDefinitions,\n\tgetGeoTypeDefinition,\n\ttype GeoTypeDefinition,\n} from './lib/shapes/geo/getGeoShapePath'\nexport { HighlightShapeTool } from './lib/shapes/highlight/HighlightShapeTool'\nexport {\n\tHighlightShapeUtil,\n\ttype HighlightShapeOptions,\n\ttype HighlightShapeUtilDisplayValues,\n} from './lib/shapes/highlight/HighlightShapeUtil'\nexport {\n\tImageShapeUtil,\n\ttype ImageShapeOptions,\n\ttype ImageShapeUtilDisplayValues,\n} from './lib/shapes/image/ImageShapeUtil'\nexport { LineShapeTool } from './lib/shapes/line/LineShapeTool'\nexport {\n\tLineShapeUtil,\n\ttype LineShapeOptions,\n\ttype LineShapeUtilDisplayValues,\n} from './lib/shapes/line/LineShapeUtil'\nexport { NoteShapeTool } from './lib/shapes/note/NoteShapeTool'\nexport {\n\tNoteShapeUtil,\n\ttype NoteShapeOptions,\n\ttype NoteShapeUtilDisplayValues,\n} from './lib/shapes/note/NoteShapeUtil'\nexport {\n\tASPECT_RATIO_OPTIONS,\n\tASPECT_RATIO_TO_VALUE,\n\tgetCropBox,\n\tgetDefaultCrop,\n\tgetUncroppedSize,\n\ttype ASPECT_RATIO_OPTION,\n\ttype CropBoxOptions,\n} from './lib/shapes/shared/crop'\nexport { getFontFamily } from './lib/shapes/shared/default-shape-constants'\nexport {\n\tallDefaultFontFaces,\n\tDefaultFontFaces,\n\ttype TLDefaultFont,\n\ttype TLDefaultFonts,\n} from './lib/shapes/shared/defaultFonts'\nexport { getStroke } from './lib/shapes/shared/freehand/getStroke'\nexport { getStrokeOutlinePoints } from './lib/shapes/shared/freehand/getStrokeOutlinePoints'\nexport { getStrokePoints } from './lib/shapes/shared/freehand/getStrokePoints'\nexport { setStrokePointRadii } from './lib/shapes/shared/freehand/setStrokePointRadii'\nexport { getSvgPathFromStrokePoints } from './lib/shapes/shared/freehand/svg'\nexport { type StrokeOptions, type StrokePoint } from './lib/shapes/shared/freehand/types'\nexport {\n\tgetDisplayValues,\n\ttype ShapeOptionsWithDisplayValues,\n} from './lib/shapes/shared/getDisplayValues'\nexport { PlainTextLabel, type PlainTextLabelProps } from './lib/shapes/shared/PlainTextLabel'\nexport {\n\tRichTextLabel,\n\tRichTextSVG,\n\ttype RichTextLabelProps,\n\ttype RichTextSVGProps,\n} from './lib/shapes/shared/RichTextLabel'\nexport { useEditablePlainText } from './lib/shapes/shared/useEditablePlainText'\nexport { useEditableRichText } from './lib/shapes/shared/useEditableRichText'\nexport {\n\tuseImageOrVideoAsset,\n\ttype UseImageOrVideoAssetOptions,\n} from './lib/shapes/shared/useImageOrVideoAsset'\nexport { PlainTextArea } from './lib/shapes/text/PlainTextArea'\nexport { RichTextArea, type TextAreaProps } from './lib/shapes/text/RichTextArea'\nexport { TextShapeTool } from './lib/shapes/text/TextShapeTool'\nexport {\n\tTextShapeUtil,\n\ttype TextShapeOptions,\n\ttype TextShapeUtilDisplayValues,\n} from './lib/shapes/text/TextShapeUtil'\nexport {\n\tVideoShapeUtil,\n\ttype VideoShapeOptions,\n\ttype VideoShapeUtilDisplayValues,\n} from './lib/shapes/video/VideoShapeUtil'\nexport { getColorStyleItems, getFontStyleItems, type StyleValuesForUi } from './lib/styles'\nexport { Tldraw, type TLComponents, type TldrawBaseProps, type TldrawProps } from './lib/Tldraw'\nexport { TldrawImage, type TldrawImageProps } from './lib/TldrawImage'\nexport { EraserTool } from './lib/tools/EraserTool/EraserTool'\nexport { HandTool } from './lib/tools/HandTool/HandTool'\nexport { LaserTool } from './lib/tools/LaserTool/LaserTool'\nexport { getHitShapeOnCanvasPointerDown } from './lib/tools/selection-logic/getHitShapeOnCanvasPointerDown'\nexport { SelectTool } from './lib/tools/SelectTool/SelectTool'\nexport { ZoomTool } from './lib/tools/ZoomTool/ZoomTool'\nexport {\n\tsetDefaultUiAssetUrls,\n\ttype TLUiAssetUrlOverrides,\n\ttype TLUiAssetUrls,\n} from './lib/ui/assetUrls'\nexport {\n\tDefaultActionsMenu,\n\ttype TLUiActionsMenuProps,\n} from './lib/ui/components/ActionsMenu/DefaultActionsMenu'\nexport {\n\tAlignMenuItems,\n\tDefaultActionsMenuContent,\n\tDistributeMenuItems,\n\tGroupOrUngroupMenuItem,\n\tReorderMenuItems,\n\tRotateCWMenuItem,\n\tStackMenuItems,\n\tZoomOrRotateMenuItem,\n} from './lib/ui/components/ActionsMenu/DefaultActionsMenuContent'\nexport {\n\tDefaultContextMenu as ContextMenu,\n\tDefaultContextMenu,\n\ttype TLUiContextMenuProps,\n} from './lib/ui/components/ContextMenu/DefaultContextMenu'\nexport { DefaultContextMenuContent } from './lib/ui/components/ContextMenu/DefaultContextMenuContent'\nexport {\n\tDefaultDebugMenu,\n\ttype TLUiDebugMenuProps,\n} from './lib/ui/components/DebugMenu/DefaultDebugMenu'\nexport {\n\tDebugFlags,\n\tDefaultDebugMenuContent,\n\tExampleDialog,\n\tFeatureFlags,\n\ttype CustomDebugFlags,\n\ttype DebugFlagsProps,\n\ttype ExampleDialogProps,\n\ttype FeatureFlagsProps,\n} from './lib/ui/components/DebugMenu/DefaultDebugMenuContent'\nexport { DefaultMenuPanel } from './lib/ui/components/DefaultMenuPanel'\nexport {\n\tDefaultHelperButtons,\n\ttype TLUiHelperButtonsProps,\n} from './lib/ui/components/HelperButtons/DefaultHelperButtons'\nexport { DefaultHelperButtonsContent } from './lib/ui/components/HelperButtons/DefaultHelperButtonsContent'\nexport {\n\tDefaultHelpMenu,\n\ttype TLUiHelpMenuProps,\n} from './lib/ui/components/HelpMenu/DefaultHelpMenu'\nexport {\n\tDefaultHelpMenuContent,\n\tKeyboardShortcutsMenuItem,\n} from './lib/ui/components/HelpMenu/DefaultHelpMenuContent'\nexport {\n\tDefaultKeyboardShortcutsDialog,\n\ttype TLUiKeyboardShortcutsDialogProps,\n} from './lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialog'\nexport { DefaultKeyboardShortcutsDialogContent } from './lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent'\nexport { LanguageMenu } from './lib/ui/components/LanguageMenu'\nexport { InputModeMenu } from './lib/ui/components/InputModeMenu'\nexport {\n\tDefaultMainMenu,\n\ttype TLUiMainMenuProps,\n} from './lib/ui/components/MainMenu/DefaultMainMenu'\nexport {\n\tDefaultMainMenuContent,\n\tEditSubmenu,\n\tExportFileContentSubMenu,\n\tExtrasGroup,\n\tLockGroup,\n\tMiscMenuGroup,\n\tPreferencesGroup,\n\tUndoRedoGroup,\n\tViewSubmenu,\n} from './lib/ui/components/MainMenu/DefaultMainMenuContent'\nexport {\n\tArrangeMenuSubmenu,\n\tClipboardMenuGroup,\n\tConversionsMenuGroup,\n\tConvertToBookmarkMenuItem,\n\tConvertToEmbedMenuItem,\n\tCopyAsMenuGroup,\n\tCopyMenuItem,\n\tCursorChatItem,\n\tCutMenuItem,\n\tDeleteMenuItem,\n\tDuplicateMenuItem,\n\tEditLinkMenuItem,\n\tEditMenuSubmenu,\n\tFitFrameToContentMenuItem,\n\tGroupMenuItem,\n\tMoveToPageMenu,\n\tPasteMenuItem,\n\tPrintItem,\n\tRemoveFrameMenuItem,\n\tReorderMenuSubmenu,\n\tSelectAllMenuItem,\n\tToggleAutoSizeMenuItem,\n\tToggleDebugModeItem,\n\tToggleDynamicSizeModeItem,\n\tToggleEdgeScrollingItem,\n\tToggleEnhancedA11yModeItem,\n\tToggleFocusModeItem,\n\tToggleGridItem,\n\tToggleInvertZoomItem,\n\tToggleKeyboardShortcutsItem,\n\tToggleLockMenuItem,\n\tTogglePasteAtCursorItem,\n\tToggleReduceMotionItem,\n\tToggleSnapModeItem,\n\tToggleToolLockItem,\n\tToggleTransparentBgMenuItem,\n\tToggleWrapModeItem,\n\tUngroupMenuItem,\n\tUnlockAllMenuItem,\n\tZoomTo100MenuItem,\n\tZoomToFitMenuItem,\n\tZoomToSelectionMenuItem,\n} from './lib/ui/components/menu-items'\nexport { DefaultMinimap } from './lib/ui/components/Minimap/DefaultMinimap'\nexport { MobileStylePanel } from './lib/ui/components/MobileStylePanel'\nexport { DefaultNavigationPanel } from './lib/ui/components/NavigationPanel/DefaultNavigationPanel'\nexport { OfflineIndicator } from './lib/ui/components/OfflineIndicator/OfflineIndicator'\nexport { DefaultPageMenu } from './lib/ui/components/PageMenu/DefaultPageMenu'\nexport { PageItemInput, type PageItemInputProps } from './lib/ui/components/PageMenu/PageItemInput'\nexport {\n\tPageItemSubmenu,\n\ttype PageItemSubmenuProps,\n} from './lib/ui/components/PageMenu/PageItemSubmenu'\nexport {\n\tTldrawUiButton,\n\ttype TLUiButtonProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButton'\nexport {\n\tTldrawUiButtonCheck,\n\ttype TLUiButtonCheckProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButtonCheck'\nexport {\n\tTldrawUiButtonIcon,\n\ttype TLUiButtonIconProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButtonIcon'\nexport {\n\tTldrawUiButtonLabel,\n\ttype TLUiButtonLabelProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButtonLabel'\nexport {\n\tTldrawUiMenuCheckboxItem,\n\ttype TLUiMenuCheckboxItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem'\nexport {\n\tTldrawUiMenuContextProvider,\n\ttype TLUiMenuContextProviderProps,\n\ttype TLUiMenuContextType,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuContext'\nexport {\n\tTldrawUiMenuGroup,\n\ttype TLUiMenuGroupProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuGroup'\nexport {\n\tTldrawUiMenuItem,\n\ttype TLUiMenuItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuItem'\nexport {\n\tTldrawUiMenuSubmenu,\n\ttype TLUiMenuSubmenuProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuSubmenu'\nexport {\n\tTldrawUiContextualToolbar,\n\ttype TLUiContextualToolbarProps,\n} from './lib/ui/components/primitives/TldrawUiContextualToolbar'\nexport {\n\tTldrawUiDialogBody,\n\tTldrawUiDialogCloseButton,\n\tTldrawUiDialogFooter,\n\tTldrawUiDialogHeader,\n\tTldrawUiDialogTitle,\n\ttype TLUiDialogBodyProps,\n\ttype TLUiDialogFooterProps,\n\ttype TLUiDialogHeaderProps,\n\ttype TLUiDialogTitleProps,\n} from './lib/ui/components/primitives/TldrawUiDialog'\nexport {\n\tTldrawUiDropdownMenuCheckboxItem,\n\tTldrawUiDropdownMenuContent,\n\tTldrawUiDropdownMenuGroup,\n\tTldrawUiDropdownMenuIndicator,\n\tTldrawUiDropdownMenuItem,\n\tTldrawUiDropdownMenuRoot,\n\tTldrawUiDropdownMenuSub,\n\tTldrawUiDropdownMenuSubContent,\n\tTldrawUiDropdownMenuSubTrigger,\n\tTldrawUiDropdownMenuTrigger,\n\ttype TLUiDropdownMenuCheckboxItemProps,\n\ttype TLUiDropdownMenuContentProps,\n\ttype TLUiDropdownMenuGroupProps,\n\ttype TLUiDropdownMenuItemProps,\n\ttype TLUiDropdownMenuRootProps,\n\ttype TLUiDropdownMenuSubContentProps,\n\ttype TLUiDropdownMenuSubProps,\n\ttype TLUiDropdownMenuSubTriggerProps,\n\ttype TLUiDropdownMenuTriggerProps,\n} from './lib/ui/components/primitives/TldrawUiDropdownMenu'\nexport {\n\tTldrawUiIcon,\n\ttype TLUiIconJsx,\n\ttype TLUiIconProps,\n} from './lib/ui/components/primitives/TldrawUiIcon'\nexport { TldrawUiInput, type TLUiInputProps } from './lib/ui/components/primitives/TldrawUiInput'\nexport { TldrawUiKbd, type TLUiKbdProps } from './lib/ui/components/primitives/TldrawUiKbd'\nexport {\n\tTldrawUiPopover,\n\tTldrawUiPopoverContent,\n\tTldrawUiPopoverTrigger,\n\ttype TLUiPopoverContentProps,\n\ttype TLUiPopoverProps,\n\ttype TLUiPopoverTriggerProps,\n} from './lib/ui/components/primitives/TldrawUiPopover'\nexport {\n\tTldrawUiSelect,\n\tTldrawUiSelectContent,\n\tTldrawUiSelectItem,\n\tTldrawUiSelectTrigger,\n\tTldrawUiSelectValue,\n\ttype TLUiSelectContentProps,\n\ttype TLUiSelectItemProps,\n\ttype TLUiSelectProps,\n\ttype TLUiSelectTriggerProps,\n\ttype TLUiSelectValueProps,\n} from './lib/ui/components/primitives/TldrawUiSelect'\nexport { TldrawUiSlider, type TLUiSliderProps } from './lib/ui/components/primitives/TldrawUiSlider'\nexport {\n\tTldrawUiToolbar,\n\tTldrawUiToolbarButton,\n\tTldrawUiToolbarToggleGroup,\n\tTldrawUiToolbarToggleItem,\n\ttype TLUiToolbarButtonProps,\n\ttype TLUiToolbarProps,\n\ttype TLUiToolbarToggleGroupProps,\n\ttype TLUiToolbarToggleItemProps,\n} from './lib/ui/components/primitives/TldrawUiToolbar'\nexport {\n\thideAllTooltips,\n\tTldrawUiTooltip,\n\tTldrawUiTooltipProvider,\n\ttype TldrawUiTooltipProps,\n\ttype TldrawUiTooltipProviderProps,\n} from './lib/ui/components/primitives/TldrawUiTooltip'\nexport {\n\tDefaultQuickActions,\n\ttype TLUiQuickActionsProps,\n} from './lib/ui/components/QuickActions/DefaultQuickActions'\nexport { DefaultQuickActionsContent } from './lib/ui/components/QuickActions/DefaultQuickActionsContent'\nexport {\n\tDefaultPeopleMenu,\n\t// legacy\n\tDefaultPeopleMenu as PeopleMenu,\n\ttype DefaultPeopleMenuProps,\n\ttype DefaultPeopleMenuProps as PeopleMenuProps,\n} from './lib/ui/components/SharePanel/DefaultPeopleMenu'\nexport {\n\tDefaultPeopleMenuAvatar,\n\ttype TLUiPeopleMenuAvatarProps,\n} from './lib/ui/components/SharePanel/DefaultPeopleMenuAvatar'\nexport {\n\tDefaultPeopleMenuContent,\n\ttype DefaultPeopleMenuContentProps,\n} from './lib/ui/components/SharePanel/DefaultPeopleMenuContent'\nexport {\n\tDefaultPeopleMenuFacePile,\n\ttype TLUiPeopleMenuFacePileProps,\n} from './lib/ui/components/SharePanel/DefaultPeopleMenuFacePile'\nexport {\n\tDefaultPeopleMenuItem,\n\ttype TLUiPeopleMenuItemProps,\n} from './lib/ui/components/SharePanel/DefaultPeopleMenuItem'\nexport { DefaultSharePanel } from './lib/ui/components/SharePanel/DefaultSharePanel'\nexport { DefaultUserPresenceEditor } from './lib/ui/components/SharePanel/DefaultUserPresenceEditor'\nexport { Spinner } from './lib/ui/components/Spinner'\nexport {\n\tDefaultStylePanel,\n\ttype TLUiStylePanelProps,\n} from './lib/ui/components/StylePanel/DefaultStylePanel'\nexport {\n\tDefaultStylePanelContent,\n\tStylePanelArrowheadPicker,\n\tStylePanelArrowKindPicker,\n\tStylePanelColorPicker,\n\tStylePanelDashPicker,\n\tStylePanelFillPicker,\n\tStylePanelFontPicker,\n\tStylePanelGeoShapePicker,\n\tStylePanelLabelAlignPicker,\n\tStylePanelOpacityPicker,\n\tStylePanelSection,\n\tStylePanelSizePicker,\n\tStylePanelSplinePicker,\n\tStylePanelTextAlignPicker,\n\ttype StylePanelSectionProps,\n} from './lib/ui/components/StylePanel/DefaultStylePanelContent'\nexport {\n\tStylePanelButtonPicker,\n\tStylePanelButtonPickerInline,\n\ttype StylePanelButtonPickerProps,\n} from './lib/ui/components/StylePanel/StylePanelButtonPicker'\nexport {\n\tStylePanelContextProvider,\n\tuseStylePanelContext,\n\ttype StylePanelContext,\n\ttype StylePanelContextProviderProps,\n} from './lib/ui/components/StylePanel/StylePanelContext'\nexport {\n\tStylePanelDoubleDropdownPicker,\n\tStylePanelDoubleDropdownPickerInline,\n\ttype StylePanelDoubleDropdownPickerProps,\n} from './lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker'\nexport {\n\tStylePanelDropdownPicker,\n\tStylePanelDropdownPickerInline,\n\ttype StylePanelDropdownPickerProps,\n} from './lib/ui/components/StylePanel/StylePanelDropdownPicker'\nexport {\n\tStylePanelSubheading,\n\ttype StylePanelSubheadingProps,\n} from './lib/ui/components/StylePanel/StylePanelSubheading'\nexport {\n\tDefaultImageToolbar,\n\ttype TLUiImageToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultImageToolbar'\nexport {\n\tDefaultImageToolbarContent,\n\ttype DefaultImageToolbarContentProps,\n} from './lib/ui/components/Toolbar/DefaultImageToolbarContent'\nexport {\n\tDefaultRichTextToolbar,\n\ttype TLUiRichTextToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultRichTextToolbar'\nexport {\n\tDefaultRichTextToolbarContent,\n\ttype DefaultRichTextToolbarContentProps,\n} from './lib/ui/components/Toolbar/DefaultRichTextToolbarContent'\nexport {\n\tDefaultToolbar,\n\ttype DefaultToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultToolbar'\nexport {\n\tArrowDownToolbarItem,\n\tArrowLeftToolbarItem,\n\tArrowRightToolbarItem,\n\tArrowToolbarItem,\n\tArrowUpToolbarItem,\n\tAssetToolbarItem,\n\tCheckBoxToolbarItem,\n\tCloudToolbarItem,\n\tDefaultToolbarContent,\n\tDiamondToolbarItem,\n\tDrawToolbarItem,\n\tEllipseToolbarItem,\n\tEraserToolbarItem,\n\tFrameToolbarItem,\n\tHandToolbarItem,\n\tHeartToolbarItem,\n\tHexagonToolbarItem,\n\tHighlightToolbarItem,\n\tLaserToolbarItem,\n\tLineToolbarItem,\n\tNoteToolbarItem,\n\tOvalToolbarItem,\n\tRectangleToolbarItem,\n\tRhombusToolbarItem,\n\tSelectToolbarItem,\n\tStarToolbarItem,\n\tTextToolbarItem,\n\tToolbarItem,\n\tTrapezoidToolbarItem,\n\tTriangleToolbarItem,\n\tuseIsToolSelected,\n\tXBoxToolbarItem,\n\ttype ToolbarItemProps,\n} from './lib/ui/components/Toolbar/DefaultToolbarContent'\nexport {\n\tDefaultVideoToolbar,\n\ttype TLUiVideoToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultVideoToolbar'\nexport {\n\tDefaultVideoToolbarContent,\n\ttype DefaultVideoToolbarContentProps,\n} from './lib/ui/components/Toolbar/DefaultVideoToolbarContent'\nexport {\n\tOverflowingToolbar,\n\ttype OverflowingToolbarProps,\n} from './lib/ui/components/Toolbar/OverflowingToolbar'\nexport {\n\tToggleToolLockedButton,\n\ttype ToggleToolLockedButtonProps,\n} from './lib/ui/components/Toolbar/ToggleToolLockedButton'\nexport {\n\tCenteredTopPanelContainer,\n\ttype CenteredTopPanelContainerProps,\n} from './lib/ui/components/TopPanel/CenteredTopPanelContainer'\nexport {\n\tDefaultZoomMenu,\n\ttype TLUiZoomMenuProps,\n} from './lib/ui/components/ZoomMenu/DefaultZoomMenu'\nexport { DefaultZoomMenuContent } from './lib/ui/components/ZoomMenu/DefaultZoomMenuContent'\nexport { PORTRAIT_BREAKPOINT } from './lib/ui/constants'\nexport {\n\tTldrawUiA11yProvider,\n\tuseA11y,\n\ttype A11yPriority,\n\ttype A11yProviderProps,\n\ttype TLUiA11y,\n\ttype TLUiA11yContextType,\n} from './lib/ui/context/a11y'\nexport {\n\tunwrapLabel,\n\tuseActions,\n\ttype ActionsProviderProps,\n\ttype TLUiActionItem,\n\ttype TLUiActionsContextType,\n} from './lib/ui/context/actions'\nexport { AssetUrlsProvider, useAssetUrls } from './lib/ui/context/asset-urls'\nexport {\n\tBreakPointProvider,\n\tuseBreakpoint,\n\ttype BreakPointProviderProps,\n} from './lib/ui/context/breakpoints'\nexport {\n\tTldrawUiComponentsProvider,\n\tuseTldrawUiComponents,\n\ttype TLUiComponents,\n\ttype TLUiComponentsProviderProps,\n} from './lib/ui/context/components'\nexport {\n\tTldrawUiDialogsProvider,\n\tuseDialogs,\n\ttype TLUiDialog,\n\ttype TLUiDialogProps,\n\ttype TLUiDialogsContextType,\n\ttype TLUiDialogsProviderProps,\n} from './lib/ui/context/dialogs'\nexport {\n\tTldrawUiEventsProvider,\n\tuseUiEvents,\n\ttype EventsProviderProps,\n\ttype TLUiEventContextType,\n\ttype TLUiEventData,\n\ttype TLUiEventHandler,\n\ttype TLUiEventMap,\n\ttype TLUiEventSource,\n} from './lib/ui/context/events'\nexport {\n\tTldrawUiContextProvider,\n\ttype TLUiContextProviderProps,\n} from './lib/ui/context/TldrawUiContextProvider'\nexport {\n\tTldrawUiToastsProvider,\n\tuseToasts,\n\ttype AlertSeverity,\n\ttype TLUiToast,\n\ttype TLUiToastAction,\n\ttype TLUiToastsContextType,\n\ttype TLUiToastsProviderProps,\n} from './lib/ui/context/toasts'\nexport {\n\tuseCanApplySelectionAction,\n\tuseCanRedo,\n\tuseCanUndo,\n\tuseUnlockedSelectedShapesCount,\n} from './lib/ui/hooks/menu-hooks'\nexport {\n\thandleNativeOrMenuCopy,\n\tuseMenuClipboardEvents,\n\tuseNativeClipboardEvents,\n} from './lib/ui/hooks/useClipboardEvents'\nexport {\n\tuseCollaborationStatus,\n\tuseShowCollaborationUi,\n} from './lib/ui/hooks/useCollaborationStatus'\nexport { useCopyAs } from './lib/ui/hooks/useCopyAs'\nexport { useExportAs } from './lib/ui/hooks/useExportAs'\nexport { useKeyboardShortcuts } from './lib/ui/hooks/useKeyboardShortcuts'\nexport { useLocalStorageState } from './lib/ui/hooks/useLocalStorageState'\nexport { useMenuIsOpen } from './lib/ui/hooks/useMenuIsOpen'\nexport { useReadonly } from './lib/ui/hooks/useReadonly'\nexport { useRelevantStyles } from './lib/ui/hooks/useRelevantStyles'\nexport {\n\tonDragFromToolbarToCreateShape,\n\tuseTools,\n\ttype OnDragFromToolbarToCreateShapesOpts,\n\ttype TLUiToolItem,\n\ttype TLUiToolsContextType,\n\ttype TLUiToolsProviderProps,\n} from './lib/ui/hooks/useTools'\nexport { type TLUiTranslationKey } from './lib/ui/hooks/useTranslation/TLUiTranslationKey'\nexport { RTL_LANGUAGES, type TLUiTranslation } from './lib/ui/hooks/useTranslation/translations'\nexport {\n\tuseCurrentTranslation,\n\tuseDirection,\n\tuseTranslation,\n\ttype TLUiTranslationContextType,\n\ttype TLUiTranslationProviderProps,\n} from './lib/ui/hooks/useTranslation/useTranslation'\nexport { iconTypes, type TLUiIconType } from './lib/ui/icon-types'\nexport { useDefaultHelpers, type TLUiOverrideHelpers, type TLUiOverrides } from './lib/ui/overrides'\nexport { TldrawUi, TldrawUiInFrontOfTheCanvas, type TldrawUiProps } from './lib/ui/TldrawUi'\nexport { containBoxSize, downsizeImage, type BoxWidthHeight } from './lib/utils/assets/assets'\nexport { preloadFont, type TLTypeFace } from './lib/utils/assets/preload-font'\nexport { getEmbedInfo, type TLEmbedResult } from './lib/utils/embeds/embeds'\nexport { putExcalidrawContent } from './lib/utils/excalidraw/putExcalidrawContent'\nexport { copyAs, type CopyAsOptions, type TLCopyType } from './lib/utils/export/copyAs'\nexport { downloadFile, exportAs, type ExportAsOptions } from './lib/utils/export/exportAs'\nexport { fitFrameToContent, removeFrame } from './lib/utils/frames/frames'\nexport {\n\tdefaultEditorAssetUrls,\n\tsetDefaultEditorAssetUrls,\n\ttype TLEditorAssetUrls,\n} from './lib/utils/static-assets/assetUrls'\nexport { sanitizeSvg } from './lib/utils/svg/sanitizeSvg'\nexport {\n\tdefaultAddFontsFromNode,\n\tKeyboardShiftEnterTweakExtension,\n\trenderHtmlFromRichText,\n\trenderHtmlFromRichTextForMeasurement,\n\trenderPlaintextFromRichText,\n\trenderRichTextFromHTML,\n\ttipTapDefaultExtensions,\n} from './lib/utils/text/richText'\nexport { truncateStringWithEllipsis } from './lib/utils/text/text'\nexport {\n\tbuildFromV1Document,\n\tTLV1AlignStyle,\n\tTLV1AssetType,\n\tTLV1ColorStyle,\n\tTLV1DashStyle,\n\tTLV1Decoration,\n\tTLV1FontStyle,\n\tTLV1ShapeType,\n\tTLV1SizeStyle,\n\ttype TLV1ArrowBinding,\n\ttype TLV1ArrowShape,\n\ttype TLV1Asset,\n\ttype TLV1BaseAsset,\n\ttype TLV1BaseBinding,\n\ttype TLV1BaseShape,\n\ttype TLV1Binding,\n\ttype TLV1Bounds,\n\ttype TLV1Document,\n\ttype TLV1DrawShape,\n\ttype TLV1EllipseShape,\n\ttype TLV1GroupShape,\n\ttype TLV1Handle,\n\ttype TLV1ImageAsset,\n\ttype TLV1ImageShape,\n\ttype TLV1Page,\n\ttype TLV1PageState,\n\ttype TLV1RectangleShape,\n\ttype TLV1Shape,\n\ttype TLV1ShapeStyles,\n\ttype TLV1StickyShape,\n\ttype TLV1TextShape,\n\ttype TLV1TriangleShape,\n\ttype TLV1VideoAsset,\n\ttype TLV1VideoShape,\n} from './lib/utils/tldr/buildFromV1Document'\nexport {\n\tparseAndLoadDocument,\n\tparseTldrawJsonFile,\n\tserializeTldrawJson,\n\tserializeTldrawJsonBlob,\n\tTLDRAW_FILE_EXTENSION,\n\ttype TldrawFile,\n\ttype TldrawFileParseError,\n} from './lib/utils/tldr/file'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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/// <reference types=\"react\" />\n\nimport { registerTldrawLibraryVersion } from '@tldraw/editor'\nexport { getPointsFromDrawSegment, getPointsFromDrawSegments } from './lib/shapes/draw/getPath'\nexport {\n\tPathBuilder,\n\tPathBuilderGeometry2d,\n\ttype BasePathBuilderOpts,\n\ttype CubicBezierToPathBuilderCommand,\n\ttype DashedPathBuilderOpts,\n\ttype DrawPathBuilderDOpts,\n\ttype DrawPathBuilderOpts,\n\ttype NonePathBuilderOpts,\n\ttype LineToPathBuilderCommand,\n\ttype MoveToPathBuilderCommand,\n\ttype PathBuilderCommand,\n\ttype PathBuilderCommandBase,\n\ttype PathBuilderCommandInfo,\n\ttype PathBuilderCommandOpts,\n\ttype PathBuilderLineOpts,\n\ttype PathBuilderOpts,\n\ttype PathBuilderToDOpts,\n\ttype SolidPathBuilderOpts,\n} from './lib/shapes/shared/PathBuilder'\nexport { usePrefersReducedMotion } from './lib/shapes/shared/usePrefersReducedMotion'\nexport { startEditingShapeWithRichText } from './lib/tools/SelectTool/selectHelpers'\nexport { DefaultA11yAnnouncer, useSelectedShapesAnnouncer } from './lib/ui/components/A11y'\nexport { AccessibilityMenu } from './lib/ui/components/AccessibilityMenu'\nexport { ColorSchemeMenu } from './lib/ui/components/ColorSchemeMenu'\nexport { DefaultFollowingIndicator } from './lib/ui/components/DefaultFollowingIndicator'\nexport { DefaultDialogs } from './lib/ui/components/Dialogs'\nexport {\n\tTldrawUiColumn,\n\tTldrawUiGrid,\n\tTldrawUiOrientationProvider,\n\tTldrawUiRow,\n\tuseTldrawUiOrientation,\n\ttype TldrawUiOrientationContext,\n\ttype TldrawUiOrientationProviderProps,\n\ttype TLUiLayoutProps,\n} from './lib/ui/components/primitives/layout'\nexport {\n\tTldrawUiMenuActionCheckboxItem,\n\ttype TLUiMenuActionCheckboxItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem'\nexport {\n\tTldrawUiMenuActionItem,\n\ttype TLUiMenuActionItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuActionItem'\nexport {\n\tTldrawUiMenuToolItem,\n\ttype TLUiMenuToolItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuToolItem'\nexport { DefaultToasts } from './lib/ui/components/Toasts'\nexport { TldrawUiTranslationProvider } from './lib/ui/hooks/useTranslation/useTranslation'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/editor'\nexport { BookmarkAssetUtil } from './lib/assets/BookmarkAssetUtil'\nexport { ImageAssetUtil } from './lib/assets/ImageAssetUtil'\nexport { VideoAssetUtil } from './lib/assets/VideoAssetUtil'\nexport {\n\tArrowBindingHintOverlayUtil,\n\ttype TLArrowBindingHintOverlay,\n} from './lib/overlays/ArrowBindingHintOverlayUtil'\nexport { ArrowBindingUtil } from './lib/bindings/arrow/ArrowBindingUtil'\nexport { ArrowHintOverlayUtil, type TLArrowHintOverlay } from './lib/overlays/ArrowHintOverlayUtil'\nexport {\n\tBrushOverlayUtil,\n\ttype BrushOverlayUtilDisplayValues,\n\ttype BrushOverlayUtilOptions,\n\ttype TLBrushOverlay,\n} from './lib/overlays/BrushOverlayUtil'\nexport { ZoomBrushOverlayUtil, type TLZoomBrushOverlay } from './lib/overlays/ZoomBrushOverlayUtil'\nexport { ScribbleOverlayUtil, type TLScribbleOverlay } from './lib/overlays/ScribbleOverlayUtil'\nexport {\n\tCollaboratorBrushOverlayUtil,\n\ttype TLCollaboratorBrushOverlay,\n} from './lib/overlays/CollaboratorBrushOverlayUtil'\nexport {\n\tCollaboratorScribbleOverlayUtil,\n\ttype TLCollaboratorScribbleOverlay,\n} from './lib/overlays/CollaboratorScribbleOverlayUtil'\nexport {\n\tCollaboratorHintOverlayUtil,\n\ttype TLCollaboratorHintOverlay,\n} from './lib/overlays/CollaboratorHintOverlayUtil'\nexport {\n\tCollaboratorCursorOverlayUtil,\n\ttype TLCollaboratorCursorOverlay,\n} from './lib/overlays/CollaboratorCursorOverlayUtil'\nexport {\n\tCollaboratorShapeIndicatorOverlayUtil,\n\ttype TLCollaboratorShapeIndicatorOverlay,\n} from './lib/overlays/CollaboratorShapeIndicatorOverlayUtil'\nexport {\n\tShapeHandleOverlayUtil,\n\ttype TLShapeHandleOverlay,\n} from './lib/overlays/ShapeHandleOverlayUtil'\nexport {\n\tSelectionForegroundOverlayUtil,\n\ttype TLSelectionForegroundOverlay,\n} from './lib/overlays/SelectionForegroundOverlayUtil'\nexport {\n\tSnapIndicatorOverlayUtil,\n\ttype TLSnapIndicatorOverlay,\n} from './lib/overlays/SnapIndicatorOverlayUtil'\nexport { defaultAssetUtils } from './lib/defaultAssetUtils'\nexport { defaultBindingUtils } from './lib/defaultBindingUtils'\nexport { defaultOverlayUtils } from './lib/defaultOverlayUtils'\nexport {\n\tDEFAULT_EMBED_DEFINITIONS,\n\tembedShapePermissionDefaults,\n\tunknownEmbedShapePermissionOverrides,\n\ttype CustomEmbedDefinition,\n\ttype DefaultEmbedDefinitionType,\n\ttype EmbedDefinition,\n\ttype TLEmbedDefinition,\n\ttype TLEmbedShapePermissions,\n} from './lib/defaultEmbedDefinitions'\nexport {\n\tcenterSelectionAroundPoint,\n\tcreateEmptyBookmarkShape,\n\tcreateShapesForAssets,\n\tDEFAULT_MAX_ASSET_SIZE,\n\tDEFAULT_MAX_IMAGE_DIMENSION,\n\tdefaultHandleExternalEmbedContent,\n\tdefaultHandleExternalExcalidrawContent,\n\tdefaultHandleExternalFileAsset,\n\tdefaultHandleExternalFileContent,\n\tdefaultHandleExternalFileReplaceContent,\n\tdefaultHandleExternalSvgTextContent,\n\tdefaultHandleExternalTextContent,\n\tdefaultHandleExternalTldrawContent,\n\tdefaultHandleExternalUrlAsset,\n\tdefaultHandleExternalUrlContent,\n\tgetAssetInfo,\n\tnotifyIfFileNotAllowed,\n\tregisterDefaultExternalContentHandlers,\n\ttype TLDefaultExternalContentHandlerOpts,\n\ttype TLExternalContentProps,\n} from './lib/defaultExternalContentHandlers'\nexport { defaultShapeTools } from './lib/defaultShapeTools'\nexport { defaultShapeUtils } from './lib/defaultShapeUtils'\nexport { registerDefaultSideEffects } from './lib/defaultSideEffects'\nexport { defaultTools } from './lib/defaultTools'\nexport {\n\ttype ArrowShapeOptions,\n\ttype ArrowShapeUtilDisplayValues,\n\ttype TLArcArrowInfo,\n\ttype TLArcInfo,\n\ttype TLArrowInfo,\n\ttype TLArrowPoint,\n\ttype TLElbowArrowInfo,\n\ttype TLStraightArrowInfo,\n} from './lib/shapes/arrow/arrow-types'\nexport { ArrowShapeTool } from './lib/shapes/arrow/ArrowShapeTool'\nexport { ArrowShapeUtil } from './lib/shapes/arrow/ArrowShapeUtil'\nexport {\n\tclearArrowTargetState,\n\tgetArrowTargetState,\n\tupdateArrowTargetState,\n\ttype ArrowTargetState,\n\ttype UpdateArrowTargetStateOpts,\n} from './lib/shapes/arrow/arrowTargetState'\nexport {\n\ttype ElbowArrowBox,\n\ttype ElbowArrowBoxEdges,\n\ttype ElbowArrowBoxes,\n\ttype ElbowArrowEdge,\n\ttype ElbowArrowInfo,\n\ttype ElbowArrowInfoWithoutRoute,\n\ttype ElbowArrowMidpointHandle,\n\ttype ElbowArrowOptions,\n\ttype ElbowArrowRange,\n\ttype ElbowArrowRoute,\n\ttype ElbowArrowSide,\n\ttype ElbowArrowSideReason,\n\ttype ElbowArrowTargetBox,\n} from './lib/shapes/arrow/elbow/definitions'\nexport { getArrowInfo } from './lib/shapes/arrow/getArrowInfo'\nexport {\n\tgetArrowBindings,\n\tgetArrowTerminalsInArrowSpace,\n\ttype TLArrowBindings,\n} from './lib/shapes/arrow/shared'\nexport { createBookmarkFromUrl } from './lib/shapes/bookmark/bookmarks'\nexport {\n\tBookmarkShapeUtil,\n\ttype BookmarkShapeOptions,\n\ttype BookmarkShapeUtilDisplayValues,\n} from './lib/shapes/bookmark/BookmarkShapeUtil'\nexport { DrawShapeTool } from './lib/shapes/draw/DrawShapeTool'\nexport {\n\tDrawShapeUtil,\n\ttype DrawShapeOptions,\n\ttype DrawShapeUtilDisplayValues,\n} from './lib/shapes/draw/DrawShapeUtil'\nexport {\n\tEmbedShapeUtil,\n\ttype EmbedShapeOptions,\n\ttype EmbedShapeUtilDisplayValues,\n} from './lib/shapes/embed/EmbedShapeUtil'\nexport { FrameShapeTool } from './lib/shapes/frame/FrameShapeTool'\nexport {\n\tFrameShapeUtil,\n\ttype FrameShapeOptions,\n\ttype FrameShapeUtilDisplayValues,\n} from './lib/shapes/frame/FrameShapeUtil'\nexport { GeoShapeTool } from './lib/shapes/geo/GeoShapeTool'\nexport {\n\tGeoShapeUtil,\n\ttype GeoShapeOptions,\n\ttype GeoShapeUtilDisplayValues,\n} from './lib/shapes/geo/GeoShapeUtil'\nexport {\n\tdefaultGeoTypeDefinitions,\n\tgetGeoTypeDefinition,\n\ttype GeoTypeDefinition,\n} from './lib/shapes/geo/getGeoShapePath'\nexport { HighlightShapeTool } from './lib/shapes/highlight/HighlightShapeTool'\nexport {\n\tHighlightShapeUtil,\n\ttype HighlightShapeOptions,\n\ttype HighlightShapeUtilDisplayValues,\n} from './lib/shapes/highlight/HighlightShapeUtil'\nexport {\n\tImageShapeUtil,\n\ttype ImageShapeOptions,\n\ttype ImageShapeUtilDisplayValues,\n} from './lib/shapes/image/ImageShapeUtil'\nexport { LineShapeTool } from './lib/shapes/line/LineShapeTool'\nexport {\n\tLineShapeUtil,\n\ttype LineShapeOptions,\n\ttype LineShapeUtilDisplayValues,\n} from './lib/shapes/line/LineShapeUtil'\nexport { NoteShapeTool } from './lib/shapes/note/NoteShapeTool'\nexport {\n\tNoteShapeUtil,\n\ttype NoteShapeOptions,\n\ttype NoteShapeUtilDisplayValues,\n} from './lib/shapes/note/NoteShapeUtil'\nexport {\n\tASPECT_RATIO_OPTIONS,\n\tASPECT_RATIO_TO_VALUE,\n\tgetCropBox,\n\tgetDefaultCrop,\n\tgetUncroppedSize,\n\ttype ASPECT_RATIO_OPTION,\n\ttype CropBoxOptions,\n} from './lib/shapes/shared/crop'\nexport { getFontFamily } from './lib/shapes/shared/default-shape-constants'\nexport {\n\tallDefaultFontFaces,\n\tDefaultFontFaces,\n\ttype TLDefaultFont,\n\ttype TLDefaultFonts,\n} from './lib/shapes/shared/defaultFonts'\nexport { getStroke } from './lib/shapes/shared/freehand/getStroke'\nexport { getStrokeOutlinePoints } from './lib/shapes/shared/freehand/getStrokeOutlinePoints'\nexport { getStrokePoints } from './lib/shapes/shared/freehand/getStrokePoints'\nexport { setStrokePointRadii } from './lib/shapes/shared/freehand/setStrokePointRadii'\nexport { getSvgPathFromStrokePoints } from './lib/shapes/shared/freehand/svg'\nexport { type StrokeOptions, type StrokePoint } from './lib/shapes/shared/freehand/types'\nexport {\n\tgetDisplayValues,\n\ttype ShapeOptionsWithDisplayValues,\n} from './lib/shapes/shared/getDisplayValues'\nexport { PlainTextLabel, type PlainTextLabelProps } from './lib/shapes/shared/PlainTextLabel'\nexport {\n\tRichTextLabel,\n\tRichTextSVG,\n\ttype RichTextLabelProps,\n\ttype RichTextSVGProps,\n} from './lib/shapes/shared/RichTextLabel'\nexport { useEditablePlainText } from './lib/shapes/shared/useEditablePlainText'\nexport { useEditableRichText } from './lib/shapes/shared/useEditableRichText'\nexport {\n\tuseImageOrVideoAsset,\n\ttype UseImageOrVideoAssetOptions,\n} from './lib/shapes/shared/useImageOrVideoAsset'\nexport { PlainTextArea } from './lib/shapes/text/PlainTextArea'\nexport { RichTextArea, type TextAreaProps } from './lib/shapes/text/RichTextArea'\nexport { TextShapeTool } from './lib/shapes/text/TextShapeTool'\nexport {\n\tTextShapeUtil,\n\ttype TextShapeOptions,\n\ttype TextShapeUtilDisplayValues,\n} from './lib/shapes/text/TextShapeUtil'\nexport {\n\tVideoShapeUtil,\n\ttype VideoShapeOptions,\n\ttype VideoShapeUtilDisplayValues,\n} from './lib/shapes/video/VideoShapeUtil'\nexport { getColorStyleItems, getFontStyleItems, type StyleValuesForUi } from './lib/styles'\nexport { Tldraw, type TLComponents, type TldrawBaseProps, type TldrawProps } from './lib/Tldraw'\nexport { TldrawImage, type TldrawImageProps } from './lib/TldrawImage'\nexport { EraserTool } from './lib/tools/EraserTool/EraserTool'\nexport { HandTool } from './lib/tools/HandTool/HandTool'\nexport { LaserTool } from './lib/tools/LaserTool/LaserTool'\nexport { getHitShapeOnCanvasPointerDown } from './lib/tools/selection-logic/getHitShapeOnCanvasPointerDown'\nexport { SelectTool } from './lib/tools/SelectTool/SelectTool'\nexport { ZoomTool } from './lib/tools/ZoomTool/ZoomTool'\nexport {\n\tsetDefaultUiAssetUrls,\n\ttype TLUiAssetUrlOverrides,\n\ttype TLUiAssetUrls,\n} from './lib/ui/assetUrls'\nexport {\n\tDefaultActionsMenu,\n\ttype TLUiActionsMenuProps,\n} from './lib/ui/components/ActionsMenu/DefaultActionsMenu'\nexport {\n\tAlignMenuItems,\n\tDefaultActionsMenuContent,\n\tDistributeMenuItems,\n\tGroupOrUngroupMenuItem,\n\tReorderMenuItems,\n\tRotateCWMenuItem,\n\tStackMenuItems,\n\tZoomOrRotateMenuItem,\n} from './lib/ui/components/ActionsMenu/DefaultActionsMenuContent'\nexport {\n\tDefaultContextMenu as ContextMenu,\n\tDefaultContextMenu,\n\ttype TLUiContextMenuProps,\n} from './lib/ui/components/ContextMenu/DefaultContextMenu'\nexport { DefaultContextMenuContent } from './lib/ui/components/ContextMenu/DefaultContextMenuContent'\nexport {\n\tDefaultDebugMenu,\n\ttype TLUiDebugMenuProps,\n} from './lib/ui/components/DebugMenu/DefaultDebugMenu'\nexport {\n\tDebugFlags,\n\tDefaultDebugMenuContent,\n\tExampleDialog,\n\tFeatureFlags,\n\ttype CustomDebugFlags,\n\ttype DebugFlagsProps,\n\ttype ExampleDialogProps,\n\ttype FeatureFlagsProps,\n} from './lib/ui/components/DebugMenu/DefaultDebugMenuContent'\nexport { DefaultMenuPanel } from './lib/ui/components/DefaultMenuPanel'\nexport {\n\tDefaultHelperButtons,\n\ttype TLUiHelperButtonsProps,\n} from './lib/ui/components/HelperButtons/DefaultHelperButtons'\nexport { DefaultHelperButtonsContent } from './lib/ui/components/HelperButtons/DefaultHelperButtonsContent'\nexport {\n\tDefaultHelpMenu,\n\ttype TLUiHelpMenuProps,\n} from './lib/ui/components/HelpMenu/DefaultHelpMenu'\nexport {\n\tDefaultHelpMenuContent,\n\tKeyboardShortcutsMenuItem,\n} from './lib/ui/components/HelpMenu/DefaultHelpMenuContent'\nexport {\n\tDefaultKeyboardShortcutsDialog,\n\ttype TLUiKeyboardShortcutsDialogProps,\n} from './lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialog'\nexport { DefaultKeyboardShortcutsDialogContent } from './lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent'\nexport { LanguageMenu } from './lib/ui/components/LanguageMenu'\nexport { InputModeMenu } from './lib/ui/components/InputModeMenu'\nexport {\n\tDefaultMainMenu,\n\ttype TLUiMainMenuProps,\n} from './lib/ui/components/MainMenu/DefaultMainMenu'\nexport {\n\tDefaultMainMenuContent,\n\tEditSubmenu,\n\tExportFileContentSubMenu,\n\tExtrasGroup,\n\tLockGroup,\n\tMiscMenuGroup,\n\tPreferencesGroup,\n\tUndoRedoGroup,\n\tViewSubmenu,\n} from './lib/ui/components/MainMenu/DefaultMainMenuContent'\nexport {\n\tArrangeMenuSubmenu,\n\tClipboardMenuGroup,\n\tConversionsMenuGroup,\n\tConvertToBookmarkMenuItem,\n\tConvertToEmbedMenuItem,\n\tCopyAsMenuGroup,\n\tCopyMenuItem,\n\tCursorChatItem,\n\tCutMenuItem,\n\tDeleteMenuItem,\n\tDuplicateMenuItem,\n\tEditLinkMenuItem,\n\tEditMenuSubmenu,\n\tFitFrameToContentMenuItem,\n\tGroupMenuItem,\n\tMoveToPageMenu,\n\tPasteMenuItem,\n\tPrintItem,\n\tRemoveFrameMenuItem,\n\tReorderMenuSubmenu,\n\tSelectAllMenuItem,\n\tToggleAutoSizeMenuItem,\n\tToggleDebugModeItem,\n\tToggleDynamicSizeModeItem,\n\tToggleEdgeScrollingItem,\n\tToggleEnhancedA11yModeItem,\n\tToggleFocusModeItem,\n\tToggleGridItem,\n\tToggleInvertZoomItem,\n\tToggleKeyboardShortcutsItem,\n\tToggleLockMenuItem,\n\tTogglePasteAtCursorItem,\n\tToggleReduceMotionItem,\n\tToggleSnapModeItem,\n\tToggleToolLockItem,\n\tToggleTransparentBgMenuItem,\n\tToggleWrapModeItem,\n\tUngroupMenuItem,\n\tUnlockAllMenuItem,\n\tZoomTo100MenuItem,\n\tZoomToFitMenuItem,\n\tZoomToSelectionMenuItem,\n} from './lib/ui/components/menu-items'\nexport { DefaultMinimap } from './lib/ui/components/Minimap/DefaultMinimap'\nexport { MobileStylePanel } from './lib/ui/components/MobileStylePanel'\nexport { DefaultNavigationPanel } from './lib/ui/components/NavigationPanel/DefaultNavigationPanel'\nexport { OfflineIndicator } from './lib/ui/components/OfflineIndicator/OfflineIndicator'\nexport { DefaultPageMenu } from './lib/ui/components/PageMenu/DefaultPageMenu'\nexport { PageItemInput, type PageItemInputProps } from './lib/ui/components/PageMenu/PageItemInput'\nexport {\n\tPageItemSubmenu,\n\ttype PageItemSubmenuProps,\n} from './lib/ui/components/PageMenu/PageItemSubmenu'\nexport {\n\tTldrawUiButton,\n\ttype TLUiButtonProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButton'\nexport {\n\tTldrawUiButtonCheck,\n\ttype TLUiButtonCheckProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButtonCheck'\nexport {\n\tTldrawUiButtonIcon,\n\ttype TLUiButtonIconProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButtonIcon'\nexport {\n\tTldrawUiButtonLabel,\n\ttype TLUiButtonLabelProps,\n} from './lib/ui/components/primitives/Button/TldrawUiButtonLabel'\nexport {\n\tTldrawUiMenuCheckboxItem,\n\ttype TLUiMenuCheckboxItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem'\nexport {\n\tTldrawUiMenuContextProvider,\n\ttype TLUiMenuContextProviderProps,\n\ttype TLUiMenuContextType,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuContext'\nexport {\n\tTldrawUiMenuGroup,\n\ttype TLUiMenuGroupProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuGroup'\nexport {\n\tTldrawUiMenuItem,\n\ttype TLUiMenuItemProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuItem'\nexport {\n\tTldrawUiMenuSubmenu,\n\ttype TLUiMenuSubmenuProps,\n} from './lib/ui/components/primitives/menus/TldrawUiMenuSubmenu'\nexport {\n\tTldrawUiContextualToolbar,\n\ttype TLUiContextualToolbarProps,\n} from './lib/ui/components/primitives/TldrawUiContextualToolbar'\nexport {\n\tTldrawUiDialogBody,\n\tTldrawUiDialogCloseButton,\n\tTldrawUiDialogFooter,\n\tTldrawUiDialogHeader,\n\tTldrawUiDialogTitle,\n\ttype TLUiDialogBodyProps,\n\ttype TLUiDialogFooterProps,\n\ttype TLUiDialogHeaderProps,\n\ttype TLUiDialogTitleProps,\n} from './lib/ui/components/primitives/TldrawUiDialog'\nexport {\n\tTldrawUiDropdownMenuCheckboxItem,\n\tTldrawUiDropdownMenuContent,\n\tTldrawUiDropdownMenuGroup,\n\tTldrawUiDropdownMenuIndicator,\n\tTldrawUiDropdownMenuItem,\n\tTldrawUiDropdownMenuRoot,\n\tTldrawUiDropdownMenuSub,\n\tTldrawUiDropdownMenuSubContent,\n\tTldrawUiDropdownMenuSubTrigger,\n\tTldrawUiDropdownMenuTrigger,\n\ttype TLUiDropdownMenuCheckboxItemProps,\n\ttype TLUiDropdownMenuContentProps,\n\ttype TLUiDropdownMenuGroupProps,\n\ttype TLUiDropdownMenuItemProps,\n\ttype TLUiDropdownMenuRootProps,\n\ttype TLUiDropdownMenuSubContentProps,\n\ttype TLUiDropdownMenuSubProps,\n\ttype TLUiDropdownMenuSubTriggerProps,\n\ttype TLUiDropdownMenuTriggerProps,\n} from './lib/ui/components/primitives/TldrawUiDropdownMenu'\nexport {\n\tTldrawUiIcon,\n\ttype TLUiIconJsx,\n\ttype TLUiIconProps,\n} from './lib/ui/components/primitives/TldrawUiIcon'\nexport { TldrawUiInput, type TLUiInputProps } from './lib/ui/components/primitives/TldrawUiInput'\nexport { TldrawUiKbd, type TLUiKbdProps } from './lib/ui/components/primitives/TldrawUiKbd'\nexport {\n\tTldrawUiPopover,\n\tTldrawUiPopoverContent,\n\tTldrawUiPopoverTrigger,\n\ttype TLUiPopoverContentProps,\n\ttype TLUiPopoverProps,\n\ttype TLUiPopoverTriggerProps,\n} from './lib/ui/components/primitives/TldrawUiPopover'\nexport {\n\tTldrawUiSelect,\n\tTldrawUiSelectContent,\n\tTldrawUiSelectItem,\n\tTldrawUiSelectTrigger,\n\tTldrawUiSelectValue,\n\ttype TLUiSelectContentProps,\n\ttype TLUiSelectItemProps,\n\ttype TLUiSelectProps,\n\ttype TLUiSelectTriggerProps,\n\ttype TLUiSelectValueProps,\n} from './lib/ui/components/primitives/TldrawUiSelect'\nexport { TldrawUiSlider, type TLUiSliderProps } from './lib/ui/components/primitives/TldrawUiSlider'\nexport {\n\tTldrawUiToolbar,\n\tTldrawUiToolbarButton,\n\tTldrawUiToolbarToggleGroup,\n\tTldrawUiToolbarToggleItem,\n\ttype TLUiToolbarButtonProps,\n\ttype TLUiToolbarProps,\n\ttype TLUiToolbarToggleGroupProps,\n\ttype TLUiToolbarToggleItemProps,\n} from './lib/ui/components/primitives/TldrawUiToolbar'\nexport {\n\thideAllTooltips,\n\tTldrawUiTooltip,\n\tTldrawUiTooltipProvider,\n\ttype TldrawUiTooltipProps,\n\ttype TldrawUiTooltipProviderProps,\n} from './lib/ui/components/primitives/TldrawUiTooltip'\nexport {\n\tDefaultQuickActions,\n\ttype TLUiQuickActionsProps,\n} from './lib/ui/components/QuickActions/DefaultQuickActions'\nexport { DefaultQuickActionsContent } from './lib/ui/components/QuickActions/DefaultQuickActionsContent'\nexport {\n\tDefaultPeopleMenu,\n\t// legacy\n\tDefaultPeopleMenu as PeopleMenu,\n\ttype DefaultPeopleMenuProps,\n\ttype DefaultPeopleMenuProps as PeopleMenuProps,\n} from './lib/ui/components/SharePanel/DefaultPeopleMenu'\nexport {\n\tDefaultPeopleMenuAvatar,\n\ttype TLUiPeopleMenuAvatarProps,\n} from './lib/ui/components/SharePanel/DefaultPeopleMenuAvatar'\nexport {\n\tDefaultPeopleMenuContent,\n\ttype DefaultPeopleMenuContentProps,\n} from './lib/ui/components/SharePanel/DefaultPeopleMenuContent'\nexport {\n\tDefaultPeopleMenuFacePile,\n\ttype TLUiPeopleMenuFacePileProps,\n} from './lib/ui/components/SharePanel/DefaultPeopleMenuFacePile'\nexport {\n\tDefaultPeopleMenuItem,\n\ttype TLUiPeopleMenuItemProps,\n} from './lib/ui/components/SharePanel/DefaultPeopleMenuItem'\nexport { DefaultSharePanel } from './lib/ui/components/SharePanel/DefaultSharePanel'\nexport { DefaultUserPresenceEditor } from './lib/ui/components/SharePanel/DefaultUserPresenceEditor'\nexport { Spinner } from './lib/ui/components/Spinner'\nexport {\n\tDefaultStylePanel,\n\ttype TLUiStylePanelProps,\n} from './lib/ui/components/StylePanel/DefaultStylePanel'\nexport {\n\tDefaultStylePanelContent,\n\tStylePanelArrowheadPicker,\n\tStylePanelArrowKindPicker,\n\tStylePanelColorPicker,\n\tStylePanelDashPicker,\n\tStylePanelFillPicker,\n\tStylePanelFontPicker,\n\tStylePanelGeoShapePicker,\n\tStylePanelLabelAlignPicker,\n\tStylePanelOpacityPicker,\n\tStylePanelSection,\n\tStylePanelSizePicker,\n\tStylePanelSplinePicker,\n\tStylePanelTextAlignPicker,\n\ttype StylePanelSectionProps,\n} from './lib/ui/components/StylePanel/DefaultStylePanelContent'\nexport {\n\tStylePanelButtonPicker,\n\tStylePanelButtonPickerInline,\n\ttype StylePanelButtonPickerProps,\n} from './lib/ui/components/StylePanel/StylePanelButtonPicker'\nexport {\n\tStylePanelContextProvider,\n\tuseStylePanelContext,\n\ttype StylePanelContext,\n\ttype StylePanelContextProviderProps,\n} from './lib/ui/components/StylePanel/StylePanelContext'\nexport {\n\tStylePanelDoubleDropdownPicker,\n\tStylePanelDoubleDropdownPickerInline,\n\ttype StylePanelDoubleDropdownPickerProps,\n} from './lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker'\nexport {\n\tStylePanelDropdownPicker,\n\tStylePanelDropdownPickerInline,\n\ttype StylePanelDropdownPickerProps,\n} from './lib/ui/components/StylePanel/StylePanelDropdownPicker'\nexport {\n\tStylePanelSubheading,\n\ttype StylePanelSubheadingProps,\n} from './lib/ui/components/StylePanel/StylePanelSubheading'\nexport {\n\tDefaultImageToolbar,\n\ttype TLUiImageToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultImageToolbar'\nexport {\n\tDefaultImageToolbarContent,\n\ttype DefaultImageToolbarContentProps,\n} from './lib/ui/components/Toolbar/DefaultImageToolbarContent'\nexport {\n\tDefaultRichTextToolbar,\n\ttype TLUiRichTextToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultRichTextToolbar'\nexport {\n\tDefaultRichTextToolbarContent,\n\ttype DefaultRichTextToolbarContentProps,\n} from './lib/ui/components/Toolbar/DefaultRichTextToolbarContent'\nexport {\n\tDefaultToolbar,\n\ttype DefaultToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultToolbar'\nexport {\n\tArrowDownToolbarItem,\n\tArrowLeftToolbarItem,\n\tArrowRightToolbarItem,\n\tArrowToolbarItem,\n\tArrowUpToolbarItem,\n\tAssetToolbarItem,\n\tCheckBoxToolbarItem,\n\tCloudToolbarItem,\n\tDefaultToolbarContent,\n\tDiamondToolbarItem,\n\tDrawToolbarItem,\n\tEllipseToolbarItem,\n\tEraserToolbarItem,\n\tFrameToolbarItem,\n\tHandToolbarItem,\n\tHeartToolbarItem,\n\tHexagonToolbarItem,\n\tHighlightToolbarItem,\n\tLaserToolbarItem,\n\tLineToolbarItem,\n\tNoteToolbarItem,\n\tOvalToolbarItem,\n\tRectangleToolbarItem,\n\tRhombusToolbarItem,\n\tSelectToolbarItem,\n\tStarToolbarItem,\n\tTextToolbarItem,\n\tToolbarItem,\n\tTrapezoidToolbarItem,\n\tTriangleToolbarItem,\n\tuseIsToolSelected,\n\tXBoxToolbarItem,\n\ttype ToolbarItemProps,\n} from './lib/ui/components/Toolbar/DefaultToolbarContent'\nexport {\n\tDefaultVideoToolbar,\n\ttype TLUiVideoToolbarProps,\n} from './lib/ui/components/Toolbar/DefaultVideoToolbar'\nexport {\n\tDefaultVideoToolbarContent,\n\ttype DefaultVideoToolbarContentProps,\n} from './lib/ui/components/Toolbar/DefaultVideoToolbarContent'\nexport {\n\tOverflowingToolbar,\n\ttype OverflowingToolbarProps,\n} from './lib/ui/components/Toolbar/OverflowingToolbar'\nexport {\n\tToggleToolLockedButton,\n\ttype ToggleToolLockedButtonProps,\n} from './lib/ui/components/Toolbar/ToggleToolLockedButton'\nexport {\n\tCenteredTopPanelContainer,\n\ttype CenteredTopPanelContainerProps,\n} from './lib/ui/components/TopPanel/CenteredTopPanelContainer'\nexport {\n\tDefaultZoomMenu,\n\ttype TLUiZoomMenuProps,\n} from './lib/ui/components/ZoomMenu/DefaultZoomMenu'\nexport { DefaultZoomMenuContent } from './lib/ui/components/ZoomMenu/DefaultZoomMenuContent'\nexport { PORTRAIT_BREAKPOINT } from './lib/ui/constants'\nexport {\n\tTldrawUiA11yProvider,\n\tuseA11y,\n\ttype A11yPriority,\n\ttype A11yProviderProps,\n\ttype TLUiA11y,\n\ttype TLUiA11yContextType,\n} from './lib/ui/context/a11y'\nexport {\n\tunwrapLabel,\n\tuseActions,\n\ttype ActionsProviderProps,\n\ttype TLUiActionItem,\n\ttype TLUiActionsContextType,\n} from './lib/ui/context/actions'\nexport {\n\tAssetUrlsProvider,\n\tuseAssetUrls,\n\ttype AssetUrlsProviderProps,\n} from './lib/ui/context/asset-urls'\nexport {\n\tBreakPointProvider,\n\tuseBreakpoint,\n\ttype BreakPointProviderProps,\n} from './lib/ui/context/breakpoints'\nexport {\n\tTldrawUiComponentsProvider,\n\tuseTldrawUiComponents,\n\ttype TLUiComponents,\n\ttype TLUiComponentsProviderProps,\n} from './lib/ui/context/components'\nexport {\n\tTldrawUiDialogsProvider,\n\tuseDialogs,\n\ttype TLUiDialog,\n\ttype TLUiDialogProps,\n\ttype TLUiDialogsContextType,\n\ttype TLUiDialogsProviderProps,\n} from './lib/ui/context/dialogs'\nexport {\n\tTldrawUiEventsProvider,\n\tuseUiEvents,\n\ttype EventsProviderProps,\n\ttype TLUiEventContextType,\n\ttype TLUiEventData,\n\ttype TLUiEventHandler,\n\ttype TLUiEventMap,\n\ttype TLUiEventSource,\n} from './lib/ui/context/events'\nexport {\n\tTldrawUiContextProvider,\n\ttype TLUiContextProviderProps,\n} from './lib/ui/context/TldrawUiContextProvider'\nexport {\n\tTldrawUiToastsProvider,\n\tuseToasts,\n\ttype AlertSeverity,\n\ttype TLUiToast,\n\ttype TLUiToastAction,\n\ttype TLUiToastsContextType,\n\ttype TLUiToastsProviderProps,\n} from './lib/ui/context/toasts'\nexport {\n\tuseCanApplySelectionAction,\n\tuseCanRedo,\n\tuseCanUndo,\n\tuseUnlockedSelectedShapesCount,\n} from './lib/ui/hooks/menu-hooks'\nexport {\n\thandleNativeOrMenuCopy,\n\tuseMenuClipboardEvents,\n\tuseNativeClipboardEvents,\n} from './lib/ui/hooks/useClipboardEvents'\nexport {\n\tuseCollaborationStatus,\n\tuseShowCollaborationUi,\n} from './lib/ui/hooks/useCollaborationStatus'\nexport { useCopyAs } from './lib/ui/hooks/useCopyAs'\nexport { useExportAs } from './lib/ui/hooks/useExportAs'\nexport { useKeyboardShortcuts } from './lib/ui/hooks/useKeyboardShortcuts'\nexport { useLocalStorageState } from './lib/ui/hooks/useLocalStorageState'\nexport { useMenuIsOpen } from './lib/ui/hooks/useMenuIsOpen'\nexport { useReadonly } from './lib/ui/hooks/useReadonly'\nexport { useRelevantStyles } from './lib/ui/hooks/useRelevantStyles'\nexport {\n\tonDragFromToolbarToCreateShape,\n\tuseTools,\n\ttype OnDragFromToolbarToCreateShapesOpts,\n\ttype TLUiToolItem,\n\ttype TLUiToolsContextType,\n\ttype TLUiToolsProviderProps,\n} from './lib/ui/hooks/useTools'\nexport { type TLUiTranslationKey } from './lib/ui/hooks/useTranslation/TLUiTranslationKey'\nexport { RTL_LANGUAGES, type TLUiTranslation } from './lib/ui/hooks/useTranslation/translations'\nexport {\n\tuseCurrentTranslation,\n\tuseDirection,\n\tuseTranslation,\n\ttype TLUiTranslationContextType,\n\ttype TLUiTranslationProviderProps,\n} from './lib/ui/hooks/useTranslation/useTranslation'\nexport { iconTypes, type TLUiIconType } from './lib/ui/icon-types'\nexport { useDefaultHelpers, type TLUiOverrideHelpers, type TLUiOverrides } from './lib/ui/overrides'\nexport { TldrawUi, TldrawUiInFrontOfTheCanvas, type TldrawUiProps } from './lib/ui/TldrawUi'\nexport { containBoxSize, downsizeImage, type BoxWidthHeight } from './lib/utils/assets/assets'\nexport { preloadFont, type TLTypeFace } from './lib/utils/assets/preload-font'\nexport { getEmbedInfo, type TLEmbedResult } from './lib/utils/embeds/embeds'\nexport { putExcalidrawContent } from './lib/utils/excalidraw/putExcalidrawContent'\nexport { copyAs, type CopyAsOptions, type TLCopyType } from './lib/utils/export/copyAs'\nexport { downloadFile, exportAs, type ExportAsOptions } from './lib/utils/export/exportAs'\nexport { fitFrameToContent, removeFrame } from './lib/utils/frames/frames'\nexport {\n\tdefaultEditorAssetUrls,\n\tsetDefaultEditorAssetUrls,\n\ttype TLEditorAssetUrls,\n} from './lib/utils/static-assets/assetUrls'\nexport { sanitizeSvg } from './lib/utils/svg/sanitizeSvg'\nexport {\n\tdefaultAddFontsFromNode,\n\tKeyboardShiftEnterTweakExtension,\n\trenderHtmlFromRichText,\n\trenderHtmlFromRichTextForMeasurement,\n\trenderPlaintextFromRichText,\n\trenderRichTextFromHTML,\n\ttipTapDefaultExtensions,\n} from './lib/utils/text/richText'\nexport { truncateStringWithEllipsis } from './lib/utils/text/text'\nexport {\n\tbuildFromV1Document,\n\tTLV1AlignStyle,\n\tTLV1AssetType,\n\tTLV1ColorStyle,\n\tTLV1DashStyle,\n\tTLV1Decoration,\n\tTLV1FontStyle,\n\tTLV1ShapeType,\n\tTLV1SizeStyle,\n\ttype TLV1ArrowBinding,\n\ttype TLV1ArrowShape,\n\ttype TLV1Asset,\n\ttype TLV1BaseAsset,\n\ttype TLV1BaseBinding,\n\ttype TLV1BaseShape,\n\ttype TLV1Binding,\n\ttype TLV1Bounds,\n\ttype TLV1Document,\n\ttype TLV1DrawShape,\n\ttype TLV1EllipseShape,\n\ttype TLV1GroupShape,\n\ttype TLV1Handle,\n\ttype TLV1ImageAsset,\n\ttype TLV1ImageShape,\n\ttype TLV1Page,\n\ttype TLV1PageState,\n\ttype TLV1RectangleShape,\n\ttype TLV1Shape,\n\ttype TLV1ShapeStyles,\n\ttype TLV1StickyShape,\n\ttype TLV1TextShape,\n\ttype TLV1TriangleShape,\n\ttype TLV1VideoAsset,\n\ttype TLV1VideoShape,\n} from './lib/utils/tldr/buildFromV1Document'\nexport {\n\tparseAndLoadDocument,\n\tparseTldrawJsonFile,\n\tserializeTldrawJson,\n\tserializeTldrawJsonBlob,\n\tTLDRAW_FILE_EXTENSION,\n\ttype TldrawFile,\n\ttype TldrawFileParseError,\n} from './lib/utils/tldr/file'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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A6C;AAC7C,oBAAiD;AACjD,kCAAqC;AACrC,oBAA4D;AAC5D,sBAA6D;AAC7D,oBAA+C;AAC/C,IAAAC,oBAIO;AACP,yBAA4B;AAC5B,sBAQO;AACP,kBAA2C;AAC3C,iCAmCO;AACP,kBAQO;AAAA,IAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
6
6
  "names": ["import_useTranslation", "import_assetUrls"]
7
7
  }
@@ -163,10 +163,12 @@ class SelectionForegroundOverlayUtil extends import_editor.OverlayUtil {
163
163
  // --- Geometry builders ---
164
164
  _getResizeHandleGeometry(handle, state, transform) {
165
165
  if (handle === "top" || handle === "bottom" || handle === "left" || handle === "right") {
166
- const edge = this._getEdgeLocalPoints(handle, state.width, state.height);
167
- return new import_editor.Edge2d({
168
- start: import_editor.Mat.applyToPoint(transform, edge.start),
169
- end: import_editor.Mat.applyToPoint(transform, edge.end)
166
+ const rect = this._getEdgeLocalRect(handle, state);
167
+ return new import_editor.Polygon2d({
168
+ points: this._localRectToPoints(rect.x, rect.y, rect.w, rect.h).map(
169
+ (p) => import_editor.Mat.applyToPoint(transform, p)
170
+ ),
171
+ isFilled: true
170
172
  });
171
173
  }
172
174
  const cp = this._getCornerLocalPoint(handle, state.width, state.height);
@@ -181,7 +183,7 @@ class SelectionForegroundOverlayUtil extends import_editor.OverlayUtil {
181
183
  _getRotateHandleGeometry(handle, state, transform) {
182
184
  const cornerSize = Math.max(state.targetSizeX, state.targetSizeY) * 1.5;
183
185
  const center = this._getRotateHandleLocalCenter(handle, state.width, state.height, cornerSize);
184
- const radius = state.targetSize * 3 / 2;
186
+ const radius = cornerSize;
185
187
  return new import_editor.Circle2d({
186
188
  x: center.x - radius,
187
189
  y: center.y - radius,
@@ -417,16 +419,17 @@ class SelectionForegroundOverlayUtil extends import_editor.OverlayUtil {
417
419
  props: { overlayType, handle }
418
420
  };
419
421
  }
420
- _getEdgeLocalPoints(edge, width, height) {
422
+ _getEdgeLocalRect(edge, state) {
423
+ const { width, height, targetSizeX, targetSizeY } = state;
421
424
  switch (edge) {
422
425
  case "top":
423
- return { start: new import_editor.Vec(0, 0), end: new import_editor.Vec(width, 0) };
426
+ return { x: 0, y: -targetSizeY, w: width, h: targetSizeY * 2 };
424
427
  case "right":
425
- return { start: new import_editor.Vec(width, 0), end: new import_editor.Vec(width, height) };
428
+ return { x: width - targetSizeX, y: 0, w: targetSizeX * 2, h: height };
426
429
  case "bottom":
427
- return { start: new import_editor.Vec(0, height), end: new import_editor.Vec(width, height) };
430
+ return { x: 0, y: height - targetSizeY, w: width, h: targetSizeY * 2 };
428
431
  case "left":
429
- return { start: new import_editor.Vec(0, 0), end: new import_editor.Vec(0, height) };
432
+ return { x: -targetSizeX, y: 0, w: targetSizeX * 2, h: height };
430
433
  }
431
434
  }
432
435
  _getRotateHandleLocalCenter(corner, width, height, cornerSize) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/overlays/SelectionForegroundOverlayUtil.ts"],
4
- "sourcesContent": ["import {\n\tBox,\n\tCircle2d,\n\tEdge2d,\n\tGeometry2d,\n\tHALF_PI,\n\tMat,\n\tOverlayUtil,\n\tPolygon2d,\n\tRotateCorner,\n\tSelectionCorner,\n\tSelectionEdge,\n\tTLCursorType,\n\tTLOverlay,\n\tTLSelectionHandle,\n\tTLShape,\n\tVec,\n} from '@tldraw/editor'\n\nconst SQUARE_ROOT_PI = Math.sqrt(Math.PI)\n\nconst ROTATE_CURSORS: Partial<Record<RotateCorner, TLCursorType>> = {\n\ttop_left_rotate: 'nwse-rotate',\n\ttop_right_rotate: 'nesw-rotate',\n\tbottom_left_rotate: 'swne-rotate',\n\tbottom_right_rotate: 'senw-rotate',\n}\n\nconst RESIZE_CURSORS: Partial<Record<TLSelectionHandle, TLCursorType>> = {\n\ttop_left: 'nwse-resize',\n\ttop_right: 'nesw-resize',\n\tbottom_right: 'nwse-resize',\n\tbottom_left: 'nesw-resize',\n\ttop: 'ns-resize',\n\tbottom: 'ns-resize',\n\tleft: 'ew-resize',\n\tright: 'ew-resize',\n}\n\n/** @public */\nexport interface TLSelectionForegroundOverlay extends TLOverlay {\n\tprops: {\n\t\toverlayType: 'resize_handle' | 'rotate_handle' | 'mobile_rotate'\n\t\thandle: TLSelectionHandle | RotateCorner\n\t}\n}\n\ninterface SelectionState {\n\tbounds: Box\n\tonlyShape: TLShape | null\n\tisCoarsePointer: boolean\n\tzoom: number\n\trotation: number\n\twidth: number\n\theight: number\n\tsize: number\n\ttargetSize: number\n\ttargetSizeX: number\n\ttargetSizeY: number\n\texpandDx: number\n\texpandDy: number\n\tisSmallX: boolean\n\tshouldDisplayControls: boolean\n\tshouldDisplayBox: boolean\n\tshowCropHandles: boolean\n\tshowResizeHandles: boolean\n\tshowCornerRotateHandles: boolean\n\tshowMobileRotateHandle: boolean\n\tshowHandles: boolean\n\thideAlternateCornerHandles: boolean\n\thideAlternateCropHandles: boolean\n\tshowOnlyOneHandle: boolean\n}\n\ninterface SelectionForegroundColors {\n\tstrokeColor: string\n\tbgColor: string\n}\n\n/**\n * Overlay util for selection foreground handles (resize corners/edges, rotate corners, mobile rotate).\n * Each interactive element of the selection foreground becomes its own overlay instance.\n *\n * @public\n */\nexport class SelectionForegroundOverlayUtil extends OverlayUtil<TLSelectionForegroundOverlay> {\n\tstatic override type = 'selection_foreground'\n\toverride options = { zIndex: 100, lineWidth: 1.5 }\n\n\toverride isActive(): boolean {\n\t\tif (!this.editor.getSelectionRotatedPageBounds()) return false\n\n\t\treturn this.editor.isInAny(\n\t\t\t'select.idle',\n\t\t\t'select.brushing',\n\t\t\t'select.scribble_brushing',\n\t\t\t'select.pointing_canvas',\n\t\t\t'select.pointing_selection',\n\t\t\t'select.pointing_shape',\n\t\t\t'select.pointing_resize_handle',\n\t\t\t'select.resizing',\n\t\t\t'select.crop.idle',\n\t\t\t'select.crop.pointing_crop',\n\t\t\t'select.crop.pointing_crop_handle'\n\t\t)\n\t}\n\n\toverride getOverlays(): TLSelectionForegroundOverlay[] {\n\t\tconst state = this._computeSelectionState()\n\t\tif (!state) return []\n\n\t\tconst overlays: TLSelectionForegroundOverlay[] = []\n\t\tthis._collectResizeCornerOverlays(state, overlays)\n\t\tthis._collectResizeEdgeOverlays(state, overlays)\n\t\tthis._collectRotateOverlays(state, overlays)\n\t\treturn overlays\n\t}\n\n\toverride getGeometry(overlay: TLSelectionForegroundOverlay): Geometry2d | null {\n\t\tconst state = this._computeSelectionState()\n\t\tif (!state) return null\n\n\t\tconst transform = Mat.Compose(\n\t\t\tMat.Translate(state.bounds.x, state.bounds.y),\n\t\t\tMat.Rotate(state.rotation),\n\t\t\tMat.Translate(state.expandDx, state.expandDy)\n\t\t)\n\n\t\tconst { overlayType, handle } = overlay.props\n\n\t\tswitch (overlayType) {\n\t\t\tcase 'resize_handle':\n\t\t\t\treturn this._getResizeHandleGeometry(handle as TLSelectionHandle, state, transform)\n\t\t\tcase 'rotate_handle':\n\t\t\t\treturn this._getRotateHandleGeometry(handle as RotateCorner, state, transform)\n\t\t\tcase 'mobile_rotate':\n\t\t\t\treturn this._getMobileRotateGeometry(state, transform)\n\t\t\tdefault:\n\t\t\t\treturn null\n\t\t}\n\t}\n\n\toverride render(ctx: CanvasRenderingContext2D, _overlays: TLSelectionForegroundOverlay[]): void {\n\t\tconst state = this._computeSelectionState()\n\t\tif (!state) return\n\n\t\t// Transform to local selection space; each render helper assumes this is active.\n\t\tctx.save()\n\t\tctx.translate(state.bounds.x, state.bounds.y)\n\t\tctx.rotate(state.rotation)\n\t\tctx.translate(state.expandDx, state.expandDy)\n\n\t\tconst colors = this._getThemeColors()\n\t\tthis._renderSelectionBox(ctx, state, colors)\n\t\tthis._renderResizeCorners(ctx, state, colors)\n\t\tthis._renderCropHandles(ctx, state, colors)\n\t\tthis._renderMobileRotateHandle(ctx, state, colors)\n\t\tthis._renderTextResizeHandles(ctx, state, colors)\n\n\t\tctx.restore()\n\t}\n\n\toverride getCursor(overlay: TLSelectionForegroundOverlay): TLCursorType | undefined {\n\t\tconst { overlayType, handle } = overlay.props\n\t\tswitch (overlayType) {\n\t\t\tcase 'rotate_handle':\n\t\t\t\treturn ROTATE_CURSORS[handle as RotateCorner]\n\t\t\tcase 'mobile_rotate':\n\t\t\t\treturn 'grab'\n\t\t\tcase 'resize_handle':\n\t\t\t\treturn RESIZE_CURSORS[handle as TLSelectionHandle]\n\t\t\tdefault:\n\t\t\t\treturn undefined\n\t\t}\n\t}\n\n\t// --- Overlay collection ---\n\n\tprivate _collectResizeCornerOverlays(\n\t\tstate: SelectionState,\n\t\toverlays: TLSelectionForegroundOverlay[]\n\t) {\n\t\tif (!state.showHandles) return\n\n\t\toverlays.push(this._makeOverlay('resize_handle', 'top_left'))\n\t\tif (!state.hideAlternateCornerHandles) {\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'top_right'))\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'bottom_left'))\n\t\t}\n\t\tif (!state.showOnlyOneHandle || state.showCropHandles) {\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'bottom_right'))\n\t\t}\n\t}\n\n\tprivate _collectResizeEdgeOverlays(\n\t\tstate: SelectionState,\n\t\toverlays: TLSelectionForegroundOverlay[]\n\t) {\n\t\tif (!state.showHandles) return\n\n\t\tconst {\n\t\t\tshowCropHandles,\n\t\t\thideAlternateCropHandles,\n\t\t\thideAlternateCornerHandles,\n\t\t\tshowOnlyOneHandle,\n\t\t\tisCoarsePointer,\n\t\t\tonlyShape,\n\t\t} = state\n\n\t\tconst hideVerticalEdgeTargets = showCropHandles\n\t\t\t? hideAlternateCropHandles\n\t\t\t: hideAlternateCornerHandles || showOnlyOneHandle || isCoarsePointer\n\t\tconst isMobileAndTextShape = isCoarsePointer && !!onlyShape && onlyShape.type === 'text'\n\t\tconst hideHorizontalEdgeTargets = showCropHandles\n\t\t\t? hideAlternateCropHandles\n\t\t\t: hideVerticalEdgeTargets && !isMobileAndTextShape\n\n\t\tif (!hideVerticalEdgeTargets) {\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'top'))\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'bottom'))\n\t\t}\n\t\tif (!hideHorizontalEdgeTargets) {\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'right'))\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'left'))\n\t\t}\n\t}\n\n\tprivate _collectRotateOverlays(state: SelectionState, overlays: TLSelectionForegroundOverlay[]) {\n\t\tif (state.showCornerRotateHandles) {\n\t\t\toverlays.push(this._makeOverlay('rotate_handle', 'top_left_rotate'))\n\t\t\toverlays.push(this._makeOverlay('rotate_handle', 'top_right_rotate'))\n\t\t\toverlays.push(this._makeOverlay('rotate_handle', 'bottom_left_rotate'))\n\t\t\toverlays.push(this._makeOverlay('rotate_handle', 'bottom_right_rotate'))\n\t\t}\n\t\tif (state.showMobileRotateHandle) {\n\t\t\toverlays.push(this._makeOverlay('mobile_rotate', 'mobile_rotate'))\n\t\t}\n\t}\n\n\t// --- Geometry builders ---\n\n\tprivate _getResizeHandleGeometry(\n\t\thandle: TLSelectionHandle,\n\t\tstate: SelectionState,\n\t\ttransform: Mat\n\t): Geometry2d {\n\t\tif (handle === 'top' || handle === 'bottom' || handle === 'left' || handle === 'right') {\n\t\t\tconst edge = this._getEdgeLocalPoints(handle, state.width, state.height)\n\t\t\treturn new Edge2d({\n\t\t\t\tstart: Mat.applyToPoint(transform, edge.start),\n\t\t\t\tend: Mat.applyToPoint(transform, edge.end),\n\t\t\t})\n\t\t}\n\n\t\tconst cp = this._getCornerLocalPoint(handle as SelectionCorner, state.width, state.height)\n\t\tconst s = Math.max(state.targetSizeX, state.targetSizeY) * 1.5\n\t\treturn new Polygon2d({\n\t\t\tpoints: this._localRectToPoints(cp.x - s, cp.y - s, s * 2, s * 2).map((p) =>\n\t\t\t\tMat.applyToPoint(transform, p)\n\t\t\t),\n\t\t\tisFilled: true,\n\t\t})\n\t}\n\n\tprivate _getRotateHandleGeometry(\n\t\thandle: RotateCorner,\n\t\tstate: SelectionState,\n\t\ttransform: Mat\n\t): Geometry2d {\n\t\tconst cornerSize = Math.max(state.targetSizeX, state.targetSizeY) * 1.5\n\t\tconst center = this._getRotateHandleLocalCenter(handle, state.width, state.height, cornerSize)\n\t\tconst radius = (state.targetSize * 3) / 2\n\t\treturn new Circle2d({\n\t\t\tx: center.x - radius,\n\t\t\ty: center.y - radius,\n\t\t\tradius,\n\t\t\tisFilled: true,\n\t\t}).transform(transform)\n\t}\n\n\tprivate _getMobileRotateGeometry(state: SelectionState, transform: Mat): Geometry2d {\n\t\tconst bgRadius = Math.max(14 * (1 / state.zoom), 20 / Math.max(1, state.zoom))\n\t\tconst { cx, cy } = this._getMobileRotateCenter(state)\n\t\treturn new Polygon2d({\n\t\t\tpoints: this._localRectToPoints(cx - bgRadius, cy - bgRadius, bgRadius * 2, bgRadius * 2).map(\n\t\t\t\t(p) => Mat.applyToPoint(transform, p)\n\t\t\t),\n\t\t\tisFilled: true,\n\t\t})\n\t}\n\n\t// --- Rendering (all helpers assume ctx is in local selection space) ---\n\n\tprivate _renderSelectionBox(\n\t\tctx: CanvasRenderingContext2D,\n\t\tstate: SelectionState,\n\t\tcolors: SelectionForegroundColors\n\t) {\n\t\tif (!state.shouldDisplayBox) return\n\t\tctx.strokeStyle = colors.strokeColor\n\t\tctx.lineWidth = this.options.lineWidth / state.zoom\n\t\tctx.strokeRect(0, 0, state.width, state.height)\n\t}\n\n\tprivate _renderResizeCorners(\n\t\tctx: CanvasRenderingContext2D,\n\t\tstate: SelectionState,\n\t\tcolors: SelectionForegroundColors\n\t) {\n\t\tif (!state.showResizeHandles) return\n\n\t\tconst { size, width, height, hideAlternateCornerHandles, showOnlyOneHandle, zoom } = state\n\n\t\tctx.fillStyle = colors.bgColor\n\t\tctx.strokeStyle = colors.strokeColor\n\t\tctx.lineWidth = this.options.lineWidth / zoom\n\n\t\tconst drawCorner = (x: number, y: number, hidden: boolean) => {\n\t\t\tif (hidden) return\n\t\t\tctx.fillRect(x - size / 2, y - size / 2, size, size)\n\t\t\tctx.strokeRect(x - size / 2, y - size / 2, size, size)\n\t\t}\n\n\t\tdrawCorner(0, 0, false) // top-left always shown\n\t\tdrawCorner(width, 0, hideAlternateCornerHandles) // top-right\n\t\tdrawCorner(width, height, showOnlyOneHandle) // bottom-right\n\t\tdrawCorner(0, height, hideAlternateCornerHandles) // bottom-left\n\t}\n\n\tprivate _renderCropHandles(\n\t\tctx: CanvasRenderingContext2D,\n\t\tstate: SelectionState,\n\t\tcolors: SelectionForegroundColors\n\t) {\n\t\tif (!state.showCropHandles) return\n\n\t\tconst { size, width, height, hideAlternateCropHandles } = state\n\t\tconst cropStrokeWidth = size / 3\n\t\tconst offset = cropStrokeWidth / 2\n\n\t\tctx.beginPath()\n\t\tctx.strokeStyle = colors.strokeColor\n\t\tctx.lineWidth = cropStrokeWidth\n\t\tctx.lineCap = 'butt'\n\t\tctx.lineJoin = 'miter'\n\n\t\t// top_left corner (always shown)\n\t\tctx.moveTo(-offset, size)\n\t\tctx.lineTo(-offset, -offset)\n\t\tctx.lineTo(size, -offset)\n\n\t\t// bottom_right corner (always shown)\n\t\tctx.moveTo(width + offset, height - size)\n\t\tctx.lineTo(width + offset, height + offset)\n\t\tctx.lineTo(width - size, height + offset)\n\n\t\tif (!hideAlternateCropHandles) {\n\t\t\t// top_right corner\n\t\t\tctx.moveTo(width - size, -offset)\n\t\t\tctx.lineTo(width + offset, -offset)\n\t\t\tctx.lineTo(width + offset, size)\n\n\t\t\t// bottom_left corner\n\t\t\tctx.moveTo(size, height + offset)\n\t\t\tctx.lineTo(-offset, height + offset)\n\t\t\tctx.lineTo(-offset, height - size)\n\n\t\t\t// top edge\n\t\t\tctx.moveTo(width / 2 - size, -offset)\n\t\t\tctx.lineTo(width / 2 + size, -offset)\n\n\t\t\t// right edge\n\t\t\tctx.moveTo(width + offset, height / 2 - size)\n\t\t\tctx.lineTo(width + offset, height / 2 + size)\n\n\t\t\t// bottom edge\n\t\t\tctx.moveTo(width / 2 - size, height + offset)\n\t\t\tctx.lineTo(width / 2 + size, height + offset)\n\n\t\t\t// left edge\n\t\t\tctx.moveTo(-offset, height / 2 - size)\n\t\t\tctx.lineTo(-offset, height / 2 + size)\n\t\t}\n\n\t\tctx.stroke()\n\t}\n\n\tprivate _renderMobileRotateHandle(\n\t\tctx: CanvasRenderingContext2D,\n\t\tstate: SelectionState,\n\t\tcolors: SelectionForegroundColors\n\t) {\n\t\tif (!state.showMobileRotateHandle) return\n\n\t\tconst { cx, cy } = this._getMobileRotateCenter(state)\n\t\tconst fgRadius = state.size / SQUARE_ROOT_PI\n\n\t\tctx.fillStyle = colors.bgColor\n\t\tctx.strokeStyle = colors.strokeColor\n\t\tctx.lineWidth = this.options.lineWidth / state.zoom\n\t\tctx.beginPath()\n\t\tctx.arc(cx, cy, fgRadius, 0, Math.PI * 2)\n\t\tctx.fill()\n\t\tctx.stroke()\n\t}\n\n\tprivate _renderTextResizeHandles(\n\t\tctx: CanvasRenderingContext2D,\n\t\tstate: SelectionState,\n\t\tcolors: SelectionForegroundColors\n\t) {\n\t\tconst {\n\t\t\tshouldDisplayControls,\n\t\t\tisCoarsePointer,\n\t\t\tonlyShape,\n\t\t\tzoom,\n\t\t\twidth,\n\t\t\theight,\n\t\t\tsize,\n\t\t\ttargetSizeY,\n\t\t} = state\n\t\tif (!shouldDisplayControls || !isCoarsePointer || !onlyShape || onlyShape.type !== 'text') {\n\t\t\treturn\n\t\t}\n\n\t\tconst textHandleHeight = Math.min(24 / zoom, height - targetSizeY * 3)\n\t\tif (textHandleHeight * zoom < 4) return\n\n\t\tconst hw = size / 2\n\t\tconst r = size / 4\n\n\t\tctx.fillStyle = colors.strokeColor\n\t\tctx.beginPath()\n\t\tctx.roundRect(0 - hw / 2, height / 2 - textHandleHeight / 2, hw, textHandleHeight, r)\n\t\tctx.fill()\n\t\tctx.beginPath()\n\t\tctx.roundRect(width - hw / 2, height / 2 - textHandleHeight / 2, hw, textHandleHeight, r)\n\t\tctx.fill()\n\t}\n\n\t// --- Shared helpers ---\n\n\t/**\n\t * Single source of truth for the derived state the selection foreground needs.\n\t * Called from `getOverlays()`, `getGeometry()`, and `render()` so their visibility\n\t * predicates can't drift. Returns `null` when no selection UI should appear at all\n\t * (nothing selected, or the only selected shape is hidden).\n\t */\n\tprivate _computeSelectionState(): SelectionState | null {\n\t\tconst editor = this.editor\n\t\tconst bounds = editor.getSelectionRotatedPageBounds()\n\t\tif (!bounds) return null\n\n\t\tconst onlyShape = editor.getOnlySelectedShape()\n\t\tif (onlyShape && editor.isShapeHidden(onlyShape)) return null\n\n\t\tconst onlyShapeUtil = onlyShape ? editor.getShapeUtil(onlyShape) : null\n\t\tconst isLockedShape = !!(onlyShape && editor.isShapeOrAncestorLocked(onlyShape))\n\n\t\tconst expandOutlineBy =\n\t\t\tonlyShape && onlyShapeUtil ? onlyShapeUtil.expandSelectionOutlinePx(onlyShape) : 0\n\t\tconst expandedBounds =\n\t\t\texpandOutlineBy instanceof Box\n\t\t\t\t? bounds.clone().expand(expandOutlineBy).zeroFix()\n\t\t\t\t: bounds.clone().expandBy(expandOutlineBy).zeroFix()\n\n\t\tconst instanceState = editor.getInstanceState()\n\t\tconst isCoarsePointer = instanceState.isCoarsePointer\n\t\tconst isChangingStyle = instanceState.isChangingStyle\n\t\tconst isReadonly = editor.getIsReadonly()\n\t\tconst zoom = editor.getZoomLevel()\n\t\tconst rotation = editor.getSelectionRotation()\n\n\t\tconst width = expandedBounds.width\n\t\tconst height = expandedBounds.height\n\t\tconst size = 8 / zoom\n\t\tconst isTinyX = width < size * 2\n\t\tconst isTinyY = height < size * 2\n\t\tconst isSmallX = width < size * 4\n\t\tconst isSmallY = height < size * 4\n\t\tconst isSmallCropX = width < size * 5\n\t\tconst isSmallCropY = height < size * 5\n\n\t\tconst mobileHandleMultiplier = isCoarsePointer ? 1.75 : 1\n\t\tconst targetSize = (6 / zoom) * mobileHandleMultiplier\n\t\tconst targetSizeX = (isSmallX ? targetSize / 2 : targetSize) * (mobileHandleMultiplier * 0.75)\n\t\tconst targetSizeY = (isSmallY ? targetSize / 2 : targetSize) * (mobileHandleMultiplier * 0.75)\n\n\t\tconst expandDx = expandedBounds.x - bounds.x\n\t\tconst expandDy = expandedBounds.y - bounds.y\n\n\t\tconst shouldDisplayControls =\n\t\t\teditor.isInAny(\n\t\t\t\t'select.idle',\n\t\t\t\t'select.pointing_selection',\n\t\t\t\t'select.pointing_shape',\n\t\t\t\t'select.crop.idle'\n\t\t\t) &&\n\t\t\t!isChangingStyle &&\n\t\t\t!isReadonly\n\n\t\tconst showCropHandles =\n\t\t\teditor.isInAny(\n\t\t\t\t'select.crop.idle',\n\t\t\t\t'select.crop.pointing_crop',\n\t\t\t\t'select.crop.pointing_crop_handle'\n\t\t\t) && !isReadonly\n\n\t\tconst canOnlyShapeResize =\n\t\t\tonlyShape && onlyShapeUtil\n\t\t\t\t? onlyShapeUtil.canResize(onlyShape) && !onlyShapeUtil.hideResizeHandles(onlyShape)\n\t\t\t\t: true\n\t\tconst hideOnlyShapeRotateHandle =\n\t\t\tonlyShape && onlyShapeUtil ? onlyShapeUtil.hideRotateHandle(onlyShape) : false\n\t\tconst hideOnlyShapeSelectionBounds =\n\t\t\tonlyShape && onlyShapeUtil ? onlyShapeUtil.hideSelectionBoundsFg(onlyShape) : false\n\n\t\tconst showResizeHandles =\n\t\t\tshouldDisplayControls && !isLockedShape && !showCropHandles && canOnlyShapeResize\n\n\t\tconst showCornerRotateHandles =\n\t\t\tshouldDisplayControls &&\n\t\t\t!isLockedShape &&\n\t\t\t!isCoarsePointer &&\n\t\t\t!(isTinyX || isTinyY) &&\n\t\t\t!hideOnlyShapeRotateHandle\n\n\t\tconst showMobileRotateHandle =\n\t\t\tshouldDisplayControls &&\n\t\t\t!isLockedShape &&\n\t\t\tisCoarsePointer &&\n\t\t\t(!isSmallX || !isSmallY) &&\n\t\t\t!hideOnlyShapeRotateHandle\n\n\t\tconst hideAlternateCornerHandles = isTinyX || isTinyY\n\t\tconst hideAlternateCropHandles = isSmallCropX || isSmallCropY\n\t\tconst showOnlyOneHandle = isTinyX && isTinyY\n\t\tconst showHandles = showResizeHandles || showCropHandles\n\n\t\tconst showSelectionBounds = !hideOnlyShapeSelectionBounds && !isChangingStyle\n\n\t\tconst shouldDisplayBox =\n\t\t\t(showSelectionBounds &&\n\t\t\t\teditor.isInAny(\n\t\t\t\t\t'select.idle',\n\t\t\t\t\t'select.brushing',\n\t\t\t\t\t'select.scribble_brushing',\n\t\t\t\t\t'select.pointing_canvas',\n\t\t\t\t\t'select.pointing_selection',\n\t\t\t\t\t'select.pointing_shape',\n\t\t\t\t\t'select.crop.idle',\n\t\t\t\t\t'select.crop.pointing_crop',\n\t\t\t\t\t'select.crop.pointing_crop_handle',\n\t\t\t\t\t'select.pointing_resize_handle'\n\t\t\t\t)) ||\n\t\t\t(showSelectionBounds &&\n\t\t\t\teditor.isIn('select.resizing') &&\n\t\t\t\t!!(onlyShape && editor.isShapeOfType(onlyShape, 'text')))\n\n\t\treturn {\n\t\t\tbounds,\n\t\t\tonlyShape,\n\t\t\tisCoarsePointer,\n\t\t\tzoom,\n\t\t\trotation,\n\t\t\twidth,\n\t\t\theight,\n\t\t\tsize,\n\t\t\ttargetSize,\n\t\t\ttargetSizeX,\n\t\t\ttargetSizeY,\n\t\t\texpandDx,\n\t\t\texpandDy,\n\t\t\tisSmallX,\n\t\t\tshouldDisplayControls,\n\t\t\tshouldDisplayBox,\n\t\t\tshowCropHandles,\n\t\t\tshowResizeHandles,\n\t\t\tshowCornerRotateHandles,\n\t\t\tshowMobileRotateHandle,\n\t\t\tshowHandles,\n\t\t\thideAlternateCornerHandles,\n\t\t\thideAlternateCropHandles,\n\t\t\tshowOnlyOneHandle,\n\t\t}\n\t}\n\n\tprivate _getMobileRotateCenter(state: SelectionState): { cx: number; cy: number } {\n\t\tconst { width, height, targetSize, isSmallX, onlyShape, rotation } = state\n\t\tconst editor = this.editor\n\t\tconst isMediaShape =\n\t\t\t!!onlyShape &&\n\t\t\t(editor.isShapeOfType(onlyShape, 'image') || editor.isShapeOfType(onlyShape, 'video'))\n\t\tconst isShapeTooCloseToContextualToolbar = rotation / HALF_PI > 1.6 && rotation / HALF_PI < 2.4\n\n\t\tconst cx = isSmallX ? -targetSize * 1.5 : width / 2\n\t\tconst cy = isSmallX\n\t\t\t? height / 2\n\t\t\t: isMediaShape && !isShapeTooCloseToContextualToolbar\n\t\t\t\t? height + targetSize * 1.5\n\t\t\t\t: -targetSize * 1.5\n\t\treturn { cx, cy }\n\t}\n\n\tprivate _getThemeColors(): SelectionForegroundColors {\n\t\tconst editor = this.editor\n\t\tconst themeColors = editor.getCurrentTheme().colors[editor.getColorMode()]\n\t\treturn {\n\t\t\tstrokeColor: themeColors.selectionStroke,\n\t\t\tbgColor: themeColors.background,\n\t\t}\n\t}\n\n\tprivate _makeOverlay(\n\t\toverlayType: TLSelectionForegroundOverlay['props']['overlayType'],\n\t\thandle: TLSelectionHandle | RotateCorner\n\t): TLSelectionForegroundOverlay {\n\t\treturn {\n\t\t\tid: `selection_fg:${handle}`,\n\t\t\ttype: 'selection_foreground',\n\t\t\tprops: { overlayType, handle },\n\t\t}\n\t}\n\n\tprivate _getEdgeLocalPoints(\n\t\tedge: SelectionEdge,\n\t\twidth: number,\n\t\theight: number\n\t): { start: Vec; end: Vec } {\n\t\tswitch (edge) {\n\t\t\tcase 'top':\n\t\t\t\treturn { start: new Vec(0, 0), end: new Vec(width, 0) }\n\t\t\tcase 'right':\n\t\t\t\treturn { start: new Vec(width, 0), end: new Vec(width, height) }\n\t\t\tcase 'bottom':\n\t\t\t\treturn { start: new Vec(0, height), end: new Vec(width, height) }\n\t\t\tcase 'left':\n\t\t\t\treturn { start: new Vec(0, 0), end: new Vec(0, height) }\n\t\t}\n\t}\n\n\tprivate _getRotateHandleLocalCenter(\n\t\tcorner: RotateCorner,\n\t\twidth: number,\n\t\theight: number,\n\t\tcornerSize: number\n\t): Vec {\n\t\t// Centered on the outside corner of the resize handle square\n\t\t// (the corner furthest from the selection interior)\n\t\tswitch (corner) {\n\t\t\tcase 'top_left_rotate':\n\t\t\t\treturn new Vec(-cornerSize, -cornerSize)\n\t\t\tcase 'top_right_rotate':\n\t\t\t\treturn new Vec(width + cornerSize, -cornerSize)\n\t\t\tcase 'bottom_left_rotate':\n\t\t\t\treturn new Vec(-cornerSize, height + cornerSize)\n\t\t\tcase 'bottom_right_rotate':\n\t\t\t\treturn new Vec(width + cornerSize, height + cornerSize)\n\t\t\tdefault:\n\t\t\t\treturn new Vec(0, 0)\n\t\t}\n\t}\n\n\tprivate _getCornerLocalPoint(corner: SelectionCorner, width: number, height: number): Vec {\n\t\tswitch (corner) {\n\t\t\tcase 'top_left':\n\t\t\t\treturn new Vec(0, 0)\n\t\t\tcase 'top_right':\n\t\t\t\treturn new Vec(width, 0)\n\t\t\tcase 'bottom_right':\n\t\t\t\treturn new Vec(width, height)\n\t\t\tcase 'bottom_left':\n\t\t\t\treturn new Vec(0, height)\n\t\t}\n\t}\n\n\tprivate _localRectToPoints(x: number, y: number, w: number, h: number): Vec[] {\n\t\treturn [new Vec(x, y), new Vec(x + w, y), new Vec(x + w, y + h), new Vec(x, y + h)]\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAiBO;AAEP,MAAM,iBAAiB,KAAK,KAAK,KAAK,EAAE;AAExC,MAAM,iBAA8D;AAAA,EACnE,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,qBAAqB;AACtB;AAEA,MAAM,iBAAmE;AAAA,EACxE,UAAU;AAAA,EACV,WAAW;AAAA,EACX,cAAc;AAAA,EACd,aAAa;AAAA,EACb,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACR;AAgDO,MAAM,uCAAuC,0BAA0C;AAAA,EAC7F,OAAgB,OAAO;AAAA,EACd,UAAU,EAAE,QAAQ,KA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AAI,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,kBAAI,GAAG,IAAI,CAAC,CAAC;AAAA,EACnF;AACD;",
4
+ "sourcesContent": ["import {\n\tBox,\n\tCircle2d,\n\tGeometry2d,\n\tHALF_PI,\n\tMat,\n\tOverlayUtil,\n\tPolygon2d,\n\tRotateCorner,\n\tSelectionCorner,\n\tSelectionEdge,\n\tTLCursorType,\n\tTLOverlay,\n\tTLSelectionHandle,\n\tTLShape,\n\tVec,\n} from '@tldraw/editor'\n\nconst SQUARE_ROOT_PI = Math.sqrt(Math.PI)\n\nconst ROTATE_CURSORS: Partial<Record<RotateCorner, TLCursorType>> = {\n\ttop_left_rotate: 'nwse-rotate',\n\ttop_right_rotate: 'nesw-rotate',\n\tbottom_left_rotate: 'swne-rotate',\n\tbottom_right_rotate: 'senw-rotate',\n}\n\nconst RESIZE_CURSORS: Partial<Record<TLSelectionHandle, TLCursorType>> = {\n\ttop_left: 'nwse-resize',\n\ttop_right: 'nesw-resize',\n\tbottom_right: 'nwse-resize',\n\tbottom_left: 'nesw-resize',\n\ttop: 'ns-resize',\n\tbottom: 'ns-resize',\n\tleft: 'ew-resize',\n\tright: 'ew-resize',\n}\n\n/** @public */\nexport interface TLSelectionForegroundOverlay extends TLOverlay {\n\tprops: {\n\t\toverlayType: 'resize_handle' | 'rotate_handle' | 'mobile_rotate'\n\t\thandle: TLSelectionHandle | RotateCorner\n\t}\n}\n\ninterface SelectionState {\n\tbounds: Box\n\tonlyShape: TLShape | null\n\tisCoarsePointer: boolean\n\tzoom: number\n\trotation: number\n\twidth: number\n\theight: number\n\tsize: number\n\ttargetSize: number\n\ttargetSizeX: number\n\ttargetSizeY: number\n\texpandDx: number\n\texpandDy: number\n\tisSmallX: boolean\n\tshouldDisplayControls: boolean\n\tshouldDisplayBox: boolean\n\tshowCropHandles: boolean\n\tshowResizeHandles: boolean\n\tshowCornerRotateHandles: boolean\n\tshowMobileRotateHandle: boolean\n\tshowHandles: boolean\n\thideAlternateCornerHandles: boolean\n\thideAlternateCropHandles: boolean\n\tshowOnlyOneHandle: boolean\n}\n\ninterface SelectionForegroundColors {\n\tstrokeColor: string\n\tbgColor: string\n}\n\n/**\n * Overlay util for selection foreground handles (resize corners/edges, rotate corners, mobile rotate).\n * Each interactive element of the selection foreground becomes its own overlay instance.\n *\n * @public\n */\nexport class SelectionForegroundOverlayUtil extends OverlayUtil<TLSelectionForegroundOverlay> {\n\tstatic override type = 'selection_foreground'\n\toverride options = { zIndex: 100, lineWidth: 1.5 }\n\n\toverride isActive(): boolean {\n\t\tif (!this.editor.getSelectionRotatedPageBounds()) return false\n\n\t\treturn this.editor.isInAny(\n\t\t\t'select.idle',\n\t\t\t'select.brushing',\n\t\t\t'select.scribble_brushing',\n\t\t\t'select.pointing_canvas',\n\t\t\t'select.pointing_selection',\n\t\t\t'select.pointing_shape',\n\t\t\t'select.pointing_resize_handle',\n\t\t\t'select.resizing',\n\t\t\t'select.crop.idle',\n\t\t\t'select.crop.pointing_crop',\n\t\t\t'select.crop.pointing_crop_handle'\n\t\t)\n\t}\n\n\toverride getOverlays(): TLSelectionForegroundOverlay[] {\n\t\tconst state = this._computeSelectionState()\n\t\tif (!state) return []\n\n\t\tconst overlays: TLSelectionForegroundOverlay[] = []\n\t\tthis._collectResizeCornerOverlays(state, overlays)\n\t\tthis._collectResizeEdgeOverlays(state, overlays)\n\t\tthis._collectRotateOverlays(state, overlays)\n\t\treturn overlays\n\t}\n\n\toverride getGeometry(overlay: TLSelectionForegroundOverlay): Geometry2d | null {\n\t\tconst state = this._computeSelectionState()\n\t\tif (!state) return null\n\n\t\tconst transform = Mat.Compose(\n\t\t\tMat.Translate(state.bounds.x, state.bounds.y),\n\t\t\tMat.Rotate(state.rotation),\n\t\t\tMat.Translate(state.expandDx, state.expandDy)\n\t\t)\n\n\t\tconst { overlayType, handle } = overlay.props\n\n\t\tswitch (overlayType) {\n\t\t\tcase 'resize_handle':\n\t\t\t\treturn this._getResizeHandleGeometry(handle as TLSelectionHandle, state, transform)\n\t\t\tcase 'rotate_handle':\n\t\t\t\treturn this._getRotateHandleGeometry(handle as RotateCorner, state, transform)\n\t\t\tcase 'mobile_rotate':\n\t\t\t\treturn this._getMobileRotateGeometry(state, transform)\n\t\t\tdefault:\n\t\t\t\treturn null\n\t\t}\n\t}\n\n\toverride render(ctx: CanvasRenderingContext2D, _overlays: TLSelectionForegroundOverlay[]): void {\n\t\tconst state = this._computeSelectionState()\n\t\tif (!state) return\n\n\t\t// Transform to local selection space; each render helper assumes this is active.\n\t\tctx.save()\n\t\tctx.translate(state.bounds.x, state.bounds.y)\n\t\tctx.rotate(state.rotation)\n\t\tctx.translate(state.expandDx, state.expandDy)\n\n\t\tconst colors = this._getThemeColors()\n\t\tthis._renderSelectionBox(ctx, state, colors)\n\t\tthis._renderResizeCorners(ctx, state, colors)\n\t\tthis._renderCropHandles(ctx, state, colors)\n\t\tthis._renderMobileRotateHandle(ctx, state, colors)\n\t\tthis._renderTextResizeHandles(ctx, state, colors)\n\n\t\tctx.restore()\n\t}\n\n\toverride getCursor(overlay: TLSelectionForegroundOverlay): TLCursorType | undefined {\n\t\tconst { overlayType, handle } = overlay.props\n\t\tswitch (overlayType) {\n\t\t\tcase 'rotate_handle':\n\t\t\t\treturn ROTATE_CURSORS[handle as RotateCorner]\n\t\t\tcase 'mobile_rotate':\n\t\t\t\treturn 'grab'\n\t\t\tcase 'resize_handle':\n\t\t\t\treturn RESIZE_CURSORS[handle as TLSelectionHandle]\n\t\t\tdefault:\n\t\t\t\treturn undefined\n\t\t}\n\t}\n\n\t// --- Overlay collection ---\n\n\tprivate _collectResizeCornerOverlays(\n\t\tstate: SelectionState,\n\t\toverlays: TLSelectionForegroundOverlay[]\n\t) {\n\t\tif (!state.showHandles) return\n\n\t\toverlays.push(this._makeOverlay('resize_handle', 'top_left'))\n\t\tif (!state.hideAlternateCornerHandles) {\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'top_right'))\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'bottom_left'))\n\t\t}\n\t\tif (!state.showOnlyOneHandle || state.showCropHandles) {\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'bottom_right'))\n\t\t}\n\t}\n\n\tprivate _collectResizeEdgeOverlays(\n\t\tstate: SelectionState,\n\t\toverlays: TLSelectionForegroundOverlay[]\n\t) {\n\t\tif (!state.showHandles) return\n\n\t\tconst {\n\t\t\tshowCropHandles,\n\t\t\thideAlternateCropHandles,\n\t\t\thideAlternateCornerHandles,\n\t\t\tshowOnlyOneHandle,\n\t\t\tisCoarsePointer,\n\t\t\tonlyShape,\n\t\t} = state\n\n\t\tconst hideVerticalEdgeTargets = showCropHandles\n\t\t\t? hideAlternateCropHandles\n\t\t\t: hideAlternateCornerHandles || showOnlyOneHandle || isCoarsePointer\n\t\tconst isMobileAndTextShape = isCoarsePointer && !!onlyShape && onlyShape.type === 'text'\n\t\tconst hideHorizontalEdgeTargets = showCropHandles\n\t\t\t? hideAlternateCropHandles\n\t\t\t: hideVerticalEdgeTargets && !isMobileAndTextShape\n\n\t\tif (!hideVerticalEdgeTargets) {\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'top'))\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'bottom'))\n\t\t}\n\t\tif (!hideHorizontalEdgeTargets) {\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'right'))\n\t\t\toverlays.push(this._makeOverlay('resize_handle', 'left'))\n\t\t}\n\t}\n\n\tprivate _collectRotateOverlays(state: SelectionState, overlays: TLSelectionForegroundOverlay[]) {\n\t\tif (state.showCornerRotateHandles) {\n\t\t\toverlays.push(this._makeOverlay('rotate_handle', 'top_left_rotate'))\n\t\t\toverlays.push(this._makeOverlay('rotate_handle', 'top_right_rotate'))\n\t\t\toverlays.push(this._makeOverlay('rotate_handle', 'bottom_left_rotate'))\n\t\t\toverlays.push(this._makeOverlay('rotate_handle', 'bottom_right_rotate'))\n\t\t}\n\t\tif (state.showMobileRotateHandle) {\n\t\t\toverlays.push(this._makeOverlay('mobile_rotate', 'mobile_rotate'))\n\t\t}\n\t}\n\n\t// --- Geometry builders ---\n\n\tprivate _getResizeHandleGeometry(\n\t\thandle: TLSelectionHandle,\n\t\tstate: SelectionState,\n\t\ttransform: Mat\n\t): Geometry2d {\n\t\tif (handle === 'top' || handle === 'bottom' || handle === 'left' || handle === 'right') {\n\t\t\tconst rect = this._getEdgeLocalRect(handle, state)\n\t\t\treturn new Polygon2d({\n\t\t\t\tpoints: this._localRectToPoints(rect.x, rect.y, rect.w, rect.h).map((p) =>\n\t\t\t\t\tMat.applyToPoint(transform, p)\n\t\t\t\t),\n\t\t\t\tisFilled: true,\n\t\t\t})\n\t\t}\n\n\t\tconst cp = this._getCornerLocalPoint(handle as SelectionCorner, state.width, state.height)\n\t\tconst s = Math.max(state.targetSizeX, state.targetSizeY) * 1.5\n\t\treturn new Polygon2d({\n\t\t\tpoints: this._localRectToPoints(cp.x - s, cp.y - s, s * 2, s * 2).map((p) =>\n\t\t\t\tMat.applyToPoint(transform, p)\n\t\t\t),\n\t\t\tisFilled: true,\n\t\t})\n\t}\n\n\tprivate _getRotateHandleGeometry(\n\t\thandle: RotateCorner,\n\t\tstate: SelectionState,\n\t\ttransform: Mat\n\t): Geometry2d {\n\t\tconst cornerSize = Math.max(state.targetSizeX, state.targetSizeY) * 1.5\n\t\tconst center = this._getRotateHandleLocalCenter(handle, state.width, state.height, cornerSize)\n\t\tconst radius = cornerSize\n\t\treturn new Circle2d({\n\t\t\tx: center.x - radius,\n\t\t\ty: center.y - radius,\n\t\t\tradius,\n\t\t\tisFilled: true,\n\t\t}).transform(transform)\n\t}\n\n\tprivate _getMobileRotateGeometry(state: SelectionState, transform: Mat): Geometry2d {\n\t\tconst bgRadius = Math.max(14 * (1 / state.zoom), 20 / Math.max(1, state.zoom))\n\t\tconst { cx, cy } = this._getMobileRotateCenter(state)\n\t\treturn new Polygon2d({\n\t\t\tpoints: this._localRectToPoints(cx - bgRadius, cy - bgRadius, bgRadius * 2, bgRadius * 2).map(\n\t\t\t\t(p) => Mat.applyToPoint(transform, p)\n\t\t\t),\n\t\t\tisFilled: true,\n\t\t})\n\t}\n\n\t// --- Rendering (all helpers assume ctx is in local selection space) ---\n\n\tprivate _renderSelectionBox(\n\t\tctx: CanvasRenderingContext2D,\n\t\tstate: SelectionState,\n\t\tcolors: SelectionForegroundColors\n\t) {\n\t\tif (!state.shouldDisplayBox) return\n\t\tctx.strokeStyle = colors.strokeColor\n\t\tctx.lineWidth = this.options.lineWidth / state.zoom\n\t\tctx.strokeRect(0, 0, state.width, state.height)\n\t}\n\n\tprivate _renderResizeCorners(\n\t\tctx: CanvasRenderingContext2D,\n\t\tstate: SelectionState,\n\t\tcolors: SelectionForegroundColors\n\t) {\n\t\tif (!state.showResizeHandles) return\n\n\t\tconst { size, width, height, hideAlternateCornerHandles, showOnlyOneHandle, zoom } = state\n\n\t\tctx.fillStyle = colors.bgColor\n\t\tctx.strokeStyle = colors.strokeColor\n\t\tctx.lineWidth = this.options.lineWidth / zoom\n\n\t\tconst drawCorner = (x: number, y: number, hidden: boolean) => {\n\t\t\tif (hidden) return\n\t\t\tctx.fillRect(x - size / 2, y - size / 2, size, size)\n\t\t\tctx.strokeRect(x - size / 2, y - size / 2, size, size)\n\t\t}\n\n\t\tdrawCorner(0, 0, false) // top-left always shown\n\t\tdrawCorner(width, 0, hideAlternateCornerHandles) // top-right\n\t\tdrawCorner(width, height, showOnlyOneHandle) // bottom-right\n\t\tdrawCorner(0, height, hideAlternateCornerHandles) // bottom-left\n\t}\n\n\tprivate _renderCropHandles(\n\t\tctx: CanvasRenderingContext2D,\n\t\tstate: SelectionState,\n\t\tcolors: SelectionForegroundColors\n\t) {\n\t\tif (!state.showCropHandles) return\n\n\t\tconst { size, width, height, hideAlternateCropHandles } = state\n\t\tconst cropStrokeWidth = size / 3\n\t\tconst offset = cropStrokeWidth / 2\n\n\t\tctx.beginPath()\n\t\tctx.strokeStyle = colors.strokeColor\n\t\tctx.lineWidth = cropStrokeWidth\n\t\tctx.lineCap = 'butt'\n\t\tctx.lineJoin = 'miter'\n\n\t\t// top_left corner (always shown)\n\t\tctx.moveTo(-offset, size)\n\t\tctx.lineTo(-offset, -offset)\n\t\tctx.lineTo(size, -offset)\n\n\t\t// bottom_right corner (always shown)\n\t\tctx.moveTo(width + offset, height - size)\n\t\tctx.lineTo(width + offset, height + offset)\n\t\tctx.lineTo(width - size, height + offset)\n\n\t\tif (!hideAlternateCropHandles) {\n\t\t\t// top_right corner\n\t\t\tctx.moveTo(width - size, -offset)\n\t\t\tctx.lineTo(width + offset, -offset)\n\t\t\tctx.lineTo(width + offset, size)\n\n\t\t\t// bottom_left corner\n\t\t\tctx.moveTo(size, height + offset)\n\t\t\tctx.lineTo(-offset, height + offset)\n\t\t\tctx.lineTo(-offset, height - size)\n\n\t\t\t// top edge\n\t\t\tctx.moveTo(width / 2 - size, -offset)\n\t\t\tctx.lineTo(width / 2 + size, -offset)\n\n\t\t\t// right edge\n\t\t\tctx.moveTo(width + offset, height / 2 - size)\n\t\t\tctx.lineTo(width + offset, height / 2 + size)\n\n\t\t\t// bottom edge\n\t\t\tctx.moveTo(width / 2 - size, height + offset)\n\t\t\tctx.lineTo(width / 2 + size, height + offset)\n\n\t\t\t// left edge\n\t\t\tctx.moveTo(-offset, height / 2 - size)\n\t\t\tctx.lineTo(-offset, height / 2 + size)\n\t\t}\n\n\t\tctx.stroke()\n\t}\n\n\tprivate _renderMobileRotateHandle(\n\t\tctx: CanvasRenderingContext2D,\n\t\tstate: SelectionState,\n\t\tcolors: SelectionForegroundColors\n\t) {\n\t\tif (!state.showMobileRotateHandle) return\n\n\t\tconst { cx, cy } = this._getMobileRotateCenter(state)\n\t\tconst fgRadius = state.size / SQUARE_ROOT_PI\n\n\t\tctx.fillStyle = colors.bgColor\n\t\tctx.strokeStyle = colors.strokeColor\n\t\tctx.lineWidth = this.options.lineWidth / state.zoom\n\t\tctx.beginPath()\n\t\tctx.arc(cx, cy, fgRadius, 0, Math.PI * 2)\n\t\tctx.fill()\n\t\tctx.stroke()\n\t}\n\n\tprivate _renderTextResizeHandles(\n\t\tctx: CanvasRenderingContext2D,\n\t\tstate: SelectionState,\n\t\tcolors: SelectionForegroundColors\n\t) {\n\t\tconst {\n\t\t\tshouldDisplayControls,\n\t\t\tisCoarsePointer,\n\t\t\tonlyShape,\n\t\t\tzoom,\n\t\t\twidth,\n\t\t\theight,\n\t\t\tsize,\n\t\t\ttargetSizeY,\n\t\t} = state\n\t\tif (!shouldDisplayControls || !isCoarsePointer || !onlyShape || onlyShape.type !== 'text') {\n\t\t\treturn\n\t\t}\n\n\t\tconst textHandleHeight = Math.min(24 / zoom, height - targetSizeY * 3)\n\t\tif (textHandleHeight * zoom < 4) return\n\n\t\tconst hw = size / 2\n\t\tconst r = size / 4\n\n\t\tctx.fillStyle = colors.strokeColor\n\t\tctx.beginPath()\n\t\tctx.roundRect(0 - hw / 2, height / 2 - textHandleHeight / 2, hw, textHandleHeight, r)\n\t\tctx.fill()\n\t\tctx.beginPath()\n\t\tctx.roundRect(width - hw / 2, height / 2 - textHandleHeight / 2, hw, textHandleHeight, r)\n\t\tctx.fill()\n\t}\n\n\t// --- Shared helpers ---\n\n\t/**\n\t * Single source of truth for the derived state the selection foreground needs.\n\t * Called from `getOverlays()`, `getGeometry()`, and `render()` so their visibility\n\t * predicates can't drift. Returns `null` when no selection UI should appear at all\n\t * (nothing selected, or the only selected shape is hidden).\n\t */\n\tprivate _computeSelectionState(): SelectionState | null {\n\t\tconst editor = this.editor\n\t\tconst bounds = editor.getSelectionRotatedPageBounds()\n\t\tif (!bounds) return null\n\n\t\tconst onlyShape = editor.getOnlySelectedShape()\n\t\tif (onlyShape && editor.isShapeHidden(onlyShape)) return null\n\n\t\tconst onlyShapeUtil = onlyShape ? editor.getShapeUtil(onlyShape) : null\n\t\tconst isLockedShape = !!(onlyShape && editor.isShapeOrAncestorLocked(onlyShape))\n\n\t\tconst expandOutlineBy =\n\t\t\tonlyShape && onlyShapeUtil ? onlyShapeUtil.expandSelectionOutlinePx(onlyShape) : 0\n\t\tconst expandedBounds =\n\t\t\texpandOutlineBy instanceof Box\n\t\t\t\t? bounds.clone().expand(expandOutlineBy).zeroFix()\n\t\t\t\t: bounds.clone().expandBy(expandOutlineBy).zeroFix()\n\n\t\tconst instanceState = editor.getInstanceState()\n\t\tconst isCoarsePointer = instanceState.isCoarsePointer\n\t\tconst isChangingStyle = instanceState.isChangingStyle\n\t\tconst isReadonly = editor.getIsReadonly()\n\t\tconst zoom = editor.getZoomLevel()\n\t\tconst rotation = editor.getSelectionRotation()\n\n\t\tconst width = expandedBounds.width\n\t\tconst height = expandedBounds.height\n\t\tconst size = 8 / zoom\n\t\tconst isTinyX = width < size * 2\n\t\tconst isTinyY = height < size * 2\n\t\tconst isSmallX = width < size * 4\n\t\tconst isSmallY = height < size * 4\n\t\tconst isSmallCropX = width < size * 5\n\t\tconst isSmallCropY = height < size * 5\n\n\t\tconst mobileHandleMultiplier = isCoarsePointer ? 1.75 : 1\n\t\tconst targetSize = (6 / zoom) * mobileHandleMultiplier\n\t\tconst targetSizeX = (isSmallX ? targetSize / 2 : targetSize) * (mobileHandleMultiplier * 0.75)\n\t\tconst targetSizeY = (isSmallY ? targetSize / 2 : targetSize) * (mobileHandleMultiplier * 0.75)\n\n\t\tconst expandDx = expandedBounds.x - bounds.x\n\t\tconst expandDy = expandedBounds.y - bounds.y\n\n\t\tconst shouldDisplayControls =\n\t\t\teditor.isInAny(\n\t\t\t\t'select.idle',\n\t\t\t\t'select.pointing_selection',\n\t\t\t\t'select.pointing_shape',\n\t\t\t\t'select.crop.idle'\n\t\t\t) &&\n\t\t\t!isChangingStyle &&\n\t\t\t!isReadonly\n\n\t\tconst showCropHandles =\n\t\t\teditor.isInAny(\n\t\t\t\t'select.crop.idle',\n\t\t\t\t'select.crop.pointing_crop',\n\t\t\t\t'select.crop.pointing_crop_handle'\n\t\t\t) && !isReadonly\n\n\t\tconst canOnlyShapeResize =\n\t\t\tonlyShape && onlyShapeUtil\n\t\t\t\t? onlyShapeUtil.canResize(onlyShape) && !onlyShapeUtil.hideResizeHandles(onlyShape)\n\t\t\t\t: true\n\t\tconst hideOnlyShapeRotateHandle =\n\t\t\tonlyShape && onlyShapeUtil ? onlyShapeUtil.hideRotateHandle(onlyShape) : false\n\t\tconst hideOnlyShapeSelectionBounds =\n\t\t\tonlyShape && onlyShapeUtil ? onlyShapeUtil.hideSelectionBoundsFg(onlyShape) : false\n\n\t\tconst showResizeHandles =\n\t\t\tshouldDisplayControls && !isLockedShape && !showCropHandles && canOnlyShapeResize\n\n\t\tconst showCornerRotateHandles =\n\t\t\tshouldDisplayControls &&\n\t\t\t!isLockedShape &&\n\t\t\t!isCoarsePointer &&\n\t\t\t!(isTinyX || isTinyY) &&\n\t\t\t!hideOnlyShapeRotateHandle\n\n\t\tconst showMobileRotateHandle =\n\t\t\tshouldDisplayControls &&\n\t\t\t!isLockedShape &&\n\t\t\tisCoarsePointer &&\n\t\t\t(!isSmallX || !isSmallY) &&\n\t\t\t!hideOnlyShapeRotateHandle\n\n\t\tconst hideAlternateCornerHandles = isTinyX || isTinyY\n\t\tconst hideAlternateCropHandles = isSmallCropX || isSmallCropY\n\t\tconst showOnlyOneHandle = isTinyX && isTinyY\n\t\tconst showHandles = showResizeHandles || showCropHandles\n\n\t\tconst showSelectionBounds = !hideOnlyShapeSelectionBounds && !isChangingStyle\n\n\t\tconst shouldDisplayBox =\n\t\t\t(showSelectionBounds &&\n\t\t\t\teditor.isInAny(\n\t\t\t\t\t'select.idle',\n\t\t\t\t\t'select.brushing',\n\t\t\t\t\t'select.scribble_brushing',\n\t\t\t\t\t'select.pointing_canvas',\n\t\t\t\t\t'select.pointing_selection',\n\t\t\t\t\t'select.pointing_shape',\n\t\t\t\t\t'select.crop.idle',\n\t\t\t\t\t'select.crop.pointing_crop',\n\t\t\t\t\t'select.crop.pointing_crop_handle',\n\t\t\t\t\t'select.pointing_resize_handle'\n\t\t\t\t)) ||\n\t\t\t(showSelectionBounds &&\n\t\t\t\teditor.isIn('select.resizing') &&\n\t\t\t\t!!(onlyShape && editor.isShapeOfType(onlyShape, 'text')))\n\n\t\treturn {\n\t\t\tbounds,\n\t\t\tonlyShape,\n\t\t\tisCoarsePointer,\n\t\t\tzoom,\n\t\t\trotation,\n\t\t\twidth,\n\t\t\theight,\n\t\t\tsize,\n\t\t\ttargetSize,\n\t\t\ttargetSizeX,\n\t\t\ttargetSizeY,\n\t\t\texpandDx,\n\t\t\texpandDy,\n\t\t\tisSmallX,\n\t\t\tshouldDisplayControls,\n\t\t\tshouldDisplayBox,\n\t\t\tshowCropHandles,\n\t\t\tshowResizeHandles,\n\t\t\tshowCornerRotateHandles,\n\t\t\tshowMobileRotateHandle,\n\t\t\tshowHandles,\n\t\t\thideAlternateCornerHandles,\n\t\t\thideAlternateCropHandles,\n\t\t\tshowOnlyOneHandle,\n\t\t}\n\t}\n\n\tprivate _getMobileRotateCenter(state: SelectionState): { cx: number; cy: number } {\n\t\tconst { width, height, targetSize, isSmallX, onlyShape, rotation } = state\n\t\tconst editor = this.editor\n\t\tconst isMediaShape =\n\t\t\t!!onlyShape &&\n\t\t\t(editor.isShapeOfType(onlyShape, 'image') || editor.isShapeOfType(onlyShape, 'video'))\n\t\tconst isShapeTooCloseToContextualToolbar = rotation / HALF_PI > 1.6 && rotation / HALF_PI < 2.4\n\n\t\tconst cx = isSmallX ? -targetSize * 1.5 : width / 2\n\t\tconst cy = isSmallX\n\t\t\t? height / 2\n\t\t\t: isMediaShape && !isShapeTooCloseToContextualToolbar\n\t\t\t\t? height + targetSize * 1.5\n\t\t\t\t: -targetSize * 1.5\n\t\treturn { cx, cy }\n\t}\n\n\tprivate _getThemeColors(): SelectionForegroundColors {\n\t\tconst editor = this.editor\n\t\tconst themeColors = editor.getCurrentTheme().colors[editor.getColorMode()]\n\t\treturn {\n\t\t\tstrokeColor: themeColors.selectionStroke,\n\t\t\tbgColor: themeColors.background,\n\t\t}\n\t}\n\n\tprivate _makeOverlay(\n\t\toverlayType: TLSelectionForegroundOverlay['props']['overlayType'],\n\t\thandle: TLSelectionHandle | RotateCorner\n\t): TLSelectionForegroundOverlay {\n\t\treturn {\n\t\t\tid: `selection_fg:${handle}`,\n\t\t\ttype: 'selection_foreground',\n\t\t\tprops: { overlayType, handle },\n\t\t}\n\t}\n\n\tprivate _getEdgeLocalRect(\n\t\tedge: SelectionEdge,\n\t\tstate: SelectionState\n\t): { x: number; y: number; w: number; h: number } {\n\t\tconst { width, height, targetSizeX, targetSizeY } = state\n\t\tswitch (edge) {\n\t\t\tcase 'top':\n\t\t\t\treturn { x: 0, y: -targetSizeY, w: width, h: targetSizeY * 2 }\n\t\t\tcase 'right':\n\t\t\t\treturn { x: width - targetSizeX, y: 0, w: targetSizeX * 2, h: height }\n\t\t\tcase 'bottom':\n\t\t\t\treturn { x: 0, y: height - targetSizeY, w: width, h: targetSizeY * 2 }\n\t\t\tcase 'left':\n\t\t\t\treturn { x: -targetSizeX, y: 0, w: targetSizeX * 2, h: height }\n\t\t}\n\t}\n\n\tprivate _getRotateHandleLocalCenter(\n\t\tcorner: RotateCorner,\n\t\twidth: number,\n\t\theight: number,\n\t\tcornerSize: number\n\t): Vec {\n\t\t// Centered on the outside corner of the resize handle square\n\t\t// (the corner furthest from the selection interior)\n\t\tswitch (corner) {\n\t\t\tcase 'top_left_rotate':\n\t\t\t\treturn new Vec(-cornerSize, -cornerSize)\n\t\t\tcase 'top_right_rotate':\n\t\t\t\treturn new Vec(width + cornerSize, -cornerSize)\n\t\t\tcase 'bottom_left_rotate':\n\t\t\t\treturn new Vec(-cornerSize, height + cornerSize)\n\t\t\tcase 'bottom_right_rotate':\n\t\t\t\treturn new Vec(width + cornerSize, height + cornerSize)\n\t\t\tdefault:\n\t\t\t\treturn new Vec(0, 0)\n\t\t}\n\t}\n\n\tprivate _getCornerLocalPoint(corner: SelectionCorner, width: number, height: number): Vec {\n\t\tswitch (corner) {\n\t\t\tcase 'top_left':\n\t\t\t\treturn new Vec(0, 0)\n\t\t\tcase 'top_right':\n\t\t\t\treturn new Vec(width, 0)\n\t\t\tcase 'bottom_right':\n\t\t\t\treturn new Vec(width, height)\n\t\t\tcase 'bottom_left':\n\t\t\t\treturn new Vec(0, height)\n\t\t}\n\t}\n\n\tprivate _localRectToPoints(x: number, y: number, w: number, h: number): Vec[] {\n\t\treturn [new Vec(x, y), new Vec(x + w, y), new Vec(x + w, y + h), new Vec(x, y + h)]\n\t}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAgBO;AAEP,MAAM,iBAAiB,KAAK,KAAK,KAAK,EAAE;AAExC,MAAM,iBAA8D;AAAA,EACnE,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,qBAAqB;AACtB;AAEA,MAAM,iBAAmE;AAAA,EACxE,UAAU;AAAA,EACV,WAAW;AAAA,EACX,cAAc;AAAA,EACd,aAAa;AAAA,EACb,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACR;AAgDO,MAAM,uCAAuC,0BAA0C;AAAA,EAC7F,OAAgB,OAAO;AAAA,EACd,UAAU,EAAE,QAAQ,KAAK,WAAW,IAAI;AAAA,EAExC,WAAoB;AAC5B,QAAI,CAAC,KAAK,OAAO,8BAA8B,EAAG,QAAO;AAEzD,WAAO,KAAK,OAAO;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACD;AAAA,EAES,cAA8C;AACtD,UAAM,QAAQ,KAAK,uBAAuB;AAC1C,QAAI,CAAC,MAAO,QAAO,CAAC;AAEpB,UAAM,WAA2C,CAAC;AAClD,SAAK,6BAA6B,OAAO,QAAQ;AACjD,SAAK,2BAA2B,OAAO,QAAQ;AAC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AQ,QAAQ;AAAA,MACf,KAAK;AACJ,eAAO,IAAI,kBAAI,CAAC,YAAY,CAAC,UAAU;AAAA,MACxC,KAAK;AACJ,eAAO,IAAI,kBAAI,QAAQ,YAAY,CAAC,UAAU;AAAA,MAC/C,KAAK;AACJ,eAAO,IAAI,kBAAI,CAAC,YAAY,SAAS,UAAU;AAAA,MAChD,KAAK;AACJ,eAAO,IAAI,kBAAI,QAAQ,YAAY,SAAS,UAAU;AAAA,MACvD;AACC,eAAO,IAAI,kBAAI,GAAG,CAAC;AAAA,IACrB;AAAA,EACD;AAAA,EAEQ,qBAAqB,QAAyB,OAAe,QAAqB;AACzF,YAAQ,QAAQ;AAAA,MACf,KAAK;AACJ,eAAO,IAAI,kBAAI,GAAG,CAAC;AAAA,MACpB,KAAK;AACJ,eAAO,IAAI,kBAAI,OAAO,CAAC;AAAA,MACxB,KAAK;AACJ,eAAO,IAAI,kBAAI,OAAO,MAAM;AAAA,MAC7B,KAAK;AACJ,eAAO,IAAI,kBAAI,GAAG,MAAM;AAAA,IAC1B;AAAA,EACD;AAAA,EAEQ,mBAAmB,GAAW,GAAW,GAAW,GAAkB;AAC7E,WAAO,CAAC,IAAI,kBAAI,GAAG,CAAC,GAAG,IAAI,kBAAI,IAAI,GAAG,CAAC,GAAG,IAAI,kBAAI,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,kBAAI,GAAG,IAAI,CAAC,CAAC;AAAA,EACnF;AACD;",
6
6
  "names": []
7
7
  }
@@ -39,7 +39,7 @@ function HashPatternForExport() {
39
39
  const getHashPatternZoomName = useGetHashPatternZoomName();
40
40
  const maskId = (0, import_editor.useUniqueSafeId)();
41
41
  const editor = (0, import_editor.useEditor)();
42
- const colorMode = editor.getColorMode();
42
+ const colorMode = (0, import_editor.useColorMode)();
43
43
  const colors = editor.getCurrentTheme().colors[colorMode];
44
44
  const t = 8 / 12;
45
45
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [