tldraw 4.3.0-canary.b8f81b08d169 → 4.3.0-canary.b9cf1eed518f

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 (134) hide show
  1. package/dist-cjs/index.d.ts +12 -0
  2. package/dist-cjs/index.js +2 -1
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js +2 -2
  5. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js.map +2 -2
  6. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +9 -12
  7. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
  8. package/dist-cjs/lib/shapes/arrow/arrow-types.js.map +1 -1
  9. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +3 -3
  10. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +2 -2
  11. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +1 -1
  12. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
  13. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +10 -6
  14. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
  15. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +1 -1
  16. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
  17. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +5 -5
  18. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
  19. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +2 -1
  20. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js.map +2 -2
  21. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js +14 -2
  22. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js.map +3 -3
  23. package/dist-cjs/lib/shapes/shared/RichTextLabel.js +11 -3
  24. package/dist-cjs/lib/shapes/shared/RichTextLabel.js.map +3 -3
  25. package/dist-cjs/lib/shapes/shared/ShapeFill.js +2 -2
  26. package/dist-cjs/lib/shapes/shared/ShapeFill.js.map +2 -2
  27. package/dist-cjs/lib/shapes/shared/{useForceSolid.js → useEfficientZoomThreshold.js} +10 -7
  28. package/dist-cjs/lib/shapes/shared/useEfficientZoomThreshold.js.map +7 -0
  29. package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js +1 -1
  30. package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js.map +2 -2
  31. package/dist-cjs/lib/shapes/text/TextShapeUtil.js +5 -2
  32. package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +2 -2
  33. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +1 -1
  34. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +2 -2
  35. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.js +3 -9
  36. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.js.map +2 -2
  37. package/dist-cjs/lib/ui/components/ZoomMenu/DefaultZoomMenu.js +1 -1
  38. package/dist-cjs/lib/ui/components/ZoomMenu/DefaultZoomMenu.js.map +2 -2
  39. package/dist-cjs/lib/ui/components/menu-items.js +3 -1
  40. package/dist-cjs/lib/ui/components/menu-items.js.map +2 -2
  41. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js +1 -1
  42. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js.map +2 -2
  43. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +143 -88
  44. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +2 -2
  45. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +1 -1
  46. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
  47. package/dist-cjs/lib/ui/version.js +3 -3
  48. package/dist-cjs/lib/ui/version.js.map +1 -1
  49. package/dist-cjs/lib/utils/text/richText.js +7 -17
  50. package/dist-cjs/lib/utils/text/richText.js.map +3 -3
  51. package/dist-esm/index.d.mts +12 -0
  52. package/dist-esm/index.mjs +3 -1
  53. package/dist-esm/index.mjs.map +2 -2
  54. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs +2 -2
  55. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs.map +2 -2
  56. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +10 -14
  57. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
  58. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +3 -3
  59. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +2 -2
  60. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +1 -1
  61. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
  62. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +10 -6
  63. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
  64. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +1 -1
  65. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
  66. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +5 -5
  67. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
  68. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs +3 -2
  69. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs.map +2 -2
  70. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs +14 -2
  71. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs.map +2 -2
  72. package/dist-esm/lib/shapes/shared/RichTextLabel.mjs +11 -3
  73. package/dist-esm/lib/shapes/shared/RichTextLabel.mjs.map +2 -2
  74. package/dist-esm/lib/shapes/shared/ShapeFill.mjs +2 -2
  75. package/dist-esm/lib/shapes/shared/ShapeFill.mjs.map +2 -2
  76. package/dist-esm/lib/shapes/shared/useEfficientZoomThreshold.mjs +12 -0
  77. package/dist-esm/lib/shapes/shared/useEfficientZoomThreshold.mjs.map +7 -0
  78. package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs +1 -1
  79. package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs.map +2 -2
  80. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +5 -2
  81. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +2 -2
  82. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +1 -1
  83. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +2 -2
  84. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.mjs +2 -8
  85. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.mjs.map +2 -2
  86. package/dist-esm/lib/ui/components/ZoomMenu/DefaultZoomMenu.mjs +1 -1
  87. package/dist-esm/lib/ui/components/ZoomMenu/DefaultZoomMenu.mjs.map +2 -2
  88. package/dist-esm/lib/ui/components/menu-items.mjs +3 -1
  89. package/dist-esm/lib/ui/components/menu-items.mjs.map +2 -2
  90. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs +2 -2
  91. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs.map +2 -2
  92. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +151 -90
  93. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +2 -2
  94. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +2 -2
  95. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
  96. package/dist-esm/lib/ui/version.mjs +3 -3
  97. package/dist-esm/lib/ui/version.mjs.map +1 -1
  98. package/dist-esm/lib/utils/text/richText.mjs +3 -3
  99. package/dist-esm/lib/utils/text/richText.mjs.map +2 -2
  100. package/package.json +3 -3
  101. package/src/index.ts +1 -0
  102. package/src/lib/canvas/TldrawSelectionForeground.tsx +2 -2
  103. package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +10 -12
  104. package/src/lib/shapes/arrow/arrow-types.ts +2 -0
  105. package/src/lib/shapes/draw/DrawShapeUtil.tsx +3 -3
  106. package/src/lib/shapes/frame/FrameShapeUtil.tsx +1 -1
  107. package/src/lib/shapes/geo/GeoShapeUtil.tsx +9 -4
  108. package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +1 -1
  109. package/src/lib/shapes/note/NoteShapeUtil.tsx +7 -8
  110. package/src/lib/shapes/shared/HyperlinkButton.tsx +3 -2
  111. package/src/lib/shapes/shared/PlainTextLabel.tsx +10 -1
  112. package/src/lib/shapes/shared/RichTextLabel.tsx +11 -2
  113. package/src/lib/shapes/shared/ShapeFill.tsx +2 -2
  114. package/src/lib/shapes/shared/useEfficientZoomThreshold.ts +10 -0
  115. package/src/lib/shapes/shared/useImageOrVideoAsset.ts +1 -1
  116. package/src/lib/shapes/text/TextShapeUtil.tsx +5 -0
  117. package/src/lib/shapes/video/VideoShapeUtil.tsx +2 -1
  118. package/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx +1 -9
  119. package/src/lib/ui/components/ZoomMenu/DefaultZoomMenu.tsx +1 -1
  120. package/src/lib/ui/components/menu-items.tsx +3 -1
  121. package/src/lib/ui/components/primitives/TldrawUiSlider.tsx +2 -2
  122. package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +196 -108
  123. package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +2 -2
  124. package/src/lib/ui/version.ts +3 -3
  125. package/src/lib/utils/text/richText.ts +3 -3
  126. package/src/test/TldrawEditor.test.tsx +3 -2
  127. package/src/test/commands/__snapshots__/getSvgString.test.ts.snap +2 -2
  128. package/src/test/commands/cameraState.test.ts +299 -0
  129. package/src/test/commands/putContent.test.ts +79 -1
  130. package/tldraw.css +8 -4
  131. package/dist-cjs/lib/shapes/shared/useForceSolid.js.map +0 -7
  132. package/dist-esm/lib/shapes/shared/useForceSolid.mjs +0 -9
  133. package/dist-esm/lib/shapes/shared/useForceSolid.mjs.map +0 -7
  134. package/src/lib/shapes/shared/useForceSolid.ts +0 -6
@@ -291,6 +291,8 @@ export declare interface ArrowShapeOptions {
291
291
  * When creating an arrow, should it bind to the target shape.
292
292
  */
293
293
  shouldIgnoreTargets(editor: Editor): boolean;
294
+ /** Whether to show the outline of the arrow shape's label (using the same color as the canvas). This helps with overlapping shapes. It does not show up on Safari, where text outline is a performance issues. */
295
+ readonly showTextOutline: boolean;
294
296
  }
295
297
 
296
298
  /** @public */
@@ -1677,6 +1679,9 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
1677
1679
  static type: "geo";
1678
1680
  static props: RecordProps<TLGeoShape>;
1679
1681
  static migrations: TLPropsMigrations;
1682
+ options: {
1683
+ showTextOutline: boolean;
1684
+ };
1680
1685
  canEdit(): boolean;
1681
1686
  getDefaultProps(): TLGeoShape['props'];
1682
1687
  getGeometry(shape: TLGeoShape): Group2d;
@@ -1902,6 +1907,9 @@ export declare function HeartToolbarItem(): JSX_2.Element;
1902
1907
  /** @public @react */
1903
1908
  export declare function HexagonToolbarItem(): JSX_2.Element;
1904
1909
 
1910
+ /** @public */
1911
+ export declare function hideAllTooltips(): void;
1912
+
1905
1913
  /** @public */
1906
1914
  export declare interface HighlightShapeOptions {
1907
1915
  /**
@@ -2435,6 +2443,7 @@ export declare interface PlainTextLabelProps {
2435
2443
  textWidth?: number;
2436
2444
  textHeight?: number;
2437
2445
  padding?: number;
2446
+ showTextOutline?: boolean;
2438
2447
  }
2439
2448
 
2440
2449
  /** @public */
@@ -2580,6 +2589,7 @@ export declare interface RichTextLabelProps {
2580
2589
  textHeight?: number;
2581
2590
  padding?: number;
2582
2591
  hasCustomTabBehavior?: boolean;
2592
+ showTextOutline?: boolean;
2583
2593
  }
2584
2594
 
2585
2595
  /**
@@ -2868,6 +2878,8 @@ export declare const TextDirection: Extension<any, any>;
2868
2878
  export declare interface TextShapeOptions {
2869
2879
  /** How much addition padding should be added to the horizontal geometry of the shape when binding to an arrow? */
2870
2880
  extraArrowHorizontalPadding: number;
2881
+ /** Whether to show the outline of the text shape (using the same color as the canvas). This helps with overlapping shapes. It does not show up on Safari, where text outline is a performance issues. */
2882
+ showTextOutline: boolean;
2871
2883
  }
2872
2884
 
2873
2885
  /** @public */
