@tldraw/editor 3.15.0-canary.db14db4f5395 → 3.15.0-canary.e3f6387b7e04
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 +49 -41
- package/dist-cjs/index.js +18 -16
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/config/TLUserPreferences.js +7 -1
- package/dist-cjs/lib/config/TLUserPreferences.js.map +2 -2
- package/dist-cjs/lib/editor/Editor.js +20 -2
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/managers/TextManager/TextManager.js +96 -101
- package/dist-cjs/lib/editor/managers/TextManager/TextManager.js.map +2 -2
- package/dist-cjs/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.js +7 -2
- package/dist-cjs/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/Arc2d.js +1 -1
- package/dist-cjs/lib/primitives/geometry/Arc2d.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/Circle2d.js +1 -1
- package/dist-cjs/lib/primitives/geometry/Circle2d.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/CubicBezier2d.js +3 -1
- package/dist-cjs/lib/primitives/geometry/CubicBezier2d.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/Ellipse2d.js +1 -1
- package/dist-cjs/lib/primitives/geometry/Ellipse2d.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/geometry-constants.js +2 -2
- package/dist-cjs/lib/primitives/geometry/geometry-constants.js.map +2 -2
- package/dist-cjs/lib/primitives/intersect.js +4 -4
- package/dist-cjs/lib/primitives/intersect.js.map +2 -2
- package/dist-cjs/lib/primitives/utils.js +4 -0
- package/dist-cjs/lib/primitives/utils.js.map +2 -2
- package/dist-cjs/lib/utils/sync/TLLocalSyncClient.js +0 -1
- package/dist-cjs/lib/utils/sync/TLLocalSyncClient.js.map +2 -2
- package/dist-cjs/version.js +3 -3
- package/dist-cjs/version.js.map +1 -1
- package/dist-esm/index.d.mts +49 -41
- package/dist-esm/index.mjs +43 -41
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/config/TLUserPreferences.mjs +7 -1
- package/dist-esm/lib/config/TLUserPreferences.mjs.map +2 -2
- package/dist-esm/lib/editor/Editor.mjs +20 -2
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/TextManager/TextManager.mjs +96 -101
- package/dist-esm/lib/editor/managers/TextManager/TextManager.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.mjs +7 -2
- package/dist-esm/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/Arc2d.mjs +2 -2
- package/dist-esm/lib/primitives/geometry/Arc2d.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/Circle2d.mjs +2 -2
- package/dist-esm/lib/primitives/geometry/Circle2d.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/CubicBezier2d.mjs +3 -1
- package/dist-esm/lib/primitives/geometry/CubicBezier2d.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/Ellipse2d.mjs +2 -2
- package/dist-esm/lib/primitives/geometry/Ellipse2d.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/geometry-constants.mjs +2 -2
- package/dist-esm/lib/primitives/geometry/geometry-constants.mjs.map +2 -2
- package/dist-esm/lib/primitives/intersect.mjs +5 -5
- package/dist-esm/lib/primitives/intersect.mjs.map +2 -2
- package/dist-esm/lib/primitives/utils.mjs +4 -0
- package/dist-esm/lib/primitives/utils.mjs.map +2 -2
- package/dist-esm/lib/utils/sync/TLLocalSyncClient.mjs +0 -1
- package/dist-esm/lib/utils/sync/TLLocalSyncClient.mjs.map +2 -2
- package/dist-esm/version.mjs +3 -3
- package/dist-esm/version.mjs.map +1 -1
- package/package.json +7 -7
- package/src/index.ts +63 -62
- package/src/lib/config/TLUserPreferences.ts +7 -0
- package/src/lib/editor/Editor.test.ts +407 -0
- package/src/lib/editor/Editor.ts +29 -4
- package/src/lib/editor/managers/TextManager/TextManager.ts +108 -128
- package/src/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.test.ts +21 -0
- package/src/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.ts +8 -0
- package/src/lib/license/LicenseManager.test.ts +1 -1
- package/src/lib/primitives/geometry/Arc2d.ts +2 -2
- package/src/lib/primitives/geometry/Circle2d.ts +2 -2
- package/src/lib/primitives/geometry/CubicBezier2d.ts +4 -1
- package/src/lib/primitives/geometry/Ellipse2d.ts +2 -2
- package/src/lib/primitives/geometry/geometry-constants.ts +2 -1
- package/src/lib/primitives/intersect.test.ts +946 -0
- package/src/lib/primitives/intersect.ts +12 -5
- package/src/lib/primitives/utils.ts +11 -0
- package/src/lib/utils/sync/TLLocalSyncClient.ts +0 -1
- package/src/version.ts +3 -3
package/src/index.ts
CHANGED
|
@@ -18,27 +18,6 @@ export * from '@tldraw/utils'
|
|
|
18
18
|
// eslint-disable-next-line local/no-export-star
|
|
19
19
|
export * from '@tldraw/validate'
|
|
20
20
|
|
|
21
|
-
export {
|
|
22
|
-
ErrorScreen,
|
|
23
|
-
LoadingScreen,
|
|
24
|
-
TldrawEditor,
|
|
25
|
-
useOnMount,
|
|
26
|
-
type LoadingScreenProps,
|
|
27
|
-
type TLOnMountHandler,
|
|
28
|
-
type TldrawEditorBaseProps,
|
|
29
|
-
type TldrawEditorProps,
|
|
30
|
-
type TldrawEditorStoreProps,
|
|
31
|
-
type TldrawEditorWithStoreProps,
|
|
32
|
-
type TldrawEditorWithoutStoreProps,
|
|
33
|
-
} from './lib/TldrawEditor'
|
|
34
|
-
export {
|
|
35
|
-
ErrorBoundary,
|
|
36
|
-
OptionalErrorBoundary,
|
|
37
|
-
type TLErrorBoundaryProps,
|
|
38
|
-
} from './lib/components/ErrorBoundary'
|
|
39
|
-
export { HTMLContainer, type HTMLContainerProps } from './lib/components/HTMLContainer'
|
|
40
|
-
export { MenuClickCapture } from './lib/components/MenuClickCapture'
|
|
41
|
-
export { SVGContainer, type SVGContainerProps } from './lib/components/SVGContainer'
|
|
42
21
|
export { DefaultBackground } from './lib/components/default-components/DefaultBackground'
|
|
43
22
|
export { DefaultBrush, type TLBrushProps } from './lib/components/default-components/DefaultBrush'
|
|
44
23
|
export {
|
|
@@ -94,6 +73,26 @@ export {
|
|
|
94
73
|
} from './lib/components/default-components/DefaultSnapIndictor'
|
|
95
74
|
export { DefaultSpinner } from './lib/components/default-components/DefaultSpinner'
|
|
96
75
|
export { DefaultSvgDefs } from './lib/components/default-components/DefaultSvgDefs'
|
|
76
|
+
export {
|
|
77
|
+
ErrorBoundary,
|
|
78
|
+
OptionalErrorBoundary,
|
|
79
|
+
type TLErrorBoundaryProps,
|
|
80
|
+
} from './lib/components/ErrorBoundary'
|
|
81
|
+
export { HTMLContainer, type HTMLContainerProps } from './lib/components/HTMLContainer'
|
|
82
|
+
export { MenuClickCapture } from './lib/components/MenuClickCapture'
|
|
83
|
+
export { SVGContainer, type SVGContainerProps } from './lib/components/SVGContainer'
|
|
84
|
+
export {
|
|
85
|
+
createTLSchemaFromUtils,
|
|
86
|
+
createTLStore,
|
|
87
|
+
inlineBase64AssetStore,
|
|
88
|
+
type TLStoreBaseOptions,
|
|
89
|
+
type TLStoreEventInfo,
|
|
90
|
+
type TLStoreOptions,
|
|
91
|
+
type TLStoreSchemaOptions,
|
|
92
|
+
} from './lib/config/createTLStore'
|
|
93
|
+
export { createTLUser, useTldrawUser, type TLUser } from './lib/config/createTLUser'
|
|
94
|
+
export { type TLAnyBindingUtilConstructor } from './lib/config/defaultBindings'
|
|
95
|
+
export { coreShapes, type TLAnyShapeUtilConstructor } from './lib/config/defaultShapes'
|
|
97
96
|
export {
|
|
98
97
|
getSnapshot,
|
|
99
98
|
loadSnapshot,
|
|
@@ -101,42 +100,23 @@ export {
|
|
|
101
100
|
type TLLoadSnapshotOptions,
|
|
102
101
|
} from './lib/config/TLEditorSnapshot'
|
|
103
102
|
export {
|
|
104
|
-
TAB_ID,
|
|
105
103
|
createSessionStateSnapshotSignal,
|
|
106
104
|
extractSessionStateFromLegacySnapshot,
|
|
107
105
|
loadSessionStateSnapshotIntoStore,
|
|
106
|
+
TAB_ID,
|
|
108
107
|
type TLLoadSessionStateSnapshotOptions,
|
|
109
108
|
type TLSessionStateSnapshot,
|
|
110
109
|
} from './lib/config/TLSessionStateSnapshot'
|
|
111
110
|
export {
|
|
112
|
-
USER_COLORS,
|
|
113
111
|
defaultUserPreferences,
|
|
114
112
|
getFreshUserPreferences,
|
|
115
113
|
getUserPreferences,
|
|
116
114
|
setUserPreferences,
|
|
115
|
+
USER_COLORS,
|
|
117
116
|
userTypeValidator,
|
|
118
117
|
type TLUserPreferences,
|
|
119
118
|
} from './lib/config/TLUserPreferences'
|
|
120
|
-
export {
|
|
121
|
-
createTLSchemaFromUtils,
|
|
122
|
-
createTLStore,
|
|
123
|
-
inlineBase64AssetStore,
|
|
124
|
-
type TLStoreBaseOptions,
|
|
125
|
-
type TLStoreEventInfo,
|
|
126
|
-
type TLStoreOptions,
|
|
127
|
-
type TLStoreSchemaOptions,
|
|
128
|
-
} from './lib/config/createTLStore'
|
|
129
|
-
export { createTLUser, useTldrawUser, type TLUser } from './lib/config/createTLUser'
|
|
130
|
-
export { type TLAnyBindingUtilConstructor } from './lib/config/defaultBindings'
|
|
131
|
-
export { coreShapes, type TLAnyShapeUtilConstructor } from './lib/config/defaultShapes'
|
|
132
119
|
export { DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS, SIDES } from './lib/constants'
|
|
133
|
-
export {
|
|
134
|
-
Editor,
|
|
135
|
-
type TLEditorOptions,
|
|
136
|
-
type TLEditorRunOptions,
|
|
137
|
-
type TLRenderingShape,
|
|
138
|
-
type TLResizeShapeOptions,
|
|
139
|
-
} from './lib/editor/Editor'
|
|
140
120
|
export {
|
|
141
121
|
BindingUtil,
|
|
142
122
|
type BindingOnChangeOptions,
|
|
@@ -147,6 +127,13 @@ export {
|
|
|
147
127
|
type BindingOnShapeIsolateOptions,
|
|
148
128
|
type TLBindingUtilConstructor,
|
|
149
129
|
} from './lib/editor/bindings/BindingUtil'
|
|
130
|
+
export {
|
|
131
|
+
Editor,
|
|
132
|
+
type TLEditorOptions,
|
|
133
|
+
type TLEditorRunOptions,
|
|
134
|
+
type TLRenderingShape,
|
|
135
|
+
type TLResizeShapeOptions,
|
|
136
|
+
} from './lib/editor/Editor'
|
|
150
137
|
export { ClickManager, type TLClickState } from './lib/editor/managers/ClickManager/ClickManager'
|
|
151
138
|
export { EdgeScrollManager } from './lib/editor/managers/EdgeScrollManager/EdgeScrollManager'
|
|
152
139
|
export {
|
|
@@ -179,6 +166,7 @@ export {
|
|
|
179
166
|
} from './lib/editor/managers/TextManager/TextManager'
|
|
180
167
|
export { UserPreferencesManager } from './lib/editor/managers/UserPreferencesManager/UserPreferencesManager'
|
|
181
168
|
export { BaseBoxShapeUtil, type TLBaseBoxShape } from './lib/editor/shapes/BaseBoxShapeUtil'
|
|
169
|
+
export { GroupShapeUtil } from './lib/editor/shapes/group/GroupShapeUtil'
|
|
182
170
|
export {
|
|
183
171
|
ShapeUtil,
|
|
184
172
|
type TLCropInfo,
|
|
@@ -195,7 +183,6 @@ export {
|
|
|
195
183
|
type TLShapeUtilCanvasSvgDef,
|
|
196
184
|
type TLShapeUtilConstructor,
|
|
197
185
|
} from './lib/editor/shapes/ShapeUtil'
|
|
198
|
-
export { GroupShapeUtil } from './lib/editor/shapes/group/GroupShapeUtil'
|
|
199
186
|
export {
|
|
200
187
|
getPerfectDashProps,
|
|
201
188
|
type PerfectDashTerminal,
|
|
@@ -205,22 +192,16 @@ export { resizeScaled } from './lib/editor/shapes/shared/resizeScaled'
|
|
|
205
192
|
export { BaseBoxShapeTool } from './lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool'
|
|
206
193
|
export { maybeSnapToGrid } from './lib/editor/tools/BaseBoxShapeTool/children/Pointing'
|
|
207
194
|
export { StateNode, type TLStateNodeConstructor } from './lib/editor/tools/StateNode'
|
|
208
|
-
export {
|
|
209
|
-
useDelaySvgExport,
|
|
210
|
-
useSvgExportContext,
|
|
211
|
-
type SvgExportContext,
|
|
212
|
-
type SvgExportDef,
|
|
213
|
-
} from './lib/editor/types/SvgExportContext'
|
|
214
195
|
export { type TLContent } from './lib/editor/types/clipboard-types'
|
|
215
196
|
export { type TLEventMap, type TLEventMapHandler } from './lib/editor/types/emit-types'
|
|
216
197
|
export {
|
|
217
198
|
EVENT_NAME_MAP,
|
|
218
199
|
type TLBaseEventInfo,
|
|
219
|
-
type TLCLickEventName,
|
|
220
200
|
type TLCancelEvent,
|
|
221
201
|
type TLCancelEventInfo,
|
|
222
202
|
type TLClickEvent,
|
|
223
203
|
type TLClickEventInfo,
|
|
204
|
+
type TLCLickEventName,
|
|
224
205
|
type TLCompleteEvent,
|
|
225
206
|
type TLCompleteEventInfo,
|
|
226
207
|
type TLEnterEventHandler,
|
|
@@ -289,6 +270,12 @@ export {
|
|
|
289
270
|
type TLResizeHandle,
|
|
290
271
|
type TLSelectionHandle,
|
|
291
272
|
} from './lib/editor/types/selection-types'
|
|
273
|
+
export {
|
|
274
|
+
useDelaySvgExport,
|
|
275
|
+
useSvgExportContext,
|
|
276
|
+
type SvgExportContext,
|
|
277
|
+
type SvgExportDef,
|
|
278
|
+
} from './lib/editor/types/SvgExportContext'
|
|
292
279
|
export { getSvgAsImage } from './lib/exports/getSvgAsImage'
|
|
293
280
|
export { tlenv } from './lib/globals/environment'
|
|
294
281
|
export { tlmenus } from './lib/globals/menus'
|
|
@@ -352,8 +339,6 @@ export {
|
|
|
352
339
|
type SelectionEdge,
|
|
353
340
|
type SelectionHandle,
|
|
354
341
|
} from './lib/primitives/Box'
|
|
355
|
-
export { Mat, type MatLike, type MatModel } from './lib/primitives/Mat'
|
|
356
|
-
export { Vec, type VecLike } from './lib/primitives/Vec'
|
|
357
342
|
export { EASINGS } from './lib/primitives/easings'
|
|
358
343
|
export { Arc2d } from './lib/primitives/geometry/Arc2d'
|
|
359
344
|
export { Circle2d } from './lib/primitives/geometry/Circle2d'
|
|
@@ -361,6 +346,7 @@ export { CubicBezier2d } from './lib/primitives/geometry/CubicBezier2d'
|
|
|
361
346
|
export { CubicSpline2d } from './lib/primitives/geometry/CubicSpline2d'
|
|
362
347
|
export { Edge2d } from './lib/primitives/geometry/Edge2d'
|
|
363
348
|
export { Ellipse2d } from './lib/primitives/geometry/Ellipse2d'
|
|
349
|
+
export { getVerticesCountForArcLength } from './lib/primitives/geometry/geometry-constants'
|
|
364
350
|
export {
|
|
365
351
|
Geometry2d,
|
|
366
352
|
Geometry2dFilters,
|
|
@@ -388,11 +374,8 @@ export {
|
|
|
388
374
|
polygonIntersectsPolyline,
|
|
389
375
|
polygonsIntersect,
|
|
390
376
|
} from './lib/primitives/intersect'
|
|
377
|
+
export { Mat, type MatLike, type MatModel } from './lib/primitives/Mat'
|
|
391
378
|
export {
|
|
392
|
-
HALF_PI,
|
|
393
|
-
PI,
|
|
394
|
-
PI2,
|
|
395
|
-
SIN,
|
|
396
379
|
angleDistance,
|
|
397
380
|
approximately,
|
|
398
381
|
areAnglesCompatible,
|
|
@@ -409,23 +392,36 @@ export {
|
|
|
409
392
|
getPointOnCircle,
|
|
410
393
|
getPointsOnArc,
|
|
411
394
|
getPolygonVertices,
|
|
395
|
+
HALF_PI,
|
|
412
396
|
isSafeFloat,
|
|
413
397
|
perimeterOfEllipse,
|
|
398
|
+
PI,
|
|
399
|
+
PI2,
|
|
414
400
|
pointInPolygon,
|
|
415
401
|
precise,
|
|
416
402
|
radiansToDegrees,
|
|
417
403
|
rangeIntersection,
|
|
418
404
|
shortAngleDist,
|
|
405
|
+
SIN,
|
|
419
406
|
snapAngle,
|
|
420
407
|
toDomPrecision,
|
|
421
408
|
toFixed,
|
|
422
409
|
toPrecision,
|
|
423
410
|
} from './lib/primitives/utils'
|
|
411
|
+
export { Vec, type VecLike } from './lib/primitives/Vec'
|
|
424
412
|
export {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
413
|
+
ErrorScreen,
|
|
414
|
+
LoadingScreen,
|
|
415
|
+
TldrawEditor,
|
|
416
|
+
useOnMount,
|
|
417
|
+
type LoadingScreenProps,
|
|
418
|
+
type TldrawEditorBaseProps,
|
|
419
|
+
type TldrawEditorProps,
|
|
420
|
+
type TldrawEditorStoreProps,
|
|
421
|
+
type TldrawEditorWithoutStoreProps,
|
|
422
|
+
type TldrawEditorWithStoreProps,
|
|
423
|
+
type TLOnMountHandler,
|
|
424
|
+
} from './lib/TldrawEditor'
|
|
429
425
|
export { dataUrlToFile, getDefaultCdnBaseUrl } from './lib/utils/assets'
|
|
430
426
|
export { clampToBrowserMaxCanvasSize, type CanvasMaxSize } from './lib/utils/browserCanvasMaxSize'
|
|
431
427
|
export {
|
|
@@ -461,9 +457,9 @@ export {
|
|
|
461
457
|
getFontsFromRichText,
|
|
462
458
|
type RichTextFontVisitor,
|
|
463
459
|
type RichTextFontVisitorState,
|
|
464
|
-
type TLTextOptions,
|
|
465
460
|
type TiptapEditor,
|
|
466
461
|
type TiptapNode,
|
|
462
|
+
type TLTextOptions,
|
|
467
463
|
} from './lib/utils/richText'
|
|
468
464
|
export {
|
|
469
465
|
applyRotationToSnapshotShapes,
|
|
@@ -471,9 +467,14 @@ export {
|
|
|
471
467
|
type TLRotationSnapshot,
|
|
472
468
|
} from './lib/utils/rotation'
|
|
473
469
|
export { runtime, setRuntimeOverrides } from './lib/utils/runtime'
|
|
470
|
+
export {
|
|
471
|
+
ReadonlySharedStyleMap,
|
|
472
|
+
SharedStyleMap,
|
|
473
|
+
type SharedStyle,
|
|
474
|
+
} from './lib/utils/SharedStylesMap'
|
|
475
|
+
export { hardReset } from './lib/utils/sync/hardReset'
|
|
474
476
|
export { LocalIndexedDb, Table, type StoreName } from './lib/utils/sync/LocalIndexedDb'
|
|
475
477
|
export { type TLStoreWithStatus } from './lib/utils/sync/StoreWithStatus'
|
|
476
|
-
export { hardReset } from './lib/utils/sync/hardReset'
|
|
477
478
|
export { uniq } from './lib/utils/uniq'
|
|
478
479
|
export { openWindow } from './lib/utils/window-open'
|
|
479
480
|
|
|
@@ -17,6 +17,7 @@ export interface TLUserPreferences {
|
|
|
17
17
|
// N.B. These are duplicated in TLdrawAppUser.
|
|
18
18
|
locale?: string | null
|
|
19
19
|
animationSpeed?: number | null
|
|
20
|
+
areKeyboardShortcutsEnabled?: boolean | null
|
|
20
21
|
edgeScrollSpeed?: number | null
|
|
21
22
|
colorScheme?: 'light' | 'dark' | 'system'
|
|
22
23
|
isSnapMode?: boolean | null
|
|
@@ -44,6 +45,7 @@ export const userTypeValidator: T.Validator<TLUserPreferences> = T.object<TLUser
|
|
|
44
45
|
// N.B. These are duplicated in TLdrawAppUser.
|
|
45
46
|
locale: T.string.nullable().optional(),
|
|
46
47
|
animationSpeed: T.number.nullable().optional(),
|
|
48
|
+
areKeyboardShortcutsEnabled: T.boolean.nullable().optional(),
|
|
47
49
|
edgeScrollSpeed: T.number.nullable().optional(),
|
|
48
50
|
colorScheme: T.literalEnum('light', 'dark', 'system').optional(),
|
|
49
51
|
isSnapMode: T.boolean.nullable().optional(),
|
|
@@ -61,6 +63,7 @@ const Versions = {
|
|
|
61
63
|
AddDynamicSizeMode: 6,
|
|
62
64
|
AllowSystemColorScheme: 7,
|
|
63
65
|
AddPasteAtCursor: 8,
|
|
66
|
+
AddKeyboardShortcuts: 9,
|
|
64
67
|
} as const
|
|
65
68
|
|
|
66
69
|
const CURRENT_VERSION = Math.max(...Object.values(Versions))
|
|
@@ -96,6 +99,9 @@ function migrateSnapshot(data: { version: number; user: any }) {
|
|
|
96
99
|
if (data.version < Versions.AddPasteAtCursor) {
|
|
97
100
|
data.user.isPasteAtCursorMode = false
|
|
98
101
|
}
|
|
102
|
+
if (data.version < Versions.AddKeyboardShortcuts) {
|
|
103
|
+
data.user.areKeyboardShortcutsEnabled = true
|
|
104
|
+
}
|
|
99
105
|
|
|
100
106
|
// finally
|
|
101
107
|
data.version = CURRENT_VERSION
|
|
@@ -139,6 +145,7 @@ export const defaultUserPreferences = Object.freeze({
|
|
|
139
145
|
// N.B. These are duplicated in TLdrawAppUser.
|
|
140
146
|
edgeScrollSpeed: 1,
|
|
141
147
|
animationSpeed: userPrefersReducedMotion() ? 0 : 1,
|
|
148
|
+
areKeyboardShortcutsEnabled: true,
|
|
142
149
|
isSnapMode: false,
|
|
143
150
|
isWrapMode: false,
|
|
144
151
|
isDynamicSizeMode: false,
|