tldraw 4.1.0-canary.571a78a3ce3d → 4.1.0-canary.58f856c8473b

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 (28) hide show
  1. package/dist-cjs/index.js +1 -1
  2. package/dist-cjs/lib/ui/components/DebugMenu/DefaultDebugMenuContent.js +2 -2
  3. package/dist-cjs/lib/ui/components/DebugMenu/DefaultDebugMenuContent.js.map +1 -1
  4. package/dist-cjs/lib/ui/components/menu-items.js +2 -2
  5. package/dist-cjs/lib/ui/components/menu-items.js.map +1 -1
  6. package/dist-cjs/lib/ui/hooks/useEditorEvents.js +1 -1
  7. package/dist-cjs/lib/ui/hooks/useEditorEvents.js.map +1 -1
  8. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +4 -4
  9. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +1 -1
  10. package/dist-cjs/lib/ui/version.js +3 -3
  11. package/dist-cjs/lib/ui/version.js.map +1 -1
  12. package/dist-esm/index.mjs +1 -1
  13. package/dist-esm/lib/ui/components/DebugMenu/DefaultDebugMenuContent.mjs +2 -2
  14. package/dist-esm/lib/ui/components/DebugMenu/DefaultDebugMenuContent.mjs.map +1 -1
  15. package/dist-esm/lib/ui/components/menu-items.mjs +2 -2
  16. package/dist-esm/lib/ui/components/menu-items.mjs.map +1 -1
  17. package/dist-esm/lib/ui/hooks/useEditorEvents.mjs +1 -1
  18. package/dist-esm/lib/ui/hooks/useEditorEvents.mjs.map +1 -1
  19. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +4 -4
  20. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +1 -1
  21. package/dist-esm/lib/ui/version.mjs +3 -3
  22. package/dist-esm/lib/ui/version.mjs.map +1 -1
  23. package/package.json +3 -3
  24. package/src/lib/ui/components/DebugMenu/DefaultDebugMenuContent.tsx +2 -2
  25. package/src/lib/ui/components/menu-items.tsx +2 -2
  26. package/src/lib/ui/hooks/useEditorEvents.ts +1 -1
  27. package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +4 -4
  28. package/src/lib/ui/version.ts +3 -3
package/dist-cjs/index.js CHANGED
@@ -584,7 +584,7 @@ var import_buildFromV1Document = require("./lib/utils/tldr/buildFromV1Document")
584
584
  var import_file = require("./lib/utils/tldr/file");
585
585
  (0, import_editor.registerTldrawLibraryVersion)(
586
586
  "tldraw",
587
- "4.1.0-canary.571a78a3ce3d",
587
+ "4.1.0-canary.58f856c8473b",
588
588
  "cjs"
589
589
  );
590
590
  //# sourceMappingURL=index.js.map
@@ -190,12 +190,12 @@ function DefaultDebugMenuContent() {
190
190
  function DebugFlags() {
191
191
  const items = Object.values(import_editor.debugFlags);
192
192
  if (!items.length) return null;
193
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TldrawUiMenuSubmenu.TldrawUiMenuSubmenu, { id: "debug flags", label: "Debug Flags", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TldrawUiMenuGroup.TldrawUiMenuGroup, { id: "debug flags", children: items.map((flag) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DebugFlagToggle, { flag }, flag.name)) }) });
193
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TldrawUiMenuSubmenu.TldrawUiMenuSubmenu, { id: "debug flags", label: "Debug flags", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TldrawUiMenuGroup.TldrawUiMenuGroup, { id: "debug flags", children: items.map((flag) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DebugFlagToggle, { flag }, flag.name)) }) });
194
194
  }
195
195
  function FeatureFlags() {
196
196
  const items = Object.values(import_editor.featureFlags);
197
197
  if (!items.length) return null;
198
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TldrawUiMenuSubmenu.TldrawUiMenuSubmenu, { id: "feature flags", label: "Feature Flags", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TldrawUiMenuGroup.TldrawUiMenuGroup, { id: "feature flags", children: items.map((flag) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DebugFlagToggle, { flag }, flag.name)) }) });
198
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TldrawUiMenuSubmenu.TldrawUiMenuSubmenu, { id: "feature flags", label: "Feature flags", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TldrawUiMenuGroup.TldrawUiMenuGroup, { id: "feature flags", children: items.map((flag) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DebugFlagToggle, { flag }, flag.name)) }) });
199
199
  }
