tldraw 3.16.0-canary.c349490eaef0 → 3.16.0-canary.c360426d8b7a
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 +2 -6
- package/dist-cjs/index.js +1 -1
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +1 -1
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js +2 -8
- package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +1 -1
- package/dist-cjs/lib/shapes/shared/HyperlinkButton.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/useEditablePlainText.js +3 -2
- package/dist-cjs/lib/shapes/shared/useEditablePlainText.js.map +2 -2
- package/dist-cjs/lib/shapes/text/PlainTextArea.js +1 -2
- package/dist-cjs/lib/shapes/text/PlainTextArea.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/Minimap/DefaultMinimap.js +1 -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/primitives/TldrawUiContextualToolbar.js +1 -1
- package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.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/hooks/useClipboardEvents.js +1 -1
- package/dist-cjs/lib/ui/hooks/useClipboardEvents.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 +2 -6
- package/dist-esm/index.mjs +1 -1
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +2 -1
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs +3 -9
- package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs +2 -2
- package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs +4 -2
- package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs.map +2 -2
- package/dist-esm/lib/shapes/text/PlainTextArea.mjs +2 -3
- package/dist-esm/lib/shapes/text/PlainTextArea.mjs.map +2 -2
- package/dist-esm/lib/ui/components/A11y.mjs +2 -1
- package/dist-esm/lib/ui/components/A11y.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs +1 -1
- package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs.map +2 -2
- package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs +2 -1
- package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +2 -1
- package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.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/hooks/useClipboardEvents.mjs +2 -1
- package/dist-esm/lib/ui/hooks/useClipboardEvents.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/lib/shapes/bookmark/BookmarkShapeUtil.tsx +2 -1
- package/src/lib/shapes/frame/components/FrameLabelInput.tsx +3 -10
- package/src/lib/shapes/shared/HyperlinkButton.tsx +2 -2
- package/src/lib/shapes/shared/useEditablePlainText.ts +5 -2
- package/src/lib/shapes/text/PlainTextArea.tsx +2 -3
- package/src/lib/ui/components/A11y.tsx +2 -1
- package/src/lib/ui/components/Minimap/DefaultMinimap.tsx +1 -1
- package/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx +2 -1
- package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +2 -1
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +3 -3
- package/src/lib/ui/hooks/useClipboardEvents.ts +2 -1
- package/src/lib/ui/version.ts +3 -3
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
TLShapeId,
|
|
4
4
|
TLUnknownShape,
|
|
5
5
|
getPointerInfo,
|
|
6
|
+
markEventAsHandled,
|
|
6
7
|
noop,
|
|
7
8
|
preventDefault,
|
|
8
9
|
tlenv,
|
|
@@ -128,7 +129,7 @@ export function useEditableTextCommon(shapeId: TLShapeId) {
|
|
|
128
129
|
// partially if we didn't dispatch/stop below.
|
|
129
130
|
|
|
130
131
|
editor.dispatch({
|
|
131
|
-
...getPointerInfo(
|
|
132
|
+
...getPointerInfo(e),
|
|
132
133
|
type: 'pointer',
|
|
133
134
|
name: 'pointer_down',
|
|
134
135
|
target: 'shape',
|
|
@@ -156,11 +157,13 @@ export function useEditableTextCommon(shapeId: TLShapeId) {
|
|
|
156
157
|
[editor, shapeId]
|
|
157
158
|
)
|
|
158
159
|
|
|
160
|
+
const handleDoubleClick: (e: React.MouseEvent) => void = markEventAsHandled
|
|
161
|
+
|
|
159
162
|
return {
|
|
160
163
|
handleFocus: noop,
|
|
161
164
|
handleBlur: noop,
|
|
162
165
|
handleInputPointerDown,
|
|
163
|
-
handleDoubleClick
|
|
166
|
+
handleDoubleClick,
|
|
164
167
|
handlePaste,
|
|
165
168
|
isEditing,
|
|
166
169
|
isReadyForEditing,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { markEventAsHandled, preventDefault } from '@tldraw/editor'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { TextAreaProps } from './RichTextArea'
|
|
4
4
|
|
|
@@ -21,7 +21,6 @@ export const PlainTextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps
|
|
|
21
21
|
},
|
|
22
22
|
ref
|
|
23
23
|
) {
|
|
24
|
-
const editor = useEditor()
|
|
25
24
|
const onChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
|
|
26
25
|
handleChange({ plaintext: e.target.value })
|
|
27
26
|
}
|
|
@@ -47,7 +46,7 @@ export const PlainTextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps
|
|
|
47
46
|
onChange={onChange}
|
|
48
47
|
onKeyDown={(e) => handleKeyDown(e.nativeEvent)}
|
|
49
48
|
onBlur={handleBlur}
|
|
50
|
-
onTouchEnd={
|
|
49
|
+
onTouchEnd={markEventAsHandled}
|
|
51
50
|
onContextMenu={isEditing ? (e) => e.stopPropagation() : undefined}
|
|
52
51
|
onPointerDown={handleInputPointerDown}
|
|
53
52
|
onPaste={handlePaste}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
debugFlags,
|
|
3
3
|
Editor,
|
|
4
|
+
markEventAsHandled,
|
|
4
5
|
TLGeoShape,
|
|
5
6
|
TLShapeId,
|
|
6
7
|
unsafe__withoutCapture,
|
|
@@ -22,7 +23,7 @@ export function SkipToMainContent() {
|
|
|
22
23
|
|
|
23
24
|
const handleNavigateToFirstShape = useCallback(
|
|
24
25
|
(e: MouseEvent | KeyboardEvent) => {
|
|
25
|
-
|
|
26
|
+
markEventAsHandled(e)
|
|
26
27
|
button.current?.blur()
|
|
27
28
|
const shapes = editor.getCurrentPageShapesInReadingOrder()
|
|
28
29
|
if (!shapes.length) return
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PageRecordType,
|
|
3
3
|
TLPageId,
|
|
4
|
+
markEventAsHandled,
|
|
4
5
|
releasePointerCapture,
|
|
5
6
|
setPointerCapture,
|
|
6
7
|
tlenv,
|
|
@@ -450,7 +451,7 @@ export const DefaultPageMenu = memo(function DefaultPageMenu() {
|
|
|
450
451
|
if (e.key === 'Enter') {
|
|
451
452
|
if (page.id === currentPage.id) {
|
|
452
453
|
toggleEditing()
|
|
453
|
-
|
|
454
|
+
markEventAsHandled(e)
|
|
454
455
|
}
|
|
455
456
|
}
|
|
456
457
|
}}
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
Box,
|
|
4
4
|
clamp,
|
|
5
5
|
Editor,
|
|
6
|
+
markEventAsHandled,
|
|
6
7
|
react,
|
|
7
8
|
useAtom,
|
|
8
9
|
useEditor,
|
|
@@ -169,7 +170,7 @@ export const TldrawUiContextualToolbar = ({
|
|
|
169
170
|
data-visible={false}
|
|
170
171
|
data-testid="contextual-toolbar"
|
|
171
172
|
className={classNames('tlui-contextual-toolbar', className)}
|
|
172
|
-
onPointerDown={
|
|
173
|
+
onPointerDown={markEventAsHandled}
|
|
173
174
|
>
|
|
174
175
|
<TldrawUiToolbar
|
|
175
176
|
orientation="horizontal"
|
|
@@ -333,7 +333,7 @@ function useDraggableEvents(
|
|
|
333
333
|
type: 'pointer',
|
|
334
334
|
target: 'canvas',
|
|
335
335
|
name: 'pointer_down',
|
|
336
|
-
...getPointerInfo(
|
|
336
|
+
...getPointerInfo(e),
|
|
337
337
|
point: screenSpaceStart,
|
|
338
338
|
})
|
|
339
339
|
|
|
@@ -345,7 +345,7 @@ function useDraggableEvents(
|
|
|
345
345
|
type: 'pointer',
|
|
346
346
|
target: 'canvas',
|
|
347
347
|
name: 'pointer_move',
|
|
348
|
-
...getPointerInfo(
|
|
348
|
+
...getPointerInfo(e),
|
|
349
349
|
point: screenSpaceStart,
|
|
350
350
|
})
|
|
351
351
|
|
|
@@ -365,7 +365,7 @@ function useDraggableEvents(
|
|
|
365
365
|
type: 'pointer',
|
|
366
366
|
target: 'canvas',
|
|
367
367
|
name: 'pointer_up',
|
|
368
|
-
...getPointerInfo(
|
|
368
|
+
...getPointerInfo(e),
|
|
369
369
|
})
|
|
370
370
|
}
|
|
371
371
|
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
assert,
|
|
8
8
|
compact,
|
|
9
9
|
isDefined,
|
|
10
|
+
markEventAsHandled,
|
|
10
11
|
preventDefault,
|
|
11
12
|
uniq,
|
|
12
13
|
useEditor,
|
|
@@ -762,7 +763,7 @@ export function useNativeClipboardEvents() {
|
|
|
762
763
|
|
|
763
764
|
const paste = (e: ClipboardEvent) => {
|
|
764
765
|
if (disablingMiddleClickPaste) {
|
|
765
|
-
|
|
766
|
+
markEventAsHandled(e)
|
|
766
767
|
return
|
|
767
768
|
}
|
|
768
769
|
|
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.c360426d8b7a'
|
|
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-17T15:16:03.696Z',
|
|
8
|
+
patch: '2025-09-17T15:16:03.696Z',
|
|
9
9
|
}
|