tldraw 4.1.1 → 4.2.0-next.d76c345101d5

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 (111) hide show
  1. package/dist-cjs/index.d.ts +15 -11
  2. package/dist-cjs/index.js +3 -1
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/defaultEmbedDefinitions.js +2 -25
  5. package/dist-cjs/lib/defaultEmbedDefinitions.js.map +2 -2
  6. package/dist-cjs/lib/defaultExternalContentHandlers.js +8 -31
  7. package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
  8. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +31 -101
  9. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
  10. package/dist-cjs/lib/shapes/bookmark/bookmarks.js +138 -0
  11. package/dist-cjs/lib/shapes/bookmark/bookmarks.js.map +7 -0
  12. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +25 -3
  13. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +2 -2
  14. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Cropping.js +20 -4
  15. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Cropping.js.map +2 -2
  16. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.js +23 -11
  17. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.js.map +2 -2
  18. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +18 -5
  19. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
  20. package/dist-cjs/lib/tools/SelectTool/childStates/PointingArrowLabel.js +21 -9
  21. package/dist-cjs/lib/tools/SelectTool/childStates/PointingArrowLabel.js.map +2 -2
  22. package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js +24 -8
  23. package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js.map +2 -2
  24. package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js +21 -9
  25. package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js.map +2 -2
  26. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +23 -8
  27. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +2 -2
  28. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +21 -9
  29. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +2 -2
  30. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +26 -11
  31. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +2 -2
  32. package/dist-cjs/lib/ui/components/DebugMenu/DefaultDebugMenuContent.js +2 -2
  33. package/dist-cjs/lib/ui/components/DebugMenu/DefaultDebugMenuContent.js.map +1 -1
  34. package/dist-cjs/lib/ui/components/menu-items.js +2 -2
  35. package/dist-cjs/lib/ui/components/menu-items.js.map +1 -1
  36. package/dist-cjs/lib/ui/context/actions.js +23 -29
  37. package/dist-cjs/lib/ui/context/actions.js.map +2 -2
  38. package/dist-cjs/lib/ui/hooks/useEditorEvents.js +1 -1
  39. package/dist-cjs/lib/ui/hooks/useEditorEvents.js.map +1 -1
  40. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +4 -4
  41. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +1 -1
  42. package/dist-cjs/lib/ui/version.js +3 -3
  43. package/dist-cjs/lib/ui/version.js.map +1 -1
  44. package/dist-esm/index.d.mts +15 -11
  45. package/dist-esm/index.mjs +3 -1
  46. package/dist-esm/index.mjs.map +2 -2
  47. package/dist-esm/lib/defaultEmbedDefinitions.mjs +2 -25
  48. package/dist-esm/lib/defaultEmbedDefinitions.mjs.map +2 -2
  49. package/dist-esm/lib/defaultExternalContentHandlers.mjs +8 -31
  50. package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
  51. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +34 -101
  52. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
  53. package/dist-esm/lib/shapes/bookmark/bookmarks.mjs +124 -0
  54. package/dist-esm/lib/shapes/bookmark/bookmarks.mjs.map +7 -0
  55. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +26 -3
  56. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +2 -2
  57. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Cropping.mjs +20 -4
  58. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Cropping.mjs.map +2 -2
  59. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.mjs +23 -11
  60. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.mjs.map +2 -2
  61. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +18 -5
  62. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
  63. package/dist-esm/lib/tools/SelectTool/childStates/PointingArrowLabel.mjs +21 -9
  64. package/dist-esm/lib/tools/SelectTool/childStates/PointingArrowLabel.mjs.map +2 -2
  65. package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs +24 -8
  66. package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs.map +2 -2
  67. package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs +21 -9
  68. package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs.map +2 -2
  69. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +23 -8
  70. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +2 -2
  71. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +21 -9
  72. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +2 -2
  73. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +26 -11
  74. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +2 -2
  75. package/dist-esm/lib/ui/components/DebugMenu/DefaultDebugMenuContent.mjs +2 -2
  76. package/dist-esm/lib/ui/components/DebugMenu/DefaultDebugMenuContent.mjs.map +1 -1
  77. package/dist-esm/lib/ui/components/menu-items.mjs +2 -2
  78. package/dist-esm/lib/ui/components/menu-items.mjs.map +1 -1
  79. package/dist-esm/lib/ui/context/actions.mjs +23 -29
  80. package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
  81. package/dist-esm/lib/ui/hooks/useEditorEvents.mjs +1 -1
  82. package/dist-esm/lib/ui/hooks/useEditorEvents.mjs.map +1 -1
  83. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +4 -4
  84. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +1 -1
  85. package/dist-esm/lib/ui/version.mjs +3 -3
  86. package/dist-esm/lib/ui/version.mjs.map +1 -1
  87. package/package.json +3 -3
  88. package/src/index.ts +1 -0
  89. package/src/lib/defaultEmbedDefinitions.ts +2 -25
  90. package/src/lib/defaultExternalContentHandlers.ts +10 -35
  91. package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +39 -133
  92. package/src/lib/shapes/bookmark/bookmarks.ts +170 -0
  93. package/src/lib/shapes/embed/EmbedShapeUtil.tsx +28 -2
  94. package/src/lib/tools/SelectTool/childStates/Crop/children/Cropping.ts +23 -6
  95. package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.ts +24 -12
  96. package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +21 -10
  97. package/src/lib/tools/SelectTool/childStates/PointingArrowLabel.ts +23 -11
  98. package/src/lib/tools/SelectTool/childStates/PointingResizeHandle.ts +26 -9
  99. package/src/lib/tools/SelectTool/childStates/PointingRotateHandle.ts +23 -10
  100. package/src/lib/tools/SelectTool/childStates/Resizing.ts +24 -9
  101. package/src/lib/tools/SelectTool/childStates/Rotating.ts +27 -11
  102. package/src/lib/tools/SelectTool/childStates/Translating.ts +28 -12
  103. package/src/lib/ui/components/DebugMenu/DefaultDebugMenuContent.tsx +2 -2
  104. package/src/lib/ui/components/menu-items.tsx +2 -2
  105. package/src/lib/ui/context/actions.tsx +27 -31
  106. package/src/lib/ui/hooks/useEditorEvents.ts +1 -1
  107. package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +4 -4
  108. package/src/lib/ui/version.ts +3 -3
  109. package/src/lib/utils/embeds/embeds.test.ts +16 -34
  110. package/src/test/SelectTool.test.ts +251 -0
  111. package/src/test/bookmark-shapes.test.ts +129 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/lib/ui/hooks/useTranslation/defaultTranslation.ts"],