package/dist-cjs/index.js CHANGED
@@ -344,6 +344,7 @@ __export(index_exports, {
344
344
  getStrokePoints: () => import_getStrokePoints.getStrokePoints,
345
345
  getSvgPathFromStrokePoints: () => import_svg.getSvgPathFromStrokePoints,
346
346
  getUncroppedSize: () => import_crop.getUncroppedSize,
347
+ hideAllTooltips: () => import_TldrawUiTooltip.hideAllTooltips,
347
348
  notifyIfFileNotAllowed: () => import_defaultExternalContentHandlers.notifyIfFileNotAllowed,
348
349
  onDragFromToolbarToCreateShape: () => import_useTools.onDragFromToolbarToCreateShape,
349
350
  parseAndLoadDocument: () => import_file.parseAndLoadDocument,
@@ -584,7 +585,7 @@ var import_buildFromV1Document = require("./lib/utils/tldr/buildFromV1Document")
584
585
  var import_file = require("./lib/utils/tldr/file");
585
586
  (0, import_editor.registerTldrawLibraryVersion)(
586
587
  "tldraw",
587
- "4.3.0-canary.b8f81b08d169",
588
+ "4.3.0-canary.b9cf1eed518f",
588
589
  "cjs"
589
590
  );
590
591
  //# 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 {\n\tPathBuilder,\n\tPathBuilderGeometry2d,\n\ttype BasePathBuilderOpts,\n\ttype CubicBezierToPathBuilderCommand,\n\ttype DashedPathBuilderOpts,\n\ttype DrawPathBuilderDOpts,\n\ttype DrawPathBuilderOpts,\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 { 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 local/no-export-star\nexport * from '@tldraw/editor'\nexport { ArrowBindingUtil } from './lib/bindings/arrow/ArrowBindingUtil'\nexport { TldrawCropHandles, type TldrawCropHandlesProps } from './lib/canvas/TldrawCropHandles'\nexport { TldrawHandles } from './lib/canvas/TldrawHandles'\nexport { TldrawArrowHints, TldrawOverlays } from './lib/canvas/TldrawOverlays'\nexport { TldrawScribble } from './lib/canvas/TldrawScribble'\nexport { TldrawSelectionForeground } from './lib/canvas/TldrawSelectionForeground'\nexport { TldrawShapeIndicators } from './lib/canvas/TldrawShapeIndicators'\nexport { defaultBindingUtils } from './lib/defaultBindingUtils'\nexport {\n\tDEFAULT_EMBED_DEFINITIONS,\n\tembedShapePermissionDefaults,\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\tdefaultHandleExternalSvgTextContent,\n\tdefaultHandleExternalTextContent,\n\tdefaultHandleExternalTldrawContent,\n\tdefaultHandleExternalUrlAsset,\n\tdefaultHandleExternalUrlContent,\n\tgetAssetInfo,\n\tgetMediaAssetInfoPartial,\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 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 {\n\tgetArrowBindings,\n\tgetArrowInfo,\n\tgetArrowTerminalsInArrowSpace,\n\ttype TLArrowBindings,\n} from './lib/shapes/arrow/shared'\nexport { createBookmarkFromUrl } from './lib/shapes/bookmark/bookmarks'\nexport { BookmarkShapeUtil } from './lib/shapes/bookmark/BookmarkShapeUtil'\nexport { DrawShapeTool } from './lib/shapes/draw/DrawShapeTool'\nexport { DrawShapeUtil, type DrawShapeOptions } from './lib/shapes/draw/DrawShapeUtil'\nexport { EmbedShapeUtil } from './lib/shapes/embed/EmbedShapeUtil'\nexport { FrameShapeTool } from './lib/shapes/frame/FrameShapeTool'\nexport { FrameShapeUtil, type FrameShapeOptions } from './lib/shapes/frame/FrameShapeUtil'\nexport { GeoShapeTool } from './lib/shapes/geo/GeoShapeTool'\nexport { GeoShapeUtil } from './lib/shapes/geo/GeoShapeUtil'\nexport { HighlightShapeTool } from './lib/shapes/highlight/HighlightShapeTool'\nexport {\n\tHighlightShapeUtil,\n\ttype HighlightShapeOptions,\n} from './lib/shapes/highlight/HighlightShapeUtil'\nexport { ImageShapeUtil } from './lib/shapes/image/ImageShapeUtil'\nexport { LineShapeTool } from './lib/shapes/line/LineShapeTool'\nexport { LineShapeUtil } from './lib/shapes/line/LineShapeUtil'\nexport { NoteShapeTool } from './lib/shapes/note/NoteShapeTool'\nexport { NoteShapeUtil, type NoteShapeOptions } 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 {\n\tARROW_LABEL_FONT_SIZES,\n\tFONT_FAMILIES,\n\tFONT_SIZES,\n\tLABEL_FONT_SIZES,\n\tSTROKE_SIZES,\n\tTEXT_PROPS,\n} 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 { getStrokePoints } from './lib/shapes/shared/freehand/getStrokePoints'\nexport { getSvgPathFromStrokePoints } from './lib/shapes/shared/freehand/svg'\nexport { type StrokeOptions, type StrokePoint } from './lib/shapes/shared/freehand/types'\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 { useDefaultColorTheme } from './lib/shapes/shared/useDefaultColorTheme'\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 { TextShapeUtil, type TextShapeOptions } from './lib/shapes/text/TextShapeUtil'\nexport { VideoShapeUtil, type VideoShapeOptions } from './lib/shapes/video/VideoShapeUtil'\nexport { 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 {\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\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\tTldrawUiDropdownMenuSubTrigger,\n\tTldrawUiDropdownMenuTrigger,\n\ttype TLUiDropdownMenuCheckboxItemProps,\n\ttype TLUiDropdownMenuContentProps,\n\ttype TLUiDropdownMenuGroupProps,\n\ttype TLUiDropdownMenuItemProps,\n\ttype TLUiDropdownMenuRootProps,\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 { 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\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 { DefaultSharePanel } from './lib/ui/components/SharePanel/DefaultSharePanel'\nexport { PeopleMenu, type PeopleMenuProps } from './lib/ui/components/SharePanel/PeopleMenu'\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 { DefaultTopPanel } from './lib/ui/components/TopPanel/DefaultTopPanel'\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 { useCanRedo, useCanUndo, useUnlockedSelectedShapesCount } from './lib/ui/hooks/menu-hooks'\nexport { useMenuClipboardEvents, useNativeClipboardEvents } 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 { type TLUiTranslation } from './lib/ui/hooks/useTranslation/translations'\nexport {\n\tuseCurrentTranslation,\n\tuseTranslation,\n\ttype TLUiTranslationContextType,\n\ttype TLUiTranslationProviderProps,\n} from './lib/ui/hooks/useTranslation/useTranslation'\nexport { 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 {\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 { TextDirection } from './lib/utils/text/textDirection'\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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AA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
4
+ "sourcesContent": ["/// <reference types=\"react\" />\n\nimport { registerTldrawLibraryVersion } from '@tldraw/editor'\nexport {\n\tPathBuilder,\n\tPathBuilderGeometry2d,\n\ttype BasePathBuilderOpts,\n\ttype CubicBezierToPathBuilderCommand,\n\ttype DashedPathBuilderOpts,\n\ttype DrawPathBuilderDOpts,\n\ttype DrawPathBuilderOpts,\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 { 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 local/no-export-star\nexport * from '@tldraw/editor'\nexport { ArrowBindingUtil } from './lib/bindings/arrow/ArrowBindingUtil'\nexport { TldrawCropHandles, type TldrawCropHandlesProps } from './lib/canvas/TldrawCropHandles'\nexport { TldrawHandles } from './lib/canvas/TldrawHandles'\nexport { TldrawArrowHints, TldrawOverlays } from './lib/canvas/TldrawOverlays'\nexport { TldrawScribble } from './lib/canvas/TldrawScribble'\nexport { TldrawSelectionForeground } from './lib/canvas/TldrawSelectionForeground'\nexport { TldrawShapeIndicators } from './lib/canvas/TldrawShapeIndicators'\nexport { defaultBindingUtils } from './lib/defaultBindingUtils'\nexport {\n\tDEFAULT_EMBED_DEFINITIONS,\n\tembedShapePermissionDefaults,\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\tdefaultHandleExternalSvgTextContent,\n\tdefaultHandleExternalTextContent,\n\tdefaultHandleExternalTldrawContent,\n\tdefaultHandleExternalUrlAsset,\n\tdefaultHandleExternalUrlContent,\n\tgetAssetInfo,\n\tgetMediaAssetInfoPartial,\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 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 {\n\tgetArrowBindings,\n\tgetArrowInfo,\n\tgetArrowTerminalsInArrowSpace,\n\ttype TLArrowBindings,\n} from './lib/shapes/arrow/shared'\nexport { createBookmarkFromUrl } from './lib/shapes/bookmark/bookmarks'\nexport { BookmarkShapeUtil } from './lib/shapes/bookmark/BookmarkShapeUtil'\nexport { DrawShapeTool } from './lib/shapes/draw/DrawShapeTool'\nexport { DrawShapeUtil, type DrawShapeOptions } from './lib/shapes/draw/DrawShapeUtil'\nexport { EmbedShapeUtil } from './lib/shapes/embed/EmbedShapeUtil'\nexport { FrameShapeTool } from './lib/shapes/frame/FrameShapeTool'\nexport { FrameShapeUtil, type FrameShapeOptions } from './lib/shapes/frame/FrameShapeUtil'\nexport { GeoShapeTool } from './lib/shapes/geo/GeoShapeTool'\nexport { GeoShapeUtil } from './lib/shapes/geo/GeoShapeUtil'\nexport { HighlightShapeTool } from './lib/shapes/highlight/HighlightShapeTool'\nexport {\n\tHighlightShapeUtil,\n\ttype HighlightShapeOptions,\n} from './lib/shapes/highlight/HighlightShapeUtil'\nexport { ImageShapeUtil } from './lib/shapes/image/ImageShapeUtil'\nexport { LineShapeTool } from './lib/shapes/line/LineShapeTool'\nexport { LineShapeUtil } from './lib/shapes/line/LineShapeUtil'\nexport { NoteShapeTool } from './lib/shapes/note/NoteShapeTool'\nexport { NoteShapeUtil, type NoteShapeOptions } 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 {\n\tARROW_LABEL_FONT_SIZES,\n\tFONT_FAMILIES,\n\tFONT_SIZES,\n\tLABEL_FONT_SIZES,\n\tSTROKE_SIZES,\n\tTEXT_PROPS,\n} 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 { getStrokePoints } from './lib/shapes/shared/freehand/getStrokePoints'\nexport { getSvgPathFromStrokePoints } from './lib/shapes/shared/freehand/svg'\nexport { type StrokeOptions, type StrokePoint } from './lib/shapes/shared/freehand/types'\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 { useDefaultColorTheme } from './lib/shapes/shared/useDefaultColorTheme'\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 { TextShapeUtil, type TextShapeOptions } from './lib/shapes/text/TextShapeUtil'\nexport { VideoShapeUtil, type VideoShapeOptions } from './lib/shapes/video/VideoShapeUtil'\nexport { 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 {\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\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\tTldrawUiDropdownMenuSubTrigger,\n\tTldrawUiDropdownMenuTrigger,\n\ttype TLUiDropdownMenuCheckboxItemProps,\n\ttype TLUiDropdownMenuContentProps,\n\ttype TLUiDropdownMenuGroupProps,\n\ttype TLUiDropdownMenuItemProps,\n\ttype TLUiDropdownMenuRootProps,\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 { 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 { DefaultSharePanel } from './lib/ui/components/SharePanel/DefaultSharePanel'\nexport { PeopleMenu, type PeopleMenuProps } from './lib/ui/components/SharePanel/PeopleMenu'\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 { DefaultTopPanel } from './lib/ui/components/TopPanel/DefaultTopPanel'\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 { useCanRedo, useCanUndo, useUnlockedSelectedShapesCount } from './lib/ui/hooks/menu-hooks'\nexport { useMenuClipboardEvents, useNativeClipboardEvents } 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 { type TLUiTranslation } from './lib/ui/hooks/useTranslation/translations'\nexport {\n\tuseCurrentTranslation,\n\tuseTranslation,\n\ttype TLUiTranslationContextType,\n\ttype TLUiTranslationProviderProps,\n} from './lib/ui/hooks/useTranslation/useTranslation'\nexport { 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 {\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 { TextDirection } from './lib/utils/text/textDirection'\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;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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AACjE,oCAGO;AACP,uBAA0B;AAC1B,yBAA4B;AAC5B,kCAAqC;AACrC,kCAAqC;AACrC,2BAA8B;AAC9B,yBAA4B;AAC5B,+BAAkC;AAClC,sBAOO;AAGP,IAAAA,yBAKO;AAEP,uBAAgF;AAChF,sBAAyE;AACzE,oBAAmE;AACnE,0BAA6C;AAC7C,oBAAiD;AACjD,kCAAqC;AACrC,oBAA4D;AAC5D,sBAA6D;AAC7D,oBAA+C;AAC/C,IAAAC,oBAIO;AACP,sBAQO;AACP,kBAA2C;AAC3C,2BAA8B;AAC9B,iCAmCO;AACP,kBAQO;AAAA,IAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
6
6
  "names": ["import_useTranslation", "import_assetUrls"]
7
7
  }
@@ -70,7 +70,7 @@ const TldrawSelectionForeground = (0, import_editor.track)(function TldrawSelect
70
70
  y: expandedBounds.y - bounds.y
71
71
  });
72
72
  if (onlyShape && editor.isShapeHidden(onlyShape)) return null;
73
- const zoom = editor.getZoomLevel();
73
+ const zoom = editor.getEfficientZoomLevel();
74
74
  const isChangingStyle = editor.getInstanceState().isChangingStyle;
75
75
  const width = expandedBounds.width;
76
76
  const height = expandedBounds.height;
@@ -489,7 +489,7 @@ const MobileRotateHandle = function RotateHandle({
489
489
  }) {
490
490
  const events = (0, import_editor.useSelectionEvents)("mobile_rotate");
491
491
  const editor = (0, import_editor.useEditor)();
492
- const zoom = (0, import_editor.useValue)("zoom level", () => editor.getZoomLevel(), [editor]);
492
+ const zoom = (0, import_editor.useValue)("zoom level", () => editor.getEfficientZoomLevel(), [editor]);
493
493
  const bgRadius = Math.max(14 * (1 / zoom), 20 / Math.max(1, zoom));
494
494
  const msg = (0, import_useTranslation.useTranslation)();
495
495
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { role: "button", "aria-label": msg("handle.rotate.mobile_rotate"), children: [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/canvas/TldrawSelectionForeground.tsx"],
4
- "sourcesContent": ["import {\n\tBox,\n\tHALF_PI,\n\tRotateCorner,\n\tTLSelectionForegroundProps,\n\tgetCursor,\n\ttlenv,\n\ttoDomPrecision,\n\ttrack,\n\tuseEditor,\n\tuseSelectionEvents,\n\tuseTransform,\n\tuseValue,\n} from '@tldraw/editor'\nimport classNames from 'classnames'\nimport { PointerEventHandler, useRef } from 'react'\nimport { useReadonly } from '../ui/hooks/useReadonly'\nimport { useTranslation } from '../ui/hooks/useTranslation/useTranslation'\nimport { TldrawCropHandles } from './TldrawCropHandles'\n\n/** @public */\nexport const TldrawSelectionForeground = track(function TldrawSelectionForeground({\n\tbounds,\n\trotation,\n}: TLSelectionForegroundProps) {\n\tconst editor = useEditor()\n\tconst msg = useTranslation()\n\tconst rSvg = useRef<SVGSVGElement>(null)\n\n\tconst isReadonlyMode = useReadonly()\n\tconst topEvents = useSelectionEvents('top')\n\tconst rightEvents = useSelectionEvents('right')\n\tconst bottomEvents = useSelectionEvents('bottom')\n\tconst leftEvents = useSelectionEvents('left')\n\tconst topLeftEvents = useSelectionEvents('top_left')\n\tconst topRightEvents = useSelectionEvents('top_right')\n\tconst bottomRightEvents = useSelectionEvents('bottom_right')\n\tconst bottomLeftEvents = useSelectionEvents('bottom_left')\n\n\tconst isDefaultCursor = editor.getInstanceState().cursor.type === 'default'\n\tconst isCoarsePointer = editor.getInstanceState().isCoarsePointer\n\n\tconst onlyShape = editor.getOnlySelectedShape()\n\tconst isLockedShape = onlyShape && editor.isShapeOrAncestorLocked(onlyShape)\n\n\t// if all shapes have an expandBy for the selection outline, we can expand by the l\n\tconst expandOutlineBy = onlyShape\n\t\t? editor.getShapeUtil(onlyShape).expandSelectionOutlinePx(onlyShape)\n\t\t: 0\n\n\tconst expandedBounds =\n\t\texpandOutlineBy instanceof Box\n\t\t\t? bounds.clone().expand(expandOutlineBy).zeroFix()\n\t\t\t: bounds.clone().expandBy(expandOutlineBy).zeroFix()\n\n\tconst selectionRotation = editor.getSelectionRotation()\n\tconst isShapeTooCloseToContextualToolbar =\n\t\tselectionRotation / HALF_PI > 1.6 && selectionRotation / HALF_PI < 2.4\n\tuseTransform(rSvg, bounds?.x, bounds?.y, 1, selectionRotation, {\n\t\tx: expandedBounds.x - bounds.x,\n\t\ty: expandedBounds.y - bounds.y,\n\t})\n\n\tif (onlyShape && editor.isShapeHidden(onlyShape)) return null\n\n\tconst zoom = editor.getZoomLevel()\n\tconst isChangingStyle = editor.getInstanceState().isChangingStyle\n\n\tconst width = expandedBounds.width\n\tconst height = expandedBounds.height\n\n\tconst size = 8 / zoom\n\tconst isTinyX = width < size * 2\n\tconst isTinyY = height < size * 2\n\n\tconst isSmallX = width < size * 4\n\tconst isSmallY = height < size * 4\n\tconst isSmallCropX = width < size * 5\n\tconst isSmallCropY = height < size * 5\n\n\tconst mobileHandleMultiplier = isCoarsePointer ? 1.75 : 1\n\tconst targetSize = (6 / zoom) * mobileHandleMultiplier\n\n\tconst targetSizeX = (isSmallX ? targetSize / 2 : targetSize) * (mobileHandleMultiplier * 0.75)\n\tconst targetSizeY = (isSmallY ? targetSize / 2 : targetSize) * (mobileHandleMultiplier * 0.75)\n\n\tconst showSelectionBounds =\n\t\t(onlyShape ? !editor.getShapeUtil(onlyShape).hideSelectionBoundsFg(onlyShape) : true) &&\n\t\t!isChangingStyle\n\n\tlet shouldDisplayBox =\n\t\t(showSelectionBounds &&\n\t\t\teditor.isInAny(\n\t\t\t\t'select.idle',\n\t\t\t\t'select.brushing',\n\t\t\t\t'select.scribble_brushing',\n\t\t\t\t'select.pointing_canvas',\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\t'select.crop.pointing_crop',\n\t\t\t\t'select.crop.pointing_crop_handle',\n\t\t\t\t'select.pointing_resize_handle'\n\t\t\t)) ||\n\t\t(showSelectionBounds &&\n\t\t\teditor.isIn('select.resizing') &&\n\t\t\tonlyShape &&\n\t\t\teditor.isShapeOfType(onlyShape, 'text'))\n\n\tif (onlyShape && shouldDisplayBox) {\n\t\tif (tlenv.isFirefox && editor.isShapeOfType(onlyShape, 'embed')) {\n\t\t\tshouldDisplayBox = false\n\t\t}\n\t}\n\n\tconst showCropHandles =\n\t\teditor.isInAny(\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\t!isChangingStyle &&\n\t\t!isReadonlyMode\n\n\tconst shouldDisplayControls =\n\t\teditor.isInAny(\n\t\t\t'select.idle',\n\t\t\t'select.pointing_selection',\n\t\t\t'select.pointing_shape',\n\t\t\t'select.crop.idle'\n\t\t) &&\n\t\t!isChangingStyle &&\n\t\t!isReadonlyMode\n\n\tconst showCornerRotateHandles =\n\t\t!isCoarsePointer &&\n\t\t!(isTinyX || isTinyY) &&\n\t\t(shouldDisplayControls || showCropHandles) &&\n\t\t(onlyShape ? !editor.getShapeUtil(onlyShape).hideRotateHandle(onlyShape) : true) &&\n\t\t!isLockedShape\n\n\tconst showMobileRotateHandle =\n\t\tisCoarsePointer &&\n\t\t(!isSmallX || !isSmallY) &&\n\t\t(shouldDisplayControls || showCropHandles) &&\n\t\t(onlyShape ? !editor.getShapeUtil(onlyShape).hideRotateHandle(onlyShape) : true) &&\n\t\t!isLockedShape\n\n\tconst showResizeHandles =\n\t\tshouldDisplayControls &&\n\t\t(onlyShape\n\t\t\t? editor.getShapeUtil(onlyShape).canResize(onlyShape) &&\n\t\t\t\t!editor.getShapeUtil(onlyShape).hideResizeHandles(onlyShape)\n\t\t\t: true) &&\n\t\t!showCropHandles &&\n\t\t!isLockedShape\n\n\tconst hideAlternateCornerHandles = isTinyX || isTinyY\n\tconst showOnlyOneHandle = isTinyX && isTinyY\n\tconst hideAlternateCropHandles = isSmallCropX || isSmallCropY\n\n\tconst showHandles = showResizeHandles || showCropHandles\n\tconst hideRotateCornerHandles = !showCornerRotateHandles\n\tconst hideMobileRotateHandle = !shouldDisplayControls || !showMobileRotateHandle\n\tconst hideTopLeftCorner = !shouldDisplayControls || !showHandles\n\tconst hideTopRightCorner = !shouldDisplayControls || !showHandles || hideAlternateCornerHandles\n\tconst hideBottomLeftCorner = !shouldDisplayControls || !showHandles || hideAlternateCornerHandles\n\tconst hideBottomRightCorner =\n\t\t!shouldDisplayControls || !showHandles || (showOnlyOneHandle && !showCropHandles)\n\n\t// If we're showing crop handles, then show the edges too.\n\t// If we're showing resize handles, then show the edges only\n\t// if we're not hiding them for some other reason.\n\tlet hideVerticalEdgeTargets = true\n\t// The same logic above applies here, except another nuance is that\n\t// we enable resizing for text on mobile (coarse).\n\tlet hideHorizontalEdgeTargets = true\n\n\tif (showCropHandles) {\n\t\thideVerticalEdgeTargets = hideAlternateCropHandles\n\t\thideHorizontalEdgeTargets = hideAlternateCropHandles\n\t} else if (showResizeHandles) {\n\t\thideVerticalEdgeTargets = hideAlternateCornerHandles || showOnlyOneHandle || isCoarsePointer\n\t\tconst isMobileAndTextShape = isCoarsePointer && onlyShape && onlyShape.type === 'text'\n\t\thideHorizontalEdgeTargets = hideVerticalEdgeTargets && !isMobileAndTextShape\n\t}\n\n\tconst textHandleHeight = Math.min(24 / zoom, height - targetSizeY * 3)\n\tconst showTextResizeHandles =\n\t\tshouldDisplayControls &&\n\t\tisCoarsePointer &&\n\t\tonlyShape &&\n\t\teditor.isShapeOfType(onlyShape, 'text') &&\n\t\ttextHandleHeight * zoom >= 4\n\tconst isMediaShape =\n\t\tonlyShape &&\n\t\t(editor.isShapeOfType(onlyShape, 'image') || editor.isShapeOfType(onlyShape, 'video'))\n\n\treturn (\n\t\t<svg\n\t\t\tclassName=\"tl-overlays__item tl-selection__fg\"\n\t\t\tdata-testid=\"selection-foreground\"\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<g ref={rSvg}>\n\t\t\t\t{shouldDisplayBox && (\n\t\t\t\t\t<rect\n\t\t\t\t\t\tclassName=\"tl-selection__fg__outline\"\n\t\t\t\t\t\twidth={toDomPrecision(width)}\n\t\t\t\t\t\theight={toDomPrecision(height)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<RotateCornerHandle\n\t\t\t\t\tdata-testid=\"selection.rotate.top-left\"\n\t\t\t\t\tcx={0}\n\t\t\t\t\tcy={0}\n\t\t\t\t\ttargetSize={targetSize}\n\t\t\t\t\tcorner=\"top_left_rotate\"\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('nwse-rotate', rotation) : undefined}\n\t\t\t\t\tisHidden={hideRotateCornerHandles}\n\t\t\t\t/>\n\t\t\t\t<RotateCornerHandle\n\t\t\t\t\tdata-testid=\"selection.rotate.top-right\"\n\t\t\t\t\tcx={width + targetSize * 3}\n\t\t\t\t\tcy={0}\n\t\t\t\t\ttargetSize={targetSize}\n\t\t\t\t\tcorner=\"top_right_rotate\"\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('nesw-rotate', rotation) : undefined}\n\t\t\t\t\tisHidden={hideRotateCornerHandles}\n\t\t\t\t/>\n\t\t\t\t<RotateCornerHandle\n\t\t\t\t\tdata-testid=\"selection.rotate.bottom-left\"\n\t\t\t\t\tcx={0}\n\t\t\t\t\tcy={height + targetSize * 3}\n\t\t\t\t\ttargetSize={targetSize}\n\t\t\t\t\tcorner=\"bottom_left_rotate\"\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('swne-rotate', rotation) : undefined}\n\t\t\t\t\tisHidden={hideRotateCornerHandles}\n\t\t\t\t/>\n\t\t\t\t<RotateCornerHandle\n\t\t\t\t\tdata-testid=\"selection.rotate.bottom-right\"\n\t\t\t\t\tcx={width + targetSize * 3}\n\t\t\t\t\tcy={height + targetSize * 3}\n\t\t\t\t\ttargetSize={targetSize}\n\t\t\t\t\tcorner=\"bottom_right_rotate\"\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('senw-rotate', rotation) : undefined}\n\t\t\t\t\tisHidden={hideRotateCornerHandles}\n\t\t\t\t/>\n\t\t\t\t<MobileRotateHandle\n\t\t\t\t\tdata-testid=\"selection.rotate.mobile\"\n\t\t\t\t\tcx={isSmallX ? -targetSize * 1.5 : width / 2}\n\t\t\t\t\tcy={\n\t\t\t\t\t\tisSmallX\n\t\t\t\t\t\t\t? height / 2\n\t\t\t\t\t\t\t: isMediaShape && !isShapeTooCloseToContextualToolbar\n\t\t\t\t\t\t\t\t? height + targetSize * 1.5\n\t\t\t\t\t\t\t\t: -targetSize * 1.5\n\t\t\t\t\t}\n\t\t\t\t\tsize={size}\n\t\t\t\t\tisHidden={hideMobileRotateHandle}\n\t\t\t\t/>\n\t\t\t\t{/* Targets */}\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideVerticalEdgeTargets}\n\t\t\t\t\tdataTestId=\"selection.resize.top\"\n\t\t\t\t\tariaLabel={msg('handle.resize-top')}\n\t\t\t\t\tx={0}\n\t\t\t\t\ty={toDomPrecision(0 - (isSmallY ? targetSizeY * 2 : targetSizeY))}\n\t\t\t\t\twidth={toDomPrecision(width)}\n\t\t\t\t\theight={toDomPrecision(Math.max(1, targetSizeY * 2))}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('ns-resize', rotation) : undefined}\n\t\t\t\t\tevents={topEvents}\n\t\t\t\t/>\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideHorizontalEdgeTargets}\n\t\t\t\t\tdataTestId=\"selection.resize.right\"\n\t\t\t\t\tariaLabel={msg('handle.resize-right')}\n\t\t\t\t\tx={toDomPrecision(width - (isSmallX ? 0 : targetSizeX))}\n\t\t\t\t\ty={0}\n\t\t\t\t\theight={toDomPrecision(height)}\n\t\t\t\t\twidth={toDomPrecision(Math.max(1, targetSizeX * 2))}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('ew-resize', rotation) : undefined}\n\t\t\t\t\tevents={rightEvents}\n\t\t\t\t/>\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideVerticalEdgeTargets}\n\t\t\t\t\tdataTestId=\"selection.resize.bottom\"\n\t\t\t\t\tariaLabel={msg('handle.resize-bottom')}\n\t\t\t\t\tx={0}\n\t\t\t\t\ty={toDomPrecision(height - (isSmallY ? 0 : targetSizeY))}\n\t\t\t\t\twidth={toDomPrecision(width)}\n\t\t\t\t\theight={toDomPrecision(Math.max(1, targetSizeY * 2))}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('ns-resize', rotation) : undefined}\n\t\t\t\t\tevents={bottomEvents}\n\t\t\t\t/>\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideHorizontalEdgeTargets}\n\t\t\t\t\tdataTestId=\"selection.resize.left\"\n\t\t\t\t\tariaLabel={msg('handle.resize-left')}\n\t\t\t\t\tx={toDomPrecision(0 - (isSmallX ? targetSizeX * 2 : targetSizeX))}\n\t\t\t\t\ty={0}\n\t\t\t\t\theight={toDomPrecision(height)}\n\t\t\t\t\twidth={toDomPrecision(Math.max(1, targetSizeX * 2))}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('ew-resize', rotation) : undefined}\n\t\t\t\t\tevents={leftEvents}\n\t\t\t\t/>\n\t\t\t\t{/* Corner Targets */}\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideTopLeftCorner}\n\t\t\t\t\tdataTestId=\"selection.target.top-left\"\n\t\t\t\t\tariaLabel={msg('handle.resize-top-left')}\n\t\t\t\t\tx={toDomPrecision(0 - (isSmallX ? targetSizeX * 2 : targetSizeX * 1.5))}\n\t\t\t\t\ty={toDomPrecision(0 - (isSmallY ? targetSizeY * 2 : targetSizeY * 1.5))}\n\t\t\t\t\twidth={toDomPrecision(targetSizeX * 3)}\n\t\t\t\t\theight={toDomPrecision(targetSizeY * 3)}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('nwse-resize', rotation) : undefined}\n\t\t\t\t\tevents={topLeftEvents}\n\t\t\t\t/>\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideTopRightCorner}\n\t\t\t\t\tdataTestId=\"selection.target.top-right\"\n\t\t\t\t\tariaLabel={msg('handle.resize-top-right')}\n\t\t\t\t\tx={toDomPrecision(width - (isSmallX ? 0 : targetSizeX * 1.5))}\n\t\t\t\t\ty={toDomPrecision(0 - (isSmallY ? targetSizeY * 2 : targetSizeY * 1.5))}\n\t\t\t\t\twidth={toDomPrecision(targetSizeX * 3)}\n\t\t\t\t\theight={toDomPrecision(targetSizeY * 3)}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('nesw-resize', rotation) : undefined}\n\t\t\t\t\tevents={topRightEvents}\n\t\t\t\t/>\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideBottomRightCorner}\n\t\t\t\t\tdataTestId=\"selection.target.bottom-right\"\n\t\t\t\t\tariaLabel={msg('handle.resize-bottom-right')}\n\t\t\t\t\tx={toDomPrecision(width - (isSmallX ? targetSizeX : targetSizeX * 1.5))}\n\t\t\t\t\ty={toDomPrecision(height - (isSmallY ? targetSizeY : targetSizeY * 1.5))}\n\t\t\t\t\twidth={toDomPrecision(targetSizeX * 3)}\n\t\t\t\t\theight={toDomPrecision(targetSizeY * 3)}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('nwse-resize', rotation) : undefined}\n\t\t\t\t\tevents={bottomRightEvents}\n\t\t\t\t/>\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideBottomLeftCorner}\n\t\t\t\t\tdataTestId=\"selection.target.bottom-left\"\n\t\t\t\t\tariaLabel={msg('handle.resize-bottom-left')}\n\t\t\t\t\tx={toDomPrecision(0 - (isSmallX ? targetSizeX * 3 : targetSizeX * 1.5))}\n\t\t\t\t\ty={toDomPrecision(height - (isSmallY ? 0 : targetSizeY * 1.5))}\n\t\t\t\t\twidth={toDomPrecision(targetSizeX * 3)}\n\t\t\t\t\theight={toDomPrecision(targetSizeY * 3)}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('nesw-resize', rotation) : undefined}\n\t\t\t\t\tevents={bottomLeftEvents}\n\t\t\t\t/>\n\t\t\t\t{/* Resize Handles */}\n\t\t\t\t{showResizeHandles && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\tdata-testid=\"selection.resize.top-left\"\n\t\t\t\t\t\t\tclassName={classNames('tl-corner-handle', {\n\t\t\t\t\t\t\t\t'tl-hidden': hideTopLeftCorner,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tx={toDomPrecision(0 - size / 2)}\n\t\t\t\t\t\t\ty={toDomPrecision(0 - size / 2)}\n\t\t\t\t\t\t\twidth={toDomPrecision(size)}\n\t\t\t\t\t\t\theight={toDomPrecision(size)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\tdata-testid=\"selection.resize.top-right\"\n\t\t\t\t\t\t\tclassName={classNames('tl-corner-handle', {\n\t\t\t\t\t\t\t\t'tl-hidden': hideTopRightCorner,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tx={toDomPrecision(width - size / 2)}\n\t\t\t\t\t\t\ty={toDomPrecision(0 - size / 2)}\n\t\t\t\t\t\t\twidth={toDomPrecision(size)}\n\t\t\t\t\t\t\theight={toDomPrecision(size)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\tdata-testid=\"selection.resize.bottom-right\"\n\t\t\t\t\t\t\tclassName={classNames('tl-corner-handle', {\n\t\t\t\t\t\t\t\t'tl-hidden': hideBottomRightCorner,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tx={toDomPrecision(width - size / 2)}\n\t\t\t\t\t\t\ty={toDomPrecision(height - size / 2)}\n\t\t\t\t\t\t\twidth={toDomPrecision(size)}\n\t\t\t\t\t\t\theight={toDomPrecision(size)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\tdata-testid=\"selection.resize.bottom-left\"\n\t\t\t\t\t\t\tclassName={classNames('tl-corner-handle', {\n\t\t\t\t\t\t\t\t'tl-hidden': hideBottomLeftCorner,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tx={toDomPrecision(0 - size / 2)}\n\t\t\t\t\t\t\ty={toDomPrecision(height - size / 2)}\n\t\t\t\t\t\t\twidth={toDomPrecision(size)}\n\t\t\t\t\t\t\theight={toDomPrecision(size)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t\t{showTextResizeHandles && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\tdata-testid=\"selection.text-resize.left.handle\"\n\t\t\t\t\t\t\tclassName=\"tl-text-handle\"\n\t\t\t\t\t\t\tx={toDomPrecision(0 - size / 4)}\n\t\t\t\t\t\t\ty={toDomPrecision(height / 2 - textHandleHeight / 2)}\n\t\t\t\t\t\t\trx={size / 4}\n\t\t\t\t\t\t\twidth={toDomPrecision(size / 2)}\n\t\t\t\t\t\t\theight={toDomPrecision(textHandleHeight)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\tdata-testid=\"selection.text-resize.right.handle\"\n\t\t\t\t\t\t\tclassName=\"tl-text-handle\"\n\t\t\t\t\t\t\trx={size / 4}\n\t\t\t\t\t\t\tx={toDomPrecision(width - size / 4)}\n\t\t\t\t\t\t\ty={toDomPrecision(height / 2 - textHandleHeight / 2)}\n\t\t\t\t\t\t\twidth={toDomPrecision(size / 2)}\n\t\t\t\t\t\t\theight={toDomPrecision(textHandleHeight)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t\t{/* Crop Handles */}\n\t\t\t\t{showCropHandles && (\n\t\t\t\t\t<TldrawCropHandles\n\t\t\t\t\t\t{...{\n\t\t\t\t\t\t\tsize,\n\t\t\t\t\t\t\twidth,\n\t\t\t\t\t\t\theight,\n\t\t\t\t\t\t\thideAlternateHandles: hideAlternateCropHandles,\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</g>\n\t\t</svg>\n\t)\n})\n\nexport const ResizeHandle = function ResizeHandle({\n\thide,\n\tdataTestId,\n\tariaLabel,\n\tx,\n\ty,\n\twidth,\n\theight,\n\tcursor,\n\tevents,\n}: {\n\thide: boolean\n\tdataTestId: string\n\tariaLabel: string\n\tx: number\n\ty: number\n\twidth: number\n\theight: number\n\tcursor?: string\n\tevents: {\n\t\tonPointerUp: PointerEventHandler<Element>\n\t\tonPointerMove(e: React.PointerEvent<Element>): void\n\t\tonPointerDown: PointerEventHandler<Element>\n\t}\n}) {\n\treturn (\n\t\t<rect\n\t\t\tclassName={classNames('tl-resize-handle', 'tl-transparent', {\n\t\t\t\t'tl-hidden': hide,\n\t\t\t})}\n\t\t\tdata-testid={dataTestId}\n\t\t\trole=\"button\"\n\t\t\taria-label={ariaLabel}\n\t\t\tpointerEvents=\"all\"\n\t\t\tx={x}\n\t\t\ty={y}\n\t\t\twidth={width}\n\t\t\theight={height}\n\t\t\tcursor={cursor}\n\t\t\t{...events}\n\t\t/>\n\t)\n}\n\nexport const RotateCornerHandle = function RotateCornerHandle({\n\tcx,\n\tcy,\n\ttargetSize,\n\tcorner,\n\tcursor,\n\tisHidden,\n\t'data-testid': testId,\n}: {\n\tcx: number\n\tcy: number\n\ttargetSize: number\n\tcorner: RotateCorner\n\tcursor?: string\n\tisHidden: boolean\n\t'data-testid'?: string\n}) {\n\tconst events = useSelectionEvents(corner)\n\tconst msg = useTranslation()\n\tconst label = msg(`handle.rotate.${corner}`)\n\n\treturn (\n\t\t<rect\n\t\t\tclassName={classNames('tl-transparent', 'tl-rotate-corner', { 'tl-hidden': isHidden })}\n\t\t\tdata-testid={testId}\n\t\t\trole=\"button\"\n\t\t\taria-label={label}\n\t\t\tpointerEvents=\"all\"\n\t\t\tx={toDomPrecision(cx - targetSize * 3)}\n\t\t\ty={toDomPrecision(cy - targetSize * 3)}\n\t\t\twidth={toDomPrecision(Math.max(1, targetSize * 3))}\n\t\t\theight={toDomPrecision(Math.max(1, targetSize * 3))}\n\t\t\tcursor={cursor}\n\t\t\t{...events}\n\t\t/>\n\t)\n}\n\nconst SQUARE_ROOT_PI = Math.sqrt(Math.PI)\n\nexport const MobileRotateHandle = function RotateHandle({\n\tcx,\n\tcy,\n\tsize,\n\tisHidden,\n\t'data-testid': testId,\n}: {\n\tcx: number\n\tcy: number\n\tsize: number\n\tisHidden: boolean\n\t'data-testid'?: string\n}) {\n\tconst events = useSelectionEvents('mobile_rotate')\n\n\tconst editor = useEditor()\n\tconst zoom = useValue('zoom level', () => editor.getZoomLevel(), [editor])\n\tconst bgRadius = Math.max(14 * (1 / zoom), 20 / Math.max(1, zoom))\n\tconst msg = useTranslation()\n\treturn (\n\t\t<g role=\"button\" aria-label={msg('handle.rotate.mobile_rotate')}>\n\t\t\t<circle\n\t\t\t\tdata-testid={testId}\n\t\t\t\tpointerEvents=\"all\"\n\t\t\t\tclassName={classNames('tl-transparent', 'tl-mobile-rotate__bg', { 'tl-hidden': isHidden })}\n\t\t\t\tcx={cx}\n\t\t\t\tcy={cy}\n\t\t\t\tr={bgRadius}\n\t\t\t\t{...events}\n\t\t\t/>\n\t\t\t<circle\n\t\t\t\tclassName={classNames('tl-mobile-rotate__fg', { 'tl-hidden': isHidden })}\n\t\t\t\tcx={cx}\n\t\t\t\tcy={cy}\n\t\t\t\tr={size / SQUARE_ROOT_PI}\n\t\t\t/>\n\t\t</g>\n\t)\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8MK;AA9ML,oBAaO;AACP,wBAAuB;AACvB,mBAA4C;AAC5C,yBAA4B;AAC5B,4BAA+B;AAC/B,+BAAkC;AAG3B,MAAM,gCAA4B,qBAAM,SAASA,2BAA0B;AAAA,EACjF;AAAA,EACA;AACD,GAA+B;AAC9B,QAAM,aAAS,yBAAU;AACzB,QAAM,UAAM,sCAAe;AAC3B,QAAM,WAAO,qBAAsB,IAAI;AAEvC,QAAM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C;AAAA;AAAA,QACA,eAAa;AAAA,QACb,eAAc;AAAA,QACd,eAAW,kBAAAA,SAAW,kBAAkB,wBAAwB,EAAE,aAAa,SAAS,CAAC;AAAA,QACzF;AAAA,QACA;AAAA,QACA,GAAG;AAAA,QACF,GAAG;AAAA;AAAA,IACL;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACA,eAAW,kBAAAA,SAAW,wBAAwB,EAAE,aAAa,SAAS,CAAC;AAAA,QACvE;AAAA,QACA;AAAA,QACA,GAAG,OAAO;AAAA;AAAA,IACX;AAAA,KACD;AAEF;",
4
+ "sourcesContent": ["import {\n\tBox,\n\tHALF_PI,\n\tRotateCorner,\n\tTLSelectionForegroundProps,\n\tgetCursor,\n\ttlenv,\n\ttoDomPrecision,\n\ttrack,\n\tuseEditor,\n\tuseSelectionEvents,\n\tuseTransform,\n\tuseValue,\n} from '@tldraw/editor'\nimport classNames from 'classnames'\nimport { PointerEventHandler, useRef } from 'react'\nimport { useReadonly } from '../ui/hooks/useReadonly'\nimport { useTranslation } from '../ui/hooks/useTranslation/useTranslation'\nimport { TldrawCropHandles } from './TldrawCropHandles'\n\n/** @public */\nexport const TldrawSelectionForeground = track(function TldrawSelectionForeground({\n\tbounds,\n\trotation,\n}: TLSelectionForegroundProps) {\n\tconst editor = useEditor()\n\tconst msg = useTranslation()\n\tconst rSvg = useRef<SVGSVGElement>(null)\n\n\tconst isReadonlyMode = useReadonly()\n\tconst topEvents = useSelectionEvents('top')\n\tconst rightEvents = useSelectionEvents('right')\n\tconst bottomEvents = useSelectionEvents('bottom')\n\tconst leftEvents = useSelectionEvents('left')\n\tconst topLeftEvents = useSelectionEvents('top_left')\n\tconst topRightEvents = useSelectionEvents('top_right')\n\tconst bottomRightEvents = useSelectionEvents('bottom_right')\n\tconst bottomLeftEvents = useSelectionEvents('bottom_left')\n\n\tconst isDefaultCursor = editor.getInstanceState().cursor.type === 'default'\n\tconst isCoarsePointer = editor.getInstanceState().isCoarsePointer\n\n\tconst onlyShape = editor.getOnlySelectedShape()\n\tconst isLockedShape = onlyShape && editor.isShapeOrAncestorLocked(onlyShape)\n\n\t// if all shapes have an expandBy for the selection outline, we can expand by the l\n\tconst expandOutlineBy = onlyShape\n\t\t? editor.getShapeUtil(onlyShape).expandSelectionOutlinePx(onlyShape)\n\t\t: 0\n\n\tconst expandedBounds =\n\t\texpandOutlineBy instanceof Box\n\t\t\t? bounds.clone().expand(expandOutlineBy).zeroFix()\n\t\t\t: bounds.clone().expandBy(expandOutlineBy).zeroFix()\n\n\tconst selectionRotation = editor.getSelectionRotation()\n\tconst isShapeTooCloseToContextualToolbar =\n\t\tselectionRotation / HALF_PI > 1.6 && selectionRotation / HALF_PI < 2.4\n\tuseTransform(rSvg, bounds?.x, bounds?.y, 1, selectionRotation, {\n\t\tx: expandedBounds.x - bounds.x,\n\t\ty: expandedBounds.y - bounds.y,\n\t})\n\n\tif (onlyShape && editor.isShapeHidden(onlyShape)) return null\n\n\tconst zoom = editor.getEfficientZoomLevel()\n\tconst isChangingStyle = editor.getInstanceState().isChangingStyle\n\n\tconst width = expandedBounds.width\n\tconst height = expandedBounds.height\n\n\tconst size = 8 / zoom\n\tconst isTinyX = width < size * 2\n\tconst isTinyY = height < size * 2\n\n\tconst isSmallX = width < size * 4\n\tconst isSmallY = height < size * 4\n\tconst isSmallCropX = width < size * 5\n\tconst isSmallCropY = height < size * 5\n\n\tconst mobileHandleMultiplier = isCoarsePointer ? 1.75 : 1\n\tconst targetSize = (6 / zoom) * mobileHandleMultiplier\n\n\tconst targetSizeX = (isSmallX ? targetSize / 2 : targetSize) * (mobileHandleMultiplier * 0.75)\n\tconst targetSizeY = (isSmallY ? targetSize / 2 : targetSize) * (mobileHandleMultiplier * 0.75)\n\n\tconst showSelectionBounds =\n\t\t(onlyShape ? !editor.getShapeUtil(onlyShape).hideSelectionBoundsFg(onlyShape) : true) &&\n\t\t!isChangingStyle\n\n\tlet shouldDisplayBox =\n\t\t(showSelectionBounds &&\n\t\t\teditor.isInAny(\n\t\t\t\t'select.idle',\n\t\t\t\t'select.brushing',\n\t\t\t\t'select.scribble_brushing',\n\t\t\t\t'select.pointing_canvas',\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\t'select.crop.pointing_crop',\n\t\t\t\t'select.crop.pointing_crop_handle',\n\t\t\t\t'select.pointing_resize_handle'\n\t\t\t)) ||\n\t\t(showSelectionBounds &&\n\t\t\teditor.isIn('select.resizing') &&\n\t\t\tonlyShape &&\n\t\t\teditor.isShapeOfType(onlyShape, 'text'))\n\n\tif (onlyShape && shouldDisplayBox) {\n\t\tif (tlenv.isFirefox && editor.isShapeOfType(onlyShape, 'embed')) {\n\t\t\tshouldDisplayBox = false\n\t\t}\n\t}\n\n\tconst showCropHandles =\n\t\teditor.isInAny(\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\t!isChangingStyle &&\n\t\t!isReadonlyMode\n\n\tconst shouldDisplayControls =\n\t\teditor.isInAny(\n\t\t\t'select.idle',\n\t\t\t'select.pointing_selection',\n\t\t\t'select.pointing_shape',\n\t\t\t'select.crop.idle'\n\t\t) &&\n\t\t!isChangingStyle &&\n\t\t!isReadonlyMode\n\n\tconst showCornerRotateHandles =\n\t\t!isCoarsePointer &&\n\t\t!(isTinyX || isTinyY) &&\n\t\t(shouldDisplayControls || showCropHandles) &&\n\t\t(onlyShape ? !editor.getShapeUtil(onlyShape).hideRotateHandle(onlyShape) : true) &&\n\t\t!isLockedShape\n\n\tconst showMobileRotateHandle =\n\t\tisCoarsePointer &&\n\t\t(!isSmallX || !isSmallY) &&\n\t\t(shouldDisplayControls || showCropHandles) &&\n\t\t(onlyShape ? !editor.getShapeUtil(onlyShape).hideRotateHandle(onlyShape) : true) &&\n\t\t!isLockedShape\n\n\tconst showResizeHandles =\n\t\tshouldDisplayControls &&\n\t\t(onlyShape\n\t\t\t? editor.getShapeUtil(onlyShape).canResize(onlyShape) &&\n\t\t\t\t!editor.getShapeUtil(onlyShape).hideResizeHandles(onlyShape)\n\t\t\t: true) &&\n\t\t!showCropHandles &&\n\t\t!isLockedShape\n\n\tconst hideAlternateCornerHandles = isTinyX || isTinyY\n\tconst showOnlyOneHandle = isTinyX && isTinyY\n\tconst hideAlternateCropHandles = isSmallCropX || isSmallCropY\n\n\tconst showHandles = showResizeHandles || showCropHandles\n\tconst hideRotateCornerHandles = !showCornerRotateHandles\n\tconst hideMobileRotateHandle = !shouldDisplayControls || !showMobileRotateHandle\n\tconst hideTopLeftCorner = !shouldDisplayControls || !showHandles\n\tconst hideTopRightCorner = !shouldDisplayControls || !showHandles || hideAlternateCornerHandles\n\tconst hideBottomLeftCorner = !shouldDisplayControls || !showHandles || hideAlternateCornerHandles\n\tconst hideBottomRightCorner =\n\t\t!shouldDisplayControls || !showHandles || (showOnlyOneHandle && !showCropHandles)\n\n\t// If we're showing crop handles, then show the edges too.\n\t// If we're showing resize handles, then show the edges only\n\t// if we're not hiding them for some other reason.\n\tlet hideVerticalEdgeTargets = true\n\t// The same logic above applies here, except another nuance is that\n\t// we enable resizing for text on mobile (coarse).\n\tlet hideHorizontalEdgeTargets = true\n\n\tif (showCropHandles) {\n\t\thideVerticalEdgeTargets = hideAlternateCropHandles\n\t\thideHorizontalEdgeTargets = hideAlternateCropHandles\n\t} else if (showResizeHandles) {\n\t\thideVerticalEdgeTargets = hideAlternateCornerHandles || showOnlyOneHandle || isCoarsePointer\n\t\tconst isMobileAndTextShape = isCoarsePointer && onlyShape && onlyShape.type === 'text'\n\t\thideHorizontalEdgeTargets = hideVerticalEdgeTargets && !isMobileAndTextShape\n\t}\n\n\tconst textHandleHeight = Math.min(24 / zoom, height - targetSizeY * 3)\n\tconst showTextResizeHandles =\n\t\tshouldDisplayControls &&\n\t\tisCoarsePointer &&\n\t\tonlyShape &&\n\t\teditor.isShapeOfType(onlyShape, 'text') &&\n\t\ttextHandleHeight * zoom >= 4\n\tconst isMediaShape =\n\t\tonlyShape &&\n\t\t(editor.isShapeOfType(onlyShape, 'image') || editor.isShapeOfType(onlyShape, 'video'))\n\n\treturn (\n\t\t<svg\n\t\t\tclassName=\"tl-overlays__item tl-selection__fg\"\n\t\t\tdata-testid=\"selection-foreground\"\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<g ref={rSvg}>\n\t\t\t\t{shouldDisplayBox && (\n\t\t\t\t\t<rect\n\t\t\t\t\t\tclassName=\"tl-selection__fg__outline\"\n\t\t\t\t\t\twidth={toDomPrecision(width)}\n\t\t\t\t\t\theight={toDomPrecision(height)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<RotateCornerHandle\n\t\t\t\t\tdata-testid=\"selection.rotate.top-left\"\n\t\t\t\t\tcx={0}\n\t\t\t\t\tcy={0}\n\t\t\t\t\ttargetSize={targetSize}\n\t\t\t\t\tcorner=\"top_left_rotate\"\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('nwse-rotate', rotation) : undefined}\n\t\t\t\t\tisHidden={hideRotateCornerHandles}\n\t\t\t\t/>\n\t\t\t\t<RotateCornerHandle\n\t\t\t\t\tdata-testid=\"selection.rotate.top-right\"\n\t\t\t\t\tcx={width + targetSize * 3}\n\t\t\t\t\tcy={0}\n\t\t\t\t\ttargetSize={targetSize}\n\t\t\t\t\tcorner=\"top_right_rotate\"\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('nesw-rotate', rotation) : undefined}\n\t\t\t\t\tisHidden={hideRotateCornerHandles}\n\t\t\t\t/>\n\t\t\t\t<RotateCornerHandle\n\t\t\t\t\tdata-testid=\"selection.rotate.bottom-left\"\n\t\t\t\t\tcx={0}\n\t\t\t\t\tcy={height + targetSize * 3}\n\t\t\t\t\ttargetSize={targetSize}\n\t\t\t\t\tcorner=\"bottom_left_rotate\"\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('swne-rotate', rotation) : undefined}\n\t\t\t\t\tisHidden={hideRotateCornerHandles}\n\t\t\t\t/>\n\t\t\t\t<RotateCornerHandle\n\t\t\t\t\tdata-testid=\"selection.rotate.bottom-right\"\n\t\t\t\t\tcx={width + targetSize * 3}\n\t\t\t\t\tcy={height + targetSize * 3}\n\t\t\t\t\ttargetSize={targetSize}\n\t\t\t\t\tcorner=\"bottom_right_rotate\"\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('senw-rotate', rotation) : undefined}\n\t\t\t\t\tisHidden={hideRotateCornerHandles}\n\t\t\t\t/>\n\t\t\t\t<MobileRotateHandle\n\t\t\t\t\tdata-testid=\"selection.rotate.mobile\"\n\t\t\t\t\tcx={isSmallX ? -targetSize * 1.5 : width / 2}\n\t\t\t\t\tcy={\n\t\t\t\t\t\tisSmallX\n\t\t\t\t\t\t\t? height / 2\n\t\t\t\t\t\t\t: isMediaShape && !isShapeTooCloseToContextualToolbar\n\t\t\t\t\t\t\t\t? height + targetSize * 1.5\n\t\t\t\t\t\t\t\t: -targetSize * 1.5\n\t\t\t\t\t}\n\t\t\t\t\tsize={size}\n\t\t\t\t\tisHidden={hideMobileRotateHandle}\n\t\t\t\t/>\n\t\t\t\t{/* Targets */}\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideVerticalEdgeTargets}\n\t\t\t\t\tdataTestId=\"selection.resize.top\"\n\t\t\t\t\tariaLabel={msg('handle.resize-top')}\n\t\t\t\t\tx={0}\n\t\t\t\t\ty={toDomPrecision(0 - (isSmallY ? targetSizeY * 2 : targetSizeY))}\n\t\t\t\t\twidth={toDomPrecision(width)}\n\t\t\t\t\theight={toDomPrecision(Math.max(1, targetSizeY * 2))}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('ns-resize', rotation) : undefined}\n\t\t\t\t\tevents={topEvents}\n\t\t\t\t/>\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideHorizontalEdgeTargets}\n\t\t\t\t\tdataTestId=\"selection.resize.right\"\n\t\t\t\t\tariaLabel={msg('handle.resize-right')}\n\t\t\t\t\tx={toDomPrecision(width - (isSmallX ? 0 : targetSizeX))}\n\t\t\t\t\ty={0}\n\t\t\t\t\theight={toDomPrecision(height)}\n\t\t\t\t\twidth={toDomPrecision(Math.max(1, targetSizeX * 2))}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('ew-resize', rotation) : undefined}\n\t\t\t\t\tevents={rightEvents}\n\t\t\t\t/>\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideVerticalEdgeTargets}\n\t\t\t\t\tdataTestId=\"selection.resize.bottom\"\n\t\t\t\t\tariaLabel={msg('handle.resize-bottom')}\n\t\t\t\t\tx={0}\n\t\t\t\t\ty={toDomPrecision(height - (isSmallY ? 0 : targetSizeY))}\n\t\t\t\t\twidth={toDomPrecision(width)}\n\t\t\t\t\theight={toDomPrecision(Math.max(1, targetSizeY * 2))}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('ns-resize', rotation) : undefined}\n\t\t\t\t\tevents={bottomEvents}\n\t\t\t\t/>\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideHorizontalEdgeTargets}\n\t\t\t\t\tdataTestId=\"selection.resize.left\"\n\t\t\t\t\tariaLabel={msg('handle.resize-left')}\n\t\t\t\t\tx={toDomPrecision(0 - (isSmallX ? targetSizeX * 2 : targetSizeX))}\n\t\t\t\t\ty={0}\n\t\t\t\t\theight={toDomPrecision(height)}\n\t\t\t\t\twidth={toDomPrecision(Math.max(1, targetSizeX * 2))}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('ew-resize', rotation) : undefined}\n\t\t\t\t\tevents={leftEvents}\n\t\t\t\t/>\n\t\t\t\t{/* Corner Targets */}\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideTopLeftCorner}\n\t\t\t\t\tdataTestId=\"selection.target.top-left\"\n\t\t\t\t\tariaLabel={msg('handle.resize-top-left')}\n\t\t\t\t\tx={toDomPrecision(0 - (isSmallX ? targetSizeX * 2 : targetSizeX * 1.5))}\n\t\t\t\t\ty={toDomPrecision(0 - (isSmallY ? targetSizeY * 2 : targetSizeY * 1.5))}\n\t\t\t\t\twidth={toDomPrecision(targetSizeX * 3)}\n\t\t\t\t\theight={toDomPrecision(targetSizeY * 3)}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('nwse-resize', rotation) : undefined}\n\t\t\t\t\tevents={topLeftEvents}\n\t\t\t\t/>\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideTopRightCorner}\n\t\t\t\t\tdataTestId=\"selection.target.top-right\"\n\t\t\t\t\tariaLabel={msg('handle.resize-top-right')}\n\t\t\t\t\tx={toDomPrecision(width - (isSmallX ? 0 : targetSizeX * 1.5))}\n\t\t\t\t\ty={toDomPrecision(0 - (isSmallY ? targetSizeY * 2 : targetSizeY * 1.5))}\n\t\t\t\t\twidth={toDomPrecision(targetSizeX * 3)}\n\t\t\t\t\theight={toDomPrecision(targetSizeY * 3)}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('nesw-resize', rotation) : undefined}\n\t\t\t\t\tevents={topRightEvents}\n\t\t\t\t/>\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideBottomRightCorner}\n\t\t\t\t\tdataTestId=\"selection.target.bottom-right\"\n\t\t\t\t\tariaLabel={msg('handle.resize-bottom-right')}\n\t\t\t\t\tx={toDomPrecision(width - (isSmallX ? targetSizeX : targetSizeX * 1.5))}\n\t\t\t\t\ty={toDomPrecision(height - (isSmallY ? targetSizeY : targetSizeY * 1.5))}\n\t\t\t\t\twidth={toDomPrecision(targetSizeX * 3)}\n\t\t\t\t\theight={toDomPrecision(targetSizeY * 3)}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('nwse-resize', rotation) : undefined}\n\t\t\t\t\tevents={bottomRightEvents}\n\t\t\t\t/>\n\t\t\t\t<ResizeHandle\n\t\t\t\t\thide={hideBottomLeftCorner}\n\t\t\t\t\tdataTestId=\"selection.target.bottom-left\"\n\t\t\t\t\tariaLabel={msg('handle.resize-bottom-left')}\n\t\t\t\t\tx={toDomPrecision(0 - (isSmallX ? targetSizeX * 3 : targetSizeX * 1.5))}\n\t\t\t\t\ty={toDomPrecision(height - (isSmallY ? 0 : targetSizeY * 1.5))}\n\t\t\t\t\twidth={toDomPrecision(targetSizeX * 3)}\n\t\t\t\t\theight={toDomPrecision(targetSizeY * 3)}\n\t\t\t\t\tcursor={isDefaultCursor ? getCursor('nesw-resize', rotation) : undefined}\n\t\t\t\t\tevents={bottomLeftEvents}\n\t\t\t\t/>\n\t\t\t\t{/* Resize Handles */}\n\t\t\t\t{showResizeHandles && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\tdata-testid=\"selection.resize.top-left\"\n\t\t\t\t\t\t\tclassName={classNames('tl-corner-handle', {\n\t\t\t\t\t\t\t\t'tl-hidden': hideTopLeftCorner,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tx={toDomPrecision(0 - size / 2)}\n\t\t\t\t\t\t\ty={toDomPrecision(0 - size / 2)}\n\t\t\t\t\t\t\twidth={toDomPrecision(size)}\n\t\t\t\t\t\t\theight={toDomPrecision(size)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\tdata-testid=\"selection.resize.top-right\"\n\t\t\t\t\t\t\tclassName={classNames('tl-corner-handle', {\n\t\t\t\t\t\t\t\t'tl-hidden': hideTopRightCorner,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tx={toDomPrecision(width - size / 2)}\n\t\t\t\t\t\t\ty={toDomPrecision(0 - size / 2)}\n\t\t\t\t\t\t\twidth={toDomPrecision(size)}\n\t\t\t\t\t\t\theight={toDomPrecision(size)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\tdata-testid=\"selection.resize.bottom-right\"\n\t\t\t\t\t\t\tclassName={classNames('tl-corner-handle', {\n\t\t\t\t\t\t\t\t'tl-hidden': hideBottomRightCorner,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tx={toDomPrecision(width - size / 2)}\n\t\t\t\t\t\t\ty={toDomPrecision(height - size / 2)}\n\t\t\t\t\t\t\twidth={toDomPrecision(size)}\n\t\t\t\t\t\t\theight={toDomPrecision(size)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\tdata-testid=\"selection.resize.bottom-left\"\n\t\t\t\t\t\t\tclassName={classNames('tl-corner-handle', {\n\t\t\t\t\t\t\t\t'tl-hidden': hideBottomLeftCorner,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tx={toDomPrecision(0 - size / 2)}\n\t\t\t\t\t\t\ty={toDomPrecision(height - size / 2)}\n\t\t\t\t\t\t\twidth={toDomPrecision(size)}\n\t\t\t\t\t\t\theight={toDomPrecision(size)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t\t{showTextResizeHandles && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\tdata-testid=\"selection.text-resize.left.handle\"\n\t\t\t\t\t\t\tclassName=\"tl-text-handle\"\n\t\t\t\t\t\t\tx={toDomPrecision(0 - size / 4)}\n\t\t\t\t\t\t\ty={toDomPrecision(height / 2 - textHandleHeight / 2)}\n\t\t\t\t\t\t\trx={size / 4}\n\t\t\t\t\t\t\twidth={toDomPrecision(size / 2)}\n\t\t\t\t\t\t\theight={toDomPrecision(textHandleHeight)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\tdata-testid=\"selection.text-resize.right.handle\"\n\t\t\t\t\t\t\tclassName=\"tl-text-handle\"\n\t\t\t\t\t\t\trx={size / 4}\n\t\t\t\t\t\t\tx={toDomPrecision(width - size / 4)}\n\t\t\t\t\t\t\ty={toDomPrecision(height / 2 - textHandleHeight / 2)}\n\t\t\t\t\t\t\twidth={toDomPrecision(size / 2)}\n\t\t\t\t\t\t\theight={toDomPrecision(textHandleHeight)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t\t{/* Crop Handles */}\n\t\t\t\t{showCropHandles && (\n\t\t\t\t\t<TldrawCropHandles\n\t\t\t\t\t\t{...{\n\t\t\t\t\t\t\tsize,\n\t\t\t\t\t\t\twidth,\n\t\t\t\t\t\t\theight,\n\t\t\t\t\t\t\thideAlternateHandles: hideAlternateCropHandles,\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</g>\n\t\t</svg>\n\t)\n})\n\nexport const ResizeHandle = function ResizeHandle({\n\thide,\n\tdataTestId,\n\tariaLabel,\n\tx,\n\ty,\n\twidth,\n\theight,\n\tcursor,\n\tevents,\n}: {\n\thide: boolean\n\tdataTestId: string\n\tariaLabel: string\n\tx: number\n\ty: number\n\twidth: number\n\theight: number\n\tcursor?: string\n\tevents: {\n\t\tonPointerUp: PointerEventHandler<Element>\n\t\tonPointerMove(e: React.PointerEvent<Element>): void\n\t\tonPointerDown: PointerEventHandler<Element>\n\t}\n}) {\n\treturn (\n\t\t<rect\n\t\t\tclassName={classNames('tl-resize-handle', 'tl-transparent', {\n\t\t\t\t'tl-hidden': hide,\n\t\t\t})}\n\t\t\tdata-testid={dataTestId}\n\t\t\trole=\"button\"\n\t\t\taria-label={ariaLabel}\n\t\t\tpointerEvents=\"all\"\n\t\t\tx={x}\n\t\t\ty={y}\n\t\t\twidth={width}\n\t\t\theight={height}\n\t\t\tcursor={cursor}\n\t\t\t{...events}\n\t\t/>\n\t)\n}\n\nexport const RotateCornerHandle = function RotateCornerHandle({\n\tcx,\n\tcy,\n\ttargetSize,\n\tcorner,\n\tcursor,\n\tisHidden,\n\t'data-testid': testId,\n}: {\n\tcx: number\n\tcy: number\n\ttargetSize: number\n\tcorner: RotateCorner\n\tcursor?: string\n\tisHidden: boolean\n\t'data-testid'?: string\n}) {\n\tconst events = useSelectionEvents(corner)\n\tconst msg = useTranslation()\n\tconst label = msg(`handle.rotate.${corner}`)\n\n\treturn (\n\t\t<rect\n\t\t\tclassName={classNames('tl-transparent', 'tl-rotate-corner', { 'tl-hidden': isHidden })}\n\t\t\tdata-testid={testId}\n\t\t\trole=\"button\"\n\t\t\taria-label={label}\n\t\t\tpointerEvents=\"all\"\n\t\t\tx={toDomPrecision(cx - targetSize * 3)}\n\t\t\ty={toDomPrecision(cy - targetSize * 3)}\n\t\t\twidth={toDomPrecision(Math.max(1, targetSize * 3))}\n\t\t\theight={toDomPrecision(Math.max(1, targetSize * 3))}\n\t\t\tcursor={cursor}\n\t\t\t{...events}\n\t\t/>\n\t)\n}\n\nconst SQUARE_ROOT_PI = Math.sqrt(Math.PI)\n\nexport const MobileRotateHandle = function RotateHandle({\n\tcx,\n\tcy,\n\tsize,\n\tisHidden,\n\t'data-testid': testId,\n}: {\n\tcx: number\n\tcy: number\n\tsize: number\n\tisHidden: boolean\n\t'data-testid'?: string\n}) {\n\tconst events = useSelectionEvents('mobile_rotate')\n\n\tconst editor = useEditor()\n\tconst zoom = useValue('zoom level', () => editor.getEfficientZoomLevel(), [editor])\n\tconst bgRadius = Math.max(14 * (1 / zoom), 20 / Math.max(1, zoom))\n\tconst msg = useTranslation()\n\treturn (\n\t\t<g role=\"button\" aria-label={msg('handle.rotate.mobile_rotate')}>\n\t\t\t<circle\n\t\t\t\tdata-testid={testId}\n\t\t\t\tpointerEvents=\"all\"\n\t\t\t\tclassName={classNames('tl-transparent', 'tl-mobile-rotate__bg', { 'tl-hidden': isHidden })}\n\t\t\t\tcx={cx}\n\t\t\t\tcy={cy}\n\t\t\t\tr={bgRadius}\n\t\t\t\t{...events}\n\t\t\t/>\n\t\t\t<circle\n\t\t\t\tclassName={classNames('tl-mobile-rotate__fg', { 'tl-hidden': isHidden })}\n\t\t\t\tcx={cx}\n\t\t\t\tcy={cy}\n\t\t\t\tr={size / SQUARE_ROOT_PI}\n\t\t\t/>\n\t\t</g>\n\t)\n}\n"],
5
+ "mappings":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AA,EACA;AAAA,EACA,eAAe;AAChB,GAMG;AACF,QAAM,aAAS,kCAAmB,eAAe;AAEjD,QAAM,aAAS,yBAAU;AACzB,QAAM,WAAO,wBAAS,cAAc,MAAM,OAAO,sBAAsB,GAAG,CAAC,MAAM,CAAC;AAClF,QAAM,WAAW,KAAK,IAAI,MAAM,IAAI,OAAO,KAAK,KAAK,IAAI,GAAG,IAAI,CAAC;AACjE,QAAM,UAAM,sCAAe;AAC3B,SACC,6CAAC,OAAE,MAAK,UAAS,cAAY,IAAI,6BAA6B,GAC7D;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,eAAa;AAAA,QACb,eAAc;AAAA,QACd,eAAW,kBAAAA,SAAW,kBAAkB,wBAAwB,EAAE,aAAa,SAAS,CAAC;AAAA,QACzF;AAAA,QACA;AAAA,QACA,GAAG;AAAA,QACF,GAAG;AAAA;AAAA,IACL;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACA,eAAW,kBAAAA,SAAW,wBAAwB,EAAE,aAAa,SAAS,CAAC;AAAA,QACvE;AAAA,QACA;AAAA,QACA,GAAG,OAAO;AAAA;AAAA,IACX;AAAA,KACD;AAEF;",
6
6
  "names": ["TldrawSelectionForeground", "classNames", "ResizeHandle", "RotateCornerHandle"]
7
7
  }
@@ -33,6 +33,7 @@ var import_ShapeFill = require("../shared/ShapeFill");
33
33
  var import_default_shape_constants = require("../shared/default-shape-constants");
34
34
  var import_defaultStyleDefs = require("../shared/defaultStyleDefs");
35
35
  var import_useDefaultColorTheme = require("../shared/useDefaultColorTheme");
36
+ var import_useEfficientZoomThreshold = require("../shared/useEfficientZoomThreshold");
36
37
  var import_ArrowPath = require("./ArrowPath");
37
38
  var import_arrowLabel = require("./arrowLabel");
38
39
  var import_arrowTargetState = require("./arrowTargetState");
@@ -76,7 +77,8 @@ class ArrowShapeUtil extends import_editor.ShapeUtil {
76
77
  hoverPreciseTimeout: 600,
77
78
  pointingPreciseTimeout: 320,
78
79
  shouldBeExact: (editor) => editor.inputs.altKey,
79
- shouldIgnoreTargets: (editor) => editor.inputs.ctrlKey
80
+ shouldIgnoreTargets: (editor) => editor.inputs.ctrlKey,
81
+ showTextOutline: true
80
82
  };
81
83
  canEdit() {
82
84
  return true;
@@ -204,7 +206,7 @@ class ArrowShapeUtil extends import_editor.ShapeUtil {
204
206
  const shapePageTransform = this.editor.getShapePageTransform(shape.id);
205
207
  const segmentStart = shapePageTransform.applyToPoint(info.route.midpointHandle.segmentStart);
206
208
  const segmentEnd = shapePageTransform.applyToPoint(info.route.midpointHandle.segmentEnd);
207
- const segmentLength = import_editor.Vec.Dist(segmentStart, segmentEnd) * this.editor.getZoomLevel();
209
+ const segmentLength = import_editor.Vec.Dist(segmentStart, segmentEnd) * this.editor.getEfficientZoomLevel();
208
210
  if (segmentLength > this.options.elbowMinSegmentLengthToShowMidpointHandle) {
209
211
  handles.push({
210
212
  id: "middle" /* Middle */,
@@ -276,7 +278,7 @@ class ArrowShapeUtil extends import_editor.ShapeUtil {
276
278
  shapeToPageTransform.applyToPoint(axis.v(midRange.hi, 0)),
277
279
  angle
278
280
  );
279
- const maxSnapDistance = this.options.elbowMidpointSnapDistance / this.editor.getZoomLevel();
281
+ const maxSnapDistance = this.options.elbowMidpointSnapDistance / this.editor.getEfficientZoomLevel();
280
282
  const midPoint = (0, import_elbowArrowSnapLines.perpDistanceToLineAngle)(
281
283
  shapeToPageTransform.applyToPoint(axis.v((0, import_editor.lerp)(midRange.lo, midRange.hi, 0.5), 0)),
282
284
  angle
@@ -601,6 +603,7 @@ class ArrowShapeUtil extends import_editor.ShapeUtil {
601
603
  textWidth: labelPosition.box.w - import_default_shape_constants.ARROW_LABEL_PADDING * 2 * shape.props.scale,
602
604
  isSelected,
603
605
  padding: 0,
606
+ showTextOutline: this.options.showTextOutline,
604
607
  style: {
605
608
  transform: `translate(${labelPosition.box.center.x}px, ${labelPosition.box.center.y}px)`
606
609
  }
@@ -727,7 +730,7 @@ class ArrowShapeUtil extends import_editor.ShapeUtil {
727
730
  richText: shape.props.richText,
728
731
  bounds: (0, import_arrowLabel.getArrowLabelPosition)(this.editor, shape).box.clone().expandBy(-import_default_shape_constants.ARROW_LABEL_PADDING * shape.props.scale),
729
732
  padding: 0,
730
- showTextOutline: true
733
+ showTextOutline: this.options.showTextOutline
731
734
  }
732
735
  )
733
736
  ] });
@@ -773,13 +776,7 @@ const ArrowSvg = (0, import_editor.track)(function ArrowSvg2({
773
776
  const editor = (0, import_editor.useEditor)();
774
777
  const theme = (0, import_useDefaultColorTheme.useDefaultColorTheme)();
775
778
  const info = (0, import_shared.getArrowInfo)(editor, shape);
776
- const isForceSolid = (0, import_editor.useValue)(
777
- "force solid",
778
- () => {
779
- return editor.getZoomLevel() < 0.2;
780
- },
781
- [editor]
782
- );
779
+ const isForceSolid = (0, import_useEfficientZoomThreshold.useEfficientZoomThreshold)(shape.props.scale * 0.25);
783
780
  const clipPathId = (0, import_editor.useSharedSafeId)(shape.id + "_clip");
784
781
  const arrowheadDotId = (0, import_editor.useSharedSafeId)("arrowhead-dot");
785
782
  const arrowheadCrossId = (0, import_editor.useSharedSafeId)("arrowhead-cross");
@@ -800,7 +797,7 @@ const ArrowSvg = (0, import_editor.track)(function ArrowSvg2({
800
797
  start: "skip",
801
798
  end: "skip",
802
799
  lengthRatio: 2.5,
803
- strokeWidth: 2 / editor.getZoomLevel(),
800
+ strokeWidth: 2 / editor.getEfficientZoomLevel(),
804
801
  props: {
805
802
  className: "tl-arrow-hint",
806
803
  markerStart: bindings.start ? bindings.start.props.isExact ? "" : bindings.start.props.isPrecise ? `url(#${arrowheadCrossId})` : `url(#${arrowheadDotId})` : "",