tldraw 3.16.0-canary.e5e61b17cef3 → 3.16.0-canary.e618c2fbc95d
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 +99 -13
- package/dist-cjs/index.js +6 -2
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/defaultExternalContentHandlers.js +10 -0
- package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/arrow-types.js.map +1 -1
- package/dist-cjs/lib/shapes/arrow/arrowTargetState.js +3 -2
- package/dist-cjs/lib/shapes/arrow/arrowTargetState.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js +1 -1
- package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +2 -2
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +4 -4
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js +8 -2
- package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +4 -4
- package/dist-cjs/lib/shapes/shared/HyperlinkButton.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/useEditablePlainText.js +3 -3
- package/dist-cjs/lib/shapes/shared/useEditablePlainText.js.map +2 -2
- package/dist-cjs/lib/shapes/text/PlainTextArea.js +3 -2
- package/dist-cjs/lib/shapes/text/PlainTextArea.js.map +2 -2
- package/dist-cjs/lib/shapes/text/RichTextArea.js +3 -3
- package/dist-cjs/lib/shapes/text/RichTextArea.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +3 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
- package/dist-cjs/lib/ui/components/A11y.js +1 -1
- package/dist-cjs/lib/ui/components/A11y.js.map +2 -2
- package/dist-cjs/lib/ui/components/AccessibilityMenu.js +1 -1
- package/dist-cjs/lib/ui/components/AccessibilityMenu.js.map +2 -2
- package/dist-cjs/lib/ui/components/InputModeMenu.js +77 -0
- package/dist-cjs/lib/ui/components/InputModeMenu.js.map +7 -0
- package/dist-cjs/lib/ui/components/LanguageMenu.js +1 -0
- package/dist-cjs/lib/ui/components/LanguageMenu.js.map +2 -2
- package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js +2 -0
- package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js +2 -1
- package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js.map +2 -2
- package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js +1 -1
- package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js +4 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js +12 -3
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js +4 -2
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js +3 -2
- package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js +5 -4
- package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js +1 -1
- package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +6 -2
- package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js.map +2 -2
- package/dist-cjs/lib/ui/components/menu-items.js +6 -4
- package/dist-cjs/lib/ui/components/menu-items.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +1 -1
- package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js +5 -3
- package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js +1 -0
- package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +44 -21
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.js +3 -0
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +3 -3
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
- package/dist-cjs/lib/ui/context/actions.js +11 -25
- package/dist-cjs/lib/ui/context/actions.js.map +2 -2
- package/dist-cjs/lib/ui/context/events.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/useClipboardEvents.js +1 -1
- package/dist-cjs/lib/ui/hooks/useClipboardEvents.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 +10 -2
- package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
- package/dist-cjs/lib/ui/version.js +3 -3
- package/dist-cjs/lib/ui/version.js.map +1 -1
- package/dist-esm/index.d.mts +99 -13
- package/dist-esm/index.mjs +11 -3
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/defaultExternalContentHandlers.mjs +10 -0
- package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs +3 -2
- package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs +1 -1
- package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +2 -2
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +4 -5
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs +9 -3
- package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs +5 -5
- package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs +3 -4
- package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs.map +2 -2
- package/dist-esm/lib/shapes/text/PlainTextArea.mjs +4 -3
- package/dist-esm/lib/shapes/text/PlainTextArea.mjs.map +2 -2
- package/dist-esm/lib/shapes/text/RichTextArea.mjs +3 -4
- package/dist-esm/lib/shapes/text/RichTextArea.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +3 -1
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
- package/dist-esm/lib/ui/components/A11y.mjs +1 -2
- package/dist-esm/lib/ui/components/A11y.mjs.map +2 -2
- package/dist-esm/lib/ui/components/AccessibilityMenu.mjs +3 -3
- package/dist-esm/lib/ui/components/AccessibilityMenu.mjs.map +2 -2
- package/dist-esm/lib/ui/components/InputModeMenu.mjs +57 -0
- package/dist-esm/lib/ui/components/InputModeMenu.mjs.map +7 -0
- package/dist-esm/lib/ui/components/LanguageMenu.mjs +1 -0
- package/dist-esm/lib/ui/components/LanguageMenu.mjs.map +2 -2
- package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs +2 -0
- package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs +2 -1
- package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs.map +2 -2
- package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs +1 -2
- package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs +4 -2
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs +12 -3
- package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs +4 -2
- package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs +3 -2
- package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs +5 -4
- package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs +1 -1
- package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs +6 -2
- package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs.map +2 -2
- package/dist-esm/lib/ui/components/menu-items.mjs +6 -4
- package/dist-esm/lib/ui/components/menu-items.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +1 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs +6 -4
- package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs +1 -0
- package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +44 -21
- package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.mjs +3 -0
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +3 -3
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
- package/dist-esm/lib/ui/context/actions.mjs +11 -25
- package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
- package/dist-esm/lib/ui/context/events.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs +1 -2
- package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +10 -2
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
- package/dist-esm/lib/ui/version.mjs +3 -3
- package/dist-esm/lib/ui/version.mjs.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +8 -1
- package/src/lib/defaultExternalContentHandlers.ts +14 -0
- package/src/lib/shapes/arrow/ArrowShapeOptions.test.ts +83 -13
- package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +97 -3
- package/src/lib/shapes/arrow/arrow-types.ts +3 -5
- package/src/lib/shapes/arrow/arrowTargetState.ts +34 -3
- package/src/lib/shapes/arrow/toolStates/Pointing.tsx +1 -1
- package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +4 -5
- package/src/lib/shapes/frame/components/FrameLabelInput.tsx +10 -3
- package/src/lib/shapes/shared/HyperlinkButton.tsx +5 -5
- package/src/lib/shapes/shared/useEditablePlainText.ts +3 -4
- package/src/lib/shapes/text/PlainTextArea.tsx +4 -3
- package/src/lib/shapes/text/RichTextArea.tsx +3 -4
- package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +6 -2
- package/src/lib/ui/components/A11y.tsx +1 -2
- package/src/lib/ui/components/AccessibilityMenu.tsx +2 -2
- package/src/lib/ui/components/InputModeMenu.tsx +65 -0
- package/src/lib/ui/components/LanguageMenu.tsx +1 -0
- package/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx +4 -0
- package/src/lib/ui/components/Minimap/DefaultMinimap.tsx +2 -1
- package/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx +1 -2
- package/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx +4 -2
- package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +4 -2
- package/src/lib/ui/components/StylePanel/StylePanelButtonPicker.tsx +10 -3
- package/src/lib/ui/components/StylePanel/StylePanelContext.tsx +5 -3
- package/src/lib/ui/components/Toolbar/AltTextEditor.tsx +4 -3
- package/src/lib/ui/components/Toolbar/LinkEditor.tsx +6 -5
- package/src/lib/ui/components/Toolbar/OverflowingToolbar.tsx +1 -1
- package/src/lib/ui/components/Toolbar/ToggleToolLockedButton.tsx +9 -2
- package/src/lib/ui/components/menu-items.tsx +5 -3
- package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +1 -2
- package/src/lib/ui/components/primitives/TldrawUiInput.tsx +6 -3
- package/src/lib/ui/components/primitives/TldrawUiToolbar.tsx +2 -1
- package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +26 -5
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.tsx +4 -0
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +3 -3
- package/src/lib/ui/context/actions.tsx +18 -27
- package/src/lib/ui/context/events.tsx +2 -1
- package/src/lib/ui/hooks/useClipboardEvents.ts +1 -2
- package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +10 -2
- package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +10 -2
- package/src/lib/ui/version.ts +3 -3
- package/src/lib/ui.css +25 -2
- package/src/test/TestEditor.ts +8 -2
- package/src/test/commands/setCamera.test.ts +13 -0
- package/src/test/frames.test.ts +15 -0
- package/tldraw.css +25 -2
|
@@ -102,13 +102,14 @@ export interface TLUiEventMap {
|
|
|
102
102
|
'toggle-grid-mode': null
|
|
103
103
|
'toggle-wrap-mode': null
|
|
104
104
|
'toggle-focus-mode': null
|
|
105
|
+
'input-mode': { value: string }
|
|
105
106
|
'toggle-debug-mode': null
|
|
106
107
|
'toggle-dynamic-size-mode': null
|
|
107
108
|
'toggle-paste-at-cursor': null
|
|
108
109
|
'toggle-lock': null
|
|
109
110
|
'toggle-reduce-motion': null
|
|
110
111
|
'toggle-keyboard-shortcuts': null
|
|
111
|
-
'
|
|
112
|
+
'enhanced-a11y-mode': null
|
|
112
113
|
'toggle-edge-scrolling': null
|
|
113
114
|
'color-scheme': { value: string }
|
|
114
115
|
'exit-pen-mode': null
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
compact,
|
|
9
9
|
isDefined,
|
|
10
10
|
preventDefault,
|
|
11
|
-
stopEventPropagation,
|
|
12
11
|
uniq,
|
|
13
12
|
useEditor,
|
|
14
13
|
useMaybeEditor,
|
|
@@ -763,7 +762,7 @@ export function useNativeClipboardEvents() {
|
|
|
763
762
|
|
|
764
763
|
const paste = (e: ClipboardEvent) => {
|
|
765
764
|
if (disablingMiddleClickPaste) {
|
|
766
|
-
|
|
765
|
+
editor.markEventAsHandled(e)
|
|
767
766
|
return
|
|
768
767
|
}
|
|
769
768
|
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
/** @public */
|
|
5
5
|
export type TLUiTranslationKey =
|
|
6
|
+
| 'action.toggle-auto-pan'
|
|
7
|
+
| 'action.toggle-auto-zoom'
|
|
8
|
+
| 'action.toggle-auto-none'
|
|
9
|
+
| 'action.toggle-mouse'
|
|
10
|
+
| 'action.toggle-trackpad'
|
|
6
11
|
| 'action.convert-to-bookmark'
|
|
7
12
|
| 'action.convert-to-embed'
|
|
8
13
|
| 'action.open-embed-link'
|
|
@@ -93,8 +98,8 @@ export type TLUiTranslationKey =
|
|
|
93
98
|
| 'action.toggle-reduce-motion'
|
|
94
99
|
| 'action.toggle-keyboard-shortcuts.menu'
|
|
95
100
|
| 'action.toggle-keyboard-shortcuts'
|
|
96
|
-
| 'action.
|
|
97
|
-
| 'action.
|
|
101
|
+
| 'action.enhanced-a11y-mode.menu'
|
|
102
|
+
| 'action.enhanced-a11y-mode'
|
|
98
103
|
| 'action.toggle-edge-scrolling.menu'
|
|
99
104
|
| 'action.toggle-edge-scrolling'
|
|
100
105
|
| 'action.toggle-debug-mode.menu'
|
|
@@ -122,6 +127,7 @@ export type TLUiTranslationKey =
|
|
|
122
127
|
| 'action.zoom-to-fit'
|
|
123
128
|
| 'action.zoom-to-selection'
|
|
124
129
|
| 'assets.files.size-too-big'
|
|
130
|
+
| 'assets.files.maximum-size'
|
|
125
131
|
| 'assets.files.type-not-allowed'
|
|
126
132
|
| 'assets.files.upload-failed'
|
|
127
133
|
| 'assets.files.amount-too-many'
|
|
@@ -310,6 +316,7 @@ export type TLUiTranslationKey =
|
|
|
310
316
|
| 'menu.language'
|
|
311
317
|
| 'menu.preferences'
|
|
312
318
|
| 'menu.view'
|
|
319
|
+
| 'menu.input-mode'
|
|
313
320
|
| 'context-menu.title'
|
|
314
321
|
| 'context-menu.edit'
|
|
315
322
|
| 'context-menu.arrange'
|
|
@@ -411,6 +418,7 @@ export type TLUiTranslationKey =
|
|
|
411
418
|
| 'style-panel.opacity'
|
|
412
419
|
| 'style-panel.size'
|
|
413
420
|
| 'style-panel.spline'
|
|
421
|
+
| 'style-panel.selected'
|
|
414
422
|
| 'tool-panel.title'
|
|
415
423
|
| 'tool-panel.more'
|
|
416
424
|
| 'navigation-zone.title'
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
/** @internal */
|
|
5
5
|
export const DEFAULT_TRANSLATION = {
|
|
6
|
+
'action.toggle-auto-pan': 'Auto (trackpad)',
|
|
7
|
+
'action.toggle-auto-zoom': 'Auto (mouse)',
|
|
8
|
+
'action.toggle-auto-none': 'Auto',
|
|
9
|
+
'action.toggle-mouse': 'Mouse',
|
|
10
|
+
'action.toggle-trackpad': 'Trackpad',
|
|
6
11
|
'action.convert-to-bookmark': 'Convert to Bookmark',
|
|
7
12
|
'action.convert-to-embed': 'Convert to Embed',
|
|
8
13
|
'action.open-embed-link': 'Open link',
|
|
@@ -94,8 +99,8 @@ export const DEFAULT_TRANSLATION = {
|
|
|
94
99
|
'action.toggle-reduce-motion': 'Toggle reduce motion',
|
|
95
100
|
'action.toggle-keyboard-shortcuts.menu': 'Enable keyboard shortcuts',
|
|
96
101
|
'action.toggle-keyboard-shortcuts': 'Toggle keyboard shortcuts',
|
|
97
|
-
'action.
|
|
98
|
-
'action.
|
|
102
|
+
'action.enhanced-a11y-mode.menu': 'Enhanced accessibility mode',
|
|
103
|
+
'action.enhanced-a11y-mode': 'Toggle enhanced accessibility mode',
|
|
99
104
|
'action.toggle-edge-scrolling.menu': 'Edge scrolling',
|
|
100
105
|
'action.toggle-edge-scrolling': 'Toggle edge scrolling',
|
|
101
106
|
'action.toggle-debug-mode.menu': 'Debug mode',
|
|
@@ -123,6 +128,7 @@ export const DEFAULT_TRANSLATION = {
|
|
|
123
128
|
'action.zoom-to-fit': 'Zoom to fit',
|
|
124
129
|
'action.zoom-to-selection': 'Zoom to selection',
|
|
125
130
|
'assets.files.size-too-big': 'File size is too big',
|
|
131
|
+
'assets.files.maximum-size': 'Maximum file size is {size}',
|
|
126
132
|
'assets.files.type-not-allowed': 'File type is not allowed',
|
|
127
133
|
'assets.files.upload-failed': 'Upload failed',
|
|
128
134
|
'assets.files.amount-too-many': 'Too many files',
|
|
@@ -311,6 +317,7 @@ export const DEFAULT_TRANSLATION = {
|
|
|
311
317
|
'menu.language': 'Language',
|
|
312
318
|
'menu.preferences': 'Preferences',
|
|
313
319
|
'menu.view': 'View',
|
|
320
|
+
'menu.input-mode': 'Input mode',
|
|
314
321
|
'context-menu.title': 'Context menu',
|
|
315
322
|
'context-menu.edit': 'Edit',
|
|
316
323
|
'context-menu.arrange': 'Arrange',
|
|
@@ -414,6 +421,7 @@ export const DEFAULT_TRANSLATION = {
|
|
|
414
421
|
'style-panel.opacity': 'Opacity',
|
|
415
422
|
'style-panel.size': 'Size',
|
|
416
423
|
'style-panel.spline': 'Spline',
|
|
424
|
+
'style-panel.selected': 'selected',
|
|
417
425
|
'tool-panel.title': 'Tools',
|
|
418
426
|
'tool-panel.more': 'More',
|
|
419
427
|
'navigation-zone.title': 'Navigation',
|
package/src/lib/ui/version.ts
CHANGED
|
@@ -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 = '3.16.0-canary.
|
|
4
|
+
export const version = '3.16.0-canary.e618c2fbc95d'
|
|
5
5
|
export const publishDates = {
|
|
6
6
|
major: '2024-09-13T14:36:29.063Z',
|
|
7
|
-
minor: '2025-09-
|
|
8
|
-
patch: '2025-09-
|
|
7
|
+
minor: '2025-09-18T14:34:09.025Z',
|
|
8
|
+
patch: '2025-09-18T14:34:09.025Z',
|
|
9
9
|
}
|
package/src/lib/ui.css
CHANGED
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
min-height: 40px;
|
|
169
169
|
width: 100%;
|
|
170
170
|
gap: 8px;
|
|
171
|
-
margin: -4px
|
|
171
|
+
margin-top: -4px;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
.tlui-button__menu::after {
|
|
@@ -494,6 +494,10 @@
|
|
|
494
494
|
-webkit-user-select: auto !important;
|
|
495
495
|
}
|
|
496
496
|
|
|
497
|
+
.tlui-input::placeholder {
|
|
498
|
+
color: var(--tl-color-text-3);
|
|
499
|
+
}
|
|
500
|
+
|
|
497
501
|
.tlui-input__wrapper {
|
|
498
502
|
width: 100%;
|
|
499
503
|
height: 44px;
|
|
@@ -578,6 +582,12 @@
|
|
|
578
582
|
box-shadow: var(--tl-shadow-3);
|
|
579
583
|
}
|
|
580
584
|
|
|
585
|
+
@media (max-height: 600px) {
|
|
586
|
+
.tlui-menu {
|
|
587
|
+
max-height: 70vh;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
581
591
|
.tlui-menu::-webkit-scrollbar {
|
|
582
592
|
display: none;
|
|
583
593
|
}
|
|
@@ -987,7 +997,7 @@
|
|
|
987
997
|
max-width: 148px;
|
|
988
998
|
}
|
|
989
999
|
|
|
990
|
-
.tlui-style-panel[data-
|
|
1000
|
+
.tlui-style-panel[data-enhanced-a11y-mode='true'] .tlui-button[data-isactive='true'] {
|
|
991
1001
|
border-radius: 10px;
|
|
992
1002
|
outline: 2px solid var(--tl-color-text);
|
|
993
1003
|
outline-offset: -5px;
|
|
@@ -1029,6 +1039,19 @@ tldraw? probably.
|
|
|
1029
1039
|
display: none;
|
|
1030
1040
|
}
|
|
1031
1041
|
|
|
1042
|
+
/*
|
|
1043
|
+
* This is used in a couple places, like Align and Vertical Align.
|
|
1044
|
+
* It's because we have a toolbar with a Toggle Group but then an adjacent button
|
|
1045
|
+
* next to it that opens a popup.
|
|
1046
|
+
*/
|
|
1047
|
+
.tlui-style-panel__section .tlui-toolbar:has(.tlui-toolbar) {
|
|
1048
|
+
flex-wrap: wrap;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.tlui-style-panel__section .tlui-toolbar:has(.tlui-toolbar) .tlui-style-panel__subheading {
|
|
1052
|
+
margin-left: -2px;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1032
1055
|
.tlui-style-panel__section__common:not(:only-child) {
|
|
1033
1056
|
margin-bottom: 7px;
|
|
1034
1057
|
border-bottom: 1px solid var(--tl-color-divider);
|
package/src/test/TestEditor.ts
CHANGED
|
@@ -86,8 +86,14 @@ export class TestEditor extends Editor {
|
|
|
86
86
|
elm.tabIndex = 0
|
|
87
87
|
elm.getBoundingClientRect = () => bounds as DOMRect
|
|
88
88
|
|
|
89
|
-
const shapeUtilsWithDefaults = [
|
|
90
|
-
|
|
89
|
+
const shapeUtilsWithDefaults = [
|
|
90
|
+
...defaultShapeUtils.filter((s) => !options.shapeUtils?.some((su) => su.type === s.type)),
|
|
91
|
+
...(options.shapeUtils ?? []),
|
|
92
|
+
]
|
|
93
|
+
const bindingUtilsWithDefaults = [
|
|
94
|
+
...defaultBindingUtils.filter((b) => !options.bindingUtils?.some((bu) => bu.type === b.type)),
|
|
95
|
+
...(options.bindingUtils ?? []),
|
|
96
|
+
]
|
|
91
97
|
|
|
92
98
|
super({
|
|
93
99
|
...options,
|
|
@@ -12,6 +12,7 @@ beforeEach(() => {
|
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
editor.updateViewportScreenBounds(new Box(0, 0, 1600, 900))
|
|
15
|
+
editor.user.updateUserPreferences({ inputMode: null })
|
|
15
16
|
})
|
|
16
17
|
|
|
17
18
|
const wheelEvent = {
|
|
@@ -204,6 +205,18 @@ describe('CameraOptions.wheelBehavior', () => {
|
|
|
204
205
|
.forceTick()
|
|
205
206
|
expect(editor.getCamera()).toMatchObject({ x: 0, y: 5, z: 1 })
|
|
206
207
|
})
|
|
208
|
+
|
|
209
|
+
it('When input mode is set, camera wheel behavior is ignored', () => {
|
|
210
|
+
editor.user.updateUserPreferences({ inputMode: 'trackpad' })
|
|
211
|
+
editor
|
|
212
|
+
.setCameraOptions({ ...DEFAULT_CAMERA_OPTIONS, wheelBehavior: 'zoom' })
|
|
213
|
+
.dispatch({
|
|
214
|
+
...wheelEvent,
|
|
215
|
+
delta: new Vec(0, 5, 0.01),
|
|
216
|
+
})
|
|
217
|
+
.forceTick()
|
|
218
|
+
expect(editor.getCamera()).toMatchObject({ x: 0, y: 5, z: 1 })
|
|
219
|
+
})
|
|
207
220
|
})
|
|
208
221
|
|
|
209
222
|
describe('CameraOptions.panSpeed', () => {
|
package/src/test/frames.test.ts
CHANGED
|
@@ -1680,3 +1680,18 @@ it('drops into the top-most frame, if there is one', () => {
|
|
|
1680
1680
|
|
|
1681
1681
|
expect(editor.getShape(rect)?.parentId).toBe(editor.getCurrentPageId())
|
|
1682
1682
|
})
|
|
1683
|
+
|
|
1684
|
+
it('does not get drop children of nested frame if they are occluded from the outer frame', () => {
|
|
1685
|
+
const frame1Id = dragCreateFrame({ down: [100, 100], move: [300, 300], up: [300, 300] })
|
|
1686
|
+
const frame2Id = dragCreateFrame({ down: [150, 150], move: [290, 290], up: [290, 290] })
|
|
1687
|
+
|
|
1688
|
+
const rect1 = createRect({ pos: [280, 160], size: [10, 30] })
|
|
1689
|
+
|
|
1690
|
+
expect(editor.getShape(rect1)?.parentId).toBe(frame2Id)
|
|
1691
|
+
expect(editor.getShape(frame2Id)?.parentId).toBe(frame1Id)
|
|
1692
|
+
|
|
1693
|
+
editor.select(frame2Id)
|
|
1694
|
+
editor.translateSelection(30, 0)
|
|
1695
|
+
|
|
1696
|
+
expect(editor.getShape(rect1)?.parentId).toBe(frame2Id)
|
|
1697
|
+
})
|
package/tldraw.css
CHANGED
|
@@ -1964,7 +1964,7 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1964
1964
|
min-height: 40px;
|
|
1965
1965
|
width: 100%;
|
|
1966
1966
|
gap: 8px;
|
|
1967
|
-
margin: -4px
|
|
1967
|
+
margin-top: -4px;
|
|
1968
1968
|
}
|
|
1969
1969
|
|
|
1970
1970
|
.tlui-button__menu::after {
|
|
@@ -2290,6 +2290,10 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2290
2290
|
-webkit-user-select: auto !important;
|
|
2291
2291
|
}
|
|
2292
2292
|
|
|
2293
|
+
.tlui-input::placeholder {
|
|
2294
|
+
color: var(--tl-color-text-3);
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2293
2297
|
.tlui-input__wrapper {
|
|
2294
2298
|
width: 100%;
|
|
2295
2299
|
height: 44px;
|
|
@@ -2374,6 +2378,12 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2374
2378
|
box-shadow: var(--tl-shadow-3);
|
|
2375
2379
|
}
|
|
2376
2380
|
|
|
2381
|
+
@media (max-height: 600px) {
|
|
2382
|
+
.tlui-menu {
|
|
2383
|
+
max-height: 70vh;
|
|
2384
|
+
}
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2377
2387
|
.tlui-menu::-webkit-scrollbar {
|
|
2378
2388
|
display: none;
|
|
2379
2389
|
}
|
|
@@ -2783,7 +2793,7 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2783
2793
|
max-width: 148px;
|
|
2784
2794
|
}
|
|
2785
2795
|
|
|
2786
|
-
.tlui-style-panel[data-
|
|
2796
|
+
.tlui-style-panel[data-enhanced-a11y-mode='true'] .tlui-button[data-isactive='true'] {
|
|
2787
2797
|
border-radius: 10px;
|
|
2788
2798
|
outline: 2px solid var(--tl-color-text);
|
|
2789
2799
|
outline-offset: -5px;
|
|
@@ -2825,6 +2835,19 @@ tldraw? probably.
|
|
|
2825
2835
|
display: none;
|
|
2826
2836
|
}
|
|
2827
2837
|
|
|
2838
|
+
/*
|
|
2839
|
+
* This is used in a couple places, like Align and Vertical Align.
|
|
2840
|
+
* It's because we have a toolbar with a Toggle Group but then an adjacent button
|
|
2841
|
+
* next to it that opens a popup.
|
|
2842
|
+
*/
|
|
2843
|
+
.tlui-style-panel__section .tlui-toolbar:has(.tlui-toolbar) {
|
|
2844
|
+
flex-wrap: wrap;
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
.tlui-style-panel__section .tlui-toolbar:has(.tlui-toolbar) .tlui-style-panel__subheading {
|
|
2848
|
+
margin-left: -2px;
|
|
2849
|
+
}
|
|
2850
|
+
|
|
2828
2851
|
.tlui-style-panel__section__common:not(:only-child) {
|
|
2829
2852
|
margin-bottom: 7px;
|
|
2830
2853
|
border-bottom: 1px solid var(--tl-color-divider);
|