4
- "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\n/** @internal */\nexport const DEFAULT_TRANSLATION = {\n\t'action.toggle-auto-pan': 'Auto (trackpad)',\n\t'action.toggle-auto-zoom': 'Auto (mouse)',\n\t'action.toggle-auto-none': 'Auto',\n\t'action.toggle-mouse': 'Mouse',\n\t'action.toggle-trackpad': 'Trackpad',\n\t'action.convert-to-bookmark': 'Convert to Bookmark',\n\t'action.convert-to-embed': 'Convert to Embed',\n\t'action.open-embed-link': 'Open link',\n\t'action.align-bottom': 'Align bottom',\n\t'action.align-center-horizontal': 'Align horizontally',\n\t'action.align-center-vertical': 'Align vertically',\n\t'action.align-center-horizontal.short': 'Align H',\n\t'action.align-center-vertical.short': 'Align V',\n\t'action.align-left': 'Align left',\n\t'action.align-right': 'Align right',\n\t'action.align-top': 'Align top',\n\t'action.back-to-content': 'Back to content',\n\t'action.bring-forward': 'Bring forward',\n\t'action.bring-to-front': 'Bring to front',\n\t'action.copy-as-png.short': 'PNG',\n\t'action.copy-as-png': 'Copy as PNG',\n\t'action.copy-as-svg.short': 'SVG',\n\t'action.copy-as-svg': 'Copy as SVG',\n\t'action.copy': 'Copy',\n\t'action.cut': 'Cut',\n\t'action.delete': 'Delete',\n\t'action.unlock-all': 'Unlock all',\n\t'action.distribute-horizontal': 'Distribute horizontally',\n\t'action.distribute-vertical': 'Distribute vertically',\n\t'action.distribute-horizontal.short': 'Distribute H',\n\t'action.distribute-vertical.short': 'Distribute V',\n\t'action.download-original': 'Download original',\n\t'action.duplicate': 'Duplicate',\n\t'action.edit-link': 'Edit link',\n\t'action.exit-pen-mode': 'Exit pen mode',\n\t'action.export-as-png.short': 'PNG',\n\t'action.export-as-png': 'Export as PNG',\n\t'action.export-as-svg.short': 'SVG',\n\t'action.export-as-svg': 'Export as SVG',\n\t'action.export-all-as-png.short': 'PNG',\n\t'action.export-all-as-png': 'Export as PNG',\n\t'action.export-all-as-svg.short': 'SVG',\n\t'action.export-all-as-svg': 'Export as SVG',\n\t'action.fit-frame-to-content': 'Fit to content',\n\t'action.flip-horizontal': 'Flip horizontally',\n\t'action.flip-vertical': 'Flip vertically',\n\t'action.flip-horizontal.short': 'Flip H',\n\t'action.flip-vertical.short': 'Flip V',\n\t'action.fork-project': 'Fork this project',\n\t'action.fork-project-on-tldraw': 'Fork project on tldraw',\n\t'action.group': 'Group',\n\t'action.insert-embed': 'Insert embed',\n\t'action.insert-media': 'Upload media',\n\t'action.leave-shared-project': 'Leave shared project',\n\t'action.new-project': 'New project',\n\t'action.new-shared-project': 'New shared project',\n\t'action.open-cursor-chat': 'Cursor chat',\n\t'action.open-kbd-shortcuts': 'Open keyboard shortcuts',\n\t'action.open-file': 'Open file',\n\t'action.pack': 'Pack',\n\t'action.paste': 'Paste',\n\t'action.paste-error-title': 'Pasting failed',\n\t'action.paste-error-description':\n\t\t'Could not paste due to missing clipboard permissions. Please enable the permissions and try again.',\n\t'action.print': 'Print',\n\t'action.redo': 'Redo',\n\t'action.remove-frame': 'Remove frame',\n\t'action.rename': 'Rename',\n\t'action.rotate-ccw': 'Rotate counterclockwise',\n\t'action.rotate-cw': 'Rotate clockwise',\n\t'action.save-copy': 'Save a copy',\n\t'action.select-all': 'Select all',\n\t'action.select-none': 'Select none',\n\t'action.send-backward': 'Send backward',\n\t'action.send-to-back': 'Send to back',\n\t'action.share-project': 'Share this project',\n\t'action.stack-horizontal': 'Stack horizontally',\n\t'action.stack-vertical': 'Stack vertically',\n\t'action.stack-horizontal.short': 'Stack H',\n\t'action.stack-vertical.short': 'Stack V',\n\t'action.stop-following': 'Stop following',\n\t'action.stretch-horizontal': 'Stretch horizontally',\n\t'action.stretch-vertical': 'Stretch vertically',\n\t'action.stretch-horizontal.short': 'Stretch H',\n\t'action.stretch-vertical.short': 'Stretch V',\n\t'action.toggle-auto-size': 'Toggle auto size',\n\t'action.toggle-dark-mode.menu': 'Dark mode',\n\t'action.toggle-dark-mode': 'Toggle dark mode',\n\t'action.toggle-paste-at-cursor.menu': 'Paste at cursor',\n\t'action.toggle-paste-at-cursor': 'Toggle paste at cursor',\n\t'action.toggle-wrap-mode.menu': 'Select on wrap',\n\t'action.toggle-wrap-mode': 'Toggle Select on wrap',\n\t'action.toggle-reduce-motion.menu': 'Reduce motion',\n\t'action.toggle-reduce-motion': 'Toggle reduce motion',\n\t'action.toggle-keyboard-shortcuts.menu': 'Enable keyboard shortcuts',\n\t'action.toggle-keyboard-shortcuts': 'Toggle keyboard shortcuts',\n\t'action.enhanced-a11y-mode.menu': 'Enhanced accessibility mode',\n\t'action.enhanced-a11y-mode': 'Toggle enhanced accessibility mode',\n\t'action.toggle-edge-scrolling.menu': 'Edge scrolling',\n\t'action.toggle-edge-scrolling': 'Toggle edge scrolling',\n\t'action.toggle-debug-mode.menu': 'Debug mode',\n\t'action.toggle-debug-mode': 'Toggle debug mode',\n\t'action.toggle-focus-mode.menu': 'Focus mode',\n\t'action.toggle-focus-mode': 'Toggle focus mode',\n\t'action.toggle-dynamic-size-mode.menu': 'Dynamic size',\n\t'action.toggle-dynamic-size-mode': 'Toggle dynamic size',\n\t'action.toggle-grid.menu': 'Show grid',\n\t'action.toggle-grid': 'Toggle grid',\n\t'action.toggle-lock': 'Toggle locked',\n\t'action.flatten-to-image': 'Flatten',\n\t'action.toggle-snap-mode.menu': 'Always snap',\n\t'action.toggle-snap-mode': 'Toggle always snap',\n\t'action.toggle-tool-lock.menu': 'Tool lock',\n\t'action.toggle-tool-lock': 'Toggle tool lock',\n\t'action.toggle-transparent.context-menu': 'Transparent',\n\t'action.toggle-transparent.menu': 'Transparent',\n\t'action.toggle-transparent': 'Toggle transparent background',\n\t'action.undo': 'Undo',\n\t'action.ungroup': 'Ungroup',\n\t'action.zoom-in': 'Zoom in',\n\t'action.zoom-out': 'Zoom out',\n\t'action.zoom-to-100': 'Zoom to 100%',\n\t'action.zoom-to-fit': 'Zoom to fit',\n\t'action.zoom-to-selection': 'Zoom to selection',\n\t'assets.files.size-too-big': 'File size is too big',\n\t'assets.files.maximum-size': 'Maximum file size is {size}',\n\t'assets.files.type-not-allowed': 'File type is not allowed',\n\t'assets.files.upload-failed': 'Upload failed',\n\t'assets.files.amount-too-many': 'Too many files',\n\t'assets.url.failed': 'Couldn\u2019t load URL preview',\n\t'theme.dark': 'Dark',\n\t'theme.light': 'Light',\n\t'theme.system': 'System',\n\t'color-style.white': 'White',\n\t'color-style.black': 'Black',\n\t'color-style.blue': 'Blue',\n\t'color-style.green': 'Green',\n\t'color-style.grey': 'Grey',\n\t'color-style.light-blue': 'Light blue',\n\t'color-style.light-green': 'Light green',\n\t'color-style.light-red': 'Light red',\n\t'color-style.light-violet': 'Light violet',\n\t'color-style.orange': 'Orange',\n\t'color-style.red': 'Red',\n\t'color-style.violet': 'Violet',\n\t'color-style.yellow': 'Yellow',\n\t'fill-style.none': 'None',\n\t'document.default-name': 'Untitled',\n\t'fill-style.semi': 'Semi',\n\t'fill-style.solid': 'Solid',\n\t'fill-style.pattern': 'Pattern',\n\t'fill-style.fill': 'Fill',\n\t'dash-style.dashed': 'Dashed',\n\t'dash-style.dotted': 'Dotted',\n\t'dash-style.draw': 'Draw',\n\t'dash-style.solid': 'Solid',\n\t'size-style.s': 'Small',\n\t'size-style.m': 'Medium',\n\t'size-style.l': 'Large',\n\t'size-style.xl': 'Extra large',\n\t'opacity-style.0.1': '10%',\n\t'opacity-style.0.25': '25%',\n\t'opacity-style.0.5': '50%',\n\t'opacity-style.0.75': '75%',\n\t'opacity-style.1': '100%',\n\t'font-style.draw': 'Draw',\n\t'font-style.sans': 'Sans',\n\t'font-style.serif': 'Serif',\n\t'font-style.mono': 'Mono',\n\t'align-style.start': 'Start',\n\t'align-style.middle': 'Middle',\n\t'align-style.end': 'End',\n\t'align-style.justify': 'Justify',\n\t'verticalAlign-style.start': 'Top',\n\t'verticalAlign-style.middle': 'Middle',\n\t'verticalAlign-style.end': 'Bottom',\n\t'geo-style.arrow-down': 'Arrow down',\n\t'geo-style.arrow-left': 'Arrow left',\n\t'geo-style.arrow-right': 'Arrow right',\n\t'geo-style.arrow-up': 'Arrow up',\n\t'geo-style.cloud': 'Cloud',\n\t'geo-style.diamond': 'Diamond',\n\t'geo-style.ellipse': 'Ellipse',\n\t'geo-style.heart': 'Heart',\n\t'geo-style.hexagon': 'Hexagon',\n\t'geo-style.octagon': 'Octagon',\n\t'geo-style.oval': 'Oval',\n\t'geo-style.pentagon': 'Pentagon',\n\t'geo-style.rectangle': 'Rectangle',\n\t'geo-style.rhombus': 'Rhombus',\n\t'geo-style.rhombus-2': 'Rhombus left',\n\t'geo-style.star': 'Star',\n\t'geo-style.trapezoid': 'Trapezoid',\n\t'geo-style.triangle': 'Triangle',\n\t'geo-style.x-box': 'X box',\n\t'geo-style.check-box': 'Check box',\n\t'arrowheadStart-style.none': 'None',\n\t'arrowheadStart-style.arrow': 'Arrow',\n\t'arrowheadStart-style.bar': 'Bar',\n\t'arrowheadStart-style.diamond': 'Diamond',\n\t'arrowheadStart-style.dot': 'Dot',\n\t'arrowheadStart-style.inverted': 'Inverted',\n\t'arrowheadStart-style.pipe': 'Pipe',\n\t'arrowheadStart-style.square': 'Square',\n\t'arrowheadStart-style.triangle': 'Triangle',\n\t'arrowheadEnd-style.none': 'None',\n\t'arrowheadEnd-style.arrow': 'Arrow',\n\t'arrowheadEnd-style.bar': 'Bar',\n\t'arrowheadEnd-style.diamond': 'Diamond',\n\t'arrowheadEnd-style.dot': 'Dot',\n\t'arrowheadEnd-style.inverted': 'Inverted',\n\t'arrowheadEnd-style.pipe': 'Pipe',\n\t'arrowheadEnd-style.square': 'Square',\n\t'arrowheadEnd-style.triangle': 'Triangle',\n\t'spline-style.line': 'Line',\n\t'spline-style.cubic': 'Cubic',\n\t'arrow-kind-style.arc': 'Arc',\n\t'arrow-kind-style.elbow': 'Elbow',\n\t'tool.select': 'Select',\n\t'tool.hand': 'Hand',\n\t'tool.draw': 'Draw',\n\t'tool.eraser': 'Eraser',\n\t'tool.arrow-down': 'Arrow down',\n\t'tool.arrow-left': 'Arrow left',\n\t'tool.arrow-right': 'Arrow right',\n\t'tool.arrow-up': 'Arrow up',\n\t'tool.arrow': 'Arrow',\n\t'tool.cloud': 'Cloud',\n\t'tool.diamond': 'Diamond',\n\t'tool.ellipse': 'Ellipse',\n\t'tool.heart': 'Heart',\n\t'tool.hexagon': 'Hexagon',\n\t'tool.highlight': 'Highlight',\n\t'tool.line': 'Line',\n\t'tool.octagon': 'Octagon',\n\t'tool.oval': 'Oval',\n\t'tool.pentagon': 'Pentagon',\n\t'tool.rectangle': 'Rectangle',\n\t'tool.rhombus': 'Rhombus',\n\t'tool.star': 'Star',\n\t'tool.trapezoid': 'Trapezoid',\n\t'tool.triangle': 'Triangle',\n\t'tool.x-box': 'X box',\n\t'tool.check-box': 'Check box',\n\t'tool.media': 'Media',\n\t'tool.frame': 'Frame',\n\t'tool.note': 'Note',\n\t'tool.laser': 'Laser',\n\t'tool.embed': 'Embed',\n\t'tool.text': 'Text',\n\t'tool.pointer-down': 'Pointer down',\n\t'tool.image-zoom': 'Zoom',\n\t'tool.replace-media': 'Replace media',\n\t'tool.flip-horz': 'Flip horizontally',\n\t'tool.flip-vert': 'Flip vertically',\n\t'tool.rotate-cw': 'Rotate',\n\t'tool.aspect-ratio': 'Aspect ratio',\n\t'tool.aspect-ratio.original': 'Original',\n\t'tool.aspect-ratio.square': 'Square (1:1)',\n\t'tool.aspect-ratio.circle': 'Circle (1:1)',\n\t'tool.aspect-ratio.landscape': 'Landscape (4:3)',\n\t'tool.aspect-ratio.portrait': 'Portrait (3:4)',\n\t'tool.aspect-ratio.wide': 'Wide (16:9)',\n\t'tool.image-toolbar-title': 'Image tools',\n\t'tool.image-crop': 'Crop image',\n\t'tool.image-crop-confirm': 'Confirm',\n\t'tool.media-alt-text': 'Alternative text',\n\t'tool.media-alt-text-desc': 'Give a description\u2026',\n\t'tool.media-alt-text-confirm': 'Confirm',\n\t'tool.rich-text-bold': 'Bold',\n\t'tool.rich-text-italic': 'Italic',\n\t'tool.rich-text-code': 'Code',\n\t'tool.rich-text-highlight': 'Highlight',\n\t'tool.rich-text-strikethrough': 'Strikethrough',\n\t'tool.rich-text-link': 'Link',\n\t'tool.rich-text-link-visit': 'Visit link',\n\t'tool.rich-text-link-remove': 'Remove link',\n\t'tool.rich-text-header': 'Header',\n\t'tool.rich-text-bulletList': 'Bulleted list',\n\t'tool.rich-text-toolbar-title': 'Text formatting',\n\t'tool.rich-text-orderedList': 'Ordered list',\n\t'tool.bookmark': 'Bookmark',\n\t'a11y.status': 'Status',\n\t'a11y.skip-to-main-content': 'Move focus to canvas',\n\t'a11y.shape-index': '{num} of {total}',\n\t'a11y.shape-image': 'Image',\n\t'a11y.shape-video': 'Video',\n\t'a11y.multiple-shapes': '{num} shapes selected',\n\t'a11y.select-shape': 'Select next shape',\n\t'a11y.select-shape-direction': 'Select shape in direction',\n\t'a11y.enter-leave-container': 'Enter/leave container',\n\t'a11y.repeat-shape': 'Repeat shape',\n\t'a11y.move-shape': 'Move shape',\n\t'a11y.move-shape-faster': 'Move shape faster',\n\t'a11y.rotate-shape-cw': 'Rotate shape clockwise',\n\t'a11y.rotate-shape-ccw': 'Rotate shape counterclockwise',\n\t'a11y.rotate-shape-cw-fine': 'Rotate shape clockwise (fine)',\n\t'a11y.rotate-shape-ccw-fine': 'Rotate shape counterclockwise (fine)',\n\t'a11y.enlarge-shape': 'Enlarge shape',\n\t'a11y.shrink-shape': 'Shrink shape',\n\t'a11y.pan-camera': 'Pan camera',\n\t'a11y.adjust-shape-styles': 'Adjust shape styles',\n\t'a11y.open-context-menu': 'Open context menu',\n\t'a11y.open-keyboard-shortcuts': 'Open keyboard shortcuts',\n\t'menu.title': 'Menu',\n\t'menu.theme': 'Theme',\n\t'menu.accessibility': 'Accessibility',\n\t'menu.copy-as': 'Copy as',\n\t'menu.edit': 'Edit',\n\t'menu.export-as': 'Export as',\n\t'menu.file': 'File',\n\t'menu.language': 'Language',\n\t'menu.preferences': 'Preferences',\n\t'menu.view': 'View',\n\t'menu.input-mode': 'Input mode',\n\t'context-menu.title': 'Context menu',\n\t'context-menu.edit': 'Edit',\n\t'context-menu.arrange': 'Arrange',\n\t'context-menu.copy-as': 'Copy as',\n\t'context-menu.export-as': 'Export as',\n\t'context-menu.export-all-as': 'Export',\n\t'context-menu.move-to-page': 'Move to page',\n\t'context-menu.reorder': 'Reorder',\n\t'page-menu.title': 'Pages',\n\t'page-menu.create-new-page': 'Create new page',\n\t'page-menu.max-page-count-reached': 'Max pages reached',\n\t'page-menu.new-page-initial-name': 'Page 1',\n\t'page-menu.edit-start': 'Edit',\n\t'page-menu.edit-done': 'Done',\n\t'page-menu.go-to-page': 'Go to page',\n\t'page-menu.submenu.rename': 'Rename',\n\t'page-menu.submenu.duplicate-page': 'Duplicate',\n\t'page-menu.submenu.title': 'Menu',\n\t'page-menu.submenu.move-down': 'Move down',\n\t'page-menu.submenu.move-up': 'Move up',\n\t'page-menu.submenu.delete': 'Delete',\n\t'share-menu.title': 'Share',\n\t'share-menu.save-note': 'Download this project to your computer as a .tldr file.',\n\t'share-menu.fork-note': 'Create a new shared project based on this snapshot.',\n\t'share-menu.share-project': 'Share this project',\n\t'share-menu.copy-link': 'Copy editor link',\n\t'share-menu.create-snapshot-link': 'Copy snapshot link',\n\t'share-menu.snapshot-link-note': 'Capture and share this project as a read-only snapshot link.',\n\t'share-menu.copy-readonly-link': 'Copy viewer link',\n\t'share-menu.offline-note': 'Create a new shared project based on your current project.',\n\t'share-menu.copy-link-note': 'Anyone with the link will be able to view and edit this project.',\n\t'share-menu.copy-readonly-link-note': 'Anyone with the link will be able to access this project.',\n\t'share-menu.project-too-large':\n\t\t'Sorry, this project can\u2019t be shared because it\u2019s too large. We\u2019re working on it!',\n\t'share-menu.upload-failed':\n\t\t'Sorry, we couldn\u2019t upload your project at the moment. Please try again or let us know if the problem persists.',\n\t'share-menu.creating-project': 'Creating the new project\u2026',\n\t'share-menu.copied': 'Copied link',\n\t'document-name-menu.copy-link': 'Copy link',\n\t'status.offline': 'Offline',\n\t'people-menu.title': 'People',\n\t'people-menu.change-name': 'Change name',\n\t'people-menu.avatar-color': 'Avatar color',\n\t'people-menu.change-color': 'Change color',\n\t'people-menu.follow': 'Following',\n\t'people-menu.following': 'Following',\n\t'people-menu.leading': 'Following You',\n\t'people-menu.user': '(You)',\n\t'people-menu.invite': 'Invite others',\n\t'people-menu.anonymous-user': 'New user',\n\t'help-menu.import-tldr-file': 'Import file\u2026',\n\t'help-menu.title': 'Help and resources',\n\t'help-menu.about': 'About tldraw',\n\t'help-menu.discord': 'Discord',\n\t'help-menu.github': 'GitHub',\n\t'help-menu.keyboard-shortcuts': 'Keyboard shortcuts',\n\t'help-menu.twitter': 'Twitter',\n\t'help-menu.terms': 'Terms of service',\n\t'help-menu.privacy': 'Privacy policy',\n\t'actions-menu.title': 'Actions',\n\t'edit-link-dialog.title': 'Edit link',\n\t'edit-link-dialog.invalid-url': 'A link must be a valid URL.',\n\t'edit-link-dialog.detail': 'Links will open in a new tab.',\n\t'edit-link-dialog.url': 'URL',\n\t'edit-link-dialog.clear': 'Clear',\n\t'edit-link-dialog.save': 'Continue',\n\t'edit-link-dialog.cancel': 'Cancel',\n\t'edit-link-dialog.external-link': 'External link',\n\t'embed-dialog.title': 'Insert embed',\n\t'embed-dialog.back': 'Back',\n\t'embed-dialog.create': 'Create',\n\t'embed-dialog.cancel': 'Cancel',\n\t'embed-dialog.url': 'URL',\n\t'embed-dialog.instruction': 'Paste in the site\u2019s URL to create the embed.',\n\t'embed-dialog.invalid-url': 'We could not create an embed from that URL.',\n\t'shortcuts-dialog.title': 'Keyboard shortcuts',\n\t'shortcuts-dialog.edit': 'Edit',\n\t'shortcuts-dialog.file': 'File',\n\t'shortcuts-dialog.preferences': 'Preferences',\n\t'shortcuts-dialog.tools': 'Tools',\n\t'shortcuts-dialog.transform': 'Transform',\n\t'shortcuts-dialog.view': 'View',\n\t'shortcuts-dialog.collaboration': 'Collaboration',\n\t'shortcuts-dialog.a11y': 'Accessibility',\n\t'shortcuts-dialog.text-formatting': 'Text formatting',\n\t'style-panel.title': 'Styles',\n\t'style-panel.align': 'Align',\n\t'style-panel.label-align': 'Label align',\n\t'style-panel.vertical-align': 'Vertical align',\n\t'style-panel.position': 'Position',\n\t'style-panel.arrowheads': 'Arrows',\n\t'style-panel.arrowhead-start': 'Start',\n\t'style-panel.arrowhead-end': 'End',\n\t'style-panel.arrow-kind': 'Line',\n\t'style-panel.color': 'Color',\n\t'style-panel.dash': 'Dash',\n\t'style-panel.fill': 'Fill',\n\t'style-panel.font': 'Font',\n\t'style-panel.geo': 'Shape',\n\t'style-panel.mixed': 'Mixed',\n\t'style-panel.opacity': 'Opacity',\n\t'style-panel.size': 'Size',\n\t'style-panel.spline': 'Spline',\n\t'style-panel.selected': 'selected',\n\t'tool-panel.title': 'Tools',\n\t'tool-panel.more': 'More',\n\t'navigation-zone.title': 'Navigation',\n\t'navigation-zone.minimap': 'Minimap',\n\t'navigation-zone.toggle-minimap': 'Toggle minimap',\n\t'navigation-zone.zoom': 'Zoom',\n\t'focus-mode.toggle-focus-mode': 'Toggle focus mode',\n\t'toast.close': 'Close',\n\t'toast.success': 'Success',\n\t'toast.error': 'Error',\n\t'toast.info': 'Info',\n\t'toast.warning': 'Warning',\n\t'file-system.file-open-error.title': 'Could not open file',\n\t'file-system.file-open-error.not-a-tldraw-file':\n\t\t'The file you tried to open doesn\u2019t look like a tldraw file.',\n\t'file-system.file-open-error.file-format-version-too-new':\n\t\t'The file you tried to open is from a newer version of tldraw. Please reload the page and try again.',\n\t'file-system.file-open-error.generic-corrupted-file': 'The file you tried to open is corrupted.',\n\t'file-system.confirm-open.title': 'Overwrite current project?',\n\t'file-system.confirm-open.description':\n\t\t'Opening a file will replace your current project and any unsaved changes will be lost. Are you sure you want to continue?',\n\t'file-system.confirm-open.cancel': 'Cancel',\n\t'file-system.confirm-open.open': 'Open file',\n\t'file-system.confirm-open.dont-show-again': 'Don\u2019t ask again',\n\t'file-system.confirm-clear.title': 'Clear current project?',\n\t'file-system.confirm-clear.description':\n\t\t'Creating a new project will clear your current project and any unsaved changes will be lost. Are you sure you want to continue?',\n\t'file-system.confirm-clear.cancel': 'Cancel',\n\t'file-system.confirm-clear.continue': 'Continue',\n\t'file-system.confirm-clear.dont-show-again': 'Don\u2019t ask again',\n\t'file-system.shared-document-file-open-error.title': 'Could not open file',\n\t'file-system.shared-document-file-open-error.description':\n\t\t'Opening files from shared projects is not supported.',\n\t'sharing.confirm-leave.title': 'Leave current project?',\n\t'sharing.confirm-leave.description':\n\t\t'Are you sure you want to leave this shared project? You can return to it by navigating to its URL.',\n\t'sharing.confirm-leave.cancel': 'Cancel',\n\t'sharing.confirm-leave.leave': 'Leave',\n\t'sharing.confirm-leave.dont-show-again': 'Don\u2019t ask again',\n\t'toast.error.export-fail.title': 'Failed export',\n\t'toast.error.export-fail.desc': 'Failed to export image',\n\t'toast.error.copy-fail.title': 'Failed copy',\n\t'toast.error.copy-fail.desc': 'Failed to copy image',\n\t'context.pages.new-page': 'New page',\n\t'vscode.file-open.desc':\n\t\t'We\u2019ve updated this document to work with the current version of tldraw. If you\u2019d like to keep the original version (which will work on old.tldraw.com), click below to create a backup.',\n\t'vscode.file-open.open': 'Continue',\n\t'vscode.file-open.backup': 'Backup',\n\t'vscode.file-open.backup-saved': 'Backup saved',\n\t'vscode.file-open.backup-failed': 'Backup failed: this is not a .tldr file.',\n\t'vscode.file-open.dont-show-again': 'Don\u2019t ask again',\n\t'cursor-chat.type-to-chat': 'Type to chat\u2026',\n\t'app.loading': 'Loading tldraw\u2026',\n\t'handle.resize-top': 'Resize top',\n\t'handle.resize-bottom': 'Resize bottom',\n\t'handle.resize-left': 'Resize left',\n\t'handle.resize-right': 'Resize right',\n\t'handle.resize-top-left': 'Resize top left',\n\t'handle.resize-top-right': 'Resize top right',\n\t'handle.resize-bottom-left': 'Resize bottom left',\n\t'handle.resize-bottom-right': 'Resize bottom right',\n\t'handle.rotate.top_left_rotate': 'Rotate top left',\n\t'handle.rotate.top_right_rotate': 'Rotate top right',\n\t'handle.rotate.bottom_left_rotate': 'Rotate bottom left',\n\t'handle.rotate.bottom_right_rotate': 'Rotate bottom right',\n\t'handle.rotate.mobile_rotate': 'Rotate',\n\t'handle.crop.top': 'Crop top',\n\t'handle.crop.bottom': 'Crop bottom',\n\t'handle.crop.left': 'Crop left',\n\t'handle.crop.right': 'Crop right',\n\t'handle.crop.top-left': 'Crop top left',\n\t'handle.crop.top-right': 'Crop top right',\n\t'handle.crop.bottom-left': 'Crop bottom left',\n\t'handle.crop.bottom-right': 'Crop bottom right',\n\t'ui.close': 'Close',\n\t'ui.checked': 'Checked',\n\t'ui.unchecked': 'Unchecked',\n}\n"],
4
+ "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\n/** @internal */\nexport const DEFAULT_TRANSLATION = {\n\t'action.toggle-auto-pan': 'Auto (trackpad)',\n\t'action.toggle-auto-zoom': 'Auto (mouse)',\n\t'action.toggle-auto-none': 'Auto',\n\t'action.toggle-mouse': 'Mouse',\n\t'action.toggle-trackpad': 'Trackpad',\n\t'action.convert-to-bookmark': 'Convert to bookmark',\n\t'action.convert-to-embed': 'Convert to embed',\n\t'action.open-embed-link': 'Open link',\n\t'action.align-bottom': 'Align bottom',\n\t'action.align-center-horizontal': 'Align horizontally',\n\t'action.align-center-vertical': 'Align vertically',\n\t'action.align-center-horizontal.short': 'Align H',\n\t'action.align-center-vertical.short': 'Align V',\n\t'action.align-left': 'Align left',\n\t'action.align-right': 'Align right',\n\t'action.align-top': 'Align top',\n\t'action.back-to-content': 'Back to content',\n\t'action.bring-forward': 'Bring forward',\n\t'action.bring-to-front': 'Bring to front',\n\t'action.copy-as-png.short': 'PNG',\n\t'action.copy-as-png': 'Copy as PNG',\n\t'action.copy-as-svg.short': 'SVG',\n\t'action.copy-as-svg': 'Copy as SVG',\n\t'action.copy': 'Copy',\n\t'action.cut': 'Cut',\n\t'action.delete': 'Delete',\n\t'action.unlock-all': 'Unlock all',\n\t'action.distribute-horizontal': 'Distribute horizontally',\n\t'action.distribute-vertical': 'Distribute vertically',\n\t'action.distribute-horizontal.short': 'Distribute H',\n\t'action.distribute-vertical.short': 'Distribute V',\n\t'action.download-original': 'Download original',\n\t'action.duplicate': 'Duplicate',\n\t'action.edit-link': 'Edit link',\n\t'action.exit-pen-mode': 'Exit pen mode',\n\t'action.export-as-png.short': 'PNG',\n\t'action.export-as-png': 'Export as PNG',\n\t'action.export-as-svg.short': 'SVG',\n\t'action.export-as-svg': 'Export as SVG',\n\t'action.export-all-as-png.short': 'PNG',\n\t'action.export-all-as-png': 'Export as PNG',\n\t'action.export-all-as-svg.short': 'SVG',\n\t'action.export-all-as-svg': 'Export as SVG',\n\t'action.fit-frame-to-content': 'Fit to content',\n\t'action.flip-horizontal': 'Flip horizontally',\n\t'action.flip-vertical': 'Flip vertically',\n\t'action.flip-horizontal.short': 'Flip H',\n\t'action.flip-vertical.short': 'Flip V',\n\t'action.fork-project': 'Fork this project',\n\t'action.fork-project-on-tldraw': 'Fork project on tldraw',\n\t'action.group': 'Group',\n\t'action.insert-embed': 'Insert embed',\n\t'action.insert-media': 'Upload media',\n\t'action.leave-shared-project': 'Leave shared project',\n\t'action.new-project': 'New project',\n\t'action.new-shared-project': 'New shared project',\n\t'action.open-cursor-chat': 'Cursor chat',\n\t'action.open-kbd-shortcuts': 'Open keyboard shortcuts',\n\t'action.open-file': 'Open file',\n\t'action.pack': 'Pack',\n\t'action.paste': 'Paste',\n\t'action.paste-error-title': 'Pasting failed',\n\t'action.paste-error-description':\n\t\t'Could not paste due to missing clipboard permissions. Please enable the permissions and try again.',\n\t'action.print': 'Print',\n\t'action.redo': 'Redo',\n\t'action.remove-frame': 'Remove frame',\n\t'action.rename': 'Rename',\n\t'action.rotate-ccw': 'Rotate counterclockwise',\n\t'action.rotate-cw': 'Rotate clockwise',\n\t'action.save-copy': 'Save a copy',\n\t'action.select-all': 'Select all',\n\t'action.select-none': 'Select none',\n\t'action.send-backward': 'Send backward',\n\t'action.send-to-back': 'Send to back',\n\t'action.share-project': 'Share this project',\n\t'action.stack-horizontal': 'Stack horizontally',\n\t'action.stack-vertical': 'Stack vertically',\n\t'action.stack-horizontal.short': 'Stack H',\n\t'action.stack-vertical.short': 'Stack V',\n\t'action.stop-following': 'Stop following',\n\t'action.stretch-horizontal': 'Stretch horizontally',\n\t'action.stretch-vertical': 'Stretch vertically',\n\t'action.stretch-horizontal.short': 'Stretch H',\n\t'action.stretch-vertical.short': 'Stretch V',\n\t'action.toggle-auto-size': 'Toggle auto size',\n\t'action.toggle-dark-mode.menu': 'Dark mode',\n\t'action.toggle-dark-mode': 'Toggle dark mode',\n\t'action.toggle-paste-at-cursor.menu': 'Paste at cursor',\n\t'action.toggle-paste-at-cursor': 'Toggle paste at cursor',\n\t'action.toggle-wrap-mode.menu': 'Select on wrap',\n\t'action.toggle-wrap-mode': 'Toggle select on wrap',\n\t'action.toggle-reduce-motion.menu': 'Reduce motion',\n\t'action.toggle-reduce-motion': 'Toggle reduce motion',\n\t'action.toggle-keyboard-shortcuts.menu': 'Enable keyboard shortcuts',\n\t'action.toggle-keyboard-shortcuts': 'Toggle keyboard shortcuts',\n\t'action.enhanced-a11y-mode.menu': 'Enhanced accessibility mode',\n\t'action.enhanced-a11y-mode': 'Toggle enhanced accessibility mode',\n\t'action.toggle-edge-scrolling.menu': 'Edge scrolling',\n\t'action.toggle-edge-scrolling': 'Toggle edge scrolling',\n\t'action.toggle-debug-mode.menu': 'Debug mode',\n\t'action.toggle-debug-mode': 'Toggle debug mode',\n\t'action.toggle-focus-mode.menu': 'Focus mode',\n\t'action.toggle-focus-mode': 'Toggle focus mode',\n\t'action.toggle-dynamic-size-mode.menu': 'Dynamic size',\n\t'action.toggle-dynamic-size-mode': 'Toggle dynamic size',\n\t'action.toggle-grid.menu': 'Show grid',\n\t'action.toggle-grid': 'Toggle grid',\n\t'action.toggle-lock': 'Toggle locked',\n\t'action.flatten-to-image': 'Flatten',\n\t'action.toggle-snap-mode.menu': 'Always snap',\n\t'action.toggle-snap-mode': 'Toggle always snap',\n\t'action.toggle-tool-lock.menu': 'Tool lock',\n\t'action.toggle-tool-lock': 'Toggle tool lock',\n\t'action.toggle-transparent.context-menu': 'Transparent',\n\t'action.toggle-transparent.menu': 'Transparent',\n\t'action.toggle-transparent': 'Toggle transparent background',\n\t'action.undo': 'Undo',\n\t'action.ungroup': 'Ungroup',\n\t'action.zoom-in': 'Zoom in',\n\t'action.zoom-out': 'Zoom out',\n\t'action.zoom-to-100': 'Zoom to 100%',\n\t'action.zoom-to-fit': 'Zoom to fit',\n\t'action.zoom-to-selection': 'Zoom to selection',\n\t'assets.files.size-too-big': 'File size is too big',\n\t'assets.files.maximum-size': 'Maximum file size is {size}',\n\t'assets.files.type-not-allowed': 'File type is not allowed',\n\t'assets.files.upload-failed': 'Upload failed',\n\t'assets.files.amount-too-many': 'Too many files',\n\t'assets.url.failed': 'Couldn\u2019t load URL preview',\n\t'theme.dark': 'Dark',\n\t'theme.light': 'Light',\n\t'theme.system': 'System',\n\t'color-style.white': 'White',\n\t'color-style.black': 'Black',\n\t'color-style.blue': 'Blue',\n\t'color-style.green': 'Green',\n\t'color-style.grey': 'Grey',\n\t'color-style.light-blue': 'Light blue',\n\t'color-style.light-green': 'Light green',\n\t'color-style.light-red': 'Light red',\n\t'color-style.light-violet': 'Light violet',\n\t'color-style.orange': 'Orange',\n\t'color-style.red': 'Red',\n\t'color-style.violet': 'Violet',\n\t'color-style.yellow': 'Yellow',\n\t'fill-style.none': 'None',\n\t'document.default-name': 'Untitled',\n\t'fill-style.semi': 'Semi',\n\t'fill-style.solid': 'Solid',\n\t'fill-style.pattern': 'Pattern',\n\t'fill-style.fill': 'Fill',\n\t'dash-style.dashed': 'Dashed',\n\t'dash-style.dotted': 'Dotted',\n\t'dash-style.draw': 'Draw',\n\t'dash-style.solid': 'Solid',\n\t'size-style.s': 'Small',\n\t'size-style.m': 'Medium',\n\t'size-style.l': 'Large',\n\t'size-style.xl': 'Extra large',\n\t'opacity-style.0.1': '10%',\n\t'opacity-style.0.25': '25%',\n\t'opacity-style.0.5': '50%',\n\t'opacity-style.0.75': '75%',\n\t'opacity-style.1': '100%',\n\t'font-style.draw': 'Draw',\n\t'font-style.sans': 'Sans',\n\t'font-style.serif': 'Serif',\n\t'font-style.mono': 'Mono',\n\t'align-style.start': 'Start',\n\t'align-style.middle': 'Middle',\n\t'align-style.end': 'End',\n\t'align-style.justify': 'Justify',\n\t'verticalAlign-style.start': 'Top',\n\t'verticalAlign-style.middle': 'Middle',\n\t'verticalAlign-style.end': 'Bottom',\n\t'geo-style.arrow-down': 'Arrow down',\n\t'geo-style.arrow-left': 'Arrow left',\n\t'geo-style.arrow-right': 'Arrow right',\n\t'geo-style.arrow-up': 'Arrow up',\n\t'geo-style.cloud': 'Cloud',\n\t'geo-style.diamond': 'Diamond',\n\t'geo-style.ellipse': 'Ellipse',\n\t'geo-style.heart': 'Heart',\n\t'geo-style.hexagon': 'Hexagon',\n\t'geo-style.octagon': 'Octagon',\n\t'geo-style.oval': 'Oval',\n\t'geo-style.pentagon': 'Pentagon',\n\t'geo-style.rectangle': 'Rectangle',\n\t'geo-style.rhombus': 'Rhombus',\n\t'geo-style.rhombus-2': 'Rhombus left',\n\t'geo-style.star': 'Star',\n\t'geo-style.trapezoid': 'Trapezoid',\n\t'geo-style.triangle': 'Triangle',\n\t'geo-style.x-box': 'X box',\n\t'geo-style.check-box': 'Check box',\n\t'arrowheadStart-style.none': 'None',\n\t'arrowheadStart-style.arrow': 'Arrow',\n\t'arrowheadStart-style.bar': 'Bar',\n\t'arrowheadStart-style.diamond': 'Diamond',\n\t'arrowheadStart-style.dot': 'Dot',\n\t'arrowheadStart-style.inverted': 'Inverted',\n\t'arrowheadStart-style.pipe': 'Pipe',\n\t'arrowheadStart-style.square': 'Square',\n\t'arrowheadStart-style.triangle': 'Triangle',\n\t'arrowheadEnd-style.none': 'None',\n\t'arrowheadEnd-style.arrow': 'Arrow',\n\t'arrowheadEnd-style.bar': 'Bar',\n\t'arrowheadEnd-style.diamond': 'Diamond',\n\t'arrowheadEnd-style.dot': 'Dot',\n\t'arrowheadEnd-style.inverted': 'Inverted',\n\t'arrowheadEnd-style.pipe': 'Pipe',\n\t'arrowheadEnd-style.square': 'Square',\n\t'arrowheadEnd-style.triangle': 'Triangle',\n\t'spline-style.line': 'Line',\n\t'spline-style.cubic': 'Cubic',\n\t'arrow-kind-style.arc': 'Arc',\n\t'arrow-kind-style.elbow': 'Elbow',\n\t'tool.select': 'Select',\n\t'tool.hand': 'Hand',\n\t'tool.draw': 'Draw',\n\t'tool.eraser': 'Eraser',\n\t'tool.arrow-down': 'Arrow down',\n\t'tool.arrow-left': 'Arrow left',\n\t'tool.arrow-right': 'Arrow right',\n\t'tool.arrow-up': 'Arrow up',\n\t'tool.arrow': 'Arrow',\n\t'tool.cloud': 'Cloud',\n\t'tool.diamond': 'Diamond',\n\t'tool.ellipse': 'Ellipse',\n\t'tool.heart': 'Heart',\n\t'tool.hexagon': 'Hexagon',\n\t'tool.highlight': 'Highlight',\n\t'tool.line': 'Line',\n\t'tool.octagon': 'Octagon',\n\t'tool.oval': 'Oval',\n\t'tool.pentagon': 'Pentagon',\n\t'tool.rectangle': 'Rectangle',\n\t'tool.rhombus': 'Rhombus',\n\t'tool.star': 'Star',\n\t'tool.trapezoid': 'Trapezoid',\n\t'tool.triangle': 'Triangle',\n\t'tool.x-box': 'X box',\n\t'tool.check-box': 'Check box',\n\t'tool.media': 'Media',\n\t'tool.frame': 'Frame',\n\t'tool.note': 'Note',\n\t'tool.laser': 'Laser',\n\t'tool.embed': 'Embed',\n\t'tool.text': 'Text',\n\t'tool.pointer-down': 'Pointer down',\n\t'tool.image-zoom': 'Zoom',\n\t'tool.replace-media': 'Replace media',\n\t'tool.flip-horz': 'Flip horizontally',\n\t'tool.flip-vert': 'Flip vertically',\n\t'tool.rotate-cw': 'Rotate',\n\t'tool.aspect-ratio': 'Aspect ratio',\n\t'tool.aspect-ratio.original': 'Original',\n\t'tool.aspect-ratio.square': 'Square (1:1)',\n\t'tool.aspect-ratio.circle': 'Circle (1:1)',\n\t'tool.aspect-ratio.landscape': 'Landscape (4:3)',\n\t'tool.aspect-ratio.portrait': 'Portrait (3:4)',\n\t'tool.aspect-ratio.wide': 'Wide (16:9)',\n\t'tool.image-toolbar-title': 'Image tools',\n\t'tool.image-crop': 'Crop image',\n\t'tool.image-crop-confirm': 'Confirm',\n\t'tool.media-alt-text': 'Alternative text',\n\t'tool.media-alt-text-desc': 'Give a description\u2026',\n\t'tool.media-alt-text-confirm': 'Confirm',\n\t'tool.rich-text-bold': 'Bold',\n\t'tool.rich-text-italic': 'Italic',\n\t'tool.rich-text-code': 'Code',\n\t'tool.rich-text-highlight': 'Highlight',\n\t'tool.rich-text-strikethrough': 'Strikethrough',\n\t'tool.rich-text-link': 'Link',\n\t'tool.rich-text-link-visit': 'Visit link',\n\t'tool.rich-text-link-remove': 'Remove link',\n\t'tool.rich-text-header': 'Header',\n\t'tool.rich-text-bulletList': 'Bulleted list',\n\t'tool.rich-text-toolbar-title': 'Text formatting',\n\t'tool.rich-text-orderedList': 'Ordered list',\n\t'tool.bookmark': 'Bookmark',\n\t'a11y.status': 'Status',\n\t'a11y.skip-to-main-content': 'Move focus to canvas',\n\t'a11y.shape-index': '{num} of {total}',\n\t'a11y.shape-image': 'Image',\n\t'a11y.shape-video': 'Video',\n\t'a11y.multiple-shapes': '{num} shapes selected',\n\t'a11y.select-shape': 'Select next shape',\n\t'a11y.select-shape-direction': 'Select shape in direction',\n\t'a11y.enter-leave-container': 'Enter/leave container',\n\t'a11y.repeat-shape': 'Repeat shape',\n\t'a11y.move-shape': 'Move shape',\n\t'a11y.move-shape-faster': 'Move shape faster',\n\t'a11y.rotate-shape-cw': 'Rotate shape clockwise',\n\t'a11y.rotate-shape-ccw': 'Rotate shape counterclockwise',\n\t'a11y.rotate-shape-cw-fine': 'Rotate shape clockwise (fine)',\n\t'a11y.rotate-shape-ccw-fine': 'Rotate shape counterclockwise (fine)',\n\t'a11y.enlarge-shape': 'Enlarge shape',\n\t'a11y.shrink-shape': 'Shrink shape',\n\t'a11y.pan-camera': 'Pan camera',\n\t'a11y.adjust-shape-styles': 'Adjust shape styles',\n\t'a11y.open-context-menu': 'Open context menu',\n\t'a11y.open-keyboard-shortcuts': 'Open keyboard shortcuts',\n\t'menu.title': 'Menu',\n\t'menu.theme': 'Theme',\n\t'menu.accessibility': 'Accessibility',\n\t'menu.copy-as': 'Copy as',\n\t'menu.edit': 'Edit',\n\t'menu.export-as': 'Export as',\n\t'menu.file': 'File',\n\t'menu.language': 'Language',\n\t'menu.preferences': 'Preferences',\n\t'menu.view': 'View',\n\t'menu.input-mode': 'Input mode',\n\t'context-menu.title': 'Context menu',\n\t'context-menu.edit': 'Edit',\n\t'context-menu.arrange': 'Arrange',\n\t'context-menu.copy-as': 'Copy as',\n\t'context-menu.export-as': 'Export as',\n\t'context-menu.export-all-as': 'Export',\n\t'context-menu.move-to-page': 'Move to page',\n\t'context-menu.reorder': 'Reorder',\n\t'page-menu.title': 'Pages',\n\t'page-menu.create-new-page': 'Create new page',\n\t'page-menu.max-page-count-reached': 'Max pages reached',\n\t'page-menu.new-page-initial-name': 'Page 1',\n\t'page-menu.edit-start': 'Edit',\n\t'page-menu.edit-done': 'Done',\n\t'page-menu.go-to-page': 'Go to page',\n\t'page-menu.submenu.rename': 'Rename',\n\t'page-menu.submenu.duplicate-page': 'Duplicate',\n\t'page-menu.submenu.title': 'Menu',\n\t'page-menu.submenu.move-down': 'Move down',\n\t'page-menu.submenu.move-up': 'Move up',\n\t'page-menu.submenu.delete': 'Delete',\n\t'share-menu.title': 'Share',\n\t'share-menu.save-note': 'Download this project to your computer as a .tldr file.',\n\t'share-menu.fork-note': 'Create a new shared project based on this snapshot.',\n\t'share-menu.share-project': 'Share this project',\n\t'share-menu.copy-link': 'Copy editor link',\n\t'share-menu.create-snapshot-link': 'Copy snapshot link',\n\t'share-menu.snapshot-link-note': 'Capture and share this project as a read-only snapshot link.',\n\t'share-menu.copy-readonly-link': 'Copy viewer link',\n\t'share-menu.offline-note': 'Create a new shared project based on your current project.',\n\t'share-menu.copy-link-note': 'Anyone with the link will be able to view and edit this project.',\n\t'share-menu.copy-readonly-link-note': 'Anyone with the link will be able to access this project.',\n\t'share-menu.project-too-large':\n\t\t'Sorry, this project can\u2019t be shared because it\u2019s too large. We\u2019re working on it!',\n\t'share-menu.upload-failed':\n\t\t'Sorry, we couldn\u2019t upload your project at the moment. Please try again or let us know if the problem persists.',\n\t'share-menu.creating-project': 'Creating the new project\u2026',\n\t'share-menu.copied': 'Copied link',\n\t'document-name-menu.copy-link': 'Copy link',\n\t'status.offline': 'Offline',\n\t'people-menu.title': 'People',\n\t'people-menu.change-name': 'Change name',\n\t'people-menu.avatar-color': 'Avatar color',\n\t'people-menu.change-color': 'Change color',\n\t'people-menu.follow': 'Following',\n\t'people-menu.following': 'Following',\n\t'people-menu.leading': 'Following you',\n\t'people-menu.user': '(You)',\n\t'people-menu.invite': 'Invite others',\n\t'people-menu.anonymous-user': 'New user',\n\t'help-menu.import-tldr-file': 'Import file\u2026',\n\t'help-menu.title': 'Help and resources',\n\t'help-menu.about': 'About tldraw',\n\t'help-menu.discord': 'Discord',\n\t'help-menu.github': 'GitHub',\n\t'help-menu.keyboard-shortcuts': 'Keyboard shortcuts',\n\t'help-menu.twitter': 'Twitter',\n\t'help-menu.terms': 'Terms of service',\n\t'help-menu.privacy': 'Privacy policy',\n\t'actions-menu.title': 'Actions',\n\t'edit-link-dialog.title': 'Edit link',\n\t'edit-link-dialog.invalid-url': 'A link must be a valid URL.',\n\t'edit-link-dialog.detail': 'Links will open in a new tab.',\n\t'edit-link-dialog.url': 'URL',\n\t'edit-link-dialog.clear': 'Clear',\n\t'edit-link-dialog.save': 'Continue',\n\t'edit-link-dialog.cancel': 'Cancel',\n\t'edit-link-dialog.external-link': 'External link',\n\t'embed-dialog.title': 'Insert embed',\n\t'embed-dialog.back': 'Back',\n\t'embed-dialog.create': 'Create',\n\t'embed-dialog.cancel': 'Cancel',\n\t'embed-dialog.url': 'URL',\n\t'embed-dialog.instruction': 'Paste in the site\u2019s URL to create the embed.',\n\t'embed-dialog.invalid-url': 'We could not create an embed from that URL.',\n\t'shortcuts-dialog.title': 'Keyboard shortcuts',\n\t'shortcuts-dialog.edit': 'Edit',\n\t'shortcuts-dialog.file': 'File',\n\t'shortcuts-dialog.preferences': 'Preferences',\n\t'shortcuts-dialog.tools': 'Tools',\n\t'shortcuts-dialog.transform': 'Transform',\n\t'shortcuts-dialog.view': 'View',\n\t'shortcuts-dialog.collaboration': 'Collaboration',\n\t'shortcuts-dialog.a11y': 'Accessibility',\n\t'shortcuts-dialog.text-formatting': 'Text formatting',\n\t'style-panel.title': 'Styles',\n\t'style-panel.align': 'Align',\n\t'style-panel.label-align': 'Label align',\n\t'style-panel.vertical-align': 'Vertical align',\n\t'style-panel.position': 'Position',\n\t'style-panel.arrowheads': 'Arrows',\n\t'style-panel.arrowhead-start': 'Start',\n\t'style-panel.arrowhead-end': 'End',\n\t'style-panel.arrow-kind': 'Line',\n\t'style-panel.color': 'Color',\n\t'style-panel.dash': 'Dash',\n\t'style-panel.fill': 'Fill',\n\t'style-panel.font': 'Font',\n\t'style-panel.geo': 'Shape',\n\t'style-panel.mixed': 'Mixed',\n\t'style-panel.opacity': 'Opacity',\n\t'style-panel.size': 'Size',\n\t'style-panel.spline': 'Spline',\n\t'style-panel.selected': 'selected',\n\t'tool-panel.title': 'Tools',\n\t'tool-panel.more': 'More',\n\t'navigation-zone.title': 'Navigation',\n\t'navigation-zone.minimap': 'Minimap',\n\t'navigation-zone.toggle-minimap': 'Toggle minimap',\n\t'navigation-zone.zoom': 'Zoom',\n\t'focus-mode.toggle-focus-mode': 'Toggle focus mode',\n\t'toast.close': 'Close',\n\t'toast.success': 'Success',\n\t'toast.error': 'Error',\n\t'toast.info': 'Info',\n\t'toast.warning': 'Warning',\n\t'file-system.file-open-error.title': 'Could not open file',\n\t'file-system.file-open-error.not-a-tldraw-file':\n\t\t'The file you tried to open doesn\u2019t look like a tldraw file.',\n\t'file-system.file-open-error.file-format-version-too-new':\n\t\t'The file you tried to open is from a newer version of tldraw. Please reload the page and try again.',\n\t'file-system.file-open-error.generic-corrupted-file': 'The file you tried to open is corrupted.',\n\t'file-system.confirm-open.title': 'Overwrite current project?',\n\t'file-system.confirm-open.description':\n\t\t'Opening a file will replace your current project and any unsaved changes will be lost. Are you sure you want to continue?',\n\t'file-system.confirm-open.cancel': 'Cancel',\n\t'file-system.confirm-open.open': 'Open file',\n\t'file-system.confirm-open.dont-show-again': 'Don\u2019t ask again',\n\t'file-system.confirm-clear.title': 'Clear current project?',\n\t'file-system.confirm-clear.description':\n\t\t'Creating a new project will clear your current project and any unsaved changes will be lost. Are you sure you want to continue?',\n\t'file-system.confirm-clear.cancel': 'Cancel',\n\t'file-system.confirm-clear.continue': 'Continue',\n\t'file-system.confirm-clear.dont-show-again': 'Don\u2019t ask again',\n\t'file-system.shared-document-file-open-error.title': 'Could not open file',\n\t'file-system.shared-document-file-open-error.description':\n\t\t'Opening files from shared projects is not supported.',\n\t'sharing.confirm-leave.title': 'Leave current project?',\n\t'sharing.confirm-leave.description':\n\t\t'Are you sure you want to leave this shared project? You can return to it by navigating to its URL.',\n\t'sharing.confirm-leave.cancel': 'Cancel',\n\t'sharing.confirm-leave.leave': 'Leave',\n\t'sharing.confirm-leave.dont-show-again': 'Don\u2019t ask again',\n\t'toast.error.export-fail.title': 'Failed export',\n\t'toast.error.export-fail.desc': 'Failed to export image',\n\t'toast.error.copy-fail.title': 'Failed copy',\n\t'toast.error.copy-fail.desc': 'Failed to copy image',\n\t'context.pages.new-page': 'New page',\n\t'vscode.file-open.desc':\n\t\t'We\u2019ve updated this document to work with the current version of tldraw. If you\u2019d like to keep the original version (which will work on old.tldraw.com), click below to create a backup.',\n\t'vscode.file-open.open': 'Continue',\n\t'vscode.file-open.backup': 'Backup',\n\t'vscode.file-open.backup-saved': 'Backup saved',\n\t'vscode.file-open.backup-failed': 'Backup failed: this is not a .tldr file.',\n\t'vscode.file-open.dont-show-again': 'Don\u2019t ask again',\n\t'cursor-chat.type-to-chat': 'Type to chat\u2026',\n\t'app.loading': 'Loading tldraw\u2026',\n\t'handle.resize-top': 'Resize top',\n\t'handle.resize-bottom': 'Resize bottom',\n\t'handle.resize-left': 'Resize left',\n\t'handle.resize-right': 'Resize right',\n\t'handle.resize-top-left': 'Resize top left',\n\t'handle.resize-top-right': 'Resize top right',\n\t'handle.resize-bottom-left': 'Resize bottom left',\n\t'handle.resize-bottom-right': 'Resize bottom right',\n\t'handle.rotate.top_left_rotate': 'Rotate top left',\n\t'handle.rotate.top_right_rotate': 'Rotate top right',\n\t'handle.rotate.bottom_left_rotate': 'Rotate bottom left',\n\t'handle.rotate.bottom_right_rotate': 'Rotate bottom right',\n\t'handle.rotate.mobile_rotate': 'Rotate',\n\t'handle.crop.top': 'Crop top',\n\t'handle.crop.bottom': 'Crop bottom',\n\t'handle.crop.left': 'Crop left',\n\t'handle.crop.right': 'Crop right',\n\t'handle.crop.top-left': 'Crop top left',\n\t'handle.crop.top-right': 'Crop top right',\n\t'handle.crop.bottom-left': 'Crop bottom left',\n\t'handle.crop.bottom-right': 'Crop bottom right',\n\t'ui.close': 'Close',\n\t'ui.checked': 'Checked',\n\t'ui.unchecked': 'Unchecked',\n}\n"],
5
5
  "mappings": "AAIO,MAAM,sBAAsB;AAAA,EAClC,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,2BAA2B;AAAA,EAC3B,uBAAuB;AAAA,EACvB,0BAA0B;AAAA,EAC1B,8BAA8B;AAAA,EAC9B,2BAA2B;AAAA,EAC3B,0BAA0B;AAAA,EAC1B,uBAAuB;AAAA,EACvB,kCAAkC;AAAA,EAClC,gCAAgC;AAAA,EAChC,wCAAwC;AAAA,EACxC,sCAAsC;AAAA,EACtC,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,0BAA0B;AAAA,EAC1B,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,4BAA4B;AAAA,EAC5B,sBAAsB;AAAA,EACtB,4BAA4B;AAAA,EAC5B,sBAAsB;AAAA,EACtB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,gCAAgC;AAAA,EAChC,8BAA8B;AAAA,EAC9B,sCAAsC;AAAA,EACtC,oCAAoC;AAAA,EACpC,4BAA4B;AAAA,EAC5B,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,8BAA8B;AAAA,EAC9B,wBAAwB;AAAA,EACxB,8BAA8B;AAAA,EAC9B,wBAAwB;AAAA,EACxB,kCAAkC;AAAA,EAClC,4BAA4B;AAAA,EAC5B,kCAAkC;AAAA,EAClC,4BAA4B;AAAA,EAC5B,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,wBAAwB;AAAA,EACxB,gCAAgC;AAAA,EAChC,8BAA8B;AAAA,EAC9B,uBAAuB;AAAA,EACvB,iCAAiC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AAA,EAClC,oCAAoC;AAAA,EACpC,qCAAqC;AAAA,EACrC,+BAA+B;AAAA,EAC/B,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,2BAA2B;AAAA,EAC3B,4BAA4B;AAAA,EAC5B,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,gBAAgB;AACjB;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,8 @@
