@bigbluebutton/tldraw 2.0.0-alpha.23 → 2.0.0-alpha.25
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.
- package/dist-cjs/index.d.ts +9 -1
- package/dist-cjs/lib/defaultShapeUtils.js +3 -1
- package/dist-cjs/lib/defaultShapeUtils.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/poll/PollShapeTool.js +30 -0
- package/dist-cjs/lib/shapes/poll/PollShapeTool.js.map +7 -0
- package/dist-cjs/lib/shapes/poll/PollShapeUtil.js +121 -0
- package/dist-cjs/lib/shapes/poll/PollShapeUtil.js.map +7 -0
- package/dist-cjs/lib/shapes/poll/components/poll-content.js +101 -0
- package/dist-cjs/lib/shapes/poll/components/poll-content.js.map +7 -0
- package/dist-cjs/lib/shapes/poll/components/styles.js +53 -0
- package/dist-cjs/lib/shapes/poll/components/styles.js.map +7 -0
- package/dist-cjs/lib/shapes/poll/poll-shape-migrations.js +45 -0
- package/dist-cjs/lib/shapes/poll/poll-shape-migrations.js.map +7 -0
- package/dist-cjs/lib/shapes/poll/poll-shape-props.js +39 -0
- package/dist-cjs/lib/shapes/poll/poll-shape-props.js.map +7 -0
- package/dist-cjs/lib/shapes/poll/poll-shape-types.js +17 -0
- package/dist-cjs/lib/shapes/poll/poll-shape-types.js.map +7 -0
- package/dist-cjs/lib/tools/HandTool/HandTool.js +3 -3
- package/dist-cjs/lib/tools/HandTool/HandTool.js.map +2 -2
- package/dist-cjs/lib/ui/components/ContextMenu.js +0 -1
- package/dist-cjs/lib/ui/components/ContextMenu.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js.map +1 -1
- package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +6 -1
- package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/useTranslation/translations.js +1 -1
- package/dist-cjs/lib/ui/hooks/useTranslation/translations.js.map +2 -2
- package/dist-esm/index.d.mts +9 -1
- package/dist-esm/lib/defaultShapeUtils.mjs +3 -1
- package/dist-esm/lib/defaultShapeUtils.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/poll/PollShapeTool.mjs +10 -0
- package/dist-esm/lib/shapes/poll/PollShapeTool.mjs.map +7 -0
- package/dist-esm/lib/shapes/poll/PollShapeUtil.mjs +97 -0
- package/dist-esm/lib/shapes/poll/PollShapeUtil.mjs.map +7 -0
- package/dist-esm/lib/shapes/poll/components/poll-content.mjs +71 -0
- package/dist-esm/lib/shapes/poll/components/poll-content.mjs.map +7 -0
- package/dist-esm/lib/shapes/poll/components/styles.mjs +23 -0
- package/dist-esm/lib/shapes/poll/components/styles.mjs.map +7 -0
- package/dist-esm/lib/shapes/poll/poll-shape-migrations.mjs +25 -0
- package/dist-esm/lib/shapes/poll/poll-shape-migrations.mjs.map +7 -0
- package/dist-esm/lib/shapes/poll/poll-shape-props.mjs +19 -0
- package/dist-esm/lib/shapes/poll/poll-shape-props.mjs.map +7 -0
- package/dist-esm/lib/shapes/poll/poll-shape-types.mjs +1 -0
- package/dist-esm/lib/shapes/poll/poll-shape-types.mjs.map +7 -0
- package/dist-esm/lib/tools/HandTool/HandTool.mjs +3 -3
- package/dist-esm/lib/tools/HandTool/HandTool.mjs.map +2 -2
- package/dist-esm/lib/ui/components/ContextMenu.mjs +0 -1
- package/dist-esm/lib/ui/components/ContextMenu.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +6 -1
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useTranslation/translations.mjs +1 -1
- package/dist-esm/lib/ui/hooks/useTranslation/translations.mjs.map +2 -2
- package/package.json +4 -3
- package/src/lib/Tldraw.test.tsx +9 -13
- package/src/lib/defaultShapeUtils.ts +2 -0
- package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +1 -1
- package/src/lib/shapes/line/__snapshots__/LineShapeUtil.test.ts.snap +6 -6
- package/src/lib/shapes/poll/PollShapeTool.tsx +7 -0
- package/src/lib/shapes/poll/PollShapeUtil.tsx +108 -0
- package/src/lib/shapes/poll/components/poll-content.tsx +100 -0
- package/src/lib/shapes/poll/components/styles.ts +21 -0
- package/src/lib/shapes/poll/poll-shape-migrations.ts +23 -0
- package/src/lib/shapes/poll/poll-shape-props.ts +17 -0
- package/src/lib/shapes/poll/poll-shape-types.ts +21 -0
- package/src/lib/tools/HandTool/HandTool.ts +4 -5
- package/src/lib/ui/components/ContextMenu.tsx +1 -1
- package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +5 -0
- package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +5 -0
- package/src/lib/ui/hooks/useTranslation/translations.ts +1 -1
- package/src/test/Editor.test.tsx +2 -2
- package/src/test/HandTool.test.ts +55 -56
- package/src/test/TLSessionStateSnapshot.test.ts +5 -5
- package/src/test/TestEditor.ts +4 -1
- package/src/test/TldrawEditor.test.tsx +28 -30
- package/src/test/__snapshots__/resizing.test.ts.snap +8 -8
- package/src/test/commands/__snapshots__/packShapes.test.ts.snap +20 -20
- package/src/test/commands/__snapshots__/zoomToFit.test.ts.snap +2 -2
- package/src/test/commands/createShapes.test.ts +1 -1
- package/src/test/commands/putContent.test.ts +4 -4
- package/src/test/commands/updateShapes.test.ts +1 -1
- package/src/test/resizing.test.ts +203 -203
- package/src/test/selection-omnibus.test.ts +41 -41
- package/src/test/test-jsx.tsx +7 -3
- package/src/test/translating.test.ts +42 -42
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/lib/tools/HandTool/HandTool.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "AAAA,
|
|
4
|
+
"sourcesContent": ["import { StateNode, TLClickEvent } from '@bigbluebutton/editor'\nimport { Dragging } from './childStates/Dragging'\nimport { Idle } from './childStates/Idle'\nimport { Pointing } from './childStates/Pointing'\n\n/** @public */\nexport class HandTool extends StateNode {\n\tstatic override id = 'hand'\n\tstatic override initial = 'idle'\n\tstatic override children = () => [Idle, Pointing, Dragging]\n\n\toverride onDoubleClick: TLClickEvent = (_info) => {\n\t\t// if (info.phase === 'settle') {\n\t\t// \tconst { currentScreenPoint } = this.editor.inputs\n\t\t// \tthis.editor.zoomIn(currentScreenPoint, { duration: 220, easing: EASINGS.easeOutQuint })\n\t\t// }\n\t}\n\n\toverride onTripleClick: TLClickEvent = (_info) => {\n\t\t// if (info.phase === 'settle') {\n\t\t// \tconst { currentScreenPoint } = this.editor.inputs\n\t\t// \tthis.editor.zoomOut(currentScreenPoint, { duration: 320, easing: EASINGS.easeOutQuint })\n\t\t// }\n\t}\n\n\toverride onQuadrupleClick: TLClickEvent = (_info) => {\n\t\t// if (info.phase === 'settle') {\n\t\t// \tconst zoomLevel = this.editor.getZoomLevel()\n\t\t// \tconst {\n\t\t// \t\tinputs: { currentScreenPoint },\n\t\t// \t} = this.editor\n\t\t// \tif (zoomLevel === 1) {\n\t\t// \t\tthis.editor.zoomToFit({ duration: 400, easing: EASINGS.easeOutQuint })\n\t\t// \t} else {\n\t\t// \t\tthis.editor.resetZoom(currentScreenPoint, { duration: 320, easing: EASINGS.easeOutQuint })\n\t\t// \t}\n\t\t// }\n\t}\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,iBAA+B;AACxC,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,gBAAgB;AAGlB,MAAM,iBAAiB,UAAU;AAAA,EACvC,OAAgB,KAAK;AAAA,EACrB,OAAgB,UAAU;AAAA,EAC1B,OAAgB,WAAW,MAAM,CAAC,MAAM,UAAU,QAAQ;AAAA,EAEjD,gBAA8B,CAAC,UAAU;AAAA,EAKlD;AAAA,EAES,gBAA8B,CAAC,UAAU;AAAA,EAKlD;AAAA,EAES,mBAAiC,CAAC,UAAU;AAAA,EAYrD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -44,7 +44,6 @@ const ContextMenu = function ContextMenu2({ children }) {
|
|
|
44
44
|
},
|
|
45
45
|
[editor]
|
|
46
46
|
);
|
|
47
|
-
const container = useContainer();
|
|
48
47
|
const [isOpen, handleOpenChange] = useMenuIsOpen("context menu", cb);
|
|
49
48
|
const isReadonly = useReadonly();
|
|
50
49
|
const noItemsToShow = contextTLUiMenuSchema.length === 0 || isReadonly && contextTLUiMenuSchema.every((item) => !item.readonlyOk);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/lib/ui/components/ContextMenu.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Editor, preventDefault, useContainer, useEditor, useValue } from '@bigbluebutton/editor'\nimport * as _ContextMenu from '@radix-ui/react-context-menu'\nimport classNames from 'classnames'\nimport { forwardRef, useCallback, useState } from 'react'\nimport { TLUiMenuChild } from '../hooks/menuHelpers'\nimport { useBreakpoint } from '../hooks/useBreakpoint'\nimport { useContextMenuSchema } from '../hooks/useContextMenuSchema'\nimport { useMenuIsOpen } from '../hooks/useMenuIsOpen'\nimport { useReadonly } from '../hooks/useReadonly'\nimport { TLUiTranslationKey } from '../hooks/useTranslation/TLUiTranslationKey'\nimport { useTranslation } from '../hooks/useTranslation/useTranslation'\nimport { TLUiIconType } from '../icon-types'\nimport { MoveToPageMenu } from './MoveToPageMenu'\nimport { Button } from './primitives/Button'\nimport { Icon } from './primitives/Icon'\nimport { Kbd } from './primitives/Kbd'\n\n/** @public */\nexport interface TLUiContextMenuProps {\n\tchildren: any\n}\n\n/** @public */\nexport const ContextMenu = function ContextMenu({ children }: { children: any }) {\n\tconst editor = useEditor()\n\n\tconst contextTLUiMenuSchema = useContextMenuSchema()\n\n\tconst cb = useCallback(\n\t\t(isOpen: boolean) => {\n\t\t\tif (!isOpen) {\n\t\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\n\t\t\t\tif (onlySelectedShape && editor.isShapeOrAncestorLocked(onlySelectedShape)) {\n\t\t\t\t\teditor.setSelectedShapes([])\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Weird route: selecting locked shapes on long press\n\t\t\t\tif (editor.getInstanceState().isCoarsePointer) {\n\t\t\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\t\t\tconst {\n\t\t\t\t\t\tinputs: { currentPagePoint },\n\t\t\t\t\t} = editor\n\n\t\t\t\t\t// get all of the shapes under the current pointer\n\t\t\t\t\tconst shapesAtPoint = editor.getShapesAtPoint(currentPagePoint)\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t// if there are no selected shapes\n\t\t\t\t\t\t!editor.getSelectedShapes().length ||\n\t\t\t\t\t\t// OR if none of the shapes at the point include the selected shape\n\t\t\t\t\t\t!shapesAtPoint.some((s) => selectedShapes.includes(s))\n\t\t\t\t\t) {\n\t\t\t\t\t\t// then are there any locked shapes under the current pointer?\n\t\t\t\t\t\tconst lockedShapes = shapesAtPoint.filter((s) => editor.isShapeOrAncestorLocked(s))\n\n\t\t\t\t\t\tif (lockedShapes.length) {\n\t\t\t\t\t\t\t// nice, let's select them\n\t\t\t\t\t\t\teditor.select(...lockedShapes.map((s) => s.id))\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[editor]\n\t)\n\n\
|
|
5
|
-
"mappings": "AAuFE,SACC,KADD;AAvFF,SAAiB,gBAAgB,cAAc,WAAW,gBAAgB;AAC1E,YAAY,kBAAkB;AAC9B,OAAO,gBAAgB;AACvB,SAAS,YAAY,aAAa,gBAAgB;AAElD,SAAS,qBAAqB;AAC9B,SAAS,4BAA4B;AACrC,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAE5B,SAAS,sBAAsB;AAE/B,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,WAAW;AAQb,MAAM,cAAc,SAASA,aAAY,EAAE,SAAS,GAAsB;AAChF,QAAM,SAAS,UAAU;AAEzB,QAAM,wBAAwB,qBAAqB;AAEnD,QAAM,KAAK;AAAA,IACV,CAACC,YAAoB;AACpB,UAAI,CAACA,SAAQ;AACZ,cAAM,oBAAoB,OAAO,qBAAqB;AAEtD,YAAI,qBAAqB,OAAO,wBAAwB,iBAAiB,GAAG;AAC3E,iBAAO,kBAAkB,CAAC,CAAC;AAAA,QAC5B;AAAA,MACD,OAAO;AAEN,YAAI,OAAO,iBAAiB,EAAE,iBAAiB;AAC9C,gBAAM,iBAAiB,OAAO,kBAAkB;AAChD,gBAAM;AAAA,YACL,QAAQ,EAAE,iBAAiB;AAAA,UAC5B,IAAI;AAGJ,gBAAM,gBAAgB,OAAO,iBAAiB,gBAAgB;AAE9D;AAAA;AAAA,YAEC,CAAC,OAAO,kBAAkB,EAAE;AAAA,YAE5B,CAAC,cAAc,KAAK,CAAC,MAAM,eAAe,SAAS,CAAC,CAAC;AAAA,YACpD;AAED,kBAAM,eAAe,cAAc,OAAO,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAElF,gBAAI,aAAa,QAAQ;AAExB,qBAAO,OAAO,GAAG,aAAa,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;AAAA,YAC/C;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAC,MAAM;AAAA,EACR;
|
|
4
|
+
"sourcesContent": ["import { Editor, preventDefault, useContainer, useEditor, useValue } from '@bigbluebutton/editor'\nimport * as _ContextMenu from '@radix-ui/react-context-menu'\nimport classNames from 'classnames'\nimport { forwardRef, useCallback, useState } from 'react'\nimport { TLUiMenuChild } from '../hooks/menuHelpers'\nimport { useBreakpoint } from '../hooks/useBreakpoint'\nimport { useContextMenuSchema } from '../hooks/useContextMenuSchema'\nimport { useMenuIsOpen } from '../hooks/useMenuIsOpen'\nimport { useReadonly } from '../hooks/useReadonly'\nimport { TLUiTranslationKey } from '../hooks/useTranslation/TLUiTranslationKey'\nimport { useTranslation } from '../hooks/useTranslation/useTranslation'\nimport { TLUiIconType } from '../icon-types'\nimport { MoveToPageMenu } from './MoveToPageMenu'\nimport { Button } from './primitives/Button'\nimport { Icon } from './primitives/Icon'\nimport { Kbd } from './primitives/Kbd'\n\n/** @public */\nexport interface TLUiContextMenuProps {\n\tchildren: any\n}\n\n/** @public */\nexport const ContextMenu = function ContextMenu({ children }: { children: any }) {\n\tconst editor = useEditor()\n\n\tconst contextTLUiMenuSchema = useContextMenuSchema()\n\n\tconst cb = useCallback(\n\t\t(isOpen: boolean) => {\n\t\t\tif (!isOpen) {\n\t\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\n\t\t\t\tif (onlySelectedShape && editor.isShapeOrAncestorLocked(onlySelectedShape)) {\n\t\t\t\t\teditor.setSelectedShapes([])\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Weird route: selecting locked shapes on long press\n\t\t\t\tif (editor.getInstanceState().isCoarsePointer) {\n\t\t\t\t\tconst selectedShapes = editor.getSelectedShapes()\n\t\t\t\t\tconst {\n\t\t\t\t\t\tinputs: { currentPagePoint },\n\t\t\t\t\t} = editor\n\n\t\t\t\t\t// get all of the shapes under the current pointer\n\t\t\t\t\tconst shapesAtPoint = editor.getShapesAtPoint(currentPagePoint)\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t// if there are no selected shapes\n\t\t\t\t\t\t!editor.getSelectedShapes().length ||\n\t\t\t\t\t\t// OR if none of the shapes at the point include the selected shape\n\t\t\t\t\t\t!shapesAtPoint.some((s) => selectedShapes.includes(s))\n\t\t\t\t\t) {\n\t\t\t\t\t\t// then are there any locked shapes under the current pointer?\n\t\t\t\t\t\tconst lockedShapes = shapesAtPoint.filter((s) => editor.isShapeOrAncestorLocked(s))\n\n\t\t\t\t\t\tif (lockedShapes.length) {\n\t\t\t\t\t\t\t// nice, let's select them\n\t\t\t\t\t\t\teditor.select(...lockedShapes.map((s) => s.id))\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[editor]\n\t)\n\n\t// const container = useContainer()\n\n\tconst [isOpen, handleOpenChange] = useMenuIsOpen('context menu', cb)\n\n\t// If every item in the menu is readonly, then we don't want to show the menu\n\tconst isReadonly = useReadonly()\n\n\tconst noItemsToShow =\n\t\tcontextTLUiMenuSchema.length === 0 ||\n\t\t(isReadonly && contextTLUiMenuSchema.every((item) => !item.readonlyOk))\n\n\tconst selectToolActive = useValue(\n\t\t'isSelectToolActive',\n\t\t() => editor.getCurrentToolId() === 'select',\n\t\t[editor]\n\t)\n\n\tconst disabled = !selectToolActive || noItemsToShow\n\n\treturn (\n\t\t<_ContextMenu.Root dir=\"ltr\" onOpenChange={handleOpenChange} modal={false}>\n\t\t\t<_ContextMenu.Trigger\n\t\t\t\tonContextMenu={disabled ? preventDefault : undefined}\n\t\t\t\tdir=\"ltr\"\n\t\t\t\tdisabled={disabled}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</_ContextMenu.Trigger>\n\t\t\t{isOpen && <ContextMenuContent />}\n\t\t</_ContextMenu.Root>\n\t)\n}\n\nconst ContextMenuContent = forwardRef(function ContextMenuContent() {\n\tconst editor = useEditor()\n\tconst msg = useTranslation()\n\tconst menuSchema = useContextMenuSchema()\n\tconst [_, handleSubOpenChange] = useMenuIsOpen('context menu sub')\n\n\tconst isReadonly = useReadonly()\n\tconst breakpoint = useBreakpoint()\n\tconst container = useContainer()\n\n\tconst [disableClicks, setDisableClicks] = useState(false)\n\n\tfunction getContextMenuItem(\n\t\teditor: Editor,\n\t\titem: TLUiMenuChild,\n\t\tparent: TLUiMenuChild | null,\n\t\tdepth: number\n\t) {\n\t\tif (!item) return null\n\t\tif (isReadonly && !item.readonlyOk) return null\n\n\t\tswitch (item.type) {\n\t\t\tcase 'custom': {\n\t\t\t\tswitch (item.id) {\n\t\t\t\t\tcase 'MOVE_TO_PAGE_MENU': {\n\t\t\t\t\t\treturn <MoveToPageMenu key={item.id} />\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'group': {\n\t\t\t\treturn (\n\t\t\t\t\t<_ContextMenu.Group\n\t\t\t\t\t\tdir=\"ltr\"\n\t\t\t\t\t\tclassName={classNames('tlui-menu__group', {\n\t\t\t\t\t\t\t'tlui-menu__group__small': parent?.type === 'submenu',\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tdata-testid={`menu-item.${item.id}`}\n\t\t\t\t\t\tkey={item.id}\n\t\t\t\t\t>\n\t\t\t\t\t\t{item.children.map((child) => getContextMenuItem(editor, child, item, depth + 1))}\n\t\t\t\t\t</_ContextMenu.Group>\n\t\t\t\t)\n\t\t\t}\n\t\t\tcase 'submenu': {\n\t\t\t\treturn (\n\t\t\t\t\t<_ContextMenu.Sub key={item.id} onOpenChange={handleSubOpenChange}>\n\t\t\t\t\t\t<_ContextMenu.SubTrigger dir=\"ltr\" disabled={item.disabled} asChild>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ttype=\"menu\"\n\t\t\t\t\t\t\t\tlabel={item.label as TLUiTranslationKey}\n\t\t\t\t\t\t\t\tdata-testid={`menu-item.${item.id}`}\n\t\t\t\t\t\t\t\ticon=\"chevron-right\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</_ContextMenu.SubTrigger>\n\t\t\t\t\t\t<_ContextMenu.Portal container={container}>\n\t\t\t\t\t\t\t<_ContextMenu.SubContent className=\"tlui-menu\" sideOffset={-4} collisionPadding={4}>\n\t\t\t\t\t\t\t\t{item.children.map((child) => getContextMenuItem(editor, child, item, depth + 1))}\n\t\t\t\t\t\t\t</_ContextMenu.SubContent>\n\t\t\t\t\t\t</_ContextMenu.Portal>\n\t\t\t\t\t</_ContextMenu.Sub>\n\t\t\t\t)\n\t\t\t}\n\t\t\tcase 'item': {\n\t\t\t\tif (isReadonly && !item.readonlyOk) return null\n\n\t\t\t\tconst { id, checkbox, contextMenuLabel, label, onSelect, kbd, icon } = item.actionItem\n\t\t\t\tconst labelToUse = contextMenuLabel ?? label\n\t\t\t\tconst labelStr = labelToUse ? msg(labelToUse as TLUiTranslationKey) : undefined\n\n\t\t\t\tif (checkbox) {\n\t\t\t\t\t// Item is in a checkbox group\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<_ContextMenu.CheckboxItem\n\t\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\t\tclassName=\"tlui-button tlui-button__menu tlui-button__checkbox\"\n\t\t\t\t\t\t\tdir=\"ltr\"\n\t\t\t\t\t\t\tdisabled={item.disabled}\n\t\t\t\t\t\t\tonSelect={(e) => {\n\t\t\t\t\t\t\t\tonSelect('context-menu')\n\t\t\t\t\t\t\t\tpreventDefault(e)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\ttitle={labelStr ? labelStr : undefined}\n\t\t\t\t\t\t\tchecked={item.checked}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon small icon={item.checked ? 'check' : 'checkbox-empty'} />\n\t\t\t\t\t\t\t{labelStr && (\n\t\t\t\t\t\t\t\t<span className=\"tlui-button__label\" draggable={false}>\n\t\t\t\t\t\t\t\t\t{labelStr}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{kbd && <Kbd>{kbd}</Kbd>}\n\t\t\t\t\t\t</_ContextMenu.CheckboxItem>\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<_ContextMenu.Item key={id} dir=\"ltr\" asChild>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"menu\"\n\t\t\t\t\t\t\tdata-testid={`menu-item.${id}`}\n\t\t\t\t\t\t\tkbd={kbd}\n\t\t\t\t\t\t\tlabel={labelToUse as TLUiTranslationKey}\n\t\t\t\t\t\t\tdisabled={item.disabled}\n\t\t\t\t\t\t\ticonLeft={breakpoint < 3 && depth > 2 ? (icon as TLUiIconType) : undefined}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tif (disableClicks) {\n\t\t\t\t\t\t\t\t\tsetDisableClicks(false)\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tonSelect('context-menu')\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</_ContextMenu.Item>\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (\n\t\t<_ContextMenu.Portal container={container}>\n\t\t\t<_ContextMenu.Content\n\t\t\t\tclassName=\"tlui-menu scrollable\"\n\t\t\t\talignOffset={-4}\n\t\t\t\tcollisionPadding={4}\n\t\t\t\tonContextMenu={preventDefault}\n\t\t\t>\n\t\t\t\t{menuSchema.map((item) => getContextMenuItem(editor, item, null, 0))}\n\t\t\t</_ContextMenu.Content>\n\t\t</_ContextMenu.Portal>\n\t)\n})\n"],
|
|
5
|
+
"mappings": "AAuFE,SACC,KADD;AAvFF,SAAiB,gBAAgB,cAAc,WAAW,gBAAgB;AAC1E,YAAY,kBAAkB;AAC9B,OAAO,gBAAgB;AACvB,SAAS,YAAY,aAAa,gBAAgB;AAElD,SAAS,qBAAqB;AAC9B,SAAS,4BAA4B;AACrC,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAE5B,SAAS,sBAAsB;AAE/B,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,WAAW;AAQb,MAAM,cAAc,SAASA,aAAY,EAAE,SAAS,GAAsB;AAChF,QAAM,SAAS,UAAU;AAEzB,QAAM,wBAAwB,qBAAqB;AAEnD,QAAM,KAAK;AAAA,IACV,CAACC,YAAoB;AACpB,UAAI,CAACA,SAAQ;AACZ,cAAM,oBAAoB,OAAO,q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AAK;AAAA,cACvB,OAAO;AACN,yBAAS,cAAc;AAAA,cACxB;AAAA,YACD;AAAA;AAAA,QACD,KAfuB,EAgBxB;AAAA,MAEF;AAAA,IACD;AAAA,EACD;AAEA,SACC,oBAAC,aAAa,QAAb,EAAoB,WACpB;AAAA,IAAC,aAAa;AAAA,IAAb;AAAA,MACA,WAAU;AAAA,MACV,aAAa;AAAA,MACb,kBAAkB;AAAA,MAClB,eAAe;AAAA,MAEd,qBAAW,IAAI,CAAC,SAAS,mBAAmB,QAAQ,MAAM,MAAM,CAAC,CAAC;AAAA;AAAA,EACpE,GACD;AAEF,CAAC;",
|
|
6
6
|
"names": ["ContextMenu", "isOpen", "ContextMenuContent", "editor"]
|
|
7
7
|
}
|
|
@@ -351,7 +351,12 @@ const DEFAULT_TRANSLATION = {
|
|
|
351
351
|
"vscode.file-open.backup-saved": "Backup saved",
|
|
352
352
|
"vscode.file-open.backup-failed": "Backup failed: this is not a .tldr file.",
|
|
353
353
|
"vscode.file-open.dont-show-again": "Don't ask again",
|
|
354
|
-
"cursor-chat.type-to-chat": "Type to chat..."
|
|
354
|
+
"cursor-chat.type-to-chat": "Type to chat...",
|
|
355
|
+
"app.poll.t": "True",
|
|
356
|
+
"app.poll.f": "False",
|
|
357
|
+
"app.poll.y": "Yes",
|
|
358
|
+
"app.poll.n": "No",
|
|
359
|
+
"app.poll.abstention": "Abstention"
|
|
355
360
|
};
|
|
356
361
|
export {
|
|
357
362
|
DEFAULT_TRANSLATION
|
|
@@ -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 scripts/refresh-assets.ts.\n// Do not edit manually.\n\n/** @internal */\nexport const DEFAULT_TRANSLATION = {\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-json.short': 'JSON',\n\t'action.copy-as-json': 'Copy as JSON',\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.duplicate': 'Duplicate',\n\t'action.edit-link': 'Edit link',\n\t'action.exit-pen-mode': 'Exit pen mode',\n\t'action.export-as-json.short': 'JSON',\n\t'action.export-as-json': 'Export as JSON',\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.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.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-file': 'Open file',\n\t'action.pack': 'Pack',\n\t'action.paste': 'Paste',\n\t'action.print': 'Print',\n\t'action.redo': 'Redo',\n\t'action.remove-frame': 'Remove frame',\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-reduce-motion.menu': 'Reduce motion',\n\t'action.toggle-reduce-motion': 'Toggle reduce motion',\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-grid.menu': 'Show grid',\n\t'action.toggle-grid': 'Toggle grid',\n\t'action.toggle-lock': 'Toggle locked',\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'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'fill-style.semi': 'Semi',\n\t'fill-style.solid': 'Solid',\n\t'fill-style.pattern': 'Pattern',\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'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.diamond': 'Diamond',\n\t'geo-style.ellipse': 'Ellipse',\n\t'geo-style.hexagon': 'Hexagon',\n\t'geo-style.octagon': 'Octagon',\n\t'geo-style.oval': 'Oval',\n\t'geo-style.cloud': 'Cloud',\n\t'geo-style.pentagon': 'Pentagon',\n\t'geo-style.rectangle': 'Rectangle',\n\t'geo-style.rhombus-2': 'Rhombus 2',\n\t'geo-style.rhombus': 'Rhombus',\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'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.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.asset': 'Asset',\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'menu.title': 'Menu',\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'context-menu.arrange': 'Arrange',\n\t'context-menu.copy-as': 'Copy as',\n\t'context-menu.export-as': 'Export as',\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.default-project-name': 'Shared Project',\n\t'share-menu.copy-link': 'Copy share link',\n\t'share-menu.readonly-link': 'Read-only',\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 read-only 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':\n\t\t'Anyone with the link will be able to view (but not edit) this project.',\n\t'share-menu.project-too-large':\n\t\t\"Sorry, this project can't be shared because it's too large. We're working on it!\",\n\t'share-menu.upload-failed':\n\t\t\"Sorry, we couldn't upload your project at the moment. Please try again or let us know if the problem persists.\",\n\t'status.offline': 'Offline',\n\t'status.online': 'Online',\n\t'people-menu.title': 'People',\n\t'people-menu.change-name': 'Change name',\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'help-menu.title': 'Help and resources',\n\t'help-menu.about': 'About',\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'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'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's URL to create the embed.\",\n\t'embed-dialog.invalid-url': 'We could not create an embed from that URL.',\n\t'edit-pages-dialog.move-down': 'Move down',\n\t'edit-pages-dialog.move-up': 'Move up',\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'home-project-dialog.title': 'Home project',\n\t'home-project-dialog.description': \"This is your local home project. It's just for you!\",\n\t'rename-project-dialog.title': 'Rename project',\n\t'rename-project-dialog.cancel': 'Cancel',\n\t'rename-project-dialog.rename': 'Rename',\n\t'home-project-dialog.ok': 'Ok',\n\t'style-panel.title': 'Styles',\n\t'style-panel.align': '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.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'tool-panel.drawing': 'Drawing',\n\t'tool-panel.shapes': 'Shapes',\n\t'tool-panel.more': 'More',\n\t'debug-panel.more': 'More',\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'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't 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't 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't 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't 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've updated this document to work with the current version of tldraw. If you'd 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't ask again\",\n\t'cursor-chat.type-to-chat': 'Type to chat...',\n}\n"],
|
|
5
|
-
"mappings": "AAIO,MAAM,sBAAsB;AAAA,EAClC,8B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AA,EAC/B,6BAA6B;AAAA,EAC7B,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,kCAAkC;AAAA,EAClC,wBAAwB;AAAA,EACxB,gCAAgC;AAAA,EAChC,eAAe;AAAA,EACf,qCAAqC;AAAA,EACrC,iDACC;AAAA,EACD,2DACC;AAAA,EACD,sDAAsD;AAAA,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;
|
|
4
|
+
"sourcesContent": ["// This file is automatically generated by scripts/refresh-assets.ts.\n// Do not edit manually.\n\n/** @internal */\nexport const DEFAULT_TRANSLATION = {\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-json.short': 'JSON',\n\t'action.copy-as-json': 'Copy as JSON',\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.duplicate': 'Duplicate',\n\t'action.edit-link': 'Edit link',\n\t'action.exit-pen-mode': 'Exit pen mode',\n\t'action.export-as-json.short': 'JSON',\n\t'action.export-as-json': 'Export as JSON',\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.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.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-file': 'Open file',\n\t'action.pack': 'Pack',\n\t'action.paste': 'Paste',\n\t'action.print': 'Print',\n\t'action.redo': 'Redo',\n\t'action.remove-frame': 'Remove frame',\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-reduce-motion.menu': 'Reduce motion',\n\t'action.toggle-reduce-motion': 'Toggle reduce motion',\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-grid.menu': 'Show grid',\n\t'action.toggle-grid': 'Toggle grid',\n\t'action.toggle-lock': 'Toggle locked',\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'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'fill-style.semi': 'Semi',\n\t'fill-style.solid': 'Solid',\n\t'fill-style.pattern': 'Pattern',\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'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.diamond': 'Diamond',\n\t'geo-style.ellipse': 'Ellipse',\n\t'geo-style.hexagon': 'Hexagon',\n\t'geo-style.octagon': 'Octagon',\n\t'geo-style.oval': 'Oval',\n\t'geo-style.cloud': 'Cloud',\n\t'geo-style.pentagon': 'Pentagon',\n\t'geo-style.rectangle': 'Rectangle',\n\t'geo-style.rhombus-2': 'Rhombus 2',\n\t'geo-style.rhombus': 'Rhombus',\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'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.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.asset': 'Asset',\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'menu.title': 'Menu',\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'context-menu.arrange': 'Arrange',\n\t'context-menu.copy-as': 'Copy as',\n\t'context-menu.export-as': 'Export as',\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.default-project-name': 'Shared Project',\n\t'share-menu.copy-link': 'Copy share link',\n\t'share-menu.readonly-link': 'Read-only',\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 read-only 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':\n\t\t'Anyone with the link will be able to view (but not edit) this project.',\n\t'share-menu.project-too-large':\n\t\t\"Sorry, this project can't be shared because it's too large. We're working on it!\",\n\t'share-menu.upload-failed':\n\t\t\"Sorry, we couldn't upload your project at the moment. Please try again or let us know if the problem persists.\",\n\t'status.offline': 'Offline',\n\t'status.online': 'Online',\n\t'people-menu.title': 'People',\n\t'people-menu.change-name': 'Change name',\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'help-menu.title': 'Help and resources',\n\t'help-menu.about': 'About',\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'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'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's URL to create the embed.\",\n\t'embed-dialog.invalid-url': 'We could not create an embed from that URL.',\n\t'edit-pages-dialog.move-down': 'Move down',\n\t'edit-pages-dialog.move-up': 'Move up',\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'home-project-dialog.title': 'Home project',\n\t'home-project-dialog.description': \"This is your local home project. It's just for you!\",\n\t'rename-project-dialog.title': 'Rename project',\n\t'rename-project-dialog.cancel': 'Cancel',\n\t'rename-project-dialog.rename': 'Rename',\n\t'home-project-dialog.ok': 'Ok',\n\t'style-panel.title': 'Styles',\n\t'style-panel.align': '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.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'tool-panel.drawing': 'Drawing',\n\t'tool-panel.shapes': 'Shapes',\n\t'tool-panel.more': 'More',\n\t'debug-panel.more': 'More',\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'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't 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't 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't 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't 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've updated this document to work with the current version of tldraw. If you'd 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't ask again\",\n\t'cursor-chat.type-to-chat': 'Type to chat...',\n\t'app.poll.t': 'True',\n\t'app.poll.f': 'False',\n\t'app.poll.y': 'Yes',\n\t'app.poll.n': 'No',\n\t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
|
}
|
|
@@ -6,7 +6,7 @@ const EN_TRANSLATION = {
|
|
|
6
6
|
messages: DEFAULT_TRANSLATION
|
|
7
7
|
};
|
|
8
8
|
async function fetchTranslation(locale, assetUrls) {
|
|
9
|
-
const mainRes = await fetch(assetUrls
|
|
9
|
+
const mainRes = await fetch(assetUrls?.translations?.en ?? "en");
|
|
10
10
|
if (!mainRes.ok) {
|
|
11
11
|
console.warn(`No main translations found.`);
|
|
12
12
|
return EN_TRANSLATION;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/lib/ui/hooks/useTranslation/translations.ts"],
|
|
4
|
-
"sourcesContent": ["import { LANGUAGES } from '@bigbluebutton/editor'\nimport { TLUiAssetUrls } from '../../assetUrls'\nimport { TLUiTranslationKey } from './TLUiTranslationKey'\nimport { DEFAULT_TRANSLATION } from './defaultTranslation'\n\n// The default language (english) must have a value for every message.\n// Other languages may have missing messages. If the application finds\n// a missing message for the current language, it will use the english\n// translation instead.\n\n/* ----------------- (do not change) ---------------- */\n\n/** @public */\nexport type TLUiTranslation = {\n\treadonly locale: string\n\treadonly label: string\n\treadonly messages: Record<TLUiTranslationKey, string>\n}\n\nconst EN_TRANSLATION: TLUiTranslation = {\n\tlocale: 'en',\n\tlabel: 'English',\n\tmessages: DEFAULT_TRANSLATION as TLUiTranslation['messages'],\n}\n\n/** @internal */\nexport async function fetchTranslation(\n\tlocale: TLUiTranslation['locale'],\n\tassetUrls: TLUiAssetUrls\n): Promise<TLUiTranslation> {\n\tconst mainRes = await fetch(assetUrls
|
|
5
|
-
"mappings": "AAAA,SAAS,iBAAiB;AAG1B,SAAS,2BAA2B;AAgBpC,MAAM,iBAAkC;AAAA,EACvC,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AACX;AAGA,eAAsB,iBACrB,QACA,WAC2B;AAC3B,QAAM,UAAU,MAAM,MAAM,
|
|
4
|
+
"sourcesContent": ["import { LANGUAGES } from '@bigbluebutton/editor'\nimport { TLUiAssetUrls } from '../../assetUrls'\nimport { TLUiTranslationKey } from './TLUiTranslationKey'\nimport { DEFAULT_TRANSLATION } from './defaultTranslation'\n\n// The default language (english) must have a value for every message.\n// Other languages may have missing messages. If the application finds\n// a missing message for the current language, it will use the english\n// translation instead.\n\n/* ----------------- (do not change) ---------------- */\n\n/** @public */\nexport type TLUiTranslation = {\n\treadonly locale: string\n\treadonly label: string\n\treadonly messages: Record<TLUiTranslationKey, string>\n}\n\nconst EN_TRANSLATION: TLUiTranslation = {\n\tlocale: 'en',\n\tlabel: 'English',\n\tmessages: DEFAULT_TRANSLATION as TLUiTranslation['messages'],\n}\n\n/** @internal */\nexport async function fetchTranslation(\n\tlocale: TLUiTranslation['locale'],\n\tassetUrls: TLUiAssetUrls\n): Promise<TLUiTranslation> {\n\tconst mainRes = await fetch(assetUrls?.translations?.en ?? 'en')\n\n\tif (!mainRes.ok) {\n\t\tconsole.warn(`No main translations found.`)\n\t\treturn EN_TRANSLATION\n\t}\n\n\tif (locale === 'en') {\n\t\treturn EN_TRANSLATION\n\t}\n\n\tconst language = LANGUAGES.find((t) => t.locale === locale)\n\n\tif (!language) {\n\t\tconsole.warn(`No translation found for locale ${locale}`)\n\t\treturn EN_TRANSLATION\n\t}\n\n\tconst res = await fetch(assetUrls.translations[language.locale])\n\tconst messages: TLUiTranslation['messages'] = await res.json()\n\n\tif (!messages) {\n\t\tconsole.warn(`No messages found for locale ${locale}`)\n\t\treturn EN_TRANSLATION\n\t}\n\n\tconst missing: string[] = []\n\n\tfor (const key in EN_TRANSLATION.messages) {\n\t\tif (!messages[key as TLUiTranslationKey]) {\n\t\t\tmissing.push(key)\n\t\t}\n\t}\n\n\tif (missing.length > 0 && process.env.NODE_ENV === 'development') {\n\t\tconsole.warn(`Language ${locale}: missing messages for keys:\\n${missing.join('\\n')}`)\n\t}\n\n\treturn {\n\t\tlocale,\n\t\tlabel: language.label,\n\t\tmessages: { ...EN_TR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"name": "@bigbluebutton/tldraw",
|
|
3
3
|
"description": "BigBlueButton's fork of tldraw 2.0-alpha.19 - A tiny little drawing editor.",
|
|
4
|
-
"version": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.25",
|
|
5
5
|
"packageManager": "yarn@3.5.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "tldraw GB Ltd.",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"src"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@bigbluebutton/editor": "2.0.0-alpha.
|
|
38
|
+
"@bigbluebutton/editor": "2.0.0-alpha.24",
|
|
39
39
|
"@radix-ui/react-alert-dialog": "^1.0.0",
|
|
40
40
|
"@radix-ui/react-context-menu": "^2.1.5",
|
|
41
41
|
"@radix-ui/react-dialog": "^1.0.5",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@peculiar/webcrypto": "^1.4.0",
|
|
59
59
|
"@testing-library/jest-dom": "^5.14.1",
|
|
60
|
-
"@testing-library/react": "
|
|
60
|
+
"@testing-library/react": "latest",
|
|
61
61
|
"@types/canvas-size": "^1.2.0",
|
|
62
62
|
"@types/classnames": "^2.3.1",
|
|
63
63
|
"@types/downscale": "^1.0.4",
|
|
@@ -93,6 +93,7 @@
|
|
|
93
93
|
"../../config/setupJest.ts"
|
|
94
94
|
]
|
|
95
95
|
},
|
|
96
|
+
"stableVersion": "2.0.0-alpha.24",
|
|
96
97
|
"module": "dist-esm/index.mjs",
|
|
97
98
|
"source": "src/index.ts",
|
|
98
99
|
"exports": {
|
package/src/lib/Tldraw.test.tsx
CHANGED
|
@@ -5,12 +5,10 @@ import { Tldraw } from './Tldraw'
|
|
|
5
5
|
|
|
6
6
|
describe('<Tldraw />', () => {
|
|
7
7
|
it('Renders without crashing', async () => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
</Tldraw>
|
|
13
|
-
)
|
|
8
|
+
render(
|
|
9
|
+
<Tldraw>
|
|
10
|
+
<div data-testid="canvas-1" />
|
|
11
|
+
</Tldraw>
|
|
14
12
|
)
|
|
15
13
|
|
|
16
14
|
await screen.findByTestId('canvas-1')
|
|
@@ -27,7 +25,7 @@ describe('<Tldraw />', () => {
|
|
|
27
25
|
)
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
render(<TestComponent />)
|
|
31
29
|
await screen.findByTestId('canvas-1')
|
|
32
30
|
})
|
|
33
31
|
|
|
@@ -57,12 +55,10 @@ describe('<Tldraw />', () => {
|
|
|
57
55
|
}
|
|
58
56
|
}
|
|
59
57
|
|
|
60
|
-
const rendered =
|
|
61
|
-
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
</Tldraw>
|
|
65
|
-
)
|
|
58
|
+
const rendered = render(
|
|
59
|
+
<Tldraw shapeUtils={[FakeShapeUtil1]}>
|
|
60
|
+
<div data-testid="canvas-1" />
|
|
61
|
+
</Tldraw>
|
|
66
62
|
)
|
|
67
63
|
await screen.findByTestId('canvas-1')
|
|
68
64
|
|
|
@@ -9,6 +9,7 @@ import { HighlightShapeUtil } from './shapes/highlight/HighlightShapeUtil'
|
|
|
9
9
|
import { ImageShapeUtil } from './shapes/image/ImageShapeUtil'
|
|
10
10
|
import { LineShapeUtil } from './shapes/line/LineShapeUtil'
|
|
11
11
|
import { NoteShapeUtil } from './shapes/note/NoteShapeUtil'
|
|
12
|
+
import { PollShapeUtil } from './shapes/poll/PollShapeUtil'
|
|
12
13
|
import { TextShapeUtil } from './shapes/text/TextShapeUtil'
|
|
13
14
|
import { VideoShapeUtil } from './shapes/video/VideoShapeUtil'
|
|
14
15
|
|
|
@@ -26,4 +27,5 @@ export const defaultShapeUtils: TLAnyShapeUtilConstructor[] = [
|
|
|
26
27
|
EmbedShapeUtil,
|
|
27
28
|
ImageShapeUtil,
|
|
28
29
|
VideoShapeUtil,
|
|
30
|
+
PollShapeUtil,
|
|
29
31
|
]
|
|
@@ -518,7 +518,7 @@ export class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
|
|
|
518
518
|
|
|
519
519
|
const path = info.isStraight ? getSolidStraightArrowPath(info) : getSolidCurvedArrowPath(info)
|
|
520
520
|
|
|
521
|
-
let handlePath: null | JSX.Element = null
|
|
521
|
+
let handlePath: null | React.JSX.Element = null
|
|
522
522
|
|
|
523
523
|
if (onlySelectedShape === shape && shouldDisplayHandles) {
|
|
524
524
|
const sw = 2
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`Misc resizes: line shape after resize 1`] = `
|
|
4
|
-
|
|
4
|
+
{
|
|
5
5
|
"id": "shape:line1",
|
|
6
6
|
"index": "a1",
|
|
7
7
|
"isLocked": false,
|
|
8
|
-
"meta":
|
|
8
|
+
"meta": {},
|
|
9
9
|
"opacity": 1,
|
|
10
10
|
"parentId": "page:page",
|
|
11
|
-
"props":
|
|
11
|
+
"props": {
|
|
12
12
|
"color": "black",
|
|
13
13
|
"dash": "draw",
|
|
14
|
-
"handles":
|
|
15
|
-
"end":
|
|
14
|
+
"handles": {
|
|
15
|
+
"end": {
|
|
16
16
|
"canBind": false,
|
|
17
17
|
"id": "end",
|
|
18
18
|
"index": "a2",
|
|
@@ -20,7 +20,7 @@ Object {
|
|
|
20
20
|
"x": 100,
|
|
21
21
|
"y": 700,
|
|
22
22
|
},
|
|
23
|
-
"start":
|
|
23
|
+
"start": {
|
|
24
24
|
"canBind": false,
|
|
25
25
|
"id": "start",
|
|
26
26
|
"index": "a1",
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HTMLContainer,
|
|
3
|
+
Rectangle2d,
|
|
4
|
+
ShapeUtil,
|
|
5
|
+
TLOnResizeHandler,
|
|
6
|
+
getDefaultColorTheme,
|
|
7
|
+
resizeBox,
|
|
8
|
+
} from '@bigbluebutton/editor'
|
|
9
|
+
|
|
10
|
+
import ChatPollContent from './components/poll-content'
|
|
11
|
+
import { pollShapeMigrations } from './poll-shape-migrations'
|
|
12
|
+
import { pollShapeProps } from './poll-shape-props'
|
|
13
|
+
import { IPollShape } from './poll-shape-types'
|
|
14
|
+
|
|
15
|
+
export class PollShapeUtil extends ShapeUtil<IPollShape> {
|
|
16
|
+
static override type = 'poll' as const
|
|
17
|
+
|
|
18
|
+
static override props = pollShapeProps
|
|
19
|
+
|
|
20
|
+
static override migrations = pollShapeMigrations
|
|
21
|
+
|
|
22
|
+
override isAspectRatioLocked = (_shape: IPollShape) => false
|
|
23
|
+
|
|
24
|
+
override canResize = (_shape: IPollShape) => true
|
|
25
|
+
|
|
26
|
+
override canBind = (_shape: IPollShape) => true
|
|
27
|
+
|
|
28
|
+
getDefaultProps(): IPollShape['props'] {
|
|
29
|
+
return {
|
|
30
|
+
w: 300,
|
|
31
|
+
h: 300,
|
|
32
|
+
color: 'black',
|
|
33
|
+
fill: 'white',
|
|
34
|
+
question: '',
|
|
35
|
+
numRespondents: 0,
|
|
36
|
+
numResponders: 0,
|
|
37
|
+
questionText: '',
|
|
38
|
+
questionType: '',
|
|
39
|
+
answers: [],
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
getGeometry(shape: IPollShape) {
|
|
44
|
+
return new Rectangle2d({
|
|
45
|
+
width: shape.props.w,
|
|
46
|
+
height: shape.props.h,
|
|
47
|
+
isFilled: true,
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
component(shape: IPollShape) {
|
|
52
|
+
const { bounds } = this.editor.getShapeGeometry(shape)
|
|
53
|
+
const theme = getDefaultColorTheme({
|
|
54
|
+
isDarkMode: this.editor.user.getIsDarkMode(),
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
// const contentRef = React.useRef<HTMLDivElement>(null)
|
|
58
|
+
const pollMetadata = JSON.stringify({
|
|
59
|
+
id: shape.id,
|
|
60
|
+
question: shape.props.question,
|
|
61
|
+
numRespondents: shape.props.numRespondents,
|
|
62
|
+
numResponders: shape.props.numResponders,
|
|
63
|
+
questionText: shape.props.questionText,
|
|
64
|
+
questionType: shape.props.questionType,
|
|
65
|
+
answers: shape.props.answers,
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
const adjustedHeight = shape.props.questionText.length > 0 ? bounds.height - 75 : bounds.height
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<HTMLContainer
|
|
72
|
+
id={shape.id}
|
|
73
|
+
style={{
|
|
74
|
+
border: '1px solid #8B9AA8',
|
|
75
|
+
borderRadius: '4px',
|
|
76
|
+
boxShadow: '0px 0px 4px 0px rgba(0, 0, 0, 0.20)',
|
|
77
|
+
display: 'flex',
|
|
78
|
+
flexDirection: 'column',
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
justifyContent: 'center',
|
|
81
|
+
pointerEvents: 'all',
|
|
82
|
+
backgroundColor: theme[shape.props.color].semi,
|
|
83
|
+
color: theme[shape.props.color].solid,
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
<div
|
|
87
|
+
style={{
|
|
88
|
+
width: `${bounds.width}px`,
|
|
89
|
+
overflow: 'hidden',
|
|
90
|
+
position: 'relative',
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
<ChatPollContent metadata={pollMetadata} height={adjustedHeight} />
|
|
94
|
+
</div>
|
|
95
|
+
</HTMLContainer>
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
indicator(shape: IPollShape) {
|
|
100
|
+
return <rect width={shape.props.w} height={shape.props.h} />
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
override onResize: TLOnResizeHandler<IPollShape> = (shape, info) => {
|
|
104
|
+
return resizeBox(shape, info)
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export default PollShapeUtil
|