200
200
  function ExampleDialog({
201
201
  title = "title",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/lib/ui/components/DebugMenu/DefaultDebugMenuContent.tsx"],
4
- "sourcesContent": ["import {\n\tDebugFlag,\n\tEditor,\n\tTLShapePartial,\n\tcreateShapeId,\n\tdebugFlags,\n\tfeatureFlags,\n\thardResetEditor,\n\ttrack,\n\tuniqueId,\n\tuseEditor,\n} from '@tldraw/editor'\nimport React from 'react'\nimport { useDialogs } from '../../context/dialogs'\nimport { useToasts } from '../../context/toasts'\nimport { untranslated } from '../../hooks/useTranslation/useTranslation'\nimport { TldrawUiButton } from '../primitives/Button/TldrawUiButton'\nimport { TldrawUiButtonCheck } from '../primitives/Button/TldrawUiButtonCheck'\nimport { TldrawUiButtonLabel } from '../primitives/Button/TldrawUiButtonLabel'\nimport {\n\tTldrawUiDialogBody,\n\tTldrawUiDialogCloseButton,\n\tTldrawUiDialogFooter,\n\tTldrawUiDialogHeader,\n\tTldrawUiDialogTitle,\n} from '../primitives/TldrawUiDialog'\nimport { TldrawUiMenuCheckboxItem } from '../primitives/menus/TldrawUiMenuCheckboxItem'\nimport { TldrawUiMenuGroup } from '../primitives/menus/TldrawUiMenuGroup'\nimport { TldrawUiMenuItem } from '../primitives/menus/TldrawUiMenuItem'\nimport { TldrawUiMenuSubmenu } from '../primitives/menus/TldrawUiMenuSubmenu'\n\n/** @public @react */\nexport function DefaultDebugMenuContent() {\n\tconst editor = useEditor()\n\tconst { addToast } = useToasts()\n\tconst { addDialog } = useDialogs()\n\tconst [error, setError] = React.useState<boolean>(false)\n\n\treturn (\n\t\t<>\n\t\t\t<TldrawUiMenuGroup id=\"items\">\n\t\t\t\t<TldrawUiMenuItem id=\"hard-reset\" onSelect={hardResetEditor} label={'Hard reset'} />\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"add-toast\"\n\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something good happened',\n\t\t\t\t\t\t\tdescription: 'Hey, attend to this thing over here. It might be important!',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t\tseverity: 'success',\n\t\t\t\t\t\t})\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something happened',\n\t\t\t\t\t\t\tdescription: 'Hey, attend to this thing over here. It might be important!',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t\tseverity: 'info',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Primary',\n\t\t\t\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Normal',\n\t\t\t\t\t\t\t\t\ttype: 'normal',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Danger',\n\t\t\t\t\t\t\t\t\ttype: 'danger',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t})\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something maybe bad happened',\n\t\t\t\t\t\t\tdescription: 'Hey, attend to this thing over here. It might be important!',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t\tseverity: 'warning',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Primary',\n\t\t\t\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Normal',\n\t\t\t\t\t\t\t\t\ttype: 'normal',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Danger',\n\t\t\t\t\t\t\t\t\ttype: 'danger',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t})\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something bad happened',\n\t\t\t\t\t\t\tseverity: 'error',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t})\n\t\t\t\t\t}}\n\t\t\t\t\tlabel={untranslated('Show toast')}\n\t\t\t\t/>\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"show-dialog\"\n\t\t\t\t\tlabel={'Show dialog'}\n\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\taddDialog({\n\t\t\t\t\t\t\tcomponent: ({ onClose }) => (\n\t\t\t\t\t\t\t\t<ExampleDialog\n\t\t\t\t\t\t\t\t\tdisplayDontShowAgain\n\t\t\t\t\t\t\t\t\tonCancel={() => onClose()}\n\t\t\t\t\t\t\t\t\tonContinue={() => onClose()}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tonClose: () => {\n\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"create-shapes\"\n\t\t\t\t\tlabel={'Create 100 shapes'}\n\t\t\t\t\tonSelect={() => createNShapes(editor, 100)}\n\t\t\t\t/>\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"count-nodes\"\n\t\t\t\t\tlabel={'Count shapes / nodes'}\n\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\t\t\t\tconst shapes =\n\t\t\t\t\t\t\tselectedShapes.length === 0 ? editor.getRenderingShapes() : selectedShapes\n\t\t\t\t\t\twindow.alert(\n\t\t\t\t\t\t\t`Shapes ${shapes.length}, DOM nodes:${document.querySelector('.tl-shapes')!.querySelectorAll('*')?.length}`\n\t\t\t\t\t\t)\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t{(() => {\n\t\t\t\t\tif (error) throw Error('oh no!')\n\t\t\t\t\treturn null\n\t\t\t\t})()}\n\t\t\t\t<TldrawUiMenuItem id=\"throw-error\" onSelect={() => setError(true)} label={'Throw error'} />\n\t\t\t</TldrawUiMenuGroup>\n\t\t\t<TldrawUiMenuGroup id=\"flags\">\n\t\t\t\t<DebugFlags />\n\t\t\t\t<FeatureFlags />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</>\n\t)\n}\n/** @public @react */\nexport function DebugFlags() {\n\tconst items = Object.values(debugFlags)\n\tif (!items.length) return null\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"debug flags\" label=\"Debug Flags\">\n\t\t\t<TldrawUiMenuGroup id=\"debug flags\">\n\t\t\t\t{items.map((flag) => (\n\t\t\t\t\t<DebugFlagToggle key={flag.name} flag={flag} />\n\t\t\t\t))}\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n/** @public @react */\nexport function FeatureFlags() {\n\tconst items = Object.values(featureFlags)\n\tif (!items.length) return null\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"feature flags\" label=\"Feature Flags\">\n\t\t\t<TldrawUiMenuGroup id=\"feature flags\">\n\t\t\t\t{items.map((flag) => (\n\t\t\t\t\t<DebugFlagToggle key={flag.name} flag={flag} />\n\t\t\t\t))}\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public */\nexport interface ExampleDialogProps {\n\ttitle?: string\n\tbody?: React.ReactNode\n\tcancel?: string\n\tconfirm?: string\n\tdisplayDontShowAgain?: boolean\n\tmaxWidth?: string\n\tonCancel(): void\n\tonContinue(): void\n}\n\n/** @public @react */\nexport function ExampleDialog({\n\ttitle = 'title',\n\tbody = 'hello hello hello',\n\tcancel = 'Cancel',\n\tconfirm = 'Continue',\n\tdisplayDontShowAgain = false,\n\tmaxWidth = '350',\n\tonCancel,\n\tonContinue,\n}: ExampleDialogProps) {\n\tconst [dontShowAgain, setDontShowAgain] = React.useState(false)\n\n\treturn (\n\t\t<>\n\t\t\t<TldrawUiDialogHeader>\n\t\t\t\t<TldrawUiDialogTitle>{title}</TldrawUiDialogTitle>\n\t\t\t\t<TldrawUiDialogCloseButton />\n\t\t\t</TldrawUiDialogHeader>\n\t\t\t<TldrawUiDialogBody style={{ maxWidth }}>{body}</TldrawUiDialogBody>\n\t\t\t<TldrawUiDialogFooter className=\"tlui-dialog__footer__actions\">\n\t\t\t\t{displayDontShowAgain && (\n\t\t\t\t\t<TldrawUiButton\n\t\t\t\t\t\ttype=\"normal\"\n\t\t\t\t\t\tonClick={() => setDontShowAgain(!dontShowAgain)}\n\t\t\t\t\t\tstyle={{ marginRight: 'auto' }}\n\t\t\t\t\t>\n\t\t\t\t\t\t<TldrawUiButtonCheck checked={dontShowAgain} />\n\t\t\t\t\t\t<TldrawUiButtonLabel>Don\u2019t show again</TldrawUiButtonLabel>\n\t\t\t\t\t</TldrawUiButton>\n\t\t\t\t)}\n\t\t\t\t<TldrawUiButton type=\"normal\" onClick={onCancel}>\n\t\t\t\t\t<TldrawUiButtonLabel>{cancel}</TldrawUiButtonLabel>\n\t\t\t\t</TldrawUiButton>\n\t\t\t\t<TldrawUiButton type=\"primary\" onClick={async () => onContinue()}>\n\t\t\t\t\t<TldrawUiButtonLabel>{confirm}</TldrawUiButtonLabel>\n\t\t\t\t</TldrawUiButton>\n\t\t\t</TldrawUiDialogFooter>\n\t\t</>\n\t)\n}\n\nconst DebugFlagToggle = track(function DebugFlagToggle({\n\tflag,\n\tonChange,\n}: {\n\tflag: DebugFlag<boolean>\n\tonChange?(newValue: boolean): void\n}) {\n\tconst value = flag.get()\n\treturn (\n\t\t<TldrawUiMenuCheckboxItem\n\t\t\tid={flag.name}\n\t\t\ttitle={flag.name}\n\t\t\tlabel={flag.name\n\t\t\t\t.replace(/([a-z0-9])([A-Z])/g, (m) => `${m[0]} ${m[1].toLowerCase()}`)\n\t\t\t\t.replace(/^[a-z]/, (m) => m.toUpperCase())}\n\t\t\tchecked={value}\n\t\t\tonSelect={() => {\n\t\t\t\tflag.set(!value)\n\t\t\t\tonChange?.(!value)\n\t\t\t}}\n\t\t/>\n\t)\n})\n\nlet t = 0\n\nfunction createNShapes(editor: Editor, n: number) {\n\tconst gap = editor.options.adjacentShapeMargin\n\tconst shapesToCreate: TLShapePartial[] = Array(n)\n\tconst cols = Math.floor(Math.sqrt(n))\n\n\tfor (let i = 0; i < n; i++) {\n\t\tt++\n\t\tshapesToCreate[i] = {\n\t\t\tid: createShapeId('box' + t),\n\t\t\ttype: 'geo',\n\t\t\tx: (i % cols) * (100 + gap),\n\t\t\ty: Math.floor(i / cols) * (100 + gap),\n\t\t}\n\t}\n\n\teditor.run(() => {\n\t\t// allow this to trigger the max shapes alert\n\t\teditor.createShapes(shapesToCreate).setSelectedShapes(shapesToCreate.map((s) => s.id))\n\t})\n}\n"],
4
+ "sourcesContent": ["import {\n\tDebugFlag,\n\tEditor,\n\tTLShapePartial,\n\tcreateShapeId,\n\tdebugFlags,\n\tfeatureFlags,\n\thardResetEditor,\n\ttrack,\n\tuniqueId,\n\tuseEditor,\n} from '@tldraw/editor'\nimport React from 'react'\nimport { useDialogs } from '../../context/dialogs'\nimport { useToasts } from '../../context/toasts'\nimport { untranslated } from '../../hooks/useTranslation/useTranslation'\nimport { TldrawUiButton } from '../primitives/Button/TldrawUiButton'\nimport { TldrawUiButtonCheck } from '../primitives/Button/TldrawUiButtonCheck'\nimport { TldrawUiButtonLabel } from '../primitives/Button/TldrawUiButtonLabel'\nimport {\n\tTldrawUiDialogBody,\n\tTldrawUiDialogCloseButton,\n\tTldrawUiDialogFooter,\n\tTldrawUiDialogHeader,\n\tTldrawUiDialogTitle,\n} from '../primitives/TldrawUiDialog'\nimport { TldrawUiMenuCheckboxItem } from '../primitives/menus/TldrawUiMenuCheckboxItem'\nimport { TldrawUiMenuGroup } from '../primitives/menus/TldrawUiMenuGroup'\nimport { TldrawUiMenuItem } from '../primitives/menus/TldrawUiMenuItem'\nimport { TldrawUiMenuSubmenu } from '../primitives/menus/TldrawUiMenuSubmenu'\n\n/** @public @react */\nexport function DefaultDebugMenuContent() {\n\tconst editor = useEditor()\n\tconst { addToast } = useToasts()\n\tconst { addDialog } = useDialogs()\n\tconst [error, setError] = React.useState<boolean>(false)\n\n\treturn (\n\t\t<>\n\t\t\t<TldrawUiMenuGroup id=\"items\">\n\t\t\t\t<TldrawUiMenuItem id=\"hard-reset\" onSelect={hardResetEditor} label={'Hard reset'} />\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"add-toast\"\n\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something good happened',\n\t\t\t\t\t\t\tdescription: 'Hey, attend to this thing over here. It might be important!',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t\tseverity: 'success',\n\t\t\t\t\t\t})\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something happened',\n\t\t\t\t\t\t\tdescription: 'Hey, attend to this thing over here. It might be important!',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t\tseverity: 'info',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Primary',\n\t\t\t\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Normal',\n\t\t\t\t\t\t\t\t\ttype: 'normal',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Danger',\n\t\t\t\t\t\t\t\t\ttype: 'danger',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t})\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something maybe bad happened',\n\t\t\t\t\t\t\tdescription: 'Hey, attend to this thing over here. It might be important!',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t\tseverity: 'warning',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Primary',\n\t\t\t\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Normal',\n\t\t\t\t\t\t\t\t\ttype: 'normal',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Danger',\n\t\t\t\t\t\t\t\t\ttype: 'danger',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t})\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something bad happened',\n\t\t\t\t\t\t\tseverity: 'error',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t})\n\t\t\t\t\t}}\n\t\t\t\t\tlabel={untranslated('Show toast')}\n\t\t\t\t/>\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"show-dialog\"\n\t\t\t\t\tlabel={'Show dialog'}\n\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\taddDialog({\n\t\t\t\t\t\t\tcomponent: ({ onClose }) => (\n\t\t\t\t\t\t\t\t<ExampleDialog\n\t\t\t\t\t\t\t\t\tdisplayDontShowAgain\n\t\t\t\t\t\t\t\t\tonCancel={() => onClose()}\n\t\t\t\t\t\t\t\t\tonContinue={() => onClose()}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tonClose: () => {\n\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"create-shapes\"\n\t\t\t\t\tlabel={'Create 100 shapes'}\n\t\t\t\t\tonSelect={() => createNShapes(editor, 100)}\n\t\t\t\t/>\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"count-nodes\"\n\t\t\t\t\tlabel={'Count shapes / nodes'}\n\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\t\t\t\tconst shapes =\n\t\t\t\t\t\t\tselectedShapes.length === 0 ? editor.getRenderingShapes() : selectedShapes\n\t\t\t\t\t\twindow.alert(\n\t\t\t\t\t\t\t`Shapes ${shapes.length}, DOM nodes:${document.querySelector('.tl-shapes')!.querySelectorAll('*')?.length}`\n\t\t\t\t\t\t)\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t{(() => {\n\t\t\t\t\tif (error) throw Error('oh no!')\n\t\t\t\t\treturn null\n\t\t\t\t})()}\n\t\t\t\t<TldrawUiMenuItem id=\"throw-error\" onSelect={() => setError(true)} label={'Throw error'} />\n\t\t\t</TldrawUiMenuGroup>\n\t\t\t<TldrawUiMenuGroup id=\"flags\">\n\t\t\t\t<DebugFlags />\n\t\t\t\t<FeatureFlags />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</>\n\t)\n}\n/** @public @react */\nexport function DebugFlags() {\n\tconst items = Object.values(debugFlags)\n\tif (!items.length) return null\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"debug flags\" label=\"Debug flags\">\n\t\t\t<TldrawUiMenuGroup id=\"debug flags\">\n\t\t\t\t{items.map((flag) => (\n\t\t\t\t\t<DebugFlagToggle key={flag.name} flag={flag} />\n\t\t\t\t))}\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n/** @public @react */\nexport function FeatureFlags() {\n\tconst items = Object.values(featureFlags)\n\tif (!items.length) return null\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"feature flags\" label=\"Feature flags\">\n\t\t\t<TldrawUiMenuGroup id=\"feature flags\">\n\t\t\t\t{items.map((flag) => (\n\t\t\t\t\t<DebugFlagToggle key={flag.name} flag={flag} />\n\t\t\t\t))}\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public */\nexport interface ExampleDialogProps {\n\ttitle?: string\n\tbody?: React.ReactNode\n\tcancel?: string\n\tconfirm?: string\n\tdisplayDontShowAgain?: boolean\n\tmaxWidth?: string\n\tonCancel(): void\n\tonContinue(): void\n}\n\n/** @public @react */\nexport function ExampleDialog({\n\ttitle = 'title',\n\tbody = 'hello hello hello',\n\tcancel = 'Cancel',\n\tconfirm = 'Continue',\n\tdisplayDontShowAgain = false,\n\tmaxWidth = '350',\n\tonCancel,\n\tonContinue,\n}: ExampleDialogProps) {\n\tconst [dontShowAgain, setDontShowAgain] = React.useState(false)\n\n\treturn (\n\t\t<>\n\t\t\t<TldrawUiDialogHeader>\n\t\t\t\t<TldrawUiDialogTitle>{title}</TldrawUiDialogTitle>\n\t\t\t\t<TldrawUiDialogCloseButton />\n\t\t\t</TldrawUiDialogHeader>\n\t\t\t<TldrawUiDialogBody style={{ maxWidth }}>{body}</TldrawUiDialogBody>\n\t\t\t<TldrawUiDialogFooter className=\"tlui-dialog__footer__actions\">\n\t\t\t\t{displayDontShowAgain && (\n\t\t\t\t\t<TldrawUiButton\n\t\t\t\t\t\ttype=\"normal\"\n\t\t\t\t\t\tonClick={() => setDontShowAgain(!dontShowAgain)}\n\t\t\t\t\t\tstyle={{ marginRight: 'auto' }}\n\t\t\t\t\t>\n\t\t\t\t\t\t<TldrawUiButtonCheck checked={dontShowAgain} />\n\t\t\t\t\t\t<TldrawUiButtonLabel>Don\u2019t show again</TldrawUiButtonLabel>\n\t\t\t\t\t</TldrawUiButton>\n\t\t\t\t)}\n\t\t\t\t<TldrawUiButton type=\"normal\" onClick={onCancel}>\n\t\t\t\t\t<TldrawUiButtonLabel>{cancel}</TldrawUiButtonLabel>\n\t\t\t\t</TldrawUiButton>\n\t\t\t\t<TldrawUiButton type=\"primary\" onClick={async () => onContinue()}>\n\t\t\t\t\t<TldrawUiButtonLabel>{confirm}</TldrawUiButtonLabel>\n\t\t\t\t</TldrawUiButton>\n\t\t\t</TldrawUiDialogFooter>\n\t\t</>\n\t)\n}\n\nconst DebugFlagToggle = track(function DebugFlagToggle({\n\tflag,\n\tonChange,\n}: {\n\tflag: DebugFlag<boolean>\n\tonChange?(newValue: boolean): void\n}) {\n\tconst value = flag.get()\n\treturn (\n\t\t<TldrawUiMenuCheckboxItem\n\t\t\tid={flag.name}\n\t\t\ttitle={flag.name}\n\t\t\tlabel={flag.name\n\t\t\t\t.replace(/([a-z0-9])([A-Z])/g, (m) => `${m[0]} ${m[1].toLowerCase()}`)\n\t\t\t\t.replace(/^[a-z]/, (m) => m.toUpperCase())}\n\t\t\tchecked={value}\n\t\t\tonSelect={() => {\n\t\t\t\tflag.set(!value)\n\t\t\t\tonChange?.(!value)\n\t\t\t}}\n\t\t/>\n\t)\n})\n\nlet t = 0\n\nfunction createNShapes(editor: Editor, n: number) {\n\tconst gap = editor.options.adjacentShapeMargin\n\tconst shapesToCreate: TLShapePartial[] = Array(n)\n\tconst cols = Math.floor(Math.sqrt(n))\n\n\tfor (let i = 0; i < n; i++) {\n\t\tt++\n\t\tshapesToCreate[i] = {\n\t\t\tid: createShapeId('box' + t),\n\t\t\ttype: 'geo',\n\t\t\tx: (i % cols) * (100 + gap),\n\t\t\ty: Math.floor(i / cols) * (100 + gap),\n\t\t}\n\t}\n\n\teditor.run(() => {\n\t\t// allow this to trigger the max shapes alert\n\t\teditor.createShapes(shapesToCreate).setSelectedShapes(shapesToCreate.map((s) => s.id))\n\t})\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuCE;AAvCF,oBAWO;AACP,mBAAkB;AAClB,qBAA2B;AAC3B,oBAA0B;AAC1B,4BAA6B;AAC7B,4BAA+B;AAC/B,iCAAoC;AACpC,iCAAoC;AACpC,4BAMO;AACP,sCAAyC;AACzC,+BAAkC;AAClC,8BAAiC;AACjC,iCAAoC;AAG7B,SAAS,0BAA0B;AACzC,QAAM,aAAS,yBAAU;AACzB,QAAM,EAAE,SAAS,QAAI,yBAAU;AAC/B,QAAM,EAAE,UAAU,QAAI,2BAAW;AACjC,QAAM,CAAC,OAAO,QAAQ,IAAI,aAAAA,QAAM,SAAkB,KAAK;AAEvD,SACC,4EACC;AAAA,iDAAC,8CAAkB,IAAG,SACrB;AAAA,kDAAC,4CAAiB,IAAG,cAAa,UAAU,+BAAiB,OAAO,cAAc;AAAA,MAClF;AAAA,QAAC;AAAA;AAAA,UACA,IAAG;AAAA,UACH,UAAU,MAAM;AACf,qBAAS;AAAA,cACR,QAAI,wBAAS;AAAA,cACb,OAAO;AAAA,cACP,aAAa;AAAA,cACb,UAAU;AAAA,cACV,UAAU;AAAA,YACX,CAAC;AACD,qBAAS;AAAA,cACR,QAAI,wBAAS;AAAA,cACb,OAAO;AAAA,cACP,aAAa;AAAA,cACb,UAAU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AC,EAAE,YAAY,CAAC,EAAE,EACpE,QAAQ,UAAU,CAAC,MAAM,EAAE,YAAY,CAAC;AAAA,MAC1C,SAAS;AAAA,MACT,UAAU,MAAM;AACf,aAAK,IAAI,CAAC,KAAK;AACf,mBAAW,CAAC,KAAK;AAAA,MAClB;AAAA;AAAA,EACD;AAEF,CAAC;AAED,IAAI,IAAI;AAER,SAAS,cAAc,QAAgB,GAAW;AACjD,QAAM,MAAM,OAAO,QAAQ;AAC3B,QAAM,iBAAmC,MAAM,CAAC;AAChD,QAAM,OAAO,KAAK,MAAM,KAAK,KAAK,CAAC,CAAC;AAEpC,WAAS,IAAI,GAAG,IAAI,GAAG,KAAK;AAC3B;AACA,mBAAe,CAAC,IAAI;AAAA,MACnB,QAAI,6BAAc,QAAQ,CAAC;AAAA,MAC3B,MAAM;AAAA,MACN,GAAI,IAAI,QAAS,MAAM;AAAA,MACvB,GAAG,KAAK,MAAM,IAAI,IAAI,KAAK,MAAM;AAAA,IAClC;AAAA,EACD;AAEA,SAAO,IAAI,MAAM;AAEhB,WAAO,aAAa,cAAc,EAAE,kBAAkB,eAAe,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;AAAA,EACtF,CAAC;AACF;",
6
6
  "names": ["React", "DebugFlagToggle"]
7
7
  }
@@ -401,11 +401,11 @@ function MoveToPageMenu() {
401
401
  const toPage = editor.getPage(page.id);
402
402
  if (toPage) {
403
403
  addToast({
404
- title: "Changed Page",
404
+ title: "Changed page",
405
405
  description: `Moved to ${toPage.name}.`,
406
406
  actions: [
407
407
  {
408
- label: "Go Back",
408
+ label: "Go back",
409
409
  type: "primary",
410
410
  onClick: () => {
411
411
  editor.markHistoryStoppingPoint("change-page");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/lib/ui/components/menu-items.tsx"],
4
- "sourcesContent": ["import {\n\tTLBookmarkShape,\n\tTLEmbedShape,\n\tTLFrameShape,\n\tTLImageShape,\n\tTLPageId,\n\tuseEditor,\n\tuseValue,\n} from '@tldraw/editor'\nimport { supportsDownloadingOriginal } from '../context/actions'\nimport { useUiEvents } from '../context/events'\nimport { useToasts } from '../context/toasts'\nimport {\n\tshowMenuPaste,\n\tuseAllowGroup,\n\tuseAllowUngroup,\n\tuseAnySelectedShapesCount,\n\tuseHasLinkShapeSelected,\n\tuseOnlyFlippableShape,\n\tuseShowAutoSizeToggle,\n\tuseThreeStackableItems,\n\tuseUnlockedSelectedShapesCount,\n} from '../hooks/menu-hooks'\nimport { useGetEmbedDefinition } from '../hooks/useGetEmbedDefinition'\nimport { useReadonly } from '../hooks/useReadonly'\nimport { TldrawUiMenuActionCheckboxItem } from './primitives/menus/TldrawUiMenuActionCheckboxItem'\nimport { TldrawUiMenuActionItem } from './primitives/menus/TldrawUiMenuActionItem'\nimport { TldrawUiMenuGroup } from './primitives/menus/TldrawUiMenuGroup'\nimport { TldrawUiMenuItem } from './primitives/menus/TldrawUiMenuItem'\nimport { TldrawUiMenuSubmenu } from './primitives/menus/TldrawUiMenuSubmenu'\n\n/* -------------------- Selection ------------------- */\n\n/** @public @react */\nexport function ToggleAutoSizeMenuItem() {\n\tconst shouldDisplay = useShowAutoSizeToggle()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"toggle-auto-size\" />\n}\n\n/** @public @react */\nexport function EditLinkMenuItem() {\n\tconst shouldDisplay = useHasLinkShapeSelected()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"edit-link\" />\n}\n\n/** @public @react */\nexport function DuplicateMenuItem() {\n\tconst shouldDisplay = useUnlockedSelectedShapesCount(1)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"duplicate\" />\n}\n\n/** @public @react */\nexport function FlattenMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'should display flatten option',\n\t\t() => {\n\t\t\tconst selectedShapeIds = editor.getSelectedShapeIds()\n\t\t\tif (selectedShapeIds.length === 0) return false\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (onlySelectedShape && editor.isShapeOfType<TLImageShape>(onlySelectedShape, 'image')) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn true\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"flatten-to-image\" />\n}\n\n/** @public @react */\nexport function DownloadOriginalMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'should display download original option',\n\t\t() => {\n\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\tif (selectedShapes.length === 0) return false\n\t\t\treturn selectedShapes.some((shape) => supportsDownloadingOriginal(shape, editor))\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"download-original\" />\n}\n\n/** @public @react */\nexport function GroupMenuItem() {\n\tconst shouldDisplay = useAllowGroup()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"group\" />\n}\n\n/** @public @react */\nexport function UngroupMenuItem() {\n\tconst shouldDisplay = useAllowUngroup()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"ungroup\" />\n}\n\n/** @public @react */\nexport function RemoveFrameMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'allow unframe',\n\t\t() => {\n\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\tif (selectedShapes.length === 0) return false\n\t\t\treturn selectedShapes.every((shape) => editor.isShapeOfType<TLFrameShape>(shape, 'frame'))\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"remove-frame\" />\n}\n\n/** @public @react */\nexport function FitFrameToContentMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'allow fit frame to content',\n\t\t() => {\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (!onlySelectedShape) return false\n\t\t\treturn (\n\t\t\t\teditor.isShapeOfType<TLFrameShape>(onlySelectedShape, 'frame') &&\n\t\t\t\teditor.getSortedChildIdsForParent(onlySelectedShape).length > 0\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"fit-frame-to-content\" />\n}\n\n/** @public @react */\nexport function ToggleLockMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue('selected shapes', () => editor.getSelectedShapes().length > 0, [\n\t\teditor,\n\t])\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"toggle-lock\" />\n}\n\n/** @public @react */\nexport function ToggleTransparentBgMenuItem() {\n\tconst editor = useEditor()\n\tconst isTransparentBg = useValue(\n\t\t'isTransparentBg',\n\t\t() => !editor.getInstanceState().exportBackground,\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-transparent\"\n\t\t\tchecked={isTransparentBg}\n\t\t\ttoggle\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function UnlockAllMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue('any shapes', () => editor.getCurrentPageShapeIds().size > 0, [\n\t\teditor,\n\t])\n\n\treturn <TldrawUiMenuActionItem actionId=\"unlock-all\" disabled={!shouldDisplay} />\n}\n\n/* ---------------------- Zoom ---------------------- */\n\n/** @public @react */\nexport function ZoomTo100MenuItem() {\n\tconst editor = useEditor()\n\tconst isZoomedTo100 = useValue('zoomed to 100', () => editor.getZoomLevel() === 1, [editor])\n\n\treturn <TldrawUiMenuActionItem actionId=\"zoom-to-100\" noClose disabled={isZoomedTo100} />\n}\n\n/** @public @react */\nexport function ZoomToFitMenuItem() {\n\tconst editor = useEditor()\n\tconst hasShapes = useValue('has shapes', () => editor.getCurrentPageShapeIds().size > 0, [editor])\n\n\treturn (\n\t\t<TldrawUiMenuActionItem\n\t\t\tactionId=\"zoom-to-fit\"\n\t\t\tdisabled={!hasShapes}\n\t\t\tdata-testid=\"minimap.zoom-menu.zoom-to-fit\"\n\t\t\tnoClose\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ZoomToSelectionMenuItem() {\n\tconst editor = useEditor()\n\tconst hasSelected = useValue('has shapes', () => editor.getSelectedShapeIds().length > 0, [\n\t\teditor,\n\t])\n\n\treturn (\n\t\t<TldrawUiMenuActionItem\n\t\t\tactionId=\"zoom-to-selection\"\n\t\t\tdisabled={!hasSelected}\n\t\t\tdata-testid=\"minimap.zoom-menu.zoom-to-selection\"\n\t\t\tnoClose\n\t\t/>\n\t)\n}\n\n/* -------------------- Clipboard ------------------- */\n\n/** @public @react */\nexport function ClipboardMenuGroup() {\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"clipboard\">\n\t\t\t<CutMenuItem />\n\t\t\t<CopyMenuItem />\n\t\t\t<PasteMenuItem />\n\t\t\t<DuplicateMenuItem />\n\t\t\t<DeleteMenuItem />\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\n/** @public @react */\nexport function CopyAsMenuGroup() {\n\tconst editor = useEditor()\n\tconst atLeastOneShapeOnPage = useValue(\n\t\t'atLeastOneShapeOnPage',\n\t\t() => editor.getCurrentPageShapeIds().size > 0,\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu\n\t\t\tid=\"copy-as\"\n\t\t\tlabel=\"context-menu.copy-as\"\n\t\t\tsize=\"small\"\n\t\t\tdisabled={!atLeastOneShapeOnPage}\n\t\t>\n\t\t\t<TldrawUiMenuGroup id=\"copy-as-group\">\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"copy-as-svg\" />\n\t\t\t\t{Boolean(window.navigator.clipboard?.write) && (\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"copy-as-png\" />\n\t\t\t\t)}\n\t\t\t</TldrawUiMenuGroup>\n\t\t\t<TldrawUiMenuGroup id=\"copy-as-bg\">\n\t\t\t\t<ToggleTransparentBgMenuItem />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function CutMenuItem() {\n\tconst shouldDisplay = useUnlockedSelectedShapesCount(1)\n\n\treturn <TldrawUiMenuActionItem actionId=\"cut\" disabled={!shouldDisplay} />\n}\n\n/** @public @react */\nexport function CopyMenuItem() {\n\tconst shouldDisplay = useAnySelectedShapesCount(1)\n\n\treturn <TldrawUiMenuActionItem actionId=\"copy\" disabled={!shouldDisplay} />\n}\n\n/** @public @react */\nexport function PasteMenuItem() {\n\tconst shouldDisplay = showMenuPaste\n\n\treturn <TldrawUiMenuActionItem actionId=\"paste\" disabled={!shouldDisplay} />\n}\n\n/* ------------------- Conversions ------------------ */\n\n/** @public @react */\nexport function ConversionsMenuGroup() {\n\tconst editor = useEditor()\n\tconst atLeastOneShapeOnPage = useValue(\n\t\t'atLeastOneShapeOnPage',\n\t\t() => editor.getCurrentPageShapeIds().size > 0,\n\t\t[editor]\n\t)\n\n\tif (!atLeastOneShapeOnPage) return null\n\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"conversions\">\n\t\t\t<CopyAsMenuGroup />\n\t\t\t<TldrawUiMenuSubmenu id=\"export-as\" label=\"context-menu.export-as\" size=\"small\">\n\t\t\t\t<TldrawUiMenuGroup id=\"export-as-group\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"export-as-svg\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"export-as-png\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t\t<TldrawUiMenuGroup id=\"export-as-bg\">\n\t\t\t\t\t<ToggleTransparentBgMenuItem />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t</TldrawUiMenuSubmenu>\n\t\t\t<DownloadOriginalMenuItem />\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\n/* ------------------ Set Selection ----------------- */\n/** @public @react */\nexport function SelectAllMenuItem() {\n\tconst editor = useEditor()\n\tconst atLeastOneShapeOnPage = useValue(\n\t\t'atLeastOneShapeOnPage',\n\t\t() => editor.getCurrentPageShapeIds().size > 0,\n\t\t[editor]\n\t)\n\n\treturn <TldrawUiMenuActionItem actionId=\"select-all\" disabled={!atLeastOneShapeOnPage} />\n}\n\n/* ------------------ Delete Group ------------------ */\n\n/** @public @react */\nexport function DeleteMenuItem() {\n\tconst oneSelected = useUnlockedSelectedShapesCount(1)\n\n\treturn <TldrawUiMenuActionItem actionId=\"delete\" disabled={!oneSelected} />\n}\n\n/* --------------------- Modify --------------------- */\n\n/** @public @react */\nexport function EditMenuSubmenu() {\n\tconst isReadonlyMode = useReadonly()\n\tif (!useAnySelectedShapesCount(1)) return null\n\tif (isReadonlyMode) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"edit\" label=\"context-menu.edit\" size=\"small\">\n\t\t\t<GroupMenuItem />\n\t\t\t<UngroupMenuItem />\n\t\t\t<FlattenMenuItem />\n\t\t\t<EditLinkMenuItem />\n\t\t\t<FitFrameToContentMenuItem />\n\t\t\t<RemoveFrameMenuItem />\n\t\t\t<ConvertToEmbedMenuItem />\n\t\t\t<ConvertToBookmarkMenuItem />\n\t\t\t<ToggleAutoSizeMenuItem />\n\t\t\t<ToggleLockMenuItem />\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function ArrangeMenuSubmenu() {\n\tconst twoSelected = useUnlockedSelectedShapesCount(2)\n\tconst onlyFlippableShapeSelected = useOnlyFlippableShape()\n\tconst isReadonlyMode = useReadonly()\n\n\tif (isReadonlyMode) return null\n\tif (!(twoSelected || onlyFlippableShapeSelected)) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"arrange\" label=\"context-menu.arrange\" size=\"small\">\n\t\t\t{twoSelected && (\n\t\t\t\t<TldrawUiMenuGroup id=\"align\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-left\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-center-horizontal\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-right\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-top\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-center-vertical\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-bottom\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t)}\n\t\t\t<DistributeMenuGroup />\n\t\t\t{twoSelected && (\n\t\t\t\t<TldrawUiMenuGroup id=\"stretch\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"stretch-horizontal\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"stretch-vertical\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t)}\n\t\t\t{(twoSelected || onlyFlippableShapeSelected) && (\n\t\t\t\t<TldrawUiMenuGroup id=\"flip\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"flip-horizontal\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"flip-vertical\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t)}\n\t\t\t<OrderMenuGroup />\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\nfunction DistributeMenuGroup() {\n\tconst threeSelected = useUnlockedSelectedShapesCount(3)\n\tif (!threeSelected) return null\n\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"distribute\">\n\t\t\t<TldrawUiMenuActionItem actionId=\"distribute-horizontal\" />\n\t\t\t<TldrawUiMenuActionItem actionId=\"distribute-vertical\" />\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\nfunction OrderMenuGroup() {\n\tconst twoSelected = useUnlockedSelectedShapesCount(2)\n\tconst threeStackableItems = useThreeStackableItems()\n\tif (!twoSelected) return null\n\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"order\">\n\t\t\t<TldrawUiMenuActionItem actionId=\"pack\" />\n\t\t\t{threeStackableItems && <TldrawUiMenuActionItem actionId=\"stack-horizontal\" />}\n\t\t\t{threeStackableItems && <TldrawUiMenuActionItem actionId=\"stack-vertical\" />}\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\n/** @public @react */\nexport function ReorderMenuSubmenu() {\n\tconst isReadonlyMode = useReadonly()\n\tconst oneSelected = useUnlockedSelectedShapesCount(1)\n\tif (isReadonlyMode) return null\n\tif (!oneSelected) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"reorder\" label=\"context-menu.reorder\" size=\"small\">\n\t\t\t<TldrawUiMenuGroup id=\"reorder\">\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"bring-to-front\" />\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"bring-forward\" />\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"send-backward\" />\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"send-to-back\" />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function MoveToPageMenu() {\n\tconst editor = useEditor()\n\tconst pages = useValue('pages', () => editor.getPages(), [editor])\n\tconst currentPageId = useValue('current page id', () => editor.getCurrentPageId(), [editor])\n\tconst { addToast } = useToasts()\n\tconst trackEvent = useUiEvents()\n\tconst isReadonlyMode = useReadonly()\n\tconst oneSelected = useUnlockedSelectedShapesCount(1)\n\n\tif (!oneSelected) return null\n\tif (isReadonlyMode) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"move-to-page\" label=\"context-menu.move-to-page\" size=\"small\">\n\t\t\t<TldrawUiMenuGroup id=\"pages\">\n\t\t\t\t{pages.map((page) => (\n\t\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\t\tid={page.id}\n\t\t\t\t\t\tkey={page.id}\n\t\t\t\t\t\tdisabled={currentPageId === page.id}\n\t\t\t\t\t\tlabel={page.name.length > 30 ? `${page.name.slice(0, 30)}\u2026` : page.name}\n\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\teditor.markHistoryStoppingPoint('move_shapes_to_page')\n\t\t\t\t\t\t\teditor.moveShapesToPage(editor.getSelectedShapeIds(), page.id as TLPageId)\n\n\t\t\t\t\t\t\tconst toPage = editor.getPage(page.id)\n\n\t\t\t\t\t\t\tif (toPage) {\n\t\t\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\t\t\ttitle: 'Changed Page',\n\t\t\t\t\t\t\t\t\tdescription: `Moved to ${toPage.name}.`,\n\t\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tlabel: 'Go Back',\n\t\t\t\t\t\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\t\teditor.markHistoryStoppingPoint('change-page')\n\t\t\t\t\t\t\t\t\t\t\t\teditor.setCurrentPage(currentPageId)\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttrackEvent('move-to-page', { source: 'context-menu' })\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</TldrawUiMenuGroup>\n\t\t\t<TldrawUiMenuGroup id=\"new-page\">\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"move-to-new-page\" />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function ConvertToBookmarkMenuItem() {\n\tconst editor = useEditor()\n\n\tconst oneEmbedSelected = useValue(\n\t\t'oneEmbedSelected',\n\t\t() => {\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (!onlySelectedShape) return false\n\t\t\treturn !!(\n\t\t\t\teditor.isShapeOfType<TLEmbedShape>(onlySelectedShape, 'embed') &&\n\t\t\t\tonlySelectedShape.props.url &&\n\t\t\t\t!editor.isShapeOrAncestorLocked(onlySelectedShape)\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n\n\tif (!oneEmbedSelected) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"convert-to-bookmark\" />\n}\n\n/** @public @react */\nexport function ConvertToEmbedMenuItem() {\n\tconst editor = useEditor()\n\tconst getEmbedDefinition = useGetEmbedDefinition()\n\n\tconst oneEmbeddableBookmarkSelected = useValue(\n\t\t'oneEmbeddableBookmarkSelected',\n\t\t() => {\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (!onlySelectedShape) return false\n\t\t\treturn !!(\n\t\t\t\teditor.isShapeOfType<TLBookmarkShape>(onlySelectedShape, 'bookmark') &&\n\t\t\t\tonlySelectedShape.props.url &&\n\t\t\t\tgetEmbedDefinition(onlySelectedShape.props.url) &&\n\t\t\t\t!editor.isShapeOrAncestorLocked(onlySelectedShape)\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n\n\tif (!oneEmbeddableBookmarkSelected) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"convert-to-embed\" />\n}\n\n/* ------------------- Preferences ------------------ */\n\n/** @public @react */\nexport function ToggleSnapModeItem() {\n\tconst editor = useEditor()\n\tconst isSnapMode = useValue('isSnapMode', () => editor.user.getIsSnapMode(), [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-snap-mode\" checked={isSnapMode} />\n}\n\n/** @public @react */\nexport function ToggleToolLockItem() {\n\tconst editor = useEditor()\n\tconst isToolLock = useValue('isToolLock', () => editor.getInstanceState().isToolLocked, [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-tool-lock\" checked={isToolLock} />\n}\n\n/** @public @react */\nexport function ToggleGridItem() {\n\tconst editor = useEditor()\n\tconst isGridMode = useValue('isGridMode', () => editor.getInstanceState().isGridMode, [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-grid\" checked={isGridMode} />\n}\n\n/** @public @react */\nexport function ToggleWrapModeItem() {\n\tconst editor = useEditor()\n\tconst isWrapMode = useValue('isWrapMode', () => editor.user.getIsWrapMode(), [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-wrap-mode\" checked={isWrapMode} />\n}\n\n/** @public @react */\nexport function ToggleDarkModeItem() {\n\tconst editor = useEditor()\n\tconst isDarkMode = useValue('isDarkMode', () => editor.user.getIsDarkMode(), [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-dark-mode\" checked={isDarkMode} />\n}\n\n/** @public @react */\nexport function ToggleFocusModeItem() {\n\tconst editor = useEditor()\n\tconst isFocusMode = useValue('isFocusMode', () => editor.getInstanceState().isFocusMode, [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-focus-mode\" checked={isFocusMode} />\n}\n\n/** @public @react */\nexport function ToggleEdgeScrollingItem() {\n\tconst editor = useEditor()\n\tconst edgeScrollSpeed = useValue('edgeScrollSpeed', () => editor.user.getEdgeScrollSpeed(), [\n\t\teditor,\n\t])\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-edge-scrolling\"\n\t\t\tchecked={edgeScrollSpeed === 1}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ToggleReduceMotionItem() {\n\tconst editor = useEditor()\n\tconst animationSpeed = useValue('animationSpeed', () => editor.user.getAnimationSpeed(), [editor])\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-reduce-motion\"\n\t\t\tchecked={animationSpeed === 0}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ToggleKeyboardShortcutsItem() {\n\tconst editor = useEditor()\n\tconst keyboardShortcuts = useValue(\n\t\t'keyboardShortcuts',\n\t\t() => editor.user.getAreKeyboardShortcutsEnabled(),\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-keyboard-shortcuts\"\n\t\t\tchecked={keyboardShortcuts}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ToggleEnhancedA11yModeItem() {\n\tconst editor = useEditor()\n\tconst enhancedA11yMode = useValue('enhancedA11yMode', () => editor.user.getEnhancedA11yMode(), [\n\t\teditor,\n\t])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"enhanced-a11y-mode\" checked={enhancedA11yMode} />\n}\n\n/** @public @react */\nexport function ToggleDebugModeItem() {\n\tconst editor = useEditor()\n\tconst isDebugMode = useValue('isDebugMode', () => editor.getInstanceState().isDebugMode, [editor])\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-debug-mode\" checked={isDebugMode} />\n}\n\n/** @public @react */\nexport function ToggleDynamicSizeModeItem() {\n\tconst editor = useEditor()\n\tconst isDynamicResizeMode = useValue(\n\t\t'dynamic resize',\n\t\t() => editor.user.getIsDynamicResizeMode(),\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-dynamic-size-mode\"\n\t\t\tchecked={isDynamicResizeMode}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function TogglePasteAtCursorItem() {\n\tconst editor = useEditor()\n\tconst pasteAtCursor = useValue('paste at cursor', () => editor.user.getIsPasteAtCursorMode(), [\n\t\teditor,\n\t])\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem actionId=\"toggle-paste-at-cursor\" checked={pasteAtCursor} />\n\t)\n}\n\n/* ---------------------- Print --------------------- */\n\n/** @public @react */\nexport function PrintItem() {\n\tconst editor = useEditor()\n\tconst emptyPage = useValue('emptyPage', () => editor.getCurrentPageShapeIds().size === 0, [\n\t\teditor,\n\t])\n\n\treturn <TldrawUiMenuActionItem actionId=\"print\" disabled={emptyPage} />\n}\n\n/* ---------------------- Multiplayer --------------------- */\n\n/** @public @react */\nexport function CursorChatItem() {\n\tconst editor = useEditor()\n\tconst shouldShow = useValue(\n\t\t'show cursor chat',\n\t\t() => editor.getCurrentToolId() === 'select' && !editor.getInstanceState().isCoarsePointer,\n\t\t[editor]\n\t)\n\n\tif (!shouldShow) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"open-cursor-chat\" />\n}\n"],
4
+ "sourcesContent": ["import {\n\tTLBookmarkShape,\n\tTLEmbedShape,\n\tTLFrameShape,\n\tTLImageShape,\n\tTLPageId,\n\tuseEditor,\n\tuseValue,\n} from '@tldraw/editor'\nimport { supportsDownloadingOriginal } from '../context/actions'\nimport { useUiEvents } from '../context/events'\nimport { useToasts } from '../context/toasts'\nimport {\n\tshowMenuPaste,\n\tuseAllowGroup,\n\tuseAllowUngroup,\n\tuseAnySelectedShapesCount,\n\tuseHasLinkShapeSelected,\n\tuseOnlyFlippableShape,\n\tuseShowAutoSizeToggle,\n\tuseThreeStackableItems,\n\tuseUnlockedSelectedShapesCount,\n} from '../hooks/menu-hooks'\nimport { useGetEmbedDefinition } from '../hooks/useGetEmbedDefinition'\nimport { useReadonly } from '../hooks/useReadonly'\nimport { TldrawUiMenuActionCheckboxItem } from './primitives/menus/TldrawUiMenuActionCheckboxItem'\nimport { TldrawUiMenuActionItem } from './primitives/menus/TldrawUiMenuActionItem'\nimport { TldrawUiMenuGroup } from './primitives/menus/TldrawUiMenuGroup'\nimport { TldrawUiMenuItem } from './primitives/menus/TldrawUiMenuItem'\nimport { TldrawUiMenuSubmenu } from './primitives/menus/TldrawUiMenuSubmenu'\n\n/* -------------------- Selection ------------------- */\n\n/** @public @react */\nexport function ToggleAutoSizeMenuItem() {\n\tconst shouldDisplay = useShowAutoSizeToggle()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"toggle-auto-size\" />\n}\n\n/** @public @react */\nexport function EditLinkMenuItem() {\n\tconst shouldDisplay = useHasLinkShapeSelected()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"edit-link\" />\n}\n\n/** @public @react */\nexport function DuplicateMenuItem() {\n\tconst shouldDisplay = useUnlockedSelectedShapesCount(1)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"duplicate\" />\n}\n\n/** @public @react */\nexport function FlattenMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'should display flatten option',\n\t\t() => {\n\t\t\tconst selectedShapeIds = editor.getSelectedShapeIds()\n\t\t\tif (selectedShapeIds.length === 0) return false\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (onlySelectedShape && editor.isShapeOfType<TLImageShape>(onlySelectedShape, 'image')) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn true\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"flatten-to-image\" />\n}\n\n/** @public @react */\nexport function DownloadOriginalMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'should display download original option',\n\t\t() => {\n\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\tif (selectedShapes.length === 0) return false\n\t\t\treturn selectedShapes.some((shape) => supportsDownloadingOriginal(shape, editor))\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"download-original\" />\n}\n\n/** @public @react */\nexport function GroupMenuItem() {\n\tconst shouldDisplay = useAllowGroup()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"group\" />\n}\n\n/** @public @react */\nexport function UngroupMenuItem() {\n\tconst shouldDisplay = useAllowUngroup()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"ungroup\" />\n}\n\n/** @public @react */\nexport function RemoveFrameMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'allow unframe',\n\t\t() => {\n\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\tif (selectedShapes.length === 0) return false\n\t\t\treturn selectedShapes.every((shape) => editor.isShapeOfType<TLFrameShape>(shape, 'frame'))\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"remove-frame\" />\n}\n\n/** @public @react */\nexport function FitFrameToContentMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'allow fit frame to content',\n\t\t() => {\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (!onlySelectedShape) return false\n\t\t\treturn (\n\t\t\t\teditor.isShapeOfType<TLFrameShape>(onlySelectedShape, 'frame') &&\n\t\t\t\teditor.getSortedChildIdsForParent(onlySelectedShape).length > 0\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"fit-frame-to-content\" />\n}\n\n/** @public @react */\nexport function ToggleLockMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue('selected shapes', () => editor.getSelectedShapes().length > 0, [\n\t\teditor,\n\t])\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"toggle-lock\" />\n}\n\n/** @public @react */\nexport function ToggleTransparentBgMenuItem() {\n\tconst editor = useEditor()\n\tconst isTransparentBg = useValue(\n\t\t'isTransparentBg',\n\t\t() => !editor.getInstanceState().exportBackground,\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-transparent\"\n\t\t\tchecked={isTransparentBg}\n\t\t\ttoggle\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function UnlockAllMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue('any shapes', () => editor.getCurrentPageShapeIds().size > 0, [\n\t\teditor,\n\t])\n\n\treturn <TldrawUiMenuActionItem actionId=\"unlock-all\" disabled={!shouldDisplay} />\n}\n\n/* ---------------------- Zoom ---------------------- */\n\n/** @public @react */\nexport function ZoomTo100MenuItem() {\n\tconst editor = useEditor()\n\tconst isZoomedTo100 = useValue('zoomed to 100', () => editor.getZoomLevel() === 1, [editor])\n\n\treturn <TldrawUiMenuActionItem actionId=\"zoom-to-100\" noClose disabled={isZoomedTo100} />\n}\n\n/** @public @react */\nexport function ZoomToFitMenuItem() {\n\tconst editor = useEditor()\n\tconst hasShapes = useValue('has shapes', () => editor.getCurrentPageShapeIds().size > 0, [editor])\n\n\treturn (\n\t\t<TldrawUiMenuActionItem\n\t\t\tactionId=\"zoom-to-fit\"\n\t\t\tdisabled={!hasShapes}\n\t\t\tdata-testid=\"minimap.zoom-menu.zoom-to-fit\"\n\t\t\tnoClose\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ZoomToSelectionMenuItem() {\n\tconst editor = useEditor()\n\tconst hasSelected = useValue('has shapes', () => editor.getSelectedShapeIds().length > 0, [\n\t\teditor,\n\t])\n\n\treturn (\n\t\t<TldrawUiMenuActionItem\n\t\t\tactionId=\"zoom-to-selection\"\n\t\t\tdisabled={!hasSelected}\n\t\t\tdata-testid=\"minimap.zoom-menu.zoom-to-selection\"\n\t\t\tnoClose\n\t\t/>\n\t)\n}\n\n/* -------------------- Clipboard ------------------- */\n\n/** @public @react */\nexport function ClipboardMenuGroup() {\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"clipboard\">\n\t\t\t<CutMenuItem />\n\t\t\t<CopyMenuItem />\n\t\t\t<PasteMenuItem />\n\t\t\t<DuplicateMenuItem />\n\t\t\t<DeleteMenuItem />\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\n/** @public @react */\nexport function CopyAsMenuGroup() {\n\tconst editor = useEditor()\n\tconst atLeastOneShapeOnPage = useValue(\n\t\t'atLeastOneShapeOnPage',\n\t\t() => editor.getCurrentPageShapeIds().size > 0,\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu\n\t\t\tid=\"copy-as\"\n\t\t\tlabel=\"context-menu.copy-as\"\n\t\t\tsize=\"small\"\n\t\t\tdisabled={!atLeastOneShapeOnPage}\n\t\t>\n\t\t\t<TldrawUiMenuGroup id=\"copy-as-group\">\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"copy-as-svg\" />\n\t\t\t\t{Boolean(window.navigator.clipboard?.write) && (\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"copy-as-png\" />\n\t\t\t\t)}\n\t\t\t</TldrawUiMenuGroup>\n\t\t\t<TldrawUiMenuGroup id=\"copy-as-bg\">\n\t\t\t\t<ToggleTransparentBgMenuItem />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function CutMenuItem() {\n\tconst shouldDisplay = useUnlockedSelectedShapesCount(1)\n\n\treturn <TldrawUiMenuActionItem actionId=\"cut\" disabled={!shouldDisplay} />\n}\n\n/** @public @react */\nexport function CopyMenuItem() {\n\tconst shouldDisplay = useAnySelectedShapesCount(1)\n\n\treturn <TldrawUiMenuActionItem actionId=\"copy\" disabled={!shouldDisplay} />\n}\n\n/** @public @react */\nexport function PasteMenuItem() {\n\tconst shouldDisplay = showMenuPaste\n\n\treturn <TldrawUiMenuActionItem actionId=\"paste\" disabled={!shouldDisplay} />\n}\n\n/* ------------------- Conversions ------------------ */\n\n/** @public @react */\nexport function ConversionsMenuGroup() {\n\tconst editor = useEditor()\n\tconst atLeastOneShapeOnPage = useValue(\n\t\t'atLeastOneShapeOnPage',\n\t\t() => editor.getCurrentPageShapeIds().size > 0,\n\t\t[editor]\n\t)\n\n\tif (!atLeastOneShapeOnPage) return null\n\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"conversions\">\n\t\t\t<CopyAsMenuGroup />\n\t\t\t<TldrawUiMenuSubmenu id=\"export-as\" label=\"context-menu.export-as\" size=\"small\">\n\t\t\t\t<TldrawUiMenuGroup id=\"export-as-group\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"export-as-svg\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"export-as-png\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t\t<TldrawUiMenuGroup id=\"export-as-bg\">\n\t\t\t\t\t<ToggleTransparentBgMenuItem />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t</TldrawUiMenuSubmenu>\n\t\t\t<DownloadOriginalMenuItem />\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\n/* ------------------ Set Selection ----------------- */\n/** @public @react */\nexport function SelectAllMenuItem() {\n\tconst editor = useEditor()\n\tconst atLeastOneShapeOnPage = useValue(\n\t\t'atLeastOneShapeOnPage',\n\t\t() => editor.getCurrentPageShapeIds().size > 0,\n\t\t[editor]\n\t)\n\n\treturn <TldrawUiMenuActionItem actionId=\"select-all\" disabled={!atLeastOneShapeOnPage} />\n}\n\n/* ------------------ Delete Group ------------------ */\n\n/** @public @react */\nexport function DeleteMenuItem() {\n\tconst oneSelected = useUnlockedSelectedShapesCount(1)\n\n\treturn <TldrawUiMenuActionItem actionId=\"delete\" disabled={!oneSelected} />\n}\n\n/* --------------------- Modify --------------------- */\n\n/** @public @react */\nexport function EditMenuSubmenu() {\n\tconst isReadonlyMode = useReadonly()\n\tif (!useAnySelectedShapesCount(1)) return null\n\tif (isReadonlyMode) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"edit\" label=\"context-menu.edit\" size=\"small\">\n\t\t\t<GroupMenuItem />\n\t\t\t<UngroupMenuItem />\n\t\t\t<FlattenMenuItem />\n\t\t\t<EditLinkMenuItem />\n\t\t\t<FitFrameToContentMenuItem />\n\t\t\t<RemoveFrameMenuItem />\n\t\t\t<ConvertToEmbedMenuItem />\n\t\t\t<ConvertToBookmarkMenuItem />\n\t\t\t<ToggleAutoSizeMenuItem />\n\t\t\t<ToggleLockMenuItem />\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function ArrangeMenuSubmenu() {\n\tconst twoSelected = useUnlockedSelectedShapesCount(2)\n\tconst onlyFlippableShapeSelected = useOnlyFlippableShape()\n\tconst isReadonlyMode = useReadonly()\n\n\tif (isReadonlyMode) return null\n\tif (!(twoSelected || onlyFlippableShapeSelected)) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"arrange\" label=\"context-menu.arrange\" size=\"small\">\n\t\t\t{twoSelected && (\n\t\t\t\t<TldrawUiMenuGroup id=\"align\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-left\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-center-horizontal\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-right\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-top\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-center-vertical\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-bottom\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t)}\n\t\t\t<DistributeMenuGroup />\n\t\t\t{twoSelected && (\n\t\t\t\t<TldrawUiMenuGroup id=\"stretch\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"stretch-horizontal\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"stretch-vertical\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t)}\n\t\t\t{(twoSelected || onlyFlippableShapeSelected) && (\n\t\t\t\t<TldrawUiMenuGroup id=\"flip\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"flip-horizontal\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"flip-vertical\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t)}\n\t\t\t<OrderMenuGroup />\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\nfunction DistributeMenuGroup() {\n\tconst threeSelected = useUnlockedSelectedShapesCount(3)\n\tif (!threeSelected) return null\n\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"distribute\">\n\t\t\t<TldrawUiMenuActionItem actionId=\"distribute-horizontal\" />\n\t\t\t<TldrawUiMenuActionItem actionId=\"distribute-vertical\" />\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\nfunction OrderMenuGroup() {\n\tconst twoSelected = useUnlockedSelectedShapesCount(2)\n\tconst threeStackableItems = useThreeStackableItems()\n\tif (!twoSelected) return null\n\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"order\">\n\t\t\t<TldrawUiMenuActionItem actionId=\"pack\" />\n\t\t\t{threeStackableItems && <TldrawUiMenuActionItem actionId=\"stack-horizontal\" />}\n\t\t\t{threeStackableItems && <TldrawUiMenuActionItem actionId=\"stack-vertical\" />}\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\n/** @public @react */\nexport function ReorderMenuSubmenu() {\n\tconst isReadonlyMode = useReadonly()\n\tconst oneSelected = useUnlockedSelectedShapesCount(1)\n\tif (isReadonlyMode) return null\n\tif (!oneSelected) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"reorder\" label=\"context-menu.reorder\" size=\"small\">\n\t\t\t<TldrawUiMenuGroup id=\"reorder\">\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"bring-to-front\" />\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"bring-forward\" />\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"send-backward\" />\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"send-to-back\" />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function MoveToPageMenu() {\n\tconst editor = useEditor()\n\tconst pages = useValue('pages', () => editor.getPages(), [editor])\n\tconst currentPageId = useValue('current page id', () => editor.getCurrentPageId(), [editor])\n\tconst { addToast } = useToasts()\n\tconst trackEvent = useUiEvents()\n\tconst isReadonlyMode = useReadonly()\n\tconst oneSelected = useUnlockedSelectedShapesCount(1)\n\n\tif (!oneSelected) return null\n\tif (isReadonlyMode) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"move-to-page\" label=\"context-menu.move-to-page\" size=\"small\">\n\t\t\t<TldrawUiMenuGroup id=\"pages\">\n\t\t\t\t{pages.map((page) => (\n\t\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\t\tid={page.id}\n\t\t\t\t\t\tkey={page.id}\n\t\t\t\t\t\tdisabled={currentPageId === page.id}\n\t\t\t\t\t\tlabel={page.name.length > 30 ? `${page.name.slice(0, 30)}\u2026` : page.name}\n\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\teditor.markHistoryStoppingPoint('move_shapes_to_page')\n\t\t\t\t\t\t\teditor.moveShapesToPage(editor.getSelectedShapeIds(), page.id as TLPageId)\n\n\t\t\t\t\t\t\tconst toPage = editor.getPage(page.id)\n\n\t\t\t\t\t\t\tif (toPage) {\n\t\t\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\t\t\ttitle: 'Changed page',\n\t\t\t\t\t\t\t\t\tdescription: `Moved to ${toPage.name}.`,\n\t\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tlabel: 'Go back',\n\t\t\t\t\t\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\t\teditor.markHistoryStoppingPoint('change-page')\n\t\t\t\t\t\t\t\t\t\t\t\teditor.setCurrentPage(currentPageId)\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttrackEvent('move-to-page', { source: 'context-menu' })\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</TldrawUiMenuGroup>\n\t\t\t<TldrawUiMenuGroup id=\"new-page\">\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"move-to-new-page\" />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function ConvertToBookmarkMenuItem() {\n\tconst editor = useEditor()\n\n\tconst oneEmbedSelected = useValue(\n\t\t'oneEmbedSelected',\n\t\t() => {\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (!onlySelectedShape) return false\n\t\t\treturn !!(\n\t\t\t\teditor.isShapeOfType<TLEmbedShape>(onlySelectedShape, 'embed') &&\n\t\t\t\tonlySelectedShape.props.url &&\n\t\t\t\t!editor.isShapeOrAncestorLocked(onlySelectedShape)\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n\n\tif (!oneEmbedSelected) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"convert-to-bookmark\" />\n}\n\n/** @public @react */\nexport function ConvertToEmbedMenuItem() {\n\tconst editor = useEditor()\n\tconst getEmbedDefinition = useGetEmbedDefinition()\n\n\tconst oneEmbeddableBookmarkSelected = useValue(\n\t\t'oneEmbeddableBookmarkSelected',\n\t\t() => {\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (!onlySelectedShape) return false\n\t\t\treturn !!(\n\t\t\t\teditor.isShapeOfType<TLBookmarkShape>(onlySelectedShape, 'bookmark') &&\n\t\t\t\tonlySelectedShape.props.url &&\n\t\t\t\tgetEmbedDefinition(onlySelectedShape.props.url) &&\n\t\t\t\t!editor.isShapeOrAncestorLocked(onlySelectedShape)\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n\n\tif (!oneEmbeddableBookmarkSelected) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"convert-to-embed\" />\n}\n\n/* ------------------- Preferences ------------------ */\n\n/** @public @react */\nexport function ToggleSnapModeItem() {\n\tconst editor = useEditor()\n\tconst isSnapMode = useValue('isSnapMode', () => editor.user.getIsSnapMode(), [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-snap-mode\" checked={isSnapMode} />\n}\n\n/** @public @react */\nexport function ToggleToolLockItem() {\n\tconst editor = useEditor()\n\tconst isToolLock = useValue('isToolLock', () => editor.getInstanceState().isToolLocked, [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-tool-lock\" checked={isToolLock} />\n}\n\n/** @public @react */\nexport function ToggleGridItem() {\n\tconst editor = useEditor()\n\tconst isGridMode = useValue('isGridMode', () => editor.getInstanceState().isGridMode, [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-grid\" checked={isGridMode} />\n}\n\n/** @public @react */\nexport function ToggleWrapModeItem() {\n\tconst editor = useEditor()\n\tconst isWrapMode = useValue('isWrapMode', () => editor.user.getIsWrapMode(), [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-wrap-mode\" checked={isWrapMode} />\n}\n\n/** @public @react */\nexport function ToggleDarkModeItem() {\n\tconst editor = useEditor()\n\tconst isDarkMode = useValue('isDarkMode', () => editor.user.getIsDarkMode(), [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-dark-mode\" checked={isDarkMode} />\n}\n\n/** @public @react */\nexport function ToggleFocusModeItem() {\n\tconst editor = useEditor()\n\tconst isFocusMode = useValue('isFocusMode', () => editor.getInstanceState().isFocusMode, [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-focus-mode\" checked={isFocusMode} />\n}\n\n/** @public @react */\nexport function ToggleEdgeScrollingItem() {\n\tconst editor = useEditor()\n\tconst edgeScrollSpeed = useValue('edgeScrollSpeed', () => editor.user.getEdgeScrollSpeed(), [\n\t\teditor,\n\t])\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-edge-scrolling\"\n\t\t\tchecked={edgeScrollSpeed === 1}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ToggleReduceMotionItem() {\n\tconst editor = useEditor()\n\tconst animationSpeed = useValue('animationSpeed', () => editor.user.getAnimationSpeed(), [editor])\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-reduce-motion\"\n\t\t\tchecked={animationSpeed === 0}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ToggleKeyboardShortcutsItem() {\n\tconst editor = useEditor()\n\tconst keyboardShortcuts = useValue(\n\t\t'keyboardShortcuts',\n\t\t() => editor.user.getAreKeyboardShortcutsEnabled(),\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-keyboard-shortcuts\"\n\t\t\tchecked={keyboardShortcuts}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ToggleEnhancedA11yModeItem() {\n\tconst editor = useEditor()\n\tconst enhancedA11yMode = useValue('enhancedA11yMode', () => editor.user.getEnhancedA11yMode(), [\n\t\teditor,\n\t])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"enhanced-a11y-mode\" checked={enhancedA11yMode} />\n}\n\n/** @public @react */\nexport function ToggleDebugModeItem() {\n\tconst editor = useEditor()\n\tconst isDebugMode = useValue('isDebugMode', () => editor.getInstanceState().isDebugMode, [editor])\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-debug-mode\" checked={isDebugMode} />\n}\n\n/** @public @react */\nexport function ToggleDynamicSizeModeItem() {\n\tconst editor = useEditor()\n\tconst isDynamicResizeMode = useValue(\n\t\t'dynamic resize',\n\t\t() => editor.user.getIsDynamicResizeMode(),\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-dynamic-size-mode\"\n\t\t\tchecked={isDynamicResizeMode}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function TogglePasteAtCursorItem() {\n\tconst editor = useEditor()\n\tconst pasteAtCursor = useValue('paste at cursor', () => editor.user.getIsPasteAtCursorMode(), [\n\t\teditor,\n\t])\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem actionId=\"toggle-paste-at-cursor\" checked={pasteAtCursor} />\n\t)\n}\n\n/* ---------------------- Print --------------------- */\n\n/** @public @react */\nexport function PrintItem() {\n\tconst editor = useEditor()\n\tconst emptyPage = useValue('emptyPage', () => editor.getCurrentPageShapeIds().size === 0, [\n\t\teditor,\n\t])\n\n\treturn <TldrawUiMenuActionItem actionId=\"print\" disabled={emptyPage} />\n}\n\n/* ---------------------- Multiplayer --------------------- */\n\n/** @public @react */\nexport function CursorChatItem() {\n\tconst editor = useEditor()\n\tconst shouldShow = useValue(\n\t\t'show cursor chat',\n\t\t() => editor.getCurrentToolId() === 'select' && !editor.getInstanceState().isCoarsePointer,\n\t\t[editor]\n\t)\n\n\tif (!shouldShow) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"open-cursor-chat\" />\n}\n"],
5
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;AAsCQ;AAtCR,oBAQO;AACP,qBAA4C;AAC5C,oBAA4B;AAC5B,oBAA0B;AAC1B,wBAUO;AACP,mCAAsC;AACtC,yBAA4B;AAC5B,4CAA+C;AAC/C,oCAAuC;AACvC,+BAAkC;AAClC,8BAAiC;AACjC,iCAAoC;AAK7B,SAAS,yBAAyB;AACxC,QAAM,oBAAgB,yCAAsB;AAC5C,MAAI,CAAC,cAA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B;AAAA,IACzC,CAAC,MAAM;AAAA,EACR;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,UAAS;AAAA,MACT,SAAS;AAAA;AAAA,EACV;AAEF;AAGO,SAAS,0BAA0B;AACzC,QAAM,aAAS,yBAAU;AACzB,QAAM,oBAAgB,wBAAS,mBAAmB,MAAM,OAAO,KAAK,uBAAuB,GAAG;AAAA,IAC7F;AAAA,EACD,CAAC;AAED,SACC,4CAAC,wEAA+B,UAAS,0BAAyB,SAAS,eAAe;AAE5F;AAKO,SAAS,YAAY;AAC3B,QAAM,aAAS,yBAAU;AACzB,QAAM,gBAAY,wBAAS,aAAa,MAAM,OAAO,uBAAuB,EAAE,SAAS,GAAG;AAAA,IACzF;AAAA,EACD,CAAC;AAED,SAAO,4CAAC,wDAAuB,UAAS,SAAQ,UAAU,WAAW;AACtE;AAKO,SAAS,iBAAiB;AAChC,QAAM,aAAS,yBAAU;AACzB,QAAM,iBAAa;AAAA,IAClB;AAAA,IACA,MAAM,OAAO,iBAAiB,MAAM,YAAY,CAAC,OAAO,iBAAiB,EAAE;AAAA,IAC3E,CAAC,MAAM;AAAA,EACR;AAEA,MAAI,CAAC,WAAY,QAAO;AAExB,SAAO,4CAAC,wDAAuB,UAAS,oBAAmB;AAC5D;",
6
6
  "names": []
7
7
  }
@@ -30,7 +30,7 @@ function useEditorEvents() {
30
30
  (0, import_react.useEffect)(() => {
31
31
  function handleMaxShapes({ name, count }) {
32
32
  addToast({
33
- title: "Maximum Shapes Reached",
33
+ title: "Maximum shapes reached",
34
34
  description: `You've reached the maximum number of shapes allowed on ${name} (${count}). Please delete some shapes or move to a different page to continue.`,
35
35
  severity: "warning"
36
36
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/lib/ui/hooks/useEditorEvents.ts"],
4
- "sourcesContent": ["import { useEditor } from '@tldraw/editor'\nimport { useEffect } from 'react'\nimport { useToasts } from '../context/toasts'\n\n/** @internal */\nexport function useEditorEvents() {\n\tconst editor = useEditor()\n\tconst { addToast } = useToasts()\n\n\tuseEffect(() => {\n\t\tfunction handleMaxShapes({ name, count }: { name: string; pageId: string; count: number }) {\n\t\t\taddToast({\n\t\t\t\ttitle: 'Maximum Shapes Reached',\n\t\t\t\tdescription: `You've reached the maximum number of shapes allowed on ${name} (${count}). Please delete some shapes or move to a different page to continue.`,\n\t\t\t\tseverity: 'warning',\n\t\t\t})\n\t\t}\n\n\t\teditor.addListener('max-shapes', handleMaxShapes)\n\t\treturn () => {\n\t\t\teditor.removeListener('max-shapes', handleMaxShapes)\n\t\t}\n\t}, [editor, addToast])\n}\n"],
4
+ "sourcesContent": ["import { useEditor } from '@tldraw/editor'\nimport { useEffect } from 'react'\nimport { useToasts } from '../context/toasts'\n\n/** @internal */\nexport function useEditorEvents() {\n\tconst editor = useEditor()\n\tconst { addToast } = useToasts()\n\n\tuseEffect(() => {\n\t\tfunction handleMaxShapes({ name, count }: { name: string; pageId: string; count: number }) {\n\t\t\taddToast({\n\t\t\t\ttitle: 'Maximum shapes reached',\n\t\t\t\tdescription: `You've reached the maximum number of shapes allowed on ${name} (${count}). Please delete some shapes or move to a different page to continue.`,\n\t\t\t\tseverity: 'warning',\n\t\t\t})\n\t\t}\n\n\t\teditor.addListener('max-shapes', handleMaxShapes)\n\t\treturn () => {\n\t\t\teditor.removeListener('max-shapes', handleMaxShapes)\n\t\t}\n\t}, [editor, addToast])\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA0B;AAC1B,mBAA0B;AAC1B,oBAA0B;AAGnB,SAAS,kBAAkB;AACjC,QAAM,aAAS,yBAAU;AACzB,QAAM,EAAE,SAAS,QAAI,yBAAU;AAE/B,8BAAU,MAAM;AACf,aAAS,gBAAgB,EAAE,MAAM,MAAM,GAAoD;AAC1F,eAAS;AAAA,QACR,OAAO;AAAA,QACP,aAAa,0DAA0D,IAAI,KAAK,KAAK;AAAA,QACrF,UAAU;AAAA,MACX,CAAC;AAAA,IACF;AAEA,WAAO,YAAY,cAAc,eAAe;AAChD,WAAO,MAAM;AACZ,aAAO,eAAe,cAAc,eAAe;AAAA,IACpD;AAAA,EACD,GAAG,CAAC,QAAQ,QAAQ,CAAC;AACtB;",
6
6
  "names": []
7
7
  }
@@ -27,8 +27,8 @@ const DEFAULT_TRANSLATION = {
27
27
  "action.toggle-auto-none": "Auto",
28
28
  "action.toggle-mouse": "Mouse",
29
29
  "action.toggle-trackpad": "Trackpad",
30
- "action.convert-to-bookmark": "Convert to Bookmark",
31
- "action.convert-to-embed": "Convert to Embed",
30
+ "action.convert-to-bookmark": "Convert to bookmark",
31
+ "action.convert-to-embed": "Convert to embed",
32
32
  "action.open-embed-link": "Open link",
33
33
  "action.align-bottom": "Align bottom",
34
34
  "action.align-center-horizontal": "Align horizontally",
@@ -112,7 +112,7 @@ const DEFAULT_TRANSLATION = {
112
112
  "action.toggle-paste-at-cursor.menu": "Paste at cursor",
113
113
  "action.toggle-paste-at-cursor": "Toggle paste at cursor",
114
114
  "action.toggle-wrap-mode.menu": "Select on wrap",
115
- "action.toggle-wrap-mode": "Toggle Select on wrap",
115
+ "action.toggle-wrap-mode": "Toggle select on wrap",
116
116
  "action.toggle-reduce-motion.menu": "Reduce motion",
117
117
  "action.toggle-reduce-motion": "Toggle reduce motion",
118
118
  "action.toggle-keyboard-shortcuts.menu": "Enable keyboard shortcuts",
@@ -380,7 +380,7 @@ const DEFAULT_TRANSLATION = {
380
380
  "people-menu.change-color": "Change color",
381
381
  "people-menu.follow": "Following",
382
382
  "people-menu.following": "Following",
383
- "people-menu.leading": "Following You",
383
+ "people-menu.leading": "Following you",
384
384
  "people-menu.user": "(You)",
385
385
  "people-menu.invite": "Invite others",
386
386
  "people-menu.anonymous-user": "New user",
@@ -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": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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,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AAA,EACtD,kCAAkC;AAAA,EAClC,wCACC;AAAA,EACD,mCAAmC;AAAA,EACnC,iCAAiC;AAAA,EACjC,4CAA4C;AAAA,EAC5C,mCAAmC;AAAA,EACnC,yCACC;AAAA,EACD,oCAAoC;AAAA,EACpC,sCAAsC;AAAA,EACtC,6CAA6C;AAAA,EAC7C,qDAAqD;AAAA,EACrD,2DACC;AAAA,EACD,+BAA+B;AAAA,EAC/B,qCACC;AAAA,EACD,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,yCAAyC;AAAA,EACzC,iCAAiC;AAAA,EACjC,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,0BAA0B;AAAA,EAC1B,yBACC;AAAA,EACD,yBAAyB;AAAA,EACzB,2BAA2B;AAAA,EAC3B,iCAAiC;AAAA,EACjC,kCAAkC;AAAA,EAClC,oCAAoC;AAAA,EACpC,4BAA4B;AAAA,EAC5B,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,6BAA6B;AAAA,EAC7B,8BAA8B;AAAA,EAC9B,iCAAiC;AAAA,EACjC,kCAAkC;AAAA,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
  }
@@ -22,10 +22,10 @@ __export(version_exports, {
22
22
  version: () => version
23
23
  });
24
24
  module.exports = __toCommonJS(version_exports);
25
- const version = "4.1.0-canary.571a78a3ce3d";
25
+ const version = "4.1.0-canary.58f856c8473b";
26
26
  const publishDates = {
27
27
  major: "2025-09-18T14:39:22.803Z",
28
- minor: "2025-10-15T09:48:37.752Z",
29
- patch: "2025-10-15T09:48:37.752Z"
28
+ minor: "2025-10-15T11:05:45.484Z",
29
+ patch: "2025-10-15T11:05:45.484Z"
30
30
  };
31
31
  //# sourceMappingURL=version.js.map
@@ -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.0-canary.571a78a3ce3d'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2025-10-15T09:48:37.752Z',\n\tpatch: '2025-10-15T09:48:37.752Z',\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.1.0-canary.58f856c8473b'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2025-10-15T11:05:45.484Z',\n\tpatch: '2025-10-15T11:05:45.484Z',\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,UAAU;AAChB,MAAM,eAAe;AAAA,EAC3B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -533,7 +533,7 @@ import {
533
533
  } from "./lib/utils/tldr/file.mjs";
534
534
  registerTldrawLibraryVersion(
535
535
  "tldraw",
536
- "4.1.0-canary.571a78a3ce3d",
536
+ "4.1.0-canary.58f856c8473b",
537
537
  "esm"
538
538
  );
539
539
  export {
@@ -168,12 +168,12 @@ function DefaultDebugMenuContent() {
168
168
  function DebugFlags() {
169
169
  const items = Object.values(debugFlags);
170
170
  if (!items.length) return null;
171
- return /* @__PURE__ */ jsx(TldrawUiMenuSubmenu, { id: "debug flags", label: "Debug Flags", children: /* @__PURE__ */ jsx(TldrawUiMenuGroup, { id: "debug flags", children: items.map((flag) => /* @__PURE__ */ jsx(DebugFlagToggle, { flag }, flag.name)) }) });
171
+ return /* @__PURE__ */ jsx(TldrawUiMenuSubmenu, { id: "debug flags", label: "Debug flags", children: /* @__PURE__ */ jsx(TldrawUiMenuGroup, { id: "debug flags", children: items.map((flag) => /* @__PURE__ */ jsx(DebugFlagToggle, { flag }, flag.name)) }) });
172
172
  }
173
173
  function FeatureFlags() {
174
174
  const items = Object.values(featureFlags);
175
175
  if (!items.length) return null;
176
- return /* @__PURE__ */ jsx(TldrawUiMenuSubmenu, { id: "feature flags", label: "Feature Flags", children: /* @__PURE__ */ jsx(TldrawUiMenuGroup, { id: "feature flags", children: items.map((flag) => /* @__PURE__ */ jsx(DebugFlagToggle, { flag }, flag.name)) }) });
176
+ return /* @__PURE__ */ jsx(TldrawUiMenuSubmenu, { id: "feature flags", label: "Feature flags", children: /* @__PURE__ */ jsx(TldrawUiMenuGroup, { id: "feature flags", children: items.map((flag) => /* @__PURE__ */ jsx(DebugFlagToggle, { flag }, flag.name)) }) });
177
177
  }
178
178
  function ExampleDialog({
179
179
  title = "title",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/lib/ui/components/DebugMenu/DefaultDebugMenuContent.tsx"],
4
- "sourcesContent": ["import {\n\tDebugFlag,\n\tEditor,\n\tTLShapePartial,\n\tcreateShapeId,\n\tdebugFlags,\n\tfeatureFlags,\n\thardResetEditor,\n\ttrack,\n\tuniqueId,\n\tuseEditor,\n} from '@tldraw/editor'\nimport React from 'react'\nimport { useDialogs } from '../../context/dialogs'\nimport { useToasts } from '../../context/toasts'\nimport { untranslated } from '../../hooks/useTranslation/useTranslation'\nimport { TldrawUiButton } from '../primitives/Button/TldrawUiButton'\nimport { TldrawUiButtonCheck } from '../primitives/Button/TldrawUiButtonCheck'\nimport { TldrawUiButtonLabel } from '../primitives/Button/TldrawUiButtonLabel'\nimport {\n\tTldrawUiDialogBody,\n\tTldrawUiDialogCloseButton,\n\tTldrawUiDialogFooter,\n\tTldrawUiDialogHeader,\n\tTldrawUiDialogTitle,\n} from '../primitives/TldrawUiDialog'\nimport { TldrawUiMenuCheckboxItem } from '../primitives/menus/TldrawUiMenuCheckboxItem'\nimport { TldrawUiMenuGroup } from '../primitives/menus/TldrawUiMenuGroup'\nimport { TldrawUiMenuItem } from '../primitives/menus/TldrawUiMenuItem'\nimport { TldrawUiMenuSubmenu } from '../primitives/menus/TldrawUiMenuSubmenu'\n\n/** @public @react */\nexport function DefaultDebugMenuContent() {\n\tconst editor = useEditor()\n\tconst { addToast } = useToasts()\n\tconst { addDialog } = useDialogs()\n\tconst [error, setError] = React.useState<boolean>(false)\n\n\treturn (\n\t\t<>\n\t\t\t<TldrawUiMenuGroup id=\"items\">\n\t\t\t\t<TldrawUiMenuItem id=\"hard-reset\" onSelect={hardResetEditor} label={'Hard reset'} />\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"add-toast\"\n\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something good happened',\n\t\t\t\t\t\t\tdescription: 'Hey, attend to this thing over here. It might be important!',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t\tseverity: 'success',\n\t\t\t\t\t\t})\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something happened',\n\t\t\t\t\t\t\tdescription: 'Hey, attend to this thing over here. It might be important!',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t\tseverity: 'info',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Primary',\n\t\t\t\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Normal',\n\t\t\t\t\t\t\t\t\ttype: 'normal',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Danger',\n\t\t\t\t\t\t\t\t\ttype: 'danger',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t})\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something maybe bad happened',\n\t\t\t\t\t\t\tdescription: 'Hey, attend to this thing over here. It might be important!',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t\tseverity: 'warning',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Primary',\n\t\t\t\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Normal',\n\t\t\t\t\t\t\t\t\ttype: 'normal',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Danger',\n\t\t\t\t\t\t\t\t\ttype: 'danger',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t})\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something bad happened',\n\t\t\t\t\t\t\tseverity: 'error',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t})\n\t\t\t\t\t}}\n\t\t\t\t\tlabel={untranslated('Show toast')}\n\t\t\t\t/>\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"show-dialog\"\n\t\t\t\t\tlabel={'Show dialog'}\n\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\taddDialog({\n\t\t\t\t\t\t\tcomponent: ({ onClose }) => (\n\t\t\t\t\t\t\t\t<ExampleDialog\n\t\t\t\t\t\t\t\t\tdisplayDontShowAgain\n\t\t\t\t\t\t\t\t\tonCancel={() => onClose()}\n\t\t\t\t\t\t\t\t\tonContinue={() => onClose()}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tonClose: () => {\n\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"create-shapes\"\n\t\t\t\t\tlabel={'Create 100 shapes'}\n\t\t\t\t\tonSelect={() => createNShapes(editor, 100)}\n\t\t\t\t/>\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"count-nodes\"\n\t\t\t\t\tlabel={'Count shapes / nodes'}\n\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\t\t\t\tconst shapes =\n\t\t\t\t\t\t\tselectedShapes.length === 0 ? editor.getRenderingShapes() : selectedShapes\n\t\t\t\t\t\twindow.alert(\n\t\t\t\t\t\t\t`Shapes ${shapes.length}, DOM nodes:${document.querySelector('.tl-shapes')!.querySelectorAll('*')?.length}`\n\t\t\t\t\t\t)\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t{(() => {\n\t\t\t\t\tif (error) throw Error('oh no!')\n\t\t\t\t\treturn null\n\t\t\t\t})()}\n\t\t\t\t<TldrawUiMenuItem id=\"throw-error\" onSelect={() => setError(true)} label={'Throw error'} />\n\t\t\t</TldrawUiMenuGroup>\n\t\t\t<TldrawUiMenuGroup id=\"flags\">\n\t\t\t\t<DebugFlags />\n\t\t\t\t<FeatureFlags />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</>\n\t)\n}\n/** @public @react */\nexport function DebugFlags() {\n\tconst items = Object.values(debugFlags)\n\tif (!items.length) return null\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"debug flags\" label=\"Debug Flags\">\n\t\t\t<TldrawUiMenuGroup id=\"debug flags\">\n\t\t\t\t{items.map((flag) => (\n\t\t\t\t\t<DebugFlagToggle key={flag.name} flag={flag} />\n\t\t\t\t))}\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n/** @public @react */\nexport function FeatureFlags() {\n\tconst items = Object.values(featureFlags)\n\tif (!items.length) return null\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"feature flags\" label=\"Feature Flags\">\n\t\t\t<TldrawUiMenuGroup id=\"feature flags\">\n\t\t\t\t{items.map((flag) => (\n\t\t\t\t\t<DebugFlagToggle key={flag.name} flag={flag} />\n\t\t\t\t))}\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public */\nexport interface ExampleDialogProps {\n\ttitle?: string\n\tbody?: React.ReactNode\n\tcancel?: string\n\tconfirm?: string\n\tdisplayDontShowAgain?: boolean\n\tmaxWidth?: string\n\tonCancel(): void\n\tonContinue(): void\n}\n\n/** @public @react */\nexport function ExampleDialog({\n\ttitle = 'title',\n\tbody = 'hello hello hello',\n\tcancel = 'Cancel',\n\tconfirm = 'Continue',\n\tdisplayDontShowAgain = false,\n\tmaxWidth = '350',\n\tonCancel,\n\tonContinue,\n}: ExampleDialogProps) {\n\tconst [dontShowAgain, setDontShowAgain] = React.useState(false)\n\n\treturn (\n\t\t<>\n\t\t\t<TldrawUiDialogHeader>\n\t\t\t\t<TldrawUiDialogTitle>{title}</TldrawUiDialogTitle>\n\t\t\t\t<TldrawUiDialogCloseButton />\n\t\t\t</TldrawUiDialogHeader>\n\t\t\t<TldrawUiDialogBody style={{ maxWidth }}>{body}</TldrawUiDialogBody>\n\t\t\t<TldrawUiDialogFooter className=\"tlui-dialog__footer__actions\">\n\t\t\t\t{displayDontShowAgain && (\n\t\t\t\t\t<TldrawUiButton\n\t\t\t\t\t\ttype=\"normal\"\n\t\t\t\t\t\tonClick={() => setDontShowAgain(!dontShowAgain)}\n\t\t\t\t\t\tstyle={{ marginRight: 'auto' }}\n\t\t\t\t\t>\n\t\t\t\t\t\t<TldrawUiButtonCheck checked={dontShowAgain} />\n\t\t\t\t\t\t<TldrawUiButtonLabel>Don\u2019t show again</TldrawUiButtonLabel>\n\t\t\t\t\t</TldrawUiButton>\n\t\t\t\t)}\n\t\t\t\t<TldrawUiButton type=\"normal\" onClick={onCancel}>\n\t\t\t\t\t<TldrawUiButtonLabel>{cancel}</TldrawUiButtonLabel>\n\t\t\t\t</TldrawUiButton>\n\t\t\t\t<TldrawUiButton type=\"primary\" onClick={async () => onContinue()}>\n\t\t\t\t\t<TldrawUiButtonLabel>{confirm}</TldrawUiButtonLabel>\n\t\t\t\t</TldrawUiButton>\n\t\t\t</TldrawUiDialogFooter>\n\t\t</>\n\t)\n}\n\nconst DebugFlagToggle = track(function DebugFlagToggle({\n\tflag,\n\tonChange,\n}: {\n\tflag: DebugFlag<boolean>\n\tonChange?(newValue: boolean): void\n}) {\n\tconst value = flag.get()\n\treturn (\n\t\t<TldrawUiMenuCheckboxItem\n\t\t\tid={flag.name}\n\t\t\ttitle={flag.name}\n\t\t\tlabel={flag.name\n\t\t\t\t.replace(/([a-z0-9])([A-Z])/g, (m) => `${m[0]} ${m[1].toLowerCase()}`)\n\t\t\t\t.replace(/^[a-z]/, (m) => m.toUpperCase())}\n\t\t\tchecked={value}\n\t\t\tonSelect={() => {\n\t\t\t\tflag.set(!value)\n\t\t\t\tonChange?.(!value)\n\t\t\t}}\n\t\t/>\n\t)\n})\n\nlet t = 0\n\nfunction createNShapes(editor: Editor, n: number) {\n\tconst gap = editor.options.adjacentShapeMargin\n\tconst shapesToCreate: TLShapePartial[] = Array(n)\n\tconst cols = Math.floor(Math.sqrt(n))\n\n\tfor (let i = 0; i < n; i++) {\n\t\tt++\n\t\tshapesToCreate[i] = {\n\t\t\tid: createShapeId('box' + t),\n\t\t\ttype: 'geo',\n\t\t\tx: (i % cols) * (100 + gap),\n\t\t\ty: Math.floor(i / cols) * (100 + gap),\n\t\t}\n\t}\n\n\teditor.run(() => {\n\t\t// allow this to trigger the max shapes alert\n\t\teditor.createShapes(shapesToCreate).setSelectedShapes(shapesToCreate.map((s) => s.id))\n\t})\n}\n"],
4
+ "sourcesContent": ["import {\n\tDebugFlag,\n\tEditor,\n\tTLShapePartial,\n\tcreateShapeId,\n\tdebugFlags,\n\tfeatureFlags,\n\thardResetEditor,\n\ttrack,\n\tuniqueId,\n\tuseEditor,\n} from '@tldraw/editor'\nimport React from 'react'\nimport { useDialogs } from '../../context/dialogs'\nimport { useToasts } from '../../context/toasts'\nimport { untranslated } from '../../hooks/useTranslation/useTranslation'\nimport { TldrawUiButton } from '../primitives/Button/TldrawUiButton'\nimport { TldrawUiButtonCheck } from '../primitives/Button/TldrawUiButtonCheck'\nimport { TldrawUiButtonLabel } from '../primitives/Button/TldrawUiButtonLabel'\nimport {\n\tTldrawUiDialogBody,\n\tTldrawUiDialogCloseButton,\n\tTldrawUiDialogFooter,\n\tTldrawUiDialogHeader,\n\tTldrawUiDialogTitle,\n} from '../primitives/TldrawUiDialog'\nimport { TldrawUiMenuCheckboxItem } from '../primitives/menus/TldrawUiMenuCheckboxItem'\nimport { TldrawUiMenuGroup } from '../primitives/menus/TldrawUiMenuGroup'\nimport { TldrawUiMenuItem } from '../primitives/menus/TldrawUiMenuItem'\nimport { TldrawUiMenuSubmenu } from '../primitives/menus/TldrawUiMenuSubmenu'\n\n/** @public @react */\nexport function DefaultDebugMenuContent() {\n\tconst editor = useEditor()\n\tconst { addToast } = useToasts()\n\tconst { addDialog } = useDialogs()\n\tconst [error, setError] = React.useState<boolean>(false)\n\n\treturn (\n\t\t<>\n\t\t\t<TldrawUiMenuGroup id=\"items\">\n\t\t\t\t<TldrawUiMenuItem id=\"hard-reset\" onSelect={hardResetEditor} label={'Hard reset'} />\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"add-toast\"\n\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something good happened',\n\t\t\t\t\t\t\tdescription: 'Hey, attend to this thing over here. It might be important!',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t\tseverity: 'success',\n\t\t\t\t\t\t})\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something happened',\n\t\t\t\t\t\t\tdescription: 'Hey, attend to this thing over here. It might be important!',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t\tseverity: 'info',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Primary',\n\t\t\t\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Normal',\n\t\t\t\t\t\t\t\t\ttype: 'normal',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Danger',\n\t\t\t\t\t\t\t\t\ttype: 'danger',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t})\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something maybe bad happened',\n\t\t\t\t\t\t\tdescription: 'Hey, attend to this thing over here. It might be important!',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t\tseverity: 'warning',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Primary',\n\t\t\t\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Normal',\n\t\t\t\t\t\t\t\t\ttype: 'normal',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: 'Danger',\n\t\t\t\t\t\t\t\t\ttype: 'danger',\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t})\n\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\tid: uniqueId(),\n\t\t\t\t\t\t\ttitle: 'Something bad happened',\n\t\t\t\t\t\t\tseverity: 'error',\n\t\t\t\t\t\t\tkeepOpen: true,\n\t\t\t\t\t\t})\n\t\t\t\t\t}}\n\t\t\t\t\tlabel={untranslated('Show toast')}\n\t\t\t\t/>\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"show-dialog\"\n\t\t\t\t\tlabel={'Show dialog'}\n\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\taddDialog({\n\t\t\t\t\t\t\tcomponent: ({ onClose }) => (\n\t\t\t\t\t\t\t\t<ExampleDialog\n\t\t\t\t\t\t\t\t\tdisplayDontShowAgain\n\t\t\t\t\t\t\t\t\tonCancel={() => onClose()}\n\t\t\t\t\t\t\t\t\tonContinue={() => onClose()}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tonClose: () => {\n\t\t\t\t\t\t\t\tvoid null\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"create-shapes\"\n\t\t\t\t\tlabel={'Create 100 shapes'}\n\t\t\t\t\tonSelect={() => createNShapes(editor, 100)}\n\t\t\t\t/>\n\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\tid=\"count-nodes\"\n\t\t\t\t\tlabel={'Count shapes / nodes'}\n\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\t\t\t\tconst shapes =\n\t\t\t\t\t\t\tselectedShapes.length === 0 ? editor.getRenderingShapes() : selectedShapes\n\t\t\t\t\t\twindow.alert(\n\t\t\t\t\t\t\t`Shapes ${shapes.length}, DOM nodes:${document.querySelector('.tl-shapes')!.querySelectorAll('*')?.length}`\n\t\t\t\t\t\t)\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t{(() => {\n\t\t\t\t\tif (error) throw Error('oh no!')\n\t\t\t\t\treturn null\n\t\t\t\t})()}\n\t\t\t\t<TldrawUiMenuItem id=\"throw-error\" onSelect={() => setError(true)} label={'Throw error'} />\n\t\t\t</TldrawUiMenuGroup>\n\t\t\t<TldrawUiMenuGroup id=\"flags\">\n\t\t\t\t<DebugFlags />\n\t\t\t\t<FeatureFlags />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</>\n\t)\n}\n/** @public @react */\nexport function DebugFlags() {\n\tconst items = Object.values(debugFlags)\n\tif (!items.length) return null\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"debug flags\" label=\"Debug flags\">\n\t\t\t<TldrawUiMenuGroup id=\"debug flags\">\n\t\t\t\t{items.map((flag) => (\n\t\t\t\t\t<DebugFlagToggle key={flag.name} flag={flag} />\n\t\t\t\t))}\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n/** @public @react */\nexport function FeatureFlags() {\n\tconst items = Object.values(featureFlags)\n\tif (!items.length) return null\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"feature flags\" label=\"Feature flags\">\n\t\t\t<TldrawUiMenuGroup id=\"feature flags\">\n\t\t\t\t{items.map((flag) => (\n\t\t\t\t\t<DebugFlagToggle key={flag.name} flag={flag} />\n\t\t\t\t))}\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public */\nexport interface ExampleDialogProps {\n\ttitle?: string\n\tbody?: React.ReactNode\n\tcancel?: string\n\tconfirm?: string\n\tdisplayDontShowAgain?: boolean\n\tmaxWidth?: string\n\tonCancel(): void\n\tonContinue(): void\n}\n\n/** @public @react */\nexport function ExampleDialog({\n\ttitle = 'title',\n\tbody = 'hello hello hello',\n\tcancel = 'Cancel',\n\tconfirm = 'Continue',\n\tdisplayDontShowAgain = false,\n\tmaxWidth = '350',\n\tonCancel,\n\tonContinue,\n}: ExampleDialogProps) {\n\tconst [dontShowAgain, setDontShowAgain] = React.useState(false)\n\n\treturn (\n\t\t<>\n\t\t\t<TldrawUiDialogHeader>\n\t\t\t\t<TldrawUiDialogTitle>{title}</TldrawUiDialogTitle>\n\t\t\t\t<TldrawUiDialogCloseButton />\n\t\t\t</TldrawUiDialogHeader>\n\t\t\t<TldrawUiDialogBody style={{ maxWidth }}>{body}</TldrawUiDialogBody>\n\t\t\t<TldrawUiDialogFooter className=\"tlui-dialog__footer__actions\">\n\t\t\t\t{displayDontShowAgain && (\n\t\t\t\t\t<TldrawUiButton\n\t\t\t\t\t\ttype=\"normal\"\n\t\t\t\t\t\tonClick={() => setDontShowAgain(!dontShowAgain)}\n\t\t\t\t\t\tstyle={{ marginRight: 'auto' }}\n\t\t\t\t\t>\n\t\t\t\t\t\t<TldrawUiButtonCheck checked={dontShowAgain} />\n\t\t\t\t\t\t<TldrawUiButtonLabel>Don\u2019t show again</TldrawUiButtonLabel>\n\t\t\t\t\t</TldrawUiButton>\n\t\t\t\t)}\n\t\t\t\t<TldrawUiButton type=\"normal\" onClick={onCancel}>\n\t\t\t\t\t<TldrawUiButtonLabel>{cancel}</TldrawUiButtonLabel>\n\t\t\t\t</TldrawUiButton>\n\t\t\t\t<TldrawUiButton type=\"primary\" onClick={async () => onContinue()}>\n\t\t\t\t\t<TldrawUiButtonLabel>{confirm}</TldrawUiButtonLabel>\n\t\t\t\t</TldrawUiButton>\n\t\t\t</TldrawUiDialogFooter>\n\t\t</>\n\t)\n}\n\nconst DebugFlagToggle = track(function DebugFlagToggle({\n\tflag,\n\tonChange,\n}: {\n\tflag: DebugFlag<boolean>\n\tonChange?(newValue: boolean): void\n}) {\n\tconst value = flag.get()\n\treturn (\n\t\t<TldrawUiMenuCheckboxItem\n\t\t\tid={flag.name}\n\t\t\ttitle={flag.name}\n\t\t\tlabel={flag.name\n\t\t\t\t.replace(/([a-z0-9])([A-Z])/g, (m) => `${m[0]} ${m[1].toLowerCase()}`)\n\t\t\t\t.replace(/^[a-z]/, (m) => m.toUpperCase())}\n\t\t\tchecked={value}\n\t\t\tonSelect={() => {\n\t\t\t\tflag.set(!value)\n\t\t\t\tonChange?.(!value)\n\t\t\t}}\n\t\t/>\n\t)\n})\n\nlet t = 0\n\nfunction createNShapes(editor: Editor, n: number) {\n\tconst gap = editor.options.adjacentShapeMargin\n\tconst shapesToCreate: TLShapePartial[] = Array(n)\n\tconst cols = Math.floor(Math.sqrt(n))\n\n\tfor (let i = 0; i < n; i++) {\n\t\tt++\n\t\tshapesToCreate[i] = {\n\t\t\tid: createShapeId('box' + t),\n\t\t\ttype: 'geo',\n\t\t\tx: (i % cols) * (100 + gap),\n\t\t\ty: Math.floor(i / cols) * (100 + gap),\n\t\t}\n\t}\n\n\teditor.run(() => {\n\t\t// allow this to trigger the max shapes alert\n\t\teditor.createShapes(shapesToCreate).setSelectedShapes(shapesToCreate.map((s) => s.id))\n\t})\n}\n"],
5
5
  "mappings": "AAuCE,mBAEE,KADD,YADD;AAvCF;AAAA,EAIC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,OAAO,WAAW;AAClB,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAC/B,SAAS,2BAA2B;AACpC,SAAS,2BAA2B;AACpC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,gCAAgC;AACzC,SAAS,yBAAyB;AAClC,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AAG7B,SAAS,0BAA0B;AACzC,QAAM,SAAS,UAA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AAA,EACtF,CAAC;AACF;",
6
6
  "names": ["DebugFlagToggle"]
7
7
  }
@@ -348,11 +348,11 @@ function MoveToPageMenu() {
348
348
  const toPage = editor.getPage(page.id);
349
349
  if (toPage) {
350
350
  addToast({
351
- title: "Changed Page",
351
+ title: "Changed page",
352
352
  description: `Moved to ${toPage.name}.`,
353
353
  actions: [
354
354
  {
355
- label: "Go Back",
355
+ label: "Go back",
356
356
  type: "primary",
357
357
  onClick: () => {
358
358
  editor.markHistoryStoppingPoint("change-page");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/lib/ui/components/menu-items.tsx"],
4
- "sourcesContent": ["import {\n\tTLBookmarkShape,\n\tTLEmbedShape,\n\tTLFrameShape,\n\tTLImageShape,\n\tTLPageId,\n\tuseEditor,\n\tuseValue,\n} from '@tldraw/editor'\nimport { supportsDownloadingOriginal } from '../context/actions'\nimport { useUiEvents } from '../context/events'\nimport { useToasts } from '../context/toasts'\nimport {\n\tshowMenuPaste,\n\tuseAllowGroup,\n\tuseAllowUngroup,\n\tuseAnySelectedShapesCount,\n\tuseHasLinkShapeSelected,\n\tuseOnlyFlippableShape,\n\tuseShowAutoSizeToggle,\n\tuseThreeStackableItems,\n\tuseUnlockedSelectedShapesCount,\n} from '../hooks/menu-hooks'\nimport { useGetEmbedDefinition } from '../hooks/useGetEmbedDefinition'\nimport { useReadonly } from '../hooks/useReadonly'\nimport { TldrawUiMenuActionCheckboxItem } from './primitives/menus/TldrawUiMenuActionCheckboxItem'\nimport { TldrawUiMenuActionItem } from './primitives/menus/TldrawUiMenuActionItem'\nimport { TldrawUiMenuGroup } from './primitives/menus/TldrawUiMenuGroup'\nimport { TldrawUiMenuItem } from './primitives/menus/TldrawUiMenuItem'\nimport { TldrawUiMenuSubmenu } from './primitives/menus/TldrawUiMenuSubmenu'\n\n/* -------------------- Selection ------------------- */\n\n/** @public @react */\nexport function ToggleAutoSizeMenuItem() {\n\tconst shouldDisplay = useShowAutoSizeToggle()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"toggle-auto-size\" />\n}\n\n/** @public @react */\nexport function EditLinkMenuItem() {\n\tconst shouldDisplay = useHasLinkShapeSelected()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"edit-link\" />\n}\n\n/** @public @react */\nexport function DuplicateMenuItem() {\n\tconst shouldDisplay = useUnlockedSelectedShapesCount(1)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"duplicate\" />\n}\n\n/** @public @react */\nexport function FlattenMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'should display flatten option',\n\t\t() => {\n\t\t\tconst selectedShapeIds = editor.getSelectedShapeIds()\n\t\t\tif (selectedShapeIds.length === 0) return false\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (onlySelectedShape && editor.isShapeOfType<TLImageShape>(onlySelectedShape, 'image')) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn true\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"flatten-to-image\" />\n}\n\n/** @public @react */\nexport function DownloadOriginalMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'should display download original option',\n\t\t() => {\n\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\tif (selectedShapes.length === 0) return false\n\t\t\treturn selectedShapes.some((shape) => supportsDownloadingOriginal(shape, editor))\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"download-original\" />\n}\n\n/** @public @react */\nexport function GroupMenuItem() {\n\tconst shouldDisplay = useAllowGroup()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"group\" />\n}\n\n/** @public @react */\nexport function UngroupMenuItem() {\n\tconst shouldDisplay = useAllowUngroup()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"ungroup\" />\n}\n\n/** @public @react */\nexport function RemoveFrameMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'allow unframe',\n\t\t() => {\n\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\tif (selectedShapes.length === 0) return false\n\t\t\treturn selectedShapes.every((shape) => editor.isShapeOfType<TLFrameShape>(shape, 'frame'))\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"remove-frame\" />\n}\n\n/** @public @react */\nexport function FitFrameToContentMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'allow fit frame to content',\n\t\t() => {\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (!onlySelectedShape) return false\n\t\t\treturn (\n\t\t\t\teditor.isShapeOfType<TLFrameShape>(onlySelectedShape, 'frame') &&\n\t\t\t\teditor.getSortedChildIdsForParent(onlySelectedShape).length > 0\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"fit-frame-to-content\" />\n}\n\n/** @public @react */\nexport function ToggleLockMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue('selected shapes', () => editor.getSelectedShapes().length > 0, [\n\t\teditor,\n\t])\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"toggle-lock\" />\n}\n\n/** @public @react */\nexport function ToggleTransparentBgMenuItem() {\n\tconst editor = useEditor()\n\tconst isTransparentBg = useValue(\n\t\t'isTransparentBg',\n\t\t() => !editor.getInstanceState().exportBackground,\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-transparent\"\n\t\t\tchecked={isTransparentBg}\n\t\t\ttoggle\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function UnlockAllMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue('any shapes', () => editor.getCurrentPageShapeIds().size > 0, [\n\t\teditor,\n\t])\n\n\treturn <TldrawUiMenuActionItem actionId=\"unlock-all\" disabled={!shouldDisplay} />\n}\n\n/* ---------------------- Zoom ---------------------- */\n\n/** @public @react */\nexport function ZoomTo100MenuItem() {\n\tconst editor = useEditor()\n\tconst isZoomedTo100 = useValue('zoomed to 100', () => editor.getZoomLevel() === 1, [editor])\n\n\treturn <TldrawUiMenuActionItem actionId=\"zoom-to-100\" noClose disabled={isZoomedTo100} />\n}\n\n/** @public @react */\nexport function ZoomToFitMenuItem() {\n\tconst editor = useEditor()\n\tconst hasShapes = useValue('has shapes', () => editor.getCurrentPageShapeIds().size > 0, [editor])\n\n\treturn (\n\t\t<TldrawUiMenuActionItem\n\t\t\tactionId=\"zoom-to-fit\"\n\t\t\tdisabled={!hasShapes}\n\t\t\tdata-testid=\"minimap.zoom-menu.zoom-to-fit\"\n\t\t\tnoClose\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ZoomToSelectionMenuItem() {\n\tconst editor = useEditor()\n\tconst hasSelected = useValue('has shapes', () => editor.getSelectedShapeIds().length > 0, [\n\t\teditor,\n\t])\n\n\treturn (\n\t\t<TldrawUiMenuActionItem\n\t\t\tactionId=\"zoom-to-selection\"\n\t\t\tdisabled={!hasSelected}\n\t\t\tdata-testid=\"minimap.zoom-menu.zoom-to-selection\"\n\t\t\tnoClose\n\t\t/>\n\t)\n}\n\n/* -------------------- Clipboard ------------------- */\n\n/** @public @react */\nexport function ClipboardMenuGroup() {\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"clipboard\">\n\t\t\t<CutMenuItem />\n\t\t\t<CopyMenuItem />\n\t\t\t<PasteMenuItem />\n\t\t\t<DuplicateMenuItem />\n\t\t\t<DeleteMenuItem />\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\n/** @public @react */\nexport function CopyAsMenuGroup() {\n\tconst editor = useEditor()\n\tconst atLeastOneShapeOnPage = useValue(\n\t\t'atLeastOneShapeOnPage',\n\t\t() => editor.getCurrentPageShapeIds().size > 0,\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu\n\t\t\tid=\"copy-as\"\n\t\t\tlabel=\"context-menu.copy-as\"\n\t\t\tsize=\"small\"\n\t\t\tdisabled={!atLeastOneShapeOnPage}\n\t\t>\n\t\t\t<TldrawUiMenuGroup id=\"copy-as-group\">\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"copy-as-svg\" />\n\t\t\t\t{Boolean(window.navigator.clipboard?.write) && (\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"copy-as-png\" />\n\t\t\t\t)}\n\t\t\t</TldrawUiMenuGroup>\n\t\t\t<TldrawUiMenuGroup id=\"copy-as-bg\">\n\t\t\t\t<ToggleTransparentBgMenuItem />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function CutMenuItem() {\n\tconst shouldDisplay = useUnlockedSelectedShapesCount(1)\n\n\treturn <TldrawUiMenuActionItem actionId=\"cut\" disabled={!shouldDisplay} />\n}\n\n/** @public @react */\nexport function CopyMenuItem() {\n\tconst shouldDisplay = useAnySelectedShapesCount(1)\n\n\treturn <TldrawUiMenuActionItem actionId=\"copy\" disabled={!shouldDisplay} />\n}\n\n/** @public @react */\nexport function PasteMenuItem() {\n\tconst shouldDisplay = showMenuPaste\n\n\treturn <TldrawUiMenuActionItem actionId=\"paste\" disabled={!shouldDisplay} />\n}\n\n/* ------------------- Conversions ------------------ */\n\n/** @public @react */\nexport function ConversionsMenuGroup() {\n\tconst editor = useEditor()\n\tconst atLeastOneShapeOnPage = useValue(\n\t\t'atLeastOneShapeOnPage',\n\t\t() => editor.getCurrentPageShapeIds().size > 0,\n\t\t[editor]\n\t)\n\n\tif (!atLeastOneShapeOnPage) return null\n\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"conversions\">\n\t\t\t<CopyAsMenuGroup />\n\t\t\t<TldrawUiMenuSubmenu id=\"export-as\" label=\"context-menu.export-as\" size=\"small\">\n\t\t\t\t<TldrawUiMenuGroup id=\"export-as-group\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"export-as-svg\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"export-as-png\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t\t<TldrawUiMenuGroup id=\"export-as-bg\">\n\t\t\t\t\t<ToggleTransparentBgMenuItem />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t</TldrawUiMenuSubmenu>\n\t\t\t<DownloadOriginalMenuItem />\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\n/* ------------------ Set Selection ----------------- */\n/** @public @react */\nexport function SelectAllMenuItem() {\n\tconst editor = useEditor()\n\tconst atLeastOneShapeOnPage = useValue(\n\t\t'atLeastOneShapeOnPage',\n\t\t() => editor.getCurrentPageShapeIds().size > 0,\n\t\t[editor]\n\t)\n\n\treturn <TldrawUiMenuActionItem actionId=\"select-all\" disabled={!atLeastOneShapeOnPage} />\n}\n\n/* ------------------ Delete Group ------------------ */\n\n/** @public @react */\nexport function DeleteMenuItem() {\n\tconst oneSelected = useUnlockedSelectedShapesCount(1)\n\n\treturn <TldrawUiMenuActionItem actionId=\"delete\" disabled={!oneSelected} />\n}\n\n/* --------------------- Modify --------------------- */\n\n/** @public @react */\nexport function EditMenuSubmenu() {\n\tconst isReadonlyMode = useReadonly()\n\tif (!useAnySelectedShapesCount(1)) return null\n\tif (isReadonlyMode) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"edit\" label=\"context-menu.edit\" size=\"small\">\n\t\t\t<GroupMenuItem />\n\t\t\t<UngroupMenuItem />\n\t\t\t<FlattenMenuItem />\n\t\t\t<EditLinkMenuItem />\n\t\t\t<FitFrameToContentMenuItem />\n\t\t\t<RemoveFrameMenuItem />\n\t\t\t<ConvertToEmbedMenuItem />\n\t\t\t<ConvertToBookmarkMenuItem />\n\t\t\t<ToggleAutoSizeMenuItem />\n\t\t\t<ToggleLockMenuItem />\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function ArrangeMenuSubmenu() {\n\tconst twoSelected = useUnlockedSelectedShapesCount(2)\n\tconst onlyFlippableShapeSelected = useOnlyFlippableShape()\n\tconst isReadonlyMode = useReadonly()\n\n\tif (isReadonlyMode) return null\n\tif (!(twoSelected || onlyFlippableShapeSelected)) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"arrange\" label=\"context-menu.arrange\" size=\"small\">\n\t\t\t{twoSelected && (\n\t\t\t\t<TldrawUiMenuGroup id=\"align\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-left\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-center-horizontal\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-right\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-top\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-center-vertical\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-bottom\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t)}\n\t\t\t<DistributeMenuGroup />\n\t\t\t{twoSelected && (\n\t\t\t\t<TldrawUiMenuGroup id=\"stretch\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"stretch-horizontal\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"stretch-vertical\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t)}\n\t\t\t{(twoSelected || onlyFlippableShapeSelected) && (\n\t\t\t\t<TldrawUiMenuGroup id=\"flip\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"flip-horizontal\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"flip-vertical\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t)}\n\t\t\t<OrderMenuGroup />\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\nfunction DistributeMenuGroup() {\n\tconst threeSelected = useUnlockedSelectedShapesCount(3)\n\tif (!threeSelected) return null\n\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"distribute\">\n\t\t\t<TldrawUiMenuActionItem actionId=\"distribute-horizontal\" />\n\t\t\t<TldrawUiMenuActionItem actionId=\"distribute-vertical\" />\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\nfunction OrderMenuGroup() {\n\tconst twoSelected = useUnlockedSelectedShapesCount(2)\n\tconst threeStackableItems = useThreeStackableItems()\n\tif (!twoSelected) return null\n\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"order\">\n\t\t\t<TldrawUiMenuActionItem actionId=\"pack\" />\n\t\t\t{threeStackableItems && <TldrawUiMenuActionItem actionId=\"stack-horizontal\" />}\n\t\t\t{threeStackableItems && <TldrawUiMenuActionItem actionId=\"stack-vertical\" />}\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\n/** @public @react */\nexport function ReorderMenuSubmenu() {\n\tconst isReadonlyMode = useReadonly()\n\tconst oneSelected = useUnlockedSelectedShapesCount(1)\n\tif (isReadonlyMode) return null\n\tif (!oneSelected) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"reorder\" label=\"context-menu.reorder\" size=\"small\">\n\t\t\t<TldrawUiMenuGroup id=\"reorder\">\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"bring-to-front\" />\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"bring-forward\" />\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"send-backward\" />\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"send-to-back\" />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function MoveToPageMenu() {\n\tconst editor = useEditor()\n\tconst pages = useValue('pages', () => editor.getPages(), [editor])\n\tconst currentPageId = useValue('current page id', () => editor.getCurrentPageId(), [editor])\n\tconst { addToast } = useToasts()\n\tconst trackEvent = useUiEvents()\n\tconst isReadonlyMode = useReadonly()\n\tconst oneSelected = useUnlockedSelectedShapesCount(1)\n\n\tif (!oneSelected) return null\n\tif (isReadonlyMode) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"move-to-page\" label=\"context-menu.move-to-page\" size=\"small\">\n\t\t\t<TldrawUiMenuGroup id=\"pages\">\n\t\t\t\t{pages.map((page) => (\n\t\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\t\tid={page.id}\n\t\t\t\t\t\tkey={page.id}\n\t\t\t\t\t\tdisabled={currentPageId === page.id}\n\t\t\t\t\t\tlabel={page.name.length > 30 ? `${page.name.slice(0, 30)}\u2026` : page.name}\n\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\teditor.markHistoryStoppingPoint('move_shapes_to_page')\n\t\t\t\t\t\t\teditor.moveShapesToPage(editor.getSelectedShapeIds(), page.id as TLPageId)\n\n\t\t\t\t\t\t\tconst toPage = editor.getPage(page.id)\n\n\t\t\t\t\t\t\tif (toPage) {\n\t\t\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\t\t\ttitle: 'Changed Page',\n\t\t\t\t\t\t\t\t\tdescription: `Moved to ${toPage.name}.`,\n\t\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tlabel: 'Go Back',\n\t\t\t\t\t\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\t\teditor.markHistoryStoppingPoint('change-page')\n\t\t\t\t\t\t\t\t\t\t\t\teditor.setCurrentPage(currentPageId)\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttrackEvent('move-to-page', { source: 'context-menu' })\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</TldrawUiMenuGroup>\n\t\t\t<TldrawUiMenuGroup id=\"new-page\">\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"move-to-new-page\" />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function ConvertToBookmarkMenuItem() {\n\tconst editor = useEditor()\n\n\tconst oneEmbedSelected = useValue(\n\t\t'oneEmbedSelected',\n\t\t() => {\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (!onlySelectedShape) return false\n\t\t\treturn !!(\n\t\t\t\teditor.isShapeOfType<TLEmbedShape>(onlySelectedShape, 'embed') &&\n\t\t\t\tonlySelectedShape.props.url &&\n\t\t\t\t!editor.isShapeOrAncestorLocked(onlySelectedShape)\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n\n\tif (!oneEmbedSelected) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"convert-to-bookmark\" />\n}\n\n/** @public @react */\nexport function ConvertToEmbedMenuItem() {\n\tconst editor = useEditor()\n\tconst getEmbedDefinition = useGetEmbedDefinition()\n\n\tconst oneEmbeddableBookmarkSelected = useValue(\n\t\t'oneEmbeddableBookmarkSelected',\n\t\t() => {\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (!onlySelectedShape) return false\n\t\t\treturn !!(\n\t\t\t\teditor.isShapeOfType<TLBookmarkShape>(onlySelectedShape, 'bookmark') &&\n\t\t\t\tonlySelectedShape.props.url &&\n\t\t\t\tgetEmbedDefinition(onlySelectedShape.props.url) &&\n\t\t\t\t!editor.isShapeOrAncestorLocked(onlySelectedShape)\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n\n\tif (!oneEmbeddableBookmarkSelected) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"convert-to-embed\" />\n}\n\n/* ------------------- Preferences ------------------ */\n\n/** @public @react */\nexport function ToggleSnapModeItem() {\n\tconst editor = useEditor()\n\tconst isSnapMode = useValue('isSnapMode', () => editor.user.getIsSnapMode(), [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-snap-mode\" checked={isSnapMode} />\n}\n\n/** @public @react */\nexport function ToggleToolLockItem() {\n\tconst editor = useEditor()\n\tconst isToolLock = useValue('isToolLock', () => editor.getInstanceState().isToolLocked, [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-tool-lock\" checked={isToolLock} />\n}\n\n/** @public @react */\nexport function ToggleGridItem() {\n\tconst editor = useEditor()\n\tconst isGridMode = useValue('isGridMode', () => editor.getInstanceState().isGridMode, [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-grid\" checked={isGridMode} />\n}\n\n/** @public @react */\nexport function ToggleWrapModeItem() {\n\tconst editor = useEditor()\n\tconst isWrapMode = useValue('isWrapMode', () => editor.user.getIsWrapMode(), [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-wrap-mode\" checked={isWrapMode} />\n}\n\n/** @public @react */\nexport function ToggleDarkModeItem() {\n\tconst editor = useEditor()\n\tconst isDarkMode = useValue('isDarkMode', () => editor.user.getIsDarkMode(), [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-dark-mode\" checked={isDarkMode} />\n}\n\n/** @public @react */\nexport function ToggleFocusModeItem() {\n\tconst editor = useEditor()\n\tconst isFocusMode = useValue('isFocusMode', () => editor.getInstanceState().isFocusMode, [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-focus-mode\" checked={isFocusMode} />\n}\n\n/** @public @react */\nexport function ToggleEdgeScrollingItem() {\n\tconst editor = useEditor()\n\tconst edgeScrollSpeed = useValue('edgeScrollSpeed', () => editor.user.getEdgeScrollSpeed(), [\n\t\teditor,\n\t])\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-edge-scrolling\"\n\t\t\tchecked={edgeScrollSpeed === 1}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ToggleReduceMotionItem() {\n\tconst editor = useEditor()\n\tconst animationSpeed = useValue('animationSpeed', () => editor.user.getAnimationSpeed(), [editor])\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-reduce-motion\"\n\t\t\tchecked={animationSpeed === 0}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ToggleKeyboardShortcutsItem() {\n\tconst editor = useEditor()\n\tconst keyboardShortcuts = useValue(\n\t\t'keyboardShortcuts',\n\t\t() => editor.user.getAreKeyboardShortcutsEnabled(),\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-keyboard-shortcuts\"\n\t\t\tchecked={keyboardShortcuts}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ToggleEnhancedA11yModeItem() {\n\tconst editor = useEditor()\n\tconst enhancedA11yMode = useValue('enhancedA11yMode', () => editor.user.getEnhancedA11yMode(), [\n\t\teditor,\n\t])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"enhanced-a11y-mode\" checked={enhancedA11yMode} />\n}\n\n/** @public @react */\nexport function ToggleDebugModeItem() {\n\tconst editor = useEditor()\n\tconst isDebugMode = useValue('isDebugMode', () => editor.getInstanceState().isDebugMode, [editor])\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-debug-mode\" checked={isDebugMode} />\n}\n\n/** @public @react */\nexport function ToggleDynamicSizeModeItem() {\n\tconst editor = useEditor()\n\tconst isDynamicResizeMode = useValue(\n\t\t'dynamic resize',\n\t\t() => editor.user.getIsDynamicResizeMode(),\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-dynamic-size-mode\"\n\t\t\tchecked={isDynamicResizeMode}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function TogglePasteAtCursorItem() {\n\tconst editor = useEditor()\n\tconst pasteAtCursor = useValue('paste at cursor', () => editor.user.getIsPasteAtCursorMode(), [\n\t\teditor,\n\t])\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem actionId=\"toggle-paste-at-cursor\" checked={pasteAtCursor} />\n\t)\n}\n\n/* ---------------------- Print --------------------- */\n\n/** @public @react */\nexport function PrintItem() {\n\tconst editor = useEditor()\n\tconst emptyPage = useValue('emptyPage', () => editor.getCurrentPageShapeIds().size === 0, [\n\t\teditor,\n\t])\n\n\treturn <TldrawUiMenuActionItem actionId=\"print\" disabled={emptyPage} />\n}\n\n/* ---------------------- Multiplayer --------------------- */\n\n/** @public @react */\nexport function CursorChatItem() {\n\tconst editor = useEditor()\n\tconst shouldShow = useValue(\n\t\t'show cursor chat',\n\t\t() => editor.getCurrentToolId() === 'select' && !editor.getInstanceState().isCoarsePointer,\n\t\t[editor]\n\t)\n\n\tif (!shouldShow) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"open-cursor-chat\" />\n}\n"],
4
+ "sourcesContent": ["import {\n\tTLBookmarkShape,\n\tTLEmbedShape,\n\tTLFrameShape,\n\tTLImageShape,\n\tTLPageId,\n\tuseEditor,\n\tuseValue,\n} from '@tldraw/editor'\nimport { supportsDownloadingOriginal } from '../context/actions'\nimport { useUiEvents } from '../context/events'\nimport { useToasts } from '../context/toasts'\nimport {\n\tshowMenuPaste,\n\tuseAllowGroup,\n\tuseAllowUngroup,\n\tuseAnySelectedShapesCount,\n\tuseHasLinkShapeSelected,\n\tuseOnlyFlippableShape,\n\tuseShowAutoSizeToggle,\n\tuseThreeStackableItems,\n\tuseUnlockedSelectedShapesCount,\n} from '../hooks/menu-hooks'\nimport { useGetEmbedDefinition } from '../hooks/useGetEmbedDefinition'\nimport { useReadonly } from '../hooks/useReadonly'\nimport { TldrawUiMenuActionCheckboxItem } from './primitives/menus/TldrawUiMenuActionCheckboxItem'\nimport { TldrawUiMenuActionItem } from './primitives/menus/TldrawUiMenuActionItem'\nimport { TldrawUiMenuGroup } from './primitives/menus/TldrawUiMenuGroup'\nimport { TldrawUiMenuItem } from './primitives/menus/TldrawUiMenuItem'\nimport { TldrawUiMenuSubmenu } from './primitives/menus/TldrawUiMenuSubmenu'\n\n/* -------------------- Selection ------------------- */\n\n/** @public @react */\nexport function ToggleAutoSizeMenuItem() {\n\tconst shouldDisplay = useShowAutoSizeToggle()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"toggle-auto-size\" />\n}\n\n/** @public @react */\nexport function EditLinkMenuItem() {\n\tconst shouldDisplay = useHasLinkShapeSelected()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"edit-link\" />\n}\n\n/** @public @react */\nexport function DuplicateMenuItem() {\n\tconst shouldDisplay = useUnlockedSelectedShapesCount(1)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"duplicate\" />\n}\n\n/** @public @react */\nexport function FlattenMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'should display flatten option',\n\t\t() => {\n\t\t\tconst selectedShapeIds = editor.getSelectedShapeIds()\n\t\t\tif (selectedShapeIds.length === 0) return false\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (onlySelectedShape && editor.isShapeOfType<TLImageShape>(onlySelectedShape, 'image')) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn true\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"flatten-to-image\" />\n}\n\n/** @public @react */\nexport function DownloadOriginalMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'should display download original option',\n\t\t() => {\n\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\tif (selectedShapes.length === 0) return false\n\t\t\treturn selectedShapes.some((shape) => supportsDownloadingOriginal(shape, editor))\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"download-original\" />\n}\n\n/** @public @react */\nexport function GroupMenuItem() {\n\tconst shouldDisplay = useAllowGroup()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"group\" />\n}\n\n/** @public @react */\nexport function UngroupMenuItem() {\n\tconst shouldDisplay = useAllowUngroup()\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"ungroup\" />\n}\n\n/** @public @react */\nexport function RemoveFrameMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'allow unframe',\n\t\t() => {\n\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\tif (selectedShapes.length === 0) return false\n\t\t\treturn selectedShapes.every((shape) => editor.isShapeOfType<TLFrameShape>(shape, 'frame'))\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"remove-frame\" />\n}\n\n/** @public @react */\nexport function FitFrameToContentMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue(\n\t\t'allow fit frame to content',\n\t\t() => {\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (!onlySelectedShape) return false\n\t\t\treturn (\n\t\t\t\teditor.isShapeOfType<TLFrameShape>(onlySelectedShape, 'frame') &&\n\t\t\t\teditor.getSortedChildIdsForParent(onlySelectedShape).length > 0\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"fit-frame-to-content\" />\n}\n\n/** @public @react */\nexport function ToggleLockMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue('selected shapes', () => editor.getSelectedShapes().length > 0, [\n\t\teditor,\n\t])\n\tif (!shouldDisplay) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"toggle-lock\" />\n}\n\n/** @public @react */\nexport function ToggleTransparentBgMenuItem() {\n\tconst editor = useEditor()\n\tconst isTransparentBg = useValue(\n\t\t'isTransparentBg',\n\t\t() => !editor.getInstanceState().exportBackground,\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-transparent\"\n\t\t\tchecked={isTransparentBg}\n\t\t\ttoggle\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function UnlockAllMenuItem() {\n\tconst editor = useEditor()\n\tconst shouldDisplay = useValue('any shapes', () => editor.getCurrentPageShapeIds().size > 0, [\n\t\teditor,\n\t])\n\n\treturn <TldrawUiMenuActionItem actionId=\"unlock-all\" disabled={!shouldDisplay} />\n}\n\n/* ---------------------- Zoom ---------------------- */\n\n/** @public @react */\nexport function ZoomTo100MenuItem() {\n\tconst editor = useEditor()\n\tconst isZoomedTo100 = useValue('zoomed to 100', () => editor.getZoomLevel() === 1, [editor])\n\n\treturn <TldrawUiMenuActionItem actionId=\"zoom-to-100\" noClose disabled={isZoomedTo100} />\n}\n\n/** @public @react */\nexport function ZoomToFitMenuItem() {\n\tconst editor = useEditor()\n\tconst hasShapes = useValue('has shapes', () => editor.getCurrentPageShapeIds().size > 0, [editor])\n\n\treturn (\n\t\t<TldrawUiMenuActionItem\n\t\t\tactionId=\"zoom-to-fit\"\n\t\t\tdisabled={!hasShapes}\n\t\t\tdata-testid=\"minimap.zoom-menu.zoom-to-fit\"\n\t\t\tnoClose\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ZoomToSelectionMenuItem() {\n\tconst editor = useEditor()\n\tconst hasSelected = useValue('has shapes', () => editor.getSelectedShapeIds().length > 0, [\n\t\teditor,\n\t])\n\n\treturn (\n\t\t<TldrawUiMenuActionItem\n\t\t\tactionId=\"zoom-to-selection\"\n\t\t\tdisabled={!hasSelected}\n\t\t\tdata-testid=\"minimap.zoom-menu.zoom-to-selection\"\n\t\t\tnoClose\n\t\t/>\n\t)\n}\n\n/* -------------------- Clipboard ------------------- */\n\n/** @public @react */\nexport function ClipboardMenuGroup() {\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"clipboard\">\n\t\t\t<CutMenuItem />\n\t\t\t<CopyMenuItem />\n\t\t\t<PasteMenuItem />\n\t\t\t<DuplicateMenuItem />\n\t\t\t<DeleteMenuItem />\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\n/** @public @react */\nexport function CopyAsMenuGroup() {\n\tconst editor = useEditor()\n\tconst atLeastOneShapeOnPage = useValue(\n\t\t'atLeastOneShapeOnPage',\n\t\t() => editor.getCurrentPageShapeIds().size > 0,\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu\n\t\t\tid=\"copy-as\"\n\t\t\tlabel=\"context-menu.copy-as\"\n\t\t\tsize=\"small\"\n\t\t\tdisabled={!atLeastOneShapeOnPage}\n\t\t>\n\t\t\t<TldrawUiMenuGroup id=\"copy-as-group\">\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"copy-as-svg\" />\n\t\t\t\t{Boolean(window.navigator.clipboard?.write) && (\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"copy-as-png\" />\n\t\t\t\t)}\n\t\t\t</TldrawUiMenuGroup>\n\t\t\t<TldrawUiMenuGroup id=\"copy-as-bg\">\n\t\t\t\t<ToggleTransparentBgMenuItem />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function CutMenuItem() {\n\tconst shouldDisplay = useUnlockedSelectedShapesCount(1)\n\n\treturn <TldrawUiMenuActionItem actionId=\"cut\" disabled={!shouldDisplay} />\n}\n\n/** @public @react */\nexport function CopyMenuItem() {\n\tconst shouldDisplay = useAnySelectedShapesCount(1)\n\n\treturn <TldrawUiMenuActionItem actionId=\"copy\" disabled={!shouldDisplay} />\n}\n\n/** @public @react */\nexport function PasteMenuItem() {\n\tconst shouldDisplay = showMenuPaste\n\n\treturn <TldrawUiMenuActionItem actionId=\"paste\" disabled={!shouldDisplay} />\n}\n\n/* ------------------- Conversions ------------------ */\n\n/** @public @react */\nexport function ConversionsMenuGroup() {\n\tconst editor = useEditor()\n\tconst atLeastOneShapeOnPage = useValue(\n\t\t'atLeastOneShapeOnPage',\n\t\t() => editor.getCurrentPageShapeIds().size > 0,\n\t\t[editor]\n\t)\n\n\tif (!atLeastOneShapeOnPage) return null\n\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"conversions\">\n\t\t\t<CopyAsMenuGroup />\n\t\t\t<TldrawUiMenuSubmenu id=\"export-as\" label=\"context-menu.export-as\" size=\"small\">\n\t\t\t\t<TldrawUiMenuGroup id=\"export-as-group\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"export-as-svg\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"export-as-png\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t\t<TldrawUiMenuGroup id=\"export-as-bg\">\n\t\t\t\t\t<ToggleTransparentBgMenuItem />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t</TldrawUiMenuSubmenu>\n\t\t\t<DownloadOriginalMenuItem />\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\n/* ------------------ Set Selection ----------------- */\n/** @public @react */\nexport function SelectAllMenuItem() {\n\tconst editor = useEditor()\n\tconst atLeastOneShapeOnPage = useValue(\n\t\t'atLeastOneShapeOnPage',\n\t\t() => editor.getCurrentPageShapeIds().size > 0,\n\t\t[editor]\n\t)\n\n\treturn <TldrawUiMenuActionItem actionId=\"select-all\" disabled={!atLeastOneShapeOnPage} />\n}\n\n/* ------------------ Delete Group ------------------ */\n\n/** @public @react */\nexport function DeleteMenuItem() {\n\tconst oneSelected = useUnlockedSelectedShapesCount(1)\n\n\treturn <TldrawUiMenuActionItem actionId=\"delete\" disabled={!oneSelected} />\n}\n\n/* --------------------- Modify --------------------- */\n\n/** @public @react */\nexport function EditMenuSubmenu() {\n\tconst isReadonlyMode = useReadonly()\n\tif (!useAnySelectedShapesCount(1)) return null\n\tif (isReadonlyMode) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"edit\" label=\"context-menu.edit\" size=\"small\">\n\t\t\t<GroupMenuItem />\n\t\t\t<UngroupMenuItem />\n\t\t\t<FlattenMenuItem />\n\t\t\t<EditLinkMenuItem />\n\t\t\t<FitFrameToContentMenuItem />\n\t\t\t<RemoveFrameMenuItem />\n\t\t\t<ConvertToEmbedMenuItem />\n\t\t\t<ConvertToBookmarkMenuItem />\n\t\t\t<ToggleAutoSizeMenuItem />\n\t\t\t<ToggleLockMenuItem />\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function ArrangeMenuSubmenu() {\n\tconst twoSelected = useUnlockedSelectedShapesCount(2)\n\tconst onlyFlippableShapeSelected = useOnlyFlippableShape()\n\tconst isReadonlyMode = useReadonly()\n\n\tif (isReadonlyMode) return null\n\tif (!(twoSelected || onlyFlippableShapeSelected)) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"arrange\" label=\"context-menu.arrange\" size=\"small\">\n\t\t\t{twoSelected && (\n\t\t\t\t<TldrawUiMenuGroup id=\"align\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-left\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-center-horizontal\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-right\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-top\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-center-vertical\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"align-bottom\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t)}\n\t\t\t<DistributeMenuGroup />\n\t\t\t{twoSelected && (\n\t\t\t\t<TldrawUiMenuGroup id=\"stretch\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"stretch-horizontal\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"stretch-vertical\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t)}\n\t\t\t{(twoSelected || onlyFlippableShapeSelected) && (\n\t\t\t\t<TldrawUiMenuGroup id=\"flip\">\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"flip-horizontal\" />\n\t\t\t\t\t<TldrawUiMenuActionItem actionId=\"flip-vertical\" />\n\t\t\t\t</TldrawUiMenuGroup>\n\t\t\t)}\n\t\t\t<OrderMenuGroup />\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\nfunction DistributeMenuGroup() {\n\tconst threeSelected = useUnlockedSelectedShapesCount(3)\n\tif (!threeSelected) return null\n\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"distribute\">\n\t\t\t<TldrawUiMenuActionItem actionId=\"distribute-horizontal\" />\n\t\t\t<TldrawUiMenuActionItem actionId=\"distribute-vertical\" />\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\nfunction OrderMenuGroup() {\n\tconst twoSelected = useUnlockedSelectedShapesCount(2)\n\tconst threeStackableItems = useThreeStackableItems()\n\tif (!twoSelected) return null\n\n\treturn (\n\t\t<TldrawUiMenuGroup id=\"order\">\n\t\t\t<TldrawUiMenuActionItem actionId=\"pack\" />\n\t\t\t{threeStackableItems && <TldrawUiMenuActionItem actionId=\"stack-horizontal\" />}\n\t\t\t{threeStackableItems && <TldrawUiMenuActionItem actionId=\"stack-vertical\" />}\n\t\t</TldrawUiMenuGroup>\n\t)\n}\n\n/** @public @react */\nexport function ReorderMenuSubmenu() {\n\tconst isReadonlyMode = useReadonly()\n\tconst oneSelected = useUnlockedSelectedShapesCount(1)\n\tif (isReadonlyMode) return null\n\tif (!oneSelected) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"reorder\" label=\"context-menu.reorder\" size=\"small\">\n\t\t\t<TldrawUiMenuGroup id=\"reorder\">\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"bring-to-front\" />\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"bring-forward\" />\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"send-backward\" />\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"send-to-back\" />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function MoveToPageMenu() {\n\tconst editor = useEditor()\n\tconst pages = useValue('pages', () => editor.getPages(), [editor])\n\tconst currentPageId = useValue('current page id', () => editor.getCurrentPageId(), [editor])\n\tconst { addToast } = useToasts()\n\tconst trackEvent = useUiEvents()\n\tconst isReadonlyMode = useReadonly()\n\tconst oneSelected = useUnlockedSelectedShapesCount(1)\n\n\tif (!oneSelected) return null\n\tif (isReadonlyMode) return null\n\n\treturn (\n\t\t<TldrawUiMenuSubmenu id=\"move-to-page\" label=\"context-menu.move-to-page\" size=\"small\">\n\t\t\t<TldrawUiMenuGroup id=\"pages\">\n\t\t\t\t{pages.map((page) => (\n\t\t\t\t\t<TldrawUiMenuItem\n\t\t\t\t\t\tid={page.id}\n\t\t\t\t\t\tkey={page.id}\n\t\t\t\t\t\tdisabled={currentPageId === page.id}\n\t\t\t\t\t\tlabel={page.name.length > 30 ? `${page.name.slice(0, 30)}\u2026` : page.name}\n\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\teditor.markHistoryStoppingPoint('move_shapes_to_page')\n\t\t\t\t\t\t\teditor.moveShapesToPage(editor.getSelectedShapeIds(), page.id as TLPageId)\n\n\t\t\t\t\t\t\tconst toPage = editor.getPage(page.id)\n\n\t\t\t\t\t\t\tif (toPage) {\n\t\t\t\t\t\t\t\taddToast({\n\t\t\t\t\t\t\t\t\ttitle: 'Changed page',\n\t\t\t\t\t\t\t\t\tdescription: `Moved to ${toPage.name}.`,\n\t\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tlabel: 'Go back',\n\t\t\t\t\t\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\t\teditor.markHistoryStoppingPoint('change-page')\n\t\t\t\t\t\t\t\t\t\t\t\teditor.setCurrentPage(currentPageId)\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttrackEvent('move-to-page', { source: 'context-menu' })\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</TldrawUiMenuGroup>\n\t\t\t<TldrawUiMenuGroup id=\"new-page\">\n\t\t\t\t<TldrawUiMenuActionItem actionId=\"move-to-new-page\" />\n\t\t\t</TldrawUiMenuGroup>\n\t\t</TldrawUiMenuSubmenu>\n\t)\n}\n\n/** @public @react */\nexport function ConvertToBookmarkMenuItem() {\n\tconst editor = useEditor()\n\n\tconst oneEmbedSelected = useValue(\n\t\t'oneEmbedSelected',\n\t\t() => {\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (!onlySelectedShape) return false\n\t\t\treturn !!(\n\t\t\t\teditor.isShapeOfType<TLEmbedShape>(onlySelectedShape, 'embed') &&\n\t\t\t\tonlySelectedShape.props.url &&\n\t\t\t\t!editor.isShapeOrAncestorLocked(onlySelectedShape)\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n\n\tif (!oneEmbedSelected) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"convert-to-bookmark\" />\n}\n\n/** @public @react */\nexport function ConvertToEmbedMenuItem() {\n\tconst editor = useEditor()\n\tconst getEmbedDefinition = useGetEmbedDefinition()\n\n\tconst oneEmbeddableBookmarkSelected = useValue(\n\t\t'oneEmbeddableBookmarkSelected',\n\t\t() => {\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (!onlySelectedShape) return false\n\t\t\treturn !!(\n\t\t\t\teditor.isShapeOfType<TLBookmarkShape>(onlySelectedShape, 'bookmark') &&\n\t\t\t\tonlySelectedShape.props.url &&\n\t\t\t\tgetEmbedDefinition(onlySelectedShape.props.url) &&\n\t\t\t\t!editor.isShapeOrAncestorLocked(onlySelectedShape)\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n\n\tif (!oneEmbeddableBookmarkSelected) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"convert-to-embed\" />\n}\n\n/* ------------------- Preferences ------------------ */\n\n/** @public @react */\nexport function ToggleSnapModeItem() {\n\tconst editor = useEditor()\n\tconst isSnapMode = useValue('isSnapMode', () => editor.user.getIsSnapMode(), [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-snap-mode\" checked={isSnapMode} />\n}\n\n/** @public @react */\nexport function ToggleToolLockItem() {\n\tconst editor = useEditor()\n\tconst isToolLock = useValue('isToolLock', () => editor.getInstanceState().isToolLocked, [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-tool-lock\" checked={isToolLock} />\n}\n\n/** @public @react */\nexport function ToggleGridItem() {\n\tconst editor = useEditor()\n\tconst isGridMode = useValue('isGridMode', () => editor.getInstanceState().isGridMode, [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-grid\" checked={isGridMode} />\n}\n\n/** @public @react */\nexport function ToggleWrapModeItem() {\n\tconst editor = useEditor()\n\tconst isWrapMode = useValue('isWrapMode', () => editor.user.getIsWrapMode(), [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-wrap-mode\" checked={isWrapMode} />\n}\n\n/** @public @react */\nexport function ToggleDarkModeItem() {\n\tconst editor = useEditor()\n\tconst isDarkMode = useValue('isDarkMode', () => editor.user.getIsDarkMode(), [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-dark-mode\" checked={isDarkMode} />\n}\n\n/** @public @react */\nexport function ToggleFocusModeItem() {\n\tconst editor = useEditor()\n\tconst isFocusMode = useValue('isFocusMode', () => editor.getInstanceState().isFocusMode, [editor])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-focus-mode\" checked={isFocusMode} />\n}\n\n/** @public @react */\nexport function ToggleEdgeScrollingItem() {\n\tconst editor = useEditor()\n\tconst edgeScrollSpeed = useValue('edgeScrollSpeed', () => editor.user.getEdgeScrollSpeed(), [\n\t\teditor,\n\t])\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-edge-scrolling\"\n\t\t\tchecked={edgeScrollSpeed === 1}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ToggleReduceMotionItem() {\n\tconst editor = useEditor()\n\tconst animationSpeed = useValue('animationSpeed', () => editor.user.getAnimationSpeed(), [editor])\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-reduce-motion\"\n\t\t\tchecked={animationSpeed === 0}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ToggleKeyboardShortcutsItem() {\n\tconst editor = useEditor()\n\tconst keyboardShortcuts = useValue(\n\t\t'keyboardShortcuts',\n\t\t() => editor.user.getAreKeyboardShortcutsEnabled(),\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-keyboard-shortcuts\"\n\t\t\tchecked={keyboardShortcuts}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function ToggleEnhancedA11yModeItem() {\n\tconst editor = useEditor()\n\tconst enhancedA11yMode = useValue('enhancedA11yMode', () => editor.user.getEnhancedA11yMode(), [\n\t\teditor,\n\t])\n\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"enhanced-a11y-mode\" checked={enhancedA11yMode} />\n}\n\n/** @public @react */\nexport function ToggleDebugModeItem() {\n\tconst editor = useEditor()\n\tconst isDebugMode = useValue('isDebugMode', () => editor.getInstanceState().isDebugMode, [editor])\n\treturn <TldrawUiMenuActionCheckboxItem actionId=\"toggle-debug-mode\" checked={isDebugMode} />\n}\n\n/** @public @react */\nexport function ToggleDynamicSizeModeItem() {\n\tconst editor = useEditor()\n\tconst isDynamicResizeMode = useValue(\n\t\t'dynamic resize',\n\t\t() => editor.user.getIsDynamicResizeMode(),\n\t\t[editor]\n\t)\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem\n\t\t\tactionId=\"toggle-dynamic-size-mode\"\n\t\t\tchecked={isDynamicResizeMode}\n\t\t/>\n\t)\n}\n\n/** @public @react */\nexport function TogglePasteAtCursorItem() {\n\tconst editor = useEditor()\n\tconst pasteAtCursor = useValue('paste at cursor', () => editor.user.getIsPasteAtCursorMode(), [\n\t\teditor,\n\t])\n\n\treturn (\n\t\t<TldrawUiMenuActionCheckboxItem actionId=\"toggle-paste-at-cursor\" checked={pasteAtCursor} />\n\t)\n}\n\n/* ---------------------- Print --------------------- */\n\n/** @public @react */\nexport function PrintItem() {\n\tconst editor = useEditor()\n\tconst emptyPage = useValue('emptyPage', () => editor.getCurrentPageShapeIds().size === 0, [\n\t\teditor,\n\t])\n\n\treturn <TldrawUiMenuActionItem actionId=\"print\" disabled={emptyPage} />\n}\n\n/* ---------------------- Multiplayer --------------------- */\n\n/** @public @react */\nexport function CursorChatItem() {\n\tconst editor = useEditor()\n\tconst shouldShow = useValue(\n\t\t'show cursor chat',\n\t\t() => editor.getCurrentToolId() === 'select' && !editor.getInstanceState().isCoarsePointer,\n\t\t[editor]\n\t)\n\n\tif (!shouldShow) return null\n\n\treturn <TldrawUiMenuActionItem actionId=\"open-cursor-chat\" />\n}\n"],
5
5
  "mappings": "AAsCQ,cAoMN,YApMM;AAtCR;AAAA,EAMC;AAAA,EACA;AAAA,OACM;AACP,SA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;AACjG;AAGO,SAAS,sBAAsB;AACrC,QAAM,SAAS,UAAU;AACzB,QAAM,cAAc,SAAS,eAAe,MAAM,OAAO,iBAAiB,EAAE,aAAa,CAAC,MAAM,CAAC;AACjG,SAAO,oBAAC,kCAA+B,UAAS,qBAAoB,SAAS,aAAa;AAC3F;AAGO,SAAS,4BAA4B;AAC3C,QAAM,SAAS,UAAU;AACzB,QAAM,sBAAsB;AAAA,IAC3B;AAAA,IACA,MAAM,OAAO,KAAK,uBAAuB;AAAA,IACzC,CAAC,MAAM;AAAA,EACR;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,UAAS;AAAA,MACT,SAAS;AAAA;AAAA,EACV;AAEF;AAGO,SAAS,0BAA0B;AACzC,QAAM,SAAS,UAAU;AACzB,QAAM,gBAAgB,SAAS,mBAAmB,MAAM,OAAO,KAAK,uBAAuB,GAAG;AAAA,IAC7F;AAAA,EACD,CAAC;AAED,SACC,oBAAC,kCAA+B,UAAS,0BAAyB,SAAS,eAAe;AAE5F;AAKO,SAAS,YAAY;AAC3B,QAAM,SAAS,UAAU;AACzB,QAAM,YAAY,SAAS,aAAa,MAAM,OAAO,uBAAuB,EAAE,SAAS,GAAG;AAAA,IACzF;AAAA,EACD,CAAC;AAED,SAAO,oBAAC,0BAAuB,UAAS,SAAQ,UAAU,WAAW;AACtE;AAKO,SAAS,iBAAiB;AAChC,QAAM,SAAS,UAAU;AACzB,QAAM,aAAa;AAAA,IAClB;AAAA,IACA,MAAM,OAAO,iBAAiB,MAAM,YAAY,CAAC,OAAO,iBAAiB,EAAE;AAAA,IAC3E,CAAC,MAAM;AAAA,EACR;AAEA,MAAI,CAAC,WAAY,QAAO;AAExB,SAAO,oBAAC,0BAAuB,UAAS,oBAAmB;AAC5D;",
6
6
  "names": []
7
7
  }
@@ -7,7 +7,7 @@ function useEditorEvents() {
7
7
  useEffect(() => {
8
8
  function handleMaxShapes({ name, count }) {
9
9
  addToast({
10
- title: "Maximum Shapes Reached",
10
+ title: "Maximum shapes reached",
11
11
  description: `You've reached the maximum number of shapes allowed on ${name} (${count}). Please delete some shapes or move to a different page to continue.`,
12
12
  severity: "warning"
13
13
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/lib/ui/hooks/useEditorEvents.ts"],
4
- "sourcesContent": ["import { useEditor } from '@tldraw/editor'\nimport { useEffect } from 'react'\nimport { useToasts } from '../context/toasts'\n\n/** @internal */\nexport function useEditorEvents() {\n\tconst editor = useEditor()\n\tconst { addToast } = useToasts()\n\n\tuseEffect(() => {\n\t\tfunction handleMaxShapes({ name, count }: { name: string; pageId: string; count: number }) {\n\t\t\taddToast({\n\t\t\t\ttitle: 'Maximum Shapes Reached',\n\t\t\t\tdescription: `You've reached the maximum number of shapes allowed on ${name} (${count}). Please delete some shapes or move to a different page to continue.`,\n\t\t\t\tseverity: 'warning',\n\t\t\t})\n\t\t}\n\n\t\teditor.addListener('max-shapes', handleMaxShapes)\n\t\treturn () => {\n\t\t\teditor.removeListener('max-shapes', handleMaxShapes)\n\t\t}\n\t}, [editor, addToast])\n}\n"],
4
+ "sourcesContent": ["import { useEditor } from '@tldraw/editor'\nimport { useEffect } from 'react'\nimport { useToasts } from '../context/toasts'\n\n/** @internal */\nexport function useEditorEvents() {\n\tconst editor = useEditor()\n\tconst { addToast } = useToasts()\n\n\tuseEffect(() => {\n\t\tfunction handleMaxShapes({ name, count }: { name: string; pageId: string; count: number }) {\n\t\t\taddToast({\n\t\t\t\ttitle: 'Maximum shapes reached',\n\t\t\t\tdescription: `You've reached the maximum number of shapes allowed on ${name} (${count}). Please delete some shapes or move to a different page to continue.`,\n\t\t\t\tseverity: 'warning',\n\t\t\t})\n\t\t}\n\n\t\teditor.addListener('max-shapes', handleMaxShapes)\n\t\treturn () => {\n\t\t\teditor.removeListener('max-shapes', handleMaxShapes)\n\t\t}\n\t}, [editor, addToast])\n}\n"],
5
5
  "mappings": "AAAA,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAGnB,SAAS,kBAAkB;AACjC,QAAM,SAAS,UAAU;AACzB,QAAM,EAAE,SAAS,IAAI,UAAU;AAE/B,YAAU,MAAM;AACf,aAAS,gBAAgB,EAAE,MAAM,MAAM,GAAoD;AAC1F,eAAS;AAAA,QACR,OAAO;AAAA,QACP,aAAa,0DAA0D,IAAI,KAAK,KAAK;AAAA,QACrF,UAAU;AAAA,MACX,CAAC;AAAA,IACF;AAEA,WAAO,YAAY,cAAc,eAAe;AAChD,WAAO,MAAM;AACZ,aAAO,eAAe,cAAc,eAAe;AAAA,IACpD;AAAA,EACD,GAAG,CAAC,QAAQ,QAAQ,CAAC;AACtB;",
6
6
  "names": []
7
7
  }
@@ -4,8 +4,8 @@ const DEFAULT_TRANSLATION = {
4
4
  "action.toggle-auto-none": "Auto",
5
5
  "action.toggle-mouse": "Mouse",
6
6
  "action.toggle-trackpad": "Trackpad",
7
- "action.convert-to-bookmark": "Convert to Bookmark",
8
- "action.convert-to-embed": "Convert to Embed",
7
+ "action.convert-to-bookmark": "Convert to bookmark",
8
+ "action.convert-to-embed": "Convert to embed",
9
9
  "action.open-embed-link": "Open link",
10
10
  "action.align-bottom": "Align bottom",
11
11
  "action.align-center-horizontal": "Align horizontally",
@@ -89,7 +89,7 @@ const DEFAULT_TRANSLATION = {
89
89
  "action.toggle-paste-at-cursor.menu": "Paste at cursor",
90
90
  "action.toggle-paste-at-cursor": "Toggle paste at cursor",
91
91
  "action.toggle-wrap-mode.menu": "Select on wrap",
92
- "action.toggle-wrap-mode": "Toggle Select on wrap",
92
+ "action.toggle-wrap-mode": "Toggle select on wrap",
93
93
  "action.toggle-reduce-motion.menu": "Reduce motion",
94
94
  "action.toggle-reduce-motion": "Toggle reduce motion",
95
95
  "action.toggle-keyboard-shortcuts.menu": "Enable keyboard shortcuts",
@@ -357,7 +357,7 @@ const DEFAULT_TRANSLATION = {
357
357
  "people-menu.change-color": "Change color",
358
358
  "people-menu.follow": "Following",
359
359
  "people-menu.following": "Following",
360
- "people-menu.leading": "Following You",
360
+ "people-menu.leading": "Following you",
361
361
  "people-menu.user": "(You)",
362
362
  "people-menu.invite": "Invite others",
363
363
  "people-menu.anonymous-user": "New user",
@@ -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;AAA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BAA4B;AAAA,EAC5B,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,gBAAgB;AACjB;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,8 @@
1
- const version = "4.1.0-canary.571a78a3ce3d";
1
+ const version = "4.1.0-canary.58f856c8473b";
2
2
  const publishDates = {
3
3
  major: "2025-09-18T14:39:22.803Z",
4
- minor: "2025-10-15T09:48:37.752Z",
5
- patch: "2025-10-15T09:48:37.752Z"
4
+ minor: "2025-10-15T11:05:45.484Z",
5
+ patch: "2025-10-15T11:05:45.484Z"
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.0-canary.571a78a3ce3d'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2025-10-15T09:48:37.752Z',\n\tpatch: '2025-10-15T09:48:37.752Z',\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.1.0-canary.58f856c8473b'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2025-10-15T11:05:45.484Z',\n\tpatch: '2025-10-15T11:05:45.484Z',\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.0-canary.571a78a3ce3d",
4
+ "version": "4.1.0-canary.58f856c8473b",
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.0-canary.571a78a3ce3d",
66
- "@tldraw/store": "4.1.0-canary.571a78a3ce3d",
65
+ "@tldraw/editor": "4.1.0-canary.58f856c8473b",
66
+ "@tldraw/store": "4.1.0-canary.58f856c8473b",
67
67
  "classnames": "^2.5.1",
68
68
  "hotkeys-js": "^3.13.9",
69
69
  "idb": "^7.1.1",
@@ -172,7 +172,7 @@ export function DebugFlags() {
172
172
  const items = Object.values(debugFlags)
173
173
  if (!items.length) return null
174
174
  return (
175
- <TldrawUiMenuSubmenu id="debug flags" label="Debug Flags">
175
+ <TldrawUiMenuSubmenu id="debug flags" label="Debug flags">
176
176
  <TldrawUiMenuGroup id="debug flags">
177
177
  {items.map((flag) => (
178
178
  <DebugFlagToggle key={flag.name} flag={flag} />
@@ -186,7 +186,7 @@ export function FeatureFlags() {
186
186
  const items = Object.values(featureFlags)
187
187
  if (!items.length) return null
188
188
  return (
189
- <TldrawUiMenuSubmenu id="feature flags" label="Feature Flags">
189
+ <TldrawUiMenuSubmenu id="feature flags" label="Feature flags">
190
190
  <TldrawUiMenuGroup id="feature flags">
191
191
  {items.map((flag) => (
192
192
  <DebugFlagToggle key={flag.name} flag={flag} />
@@ -482,11 +482,11 @@ export function MoveToPageMenu() {
482
482
 
483
483
  if (toPage) {
484
484
  addToast({
485
- title: 'Changed Page',
485
+ title: 'Changed page',
486
486
  description: `Moved to ${toPage.name}.`,
487
487
  actions: [
488
488
  {
489
- label: 'Go Back',
489
+ label: 'Go back',
490
490
  type: 'primary',
491
491
  onClick: () => {
492
492
  editor.markHistoryStoppingPoint('change-page')
@@ -10,7 +10,7 @@ export function useEditorEvents() {
10
10
  useEffect(() => {
11
11
  function handleMaxShapes({ name, count }: { name: string; pageId: string; count: number }) {
12
12
  addToast({
13
- title: 'Maximum Shapes Reached',
13
+ title: 'Maximum shapes reached',
14
14
  description: `You've reached the maximum number of shapes allowed on ${name} (${count}). Please delete some shapes or move to a different page to continue.`,
15
15
  severity: 'warning',
16
16
  })
@@ -8,8 +8,8 @@ export const DEFAULT_TRANSLATION = {
8
8
  'action.toggle-auto-none': 'Auto',
9
9
  'action.toggle-mouse': 'Mouse',
10
10
  'action.toggle-trackpad': 'Trackpad',
11
- 'action.convert-to-bookmark': 'Convert to Bookmark',
12
- 'action.convert-to-embed': 'Convert to Embed',
11
+ 'action.convert-to-bookmark': 'Convert to bookmark',
12
+ 'action.convert-to-embed': 'Convert to embed',
13
13
  'action.open-embed-link': 'Open link',
14
14
  'action.align-bottom': 'Align bottom',
15
15
  'action.align-center-horizontal': 'Align horizontally',
@@ -94,7 +94,7 @@ export const DEFAULT_TRANSLATION = {
94
94
  'action.toggle-paste-at-cursor.menu': 'Paste at cursor',
95
95
  'action.toggle-paste-at-cursor': 'Toggle paste at cursor',
96
96
  'action.toggle-wrap-mode.menu': 'Select on wrap',
97
- 'action.toggle-wrap-mode': 'Toggle Select on wrap',
97
+ 'action.toggle-wrap-mode': 'Toggle select on wrap',
98
98
  'action.toggle-reduce-motion.menu': 'Reduce motion',
99
99
  'action.toggle-reduce-motion': 'Toggle reduce motion',
100
100
  'action.toggle-keyboard-shortcuts.menu': 'Enable keyboard shortcuts',
@@ -364,7 +364,7 @@ export const DEFAULT_TRANSLATION = {
364
364
  'people-menu.change-color': 'Change color',
365
365
  'people-menu.follow': 'Following',
366
366
  'people-menu.following': 'Following',
367
- 'people-menu.leading': 'Following You',
367
+ 'people-menu.leading': 'Following you',
368
368
  'people-menu.user': '(You)',
369
369
  'people-menu.invite': 'Invite others',
370
370
  'people-menu.anonymous-user': 'New user',
@@ -1,9 +1,9 @@
1
1
  // This file is automatically generated by internal/scripts/refresh-assets.ts.
2
2
  // Do not edit manually. Or do, I'm a comment, not a cop.
3
3
 
4
- export const version = '4.1.0-canary.571a78a3ce3d'
4
+ export const version = '4.1.0-canary.58f856c8473b'
5
5
  export const publishDates = {
6
6
  major: '2025-09-18T14:39:22.803Z',
7
- minor: '2025-10-15T09:48:37.752Z',
8
- patch: '2025-10-15T09:48:37.752Z',
7
+ minor: '2025-10-15T11:05:45.484Z',
8
+ patch: '2025-10-15T11:05:45.484Z',
9
9
  }