1
- const version = "4.1.1";
1
+ const version = "4.2.0-next.d76c345101d5";
2
2
  const publishDates = {
3
3
  major: "2025-09-18T14:39:22.803Z",
4
- minor: "2025-10-15T12:23:29.168Z",
5
- patch: "2025-10-15T13:38:40.898Z"
4
+ minor: "2025-10-15T13:27:49.690Z",
5
+ patch: "2025-10-15T13:27:49.690Z"
6
6
  };
7
7
  export {
8
8
  publishDates,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/ui/version.ts"],
4
- "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '4.1.1'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2025-10-15T12:23:29.168Z',\n\tpatch: '2025-10-15T13:38:40.898Z',\n}\n"],
4
+ "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '4.2.0-next.d76c345101d5'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2025-10-15T13:27:49.690Z',\n\tpatch: '2025-10-15T13:27:49.690Z',\n}\n"],
5
5
  "mappings": "AAGO,MAAM,UAAU;AAChB,MAAM,eAAe;AAAA,EAC3B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tldraw",
3
3
  "description": "A tiny little drawing editor.",
4
- "version": "4.1.1",
4
+ "version": "4.2.0-next.d76c345101d5",
5
5
  "author": {
6
6
  "name": "tldraw Inc.",
7
7
  "email": "hello@tldraw.com"
@@ -62,8 +62,8 @@
62
62
  "@tiptap/pm": "^2.9.1",
63
63
  "@tiptap/react": "^2.9.1",
64
64
  "@tiptap/starter-kit": "^2.9.1",
65
- "@tldraw/editor": "4.1.1",
66
- "@tldraw/store": "4.1.1",
65
+ "@tldraw/editor": "4.2.0-next.d76c345101d5",
66
+ "@tldraw/store": "4.2.0-next.d76c345101d5",
67
67
  "classnames": "^2.5.1",
68
68
  "hotkeys-js": "^3.13.9",
69
69
  "idb": "^7.1.1",
package/src/index.ts CHANGED
@@ -134,6 +134,7 @@ export {
134
134
  getArrowTerminalsInArrowSpace,
135
135
  type TLArrowBindings,
136
136
  } from './lib/shapes/arrow/shared'
137
+ export { createBookmarkFromUrl } from './lib/shapes/bookmark/bookmarks'
137
138
  export { BookmarkShapeUtil } from './lib/shapes/bookmark/BookmarkShapeUtil'
138
139
  export { DrawShapeTool } from './lib/shapes/draw/DrawShapeTool'
139
140
  export { DrawShapeUtil, type DrawShapeOptions } from './lib/shapes/draw/DrawShapeUtil'
@@ -428,7 +428,8 @@ export const DEFAULT_EMBED_DEFINITIONS = [
428
428
  toEmbedUrl: (url) => {
429
429
  const urlObj = safeParseUrl(url)
430
430
  if (urlObj && urlObj.pathname.match(/\/@([^/]+)\/([^/]+)/)) {
431
- return `${url}?embed=true`
431
+ urlObj.searchParams.append('embed', 'true')
432
+ return urlObj.href
432
433
  }
433
434
  return
434
435
  },
@@ -525,30 +526,6 @@ export const DEFAULT_EMBED_DEFINITIONS = [
525
526
  return
526
527
  },
527
528
  },
528
- {
529
- type: 'excalidraw',
530
- title: 'Excalidraw',
531
- hostnames: ['excalidraw.com'],
532
- width: 720,
533
- height: 500,
534
- doesResize: true,
535
- isAspectRatioLocked: true,
536
- embedOnPaste: true,
537
- toEmbedUrl: (url) => {
538
- const urlObj = safeParseUrl(url)
539
- if (urlObj && urlObj.hash.match(/#room=/)) {
540
- return url
541
- }
542
- return
543
- },
544
- fromEmbedUrl: (url) => {
545
- const urlObj = safeParseUrl(url)
546
- if (urlObj && urlObj.hash.match(/#room=/)) {
547
- return url
548
- }
549
- return
550
- },
551
- },
552
529
  {
553
530
  type: 'observable',
554
531
  title: 'Observable',
@@ -31,6 +31,7 @@ import {
31
31
  toRichText,
32
32
  } from '@tldraw/editor'
33
33
  import { EmbedDefinition } from './defaultEmbedDefinitions'
34
+ import { createBookmarkFromUrl } from './shapes/bookmark/bookmarks'
34
35
  import { EmbedShapeUtil } from './shapes/embed/EmbedShapeUtil'
35
36
  import { getCroppedImageDataForReplacedImage } from './shapes/shared/crop'
36
37
  import { FONT_FAMILIES, FONT_SIZES, TEXT_PROPS } from './shapes/shared/default-shape-constants'
@@ -572,42 +573,16 @@ export async function defaultHandleExternalUrlContent(
572
573
  ? editor.inputs.currentPagePoint
573
574
  : editor.getViewportPageBounds().center)
574
575
 
575
- const assetId: TLAssetId = AssetRecordType.createId(getHashForString(url))
576
- const shape = createEmptyBookmarkShape(editor, url, position)
577
-
578
- // Use an existing asset if we have one, or else else create a new one
579
- let asset = editor.getAsset(assetId) as TLAsset
580
- let shouldAlsoCreateAsset = false
581
- if (!asset) {
582
- shouldAlsoCreateAsset = true
583
- try {
584
- const bookmarkAsset = await editor.getAssetForExternalContent({ type: 'url', url })
585
- if (!bookmarkAsset) throw Error('Could not create an asset')
586
- asset = bookmarkAsset
587
- } catch {
588
- toasts.addToast({
589
- title: msg('assets.url.failed'),
590
- severity: 'error',
591
- })
592
- return
593
- }
594
- }
595
-
596
- editor.run(() => {
597
- if (shouldAlsoCreateAsset) {
598
- editor.createAssets([asset])
599
- }
576
+ // Use the new function to create the bookmark
577
+ const result = await createBookmarkFromUrl(editor, { url, center: position })
600
578
 
601
- editor.updateShapes([
602
- {
603
- id: shape.id,
604
- type: shape.type,
605
- props: {
606
- assetId: asset.id,
607
- },
608
- },
609
- ])
610
- })
579
+ if (!result.ok) {
580
+ toasts.addToast({
581
+ title: msg('assets.url.failed'),
582
+ severity: 'error',
583
+ })
584
+ return
585
+ }
611
586
  }
612
587
 
613
588
  /** @public */
@@ -1,7 +1,5 @@
1
1
  import {
2
- AssetRecordType,
3
2
  BaseBoxShapeUtil,
4
- Editor,
5
3
  HTMLContainer,
6
4
  T,
7
5
  TLAssetId,
@@ -10,8 +8,6 @@ import {
10
8
  TLBookmarkShapeProps,
11
9
  bookmarkShapeMigrations,
12
10
  bookmarkShapeProps,
13
- debounce,
14
- getHashForString,
15
11
  lerp,
16
12
  tlenv,
17
13
  toDomPrecision,
@@ -24,11 +20,13 @@ import { convertCommonTitleHTMLEntities } from '../../utils/text/text'
24
20
  import { HyperlinkButton } from '../shared/HyperlinkButton'
25
21
  import { LINK_ICON } from '../shared/icons-editor'
26
22
  import { getRotatedBoxShadow } from '../shared/rotated-box-shadow'
27
-
28
- const BOOKMARK_WIDTH = 300
29
- const BOOKMARK_HEIGHT = 320
30
- const BOOKMARK_JUST_URL_HEIGHT = 46
31
- const SHORT_BOOKMARK_HEIGHT = 101
23
+ import {
24
+ BOOKMARK_HEIGHT,
25
+ BOOKMARK_WIDTH,
26
+ getHumanReadableAddress,
27
+ setBookmarkHeight,
28
+ updateBookmarkAssetOnUrlChange,
29
+ } from './bookmarks'
32
30
 
33
31
  /** @public */
34
32
  export class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape> {
@@ -71,22 +69,18 @@ export class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape> {
71
69
  }
72
70
 
73
71
  override component(shape: TLBookmarkShape) {
74
- return <BookmarkShapeComponent shape={shape} />
72
+ const { assetId, url, h } = shape.props
73
+ const rotation = this.editor.getShapePageTransform(shape)!.rotation()
74
+
75
+ return <BookmarkShapeComponent assetId={assetId} url={url} h={h} rotation={rotation} />
75
76
  }
76
77
 
77
78
  override indicator(shape: TLBookmarkShape) {
78
- return (
79
- <rect
80
- width={toDomPrecision(shape.props.w)}
81
- height={toDomPrecision(shape.props.h)}
82
- rx="6"
83
- ry="6"
84
- />
85
- )
79
+ return <BookmarkIndicatorComponent w={shape.props.w} h={shape.props.h} />
86
80
  }
87
81
 
88
82
  override onBeforeCreate(next: TLBookmarkShape) {
89
- return getBookmarkSize(this.editor, next)
83
+ return setBookmarkHeight(this.editor, next)
90
84
  }
91
85
 
92
86
  override onBeforeUpdate(prev: TLBookmarkShape, shape: TLBookmarkShape) {
@@ -99,7 +93,7 @@ export class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape> {
99
93
  }
100
94
 
101
95
  if (prev.props.assetId !== shape.props.assetId) {
102
- return getBookmarkSize(this.editor, shape)
96
+ return setBookmarkHeight(this.editor, shape)
103
97
  }
104
98
  }
105
99
  override getInterpolatedProps(
@@ -115,18 +109,30 @@ export class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape> {
115
109
  }
116
110
  }
117
111
 
118
- function BookmarkShapeComponent({ shape }: { shape: TLBookmarkShape }) {
112
+ export function BookmarkIndicatorComponent({ w, h }: { w: number; h: number }) {
113
+ return <rect width={toDomPrecision(w)} height={toDomPrecision(h)} rx="6" ry="6" />
114
+ }
115
+
116
+ export function BookmarkShapeComponent({
117
+ assetId,
118
+ rotation,
119
+ url,
120
+ h,
121
+ showImageContainer = true,
122
+ }: {
123
+ assetId: TLAssetId | null
124
+ rotation: number
125
+ h: number
126
+ url: string
127
+ showImageContainer?: boolean
128
+ }) {
119
129
  const editor = useEditor()
120
130
 
121
- const asset = (
122
- shape.props.assetId ? editor.getAsset(shape.props.assetId) : null
123
- ) as TLBookmarkAsset
131
+ const asset = assetId ? (editor.getAsset(assetId) as TLBookmarkAsset) : null
124
132
 
125
133
  const isSafariExport = !!useSvgExportContext() && tlenv.isSafari
126
134
 
127
- const pageRotation = editor.getShapePageTransform(shape)!.rotation()
128
-
129
- const address = getHumanReadableAddress(shape)
135
+ const address = getHumanReadableAddress(url)
130
136
 
131
137
  const [isFaviconValid, setIsFaviconValid] = useState(true)
132
138
  const onFaviconError = () => setIsFaviconValid(false)
@@ -146,11 +152,11 @@ function BookmarkShapeComponent({ shape }: { shape: TLBookmarkShape }) {
146
152
  isSafariExport && 'tl-bookmark__container--safariExport'
147
153
  )}
148
154
  style={{
149
- boxShadow: isSafariExport ? undefined : getRotatedBoxShadow(pageRotation),
150
- maxHeight: shape.props.h,
155
+ boxShadow: isSafariExport ? undefined : getRotatedBoxShadow(rotation),
156
+ maxHeight: h,
151
157
  }}
152
158
  >
153
- {(!asset || asset.props.image) && (
159
+ {showImageContainer && (!asset || asset.props.image) && (
154
160
  <div className="tl-bookmark__image_container">
155
161
  {asset ? (
156
162
  <img
@@ -163,14 +169,14 @@ function BookmarkShapeComponent({ shape }: { shape: TLBookmarkShape }) {
163
169
  ) : (
164
170
  <div className="tl-bookmark__placeholder" />
165
171
  )}
166
- {asset?.props.image && <HyperlinkButton url={shape.props.url} />}
172
+ {asset?.props.image && <HyperlinkButton url={url} />}
167
173
  </div>
168
174
  )}
169
175
  <div className="tl-bookmark__copy_container">
170
176
  {asset?.props.title ? (
171
177
  <a
172
178
  className="tl-bookmark__link"
173
- href={shape.props.url || ''}
179
+ href={url || ''}
174
180
  target="_blank"
175
181
  rel="noopener noreferrer"
176
182
  draggable={false}
@@ -187,7 +193,7 @@ function BookmarkShapeComponent({ shape }: { shape: TLBookmarkShape }) {
187
193
  ) : null}
188
194
  <a
189
195
  className="tl-bookmark__link"
190
- href={shape.props.url || ''}
196
+ href={url || ''}
191
197
  target="_blank"
192
198
  rel="noopener noreferrer"
193
199
  draggable={false}
@@ -218,103 +224,3 @@ function BookmarkShapeComponent({ shape }: { shape: TLBookmarkShape }) {
218
224
  </HTMLContainer>
219
225
  )
220
226
  }
221
-
222
- function getBookmarkSize(editor: Editor, shape: TLBookmarkShape) {
223
- const asset = (
224
- shape.props.assetId ? editor.getAsset(shape.props.assetId) : null
225
- ) as TLBookmarkAsset
226
-
227
- let h = BOOKMARK_HEIGHT
228
-
229
- if (asset) {
230
- if (!asset.props.image) {
231
- if (!asset.props.title) {
232
- h = BOOKMARK_JUST_URL_HEIGHT
233
- } else {
234
- h = SHORT_BOOKMARK_HEIGHT
235
- }
236
- }
237
- }
238
-
239
- return {
240
- ...shape,
241
- props: {
242
- ...shape.props,
243
- h,
244
- },
245
- }
246
- }
247
-
248
- /** @internal */
249
- export const getHumanReadableAddress = (shape: TLBookmarkShape) => {
250
- try {
251
- const url = new URL(shape.props.url)
252
- // we want the hostname without any www
253
- return url.hostname.replace(/^www\./, '')
254
- } catch {
255
- return shape.props.url
256
- }
257
- }
258
-
259
- function updateBookmarkAssetOnUrlChange(editor: Editor, shape: TLBookmarkShape) {
260
- const { url } = shape.props
261
-
262
- // Derive the asset id from the URL
263
- const assetId: TLAssetId = AssetRecordType.createId(getHashForString(url))
264
-
265
- if (editor.getAsset(assetId)) {
266
- // Existing asset for this URL?
267
- if (shape.props.assetId !== assetId) {
268
- editor.updateShapes<TLBookmarkShape>([
269
- {
270
- id: shape.id,
271
- type: shape.type,
272
- props: { assetId },
273
- },
274
- ])
275
- }
276
- } else {
277
- // No asset for this URL?
278
-
279
- // First, clear out the existing asset reference
280
- editor.updateShapes<TLBookmarkShape>([
281
- {
282
- id: shape.id,
283
- type: shape.type,
284
- props: { assetId: null },
285
- },
286
- ])
287
-
288
- // Then try to asyncronously create a new one
289
- createBookmarkAssetOnUrlChange(editor, shape)
290
- }
291
- }
292
-
293
- const createBookmarkAssetOnUrlChange = debounce(async (editor: Editor, shape: TLBookmarkShape) => {
294
- if (editor.isDisposed) return
295
-
296
- const { url } = shape.props
297
-
298
- // Create the asset using the external content manager's createAssetFromUrl method.
299
- // This may be overwritten by the user (for example, we overwrite it on tldraw.com)
300
- const asset = await editor.getAssetForExternalContent({ type: 'url', url })
301
-
302
- if (!asset) {
303
- // No asset? Just leave the bookmark as a null assetId.
304
- return
305
- }
306
-
307
- editor.run(() => {
308
- // Create the new asset
309
- editor.createAssets([asset])
310
-
311
- // And update the shape
312
- editor.updateShapes<TLBookmarkShape>([
313
- {
314
- id: shape.id,
315
- type: shape.type,
316
- props: { assetId: asset.id },
317
- },
318
- ])
319
- })
320
- }, 500)