@tldraw/editor 5.3.2 → 5.4.0-canary.042da660fa66
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 +94 -52
- package/dist-cjs/index.js +3 -1
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/editor/Editor.js +86 -26
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/derivations/shapeIdsInCurrentPage.js +7 -3
- package/dist-cjs/lib/editor/derivations/shapeIdsInCurrentPage.js.map +2 -2
- package/dist-cjs/lib/editor/managers/TextManager/TextManager.js +6 -3
- package/dist-cjs/lib/editor/managers/TextManager/TextManager.js.map +2 -2
- package/dist-cjs/lib/editor/managers/TickManager/TickManager.js +6 -3
- package/dist-cjs/lib/editor/managers/TickManager/TickManager.js.map +2 -2
- package/dist-cjs/lib/globals/editors.js +57 -0
- package/dist-cjs/lib/globals/editors.js.map +7 -0
- package/dist-cjs/lib/hooks/useViewportHeight.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/Group2d.js +63 -21
- package/dist-cjs/lib/primitives/geometry/Group2d.js.map +2 -2
- package/dist-cjs/lib/utils/normalizeWheel.js +2 -0
- package/dist-cjs/lib/utils/normalizeWheel.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 +94 -52
- package/dist-esm/index.mjs +3 -1
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/editor/Editor.mjs +86 -26
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/lib/editor/derivations/shapeIdsInCurrentPage.mjs +7 -3
- package/dist-esm/lib/editor/derivations/shapeIdsInCurrentPage.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/TextManager/TextManager.mjs +7 -4
- package/dist-esm/lib/editor/managers/TextManager/TextManager.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/TickManager/TickManager.mjs +6 -3
- package/dist-esm/lib/editor/managers/TickManager/TickManager.mjs.map +2 -2
- package/dist-esm/lib/globals/editors.mjs +37 -0
- package/dist-esm/lib/globals/editors.mjs.map +7 -0
- package/dist-esm/lib/hooks/useViewportHeight.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/Group2d.mjs +63 -21
- package/dist-esm/lib/primitives/geometry/Group2d.mjs.map +2 -2
- package/dist-esm/lib/utils/normalizeWheel.mjs +2 -0
- package/dist-esm/lib/utils/normalizeWheel.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 +2 -0
- package/src/lib/editor/Editor.ts +126 -37
- package/src/lib/editor/derivations/shapeIdsInCurrentPage.ts +7 -3
- package/src/lib/editor/managers/TextManager/TextManager.test.ts +42 -0
- package/src/lib/editor/managers/TextManager/TextManager.ts +10 -8
- package/src/lib/editor/managers/TickManager/TickManager.test.ts +13 -0
- package/src/lib/editor/managers/TickManager/TickManager.ts +9 -3
- package/src/lib/globals/editors.test.ts +76 -0
- package/src/lib/globals/editors.ts +53 -0
- package/src/lib/hooks/useViewportHeight.ts +9 -1
- package/src/lib/primitives/geometry/Group2d.ts +63 -27
- package/src/lib/utils/normalizeWheel.test.ts +39 -0
- package/src/lib/utils/normalizeWheel.ts +6 -0
- package/src/version.ts +3 -3
package/dist-cjs/index.d.ts
CHANGED
|
@@ -18,8 +18,8 @@ import { IndexKey } from '@tldraw/utils';
|
|
|
18
18
|
import { JsonObject } from '@tldraw/utils';
|
|
19
19
|
import { JSX } from 'react/jsx-runtime';
|
|
20
20
|
import { LegacyMigrations } from '@tldraw/store';
|
|
21
|
+
import { MemoExoticComponent } from 'react';
|
|
21
22
|
import { MigrationSequence } from '@tldraw/store';
|
|
22
|
-
import { NamedExoticComponent } from 'react';
|
|
23
23
|
import { Node as Node_2 } from '@tiptap/pm/model';
|
|
24
24
|
import { PerformanceTracker } from '@tldraw/utils';
|
|
25
25
|
import * as React_2 from 'react';
|
|
@@ -68,6 +68,7 @@ import { TLImageAsset } from '@tldraw/tlschema';
|
|
|
68
68
|
import { TLInstance } from '@tldraw/tlschema';
|
|
69
69
|
import { TLInstancePageState } from '@tldraw/tlschema';
|
|
70
70
|
import { TLInstancePresence } from '@tldraw/tlschema';
|
|
71
|
+
import { TLOpacityType } from '@tldraw/tlschema';
|
|
71
72
|
import { TLPage } from '@tldraw/tlschema';
|
|
72
73
|
import { TLPageId } from '@tldraw/tlschema';
|
|
73
74
|
import { TLParentId } from '@tldraw/tlschema';
|
|
@@ -556,13 +557,13 @@ export declare class BoundsSnaps {
|
|
|
556
557
|
private getSnappablePoints;
|
|
557
558
|
private getSnappableGapNodes;
|
|
558
559
|
private getVisibleGaps;
|
|
559
|
-
snapTranslateShapes({ lockedAxis, initialSelectionPageBounds, initialSelectionSnapPoints, dragDelta }: {
|
|
560
|
+
snapTranslateShapes({ lockedAxis, initialSelectionPageBounds, initialSelectionSnapPoints, dragDelta, }: {
|
|
560
561
|
dragDelta: Vec;
|
|
561
562
|
initialSelectionPageBounds: Box;
|
|
562
563
|
initialSelectionSnapPoints: BoundsSnapPoint[];
|
|
563
564
|
lockedAxis: 'x' | 'y' | null;
|
|
564
565
|
}): SnapData;
|
|
565
|
-
snapResizeShapes({ initialSelectionPageBounds, dragDelta, handle: originalHandle, isAspectRatioLocked, isResizingFromCenter }: {
|
|
566
|
+
snapResizeShapes({ initialSelectionPageBounds, dragDelta, handle: originalHandle, isAspectRatioLocked, isResizingFromCenter, }: {
|
|
566
567
|
dragDelta: Vec;
|
|
567
568
|
handle: SelectionCorner | SelectionEdge;
|
|
568
569
|
initialSelectionPageBounds: Box;
|
|
@@ -844,7 +845,7 @@ export declare const coreShapes: readonly [typeof GroupShapeUtil];
|
|
|
844
845
|
export declare function counterClockwiseAngleDist(a0: number, a1: number): number;
|
|
845
846
|
|
|
846
847
|
/** @public */
|
|
847
|
-
export declare function createDebugValue<T>(name: string, { defaults, shouldStoreForSession }: {
|
|
848
|
+
export declare function createDebugValue<T>(name: string, { defaults, shouldStoreForSession, }: {
|
|
848
849
|
defaults: DebugFlagDefaults<T>;
|
|
849
850
|
shouldStoreForSession?: boolean;
|
|
850
851
|
}): DebugFlag<T>;
|
|
@@ -875,8 +876,8 @@ export declare function createSessionStateSnapshotSignal(store: TLStore): Signal
|
|
|
875
876
|
|
|
876
877
|
/** @public */
|
|
877
878
|
export declare function createTLCurrentUser(opts?: {
|
|
878
|
-
setUserPreferences?: (
|
|
879
|
-
userPreferences?: Signal<TLUserPreferences
|
|
879
|
+
setUserPreferences?: (userPreferences: TLUserPreferences) => void;
|
|
880
|
+
userPreferences?: Signal<TLUserPreferences>;
|
|
880
881
|
}): TLCurrentUser;
|
|
881
882
|
|
|
882
883
|
/**
|
|
@@ -991,7 +992,7 @@ export declare function DefaultCanvas({ className }: TLCanvasComponentProps): JS
|
|
|
991
992
|
*
|
|
992
993
|
* @public @react
|
|
993
994
|
*/
|
|
994
|
-
export declare const DefaultCursor:
|
|
995
|
+
export declare const DefaultCursor: MemoExoticComponent<({ className, zoom, point, color, name, chatMessage, }: TLCursorProps) => JSX.Element | null>;
|
|
995
996
|
|
|
996
997
|
/** @public @react */
|
|
997
998
|
export declare const DefaultErrorFallback: TLErrorFallbackComponent;
|
|
@@ -1010,7 +1011,7 @@ export declare function DefaultSvgDefs(): null;
|
|
|
1010
1011
|
|
|
1011
1012
|
/** @public */
|
|
1012
1013
|
export declare const defaultTldrawOptions: {
|
|
1013
|
-
readonly actionShortcutsLocation:
|
|
1014
|
+
readonly actionShortcutsLocation: 'swap';
|
|
1014
1015
|
readonly adjacentShapeMargin: 10;
|
|
1015
1016
|
readonly animationMediumMs: 320;
|
|
1016
1017
|
readonly camera: TLCameraOptions;
|
|
@@ -1182,7 +1183,7 @@ export declare class EdgeScrollManager {
|
|
|
1182
1183
|
/** @public */
|
|
1183
1184
|
export declare class Editor extends EventEmitter<TLEventMap> {
|
|
1184
1185
|
readonly id: string;
|
|
1185
|
-
constructor({ store, user, shapeUtils, bindingUtils, assetUtils: assetUtilConstructors, overlayUtils: overlayUtilConstructors, tools, getContainer, cameraOptions, initialState, autoFocus, options: _options, textOptions: _textOptions, getShapeVisibility, colorScheme, fontAssetUrls, themes, initialTheme }: TLEditorOptions);
|
|
1186
|
+
constructor({ store, user, shapeUtils, bindingUtils, assetUtils: assetUtilConstructors, overlayUtils: overlayUtilConstructors, tools, getContainer, cameraOptions, initialState, autoFocus, options: _options, textOptions: _textOptions, getShapeVisibility, colorScheme, fontAssetUrls, themes, initialTheme, }: TLEditorOptions);
|
|
1186
1187
|
private readonly _getShapeVisibility?;
|
|
1187
1188
|
private getIsShapeHiddenCache;
|
|
1188
1189
|
isShapeHidden(shapeOrId: TLShape | TLShapeId): boolean;
|
|
@@ -1275,8 +1276,8 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1275
1276
|
readonly timers: {
|
|
1276
1277
|
dispose: () => void;
|
|
1277
1278
|
requestAnimationFrame: (callback: FrameRequestCallback) => number;
|
|
1278
|
-
setInterval: (handler: TimerHandler, timeout?: number
|
|
1279
|
-
setTimeout: (handler: TimerHandler, timeout?: number
|
|
1279
|
+
setInterval: (handler: TimerHandler, timeout?: number, ...args: any[]) => number;
|
|
1280
|
+
setTimeout: (handler: TimerHandler, timeout?: number, ...args: any[]) => number;
|
|
1280
1281
|
};
|
|
1281
1282
|
/**
|
|
1282
1283
|
* A manager for remote peer collaborators connected to this editor.
|
|
@@ -1809,14 +1810,14 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1809
1810
|
* @public
|
|
1810
1811
|
*/
|
|
1811
1812
|
getPageStates(): TLInstancePageState[];
|
|
1812
|
-
|
|
1813
|
+
/* Excluded from this release type: _getPageStatesQuery */
|
|
1813
1814
|
/**
|
|
1814
1815
|
* The current page state.
|
|
1815
1816
|
*
|
|
1816
1817
|
* @public
|
|
1817
1818
|
*/
|
|
1818
1819
|
getCurrentPageState(): TLInstancePageState;
|
|
1819
|
-
|
|
1820
|
+
/* Excluded from this release type: _getCurrentPageStateId */
|
|
1820
1821
|
/**
|
|
1821
1822
|
* Update this instance's page state.
|
|
1822
1823
|
*
|
|
@@ -2209,7 +2210,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2209
2210
|
*
|
|
2210
2211
|
* @public */
|
|
2211
2212
|
getTextOptions(): TLTextOptions;
|
|
2212
|
-
|
|
2213
|
+
/* Excluded from this release type: _unsafe_getCameraId */
|
|
2213
2214
|
/**
|
|
2214
2215
|
* The current camera.
|
|
2215
2216
|
*
|
|
@@ -2465,10 +2466,10 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2465
2466
|
*/
|
|
2466
2467
|
slideCamera(opts?: {
|
|
2467
2468
|
direction: VecLike;
|
|
2468
|
-
force?: boolean
|
|
2469
|
-
friction?: number
|
|
2469
|
+
force?: boolean;
|
|
2470
|
+
friction?: number;
|
|
2470
2471
|
speed: number;
|
|
2471
|
-
speedThreshold?: number
|
|
2472
|
+
speedThreshold?: number;
|
|
2472
2473
|
}): this;
|
|
2473
2474
|
/**
|
|
2474
2475
|
* Animate the camera to a user's cursor position. This also briefly show the user's cursor if it's not currently visible.
|
|
@@ -2827,7 +2828,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2827
2828
|
* @public
|
|
2828
2829
|
*/
|
|
2829
2830
|
renamePage(page: TLPage | TLPageId, name: string): this;
|
|
2830
|
-
|
|
2831
|
+
/* Excluded from this release type: _getAllAssetsQuery */
|
|
2831
2832
|
/**
|
|
2832
2833
|
* Get all assets in the editor.
|
|
2833
2834
|
*
|
|
@@ -2916,7 +2917,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2916
2917
|
* @public
|
|
2917
2918
|
*/
|
|
2918
2919
|
getShapeGeometry<T extends Geometry2d>(shape: TLShape | TLShapeId, opts?: TLGeometryOpts): T;
|
|
2919
|
-
|
|
2920
|
+
/* Excluded from this release type: _getShapeHandlesCache */
|
|
2920
2921
|
/**
|
|
2921
2922
|
* Get the handles (if any) for a shape.
|
|
2922
2923
|
*
|
|
@@ -2946,7 +2947,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2946
2947
|
* @public
|
|
2947
2948
|
*/
|
|
2948
2949
|
getShapeLocalTransform(shape: TLShape | TLShapeId): Mat;
|
|
2949
|
-
|
|
2950
|
+
/* Excluded from this release type: _getShapePageTransformCache */
|
|
2950
2951
|
/**
|
|
2951
2952
|
* Get the local transform of a shape's parent as a matrix model.
|
|
2952
2953
|
*
|
|
@@ -2974,7 +2975,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2974
2975
|
* @public
|
|
2975
2976
|
*/
|
|
2976
2977
|
getShapePageTransform(shape: TLShape | TLShapeId): Mat;
|
|
2977
|
-
|
|
2978
|
+
/* Excluded from this release type: _getShapePageBoundsCache */
|
|
2978
2979
|
/**
|
|
2979
2980
|
* Get the bounds of a shape in the current page space.
|
|
2980
2981
|
*
|
|
@@ -2989,7 +2990,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2989
2990
|
* @public
|
|
2990
2991
|
*/
|
|
2991
2992
|
getShapePageBounds(shape: TLShape | TLShapeId): Box | undefined;
|
|
2992
|
-
|
|
2993
|
+
/* Excluded from this release type: _getShapeClipPathCache */
|
|
2993
2994
|
/**
|
|
2994
2995
|
* Get the clip path for a shape.
|
|
2995
2996
|
*
|
|
@@ -3006,7 +3007,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3006
3007
|
* @public
|
|
3007
3008
|
*/
|
|
3008
3009
|
getShapeClipPath(shape: TLShape | TLShapeId): string | undefined;
|
|
3009
|
-
|
|
3010
|
+
/* Excluded from this release type: _getShapeMaskCache */
|
|
3010
3011
|
/**
|
|
3011
3012
|
* Get the mask (in the current page space) for a shape.
|
|
3012
3013
|
*
|
|
@@ -3038,7 +3039,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3038
3039
|
* @public
|
|
3039
3040
|
*/
|
|
3040
3041
|
getShapeMaskedPageBounds(shape: TLShape | TLShapeId): Box | undefined;
|
|
3041
|
-
|
|
3042
|
+
/* Excluded from this release type: _getShapeMaskedPageBoundsCache */
|
|
3042
3043
|
/**
|
|
3043
3044
|
* Get the ancestors of a shape.
|
|
3044
3045
|
*
|
|
@@ -3159,8 +3160,8 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3159
3160
|
* @public
|
|
3160
3161
|
*/
|
|
3161
3162
|
getShapesAtPoint(point: VecLike, opts?: {
|
|
3162
|
-
hitInside?: boolean
|
|
3163
|
-
margin?: number
|
|
3163
|
+
hitInside?: boolean;
|
|
3164
|
+
margin?: number;
|
|
3164
3165
|
}): TLShape[];
|
|
3165
3166
|
/**
|
|
3166
3167
|
* Get shape IDs within the given bounds.
|
|
@@ -3196,8 +3197,8 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3196
3197
|
* @public
|
|
3197
3198
|
*/
|
|
3198
3199
|
isPointInShape(shape: TLShape | TLShapeId, point: VecLike, opts?: {
|
|
3199
|
-
hitInside?: boolean
|
|
3200
|
-
margin?: number
|
|
3200
|
+
hitInside?: boolean;
|
|
3201
|
+
margin?: number;
|
|
3201
3202
|
}): boolean;
|
|
3202
3203
|
/**
|
|
3203
3204
|
* Convert a point in the current page space to a point in the local space of a shape. For example, if a
|
|
@@ -3485,7 +3486,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3485
3486
|
* Delete a binding by its ID. If the binding doesn't exist, it's ignored.
|
|
3486
3487
|
*/
|
|
3487
3488
|
deleteBinding(binding: TLBinding | TLBindingId, opts?: Parameters<this['deleteBindings']>[1]): this;
|
|
3488
|
-
canBindShapes({ fromShape, toShape, binding }: {
|
|
3489
|
+
canBindShapes({ fromShape, toShape, binding, }: {
|
|
3489
3490
|
binding: {
|
|
3490
3491
|
type: TLBinding['type'];
|
|
3491
3492
|
} | TLBinding | TLBinding['type'];
|
|
@@ -3701,7 +3702,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3701
3702
|
*
|
|
3702
3703
|
* @public
|
|
3703
3704
|
*/
|
|
3704
|
-
alignShapes(shapes: TLShape[] | TLShapeId[], operation: 'bottom' | 'center-horizontal' | 'center-vertical' | 'left' | 'right' | 'top'): this;
|
|
3705
|
+
alignShapes(shapes: TLShape[] | TLShapeId[], operation: 'bottom' | 'center-horizontal' | 'center-vertical' | 'center' | 'left' | 'right' | 'top'): this;
|
|
3705
3706
|
/**
|
|
3706
3707
|
* Distribute shape positions.
|
|
3707
3708
|
*
|
|
@@ -3952,7 +3953,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3952
3953
|
deleteShape(id: TLShapeId): this;
|
|
3953
3954
|
deleteShape(shape: TLShape): this;
|
|
3954
3955
|
/* Excluded from this release type: _extractSharedStyles */
|
|
3955
|
-
|
|
3956
|
+
/* Excluded from this release type: _getSelectionSharedStyles */
|
|
3956
3957
|
/**
|
|
3957
3958
|
* Get the style for the next shape.
|
|
3958
3959
|
*
|
|
@@ -4141,7 +4142,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
4141
4142
|
* @param opts - Options for handling external content, including force flag to bypass readonly checks.
|
|
4142
4143
|
*/
|
|
4143
4144
|
putExternalContent<E>(info: TLExternalContent<E>, opts?: {
|
|
4144
|
-
force?: boolean
|
|
4145
|
+
force?: boolean;
|
|
4145
4146
|
}): Promise<void>;
|
|
4146
4147
|
/**
|
|
4147
4148
|
* Handle replacing external content.
|
|
@@ -4150,7 +4151,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
4150
4151
|
* @param opts - Options for handling external content, including force flag to bypass readonly checks.
|
|
4151
4152
|
*/
|
|
4152
4153
|
replaceExternalContent<E>(info: TLExternalContent<E>, opts?: {
|
|
4153
|
-
force?: boolean
|
|
4154
|
+
force?: boolean;
|
|
4154
4155
|
}): Promise<void>;
|
|
4155
4156
|
/**
|
|
4156
4157
|
* Get content that can be exported for the given shape ids.
|
|
@@ -4474,13 +4475,14 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
4474
4475
|
cancelDoubleClick(): void;
|
|
4475
4476
|
/* Excluded from this release type: _prevCursor */
|
|
4476
4477
|
/* Excluded from this release type: _shiftKeyTimeout */
|
|
4477
|
-
/* Excluded from this release type:
|
|
4478
|
+
/* Excluded from this release type: _releaseShiftKey */
|
|
4478
4479
|
/* Excluded from this release type: _altKeyTimeout */
|
|
4479
|
-
/* Excluded from this release type:
|
|
4480
|
+
/* Excluded from this release type: _releaseAltKey */
|
|
4480
4481
|
/* Excluded from this release type: _ctrlKeyTimeout */
|
|
4481
|
-
/* Excluded from this release type:
|
|
4482
|
+
/* Excluded from this release type: _releaseCtrlKey */
|
|
4482
4483
|
/* Excluded from this release type: _metaKeyTimeout */
|
|
4483
|
-
/* Excluded from this release type:
|
|
4484
|
+
/* Excluded from this release type: _releaseMetaKey */
|
|
4485
|
+
/* Excluded from this release type: _releaseDebouncedModifiers */
|
|
4484
4486
|
/* Excluded from this release type: _restoreToolId */
|
|
4485
4487
|
/* Excluded from this release type: _didPinch */
|
|
4486
4488
|
/* Excluded from this release type: _selectedShapeIdsAtPointerDown */
|
|
@@ -5040,7 +5042,7 @@ export declare class Group2d extends Geometry2d {
|
|
|
5040
5042
|
|
|
5041
5043
|
/** @public */
|
|
5042
5044
|
export declare class GroupShapeUtil extends ShapeUtil<TLGroupShape> {
|
|
5043
|
-
static type:
|
|
5045
|
+
static type: 'group';
|
|
5044
5046
|
static props: RecordProps<TLGroupShape>;
|
|
5045
5047
|
static migrations: TLPropsMigrations;
|
|
5046
5048
|
hideSelectionBoundsFg(shape: TLGroupShape): boolean;
|
|
@@ -5104,7 +5106,7 @@ export declare class HandleSnaps {
|
|
|
5104
5106
|
private iterateSnapOutlines;
|
|
5105
5107
|
private getHandleSnapPosition;
|
|
5106
5108
|
private getHandleSnapData;
|
|
5107
|
-
snapHandle({ currentShapeId, handle }: {
|
|
5109
|
+
snapHandle({ currentShapeId, handle, }: {
|
|
5108
5110
|
currentShapeId: TLShapeId;
|
|
5109
5111
|
handle: TLHandle;
|
|
5110
5112
|
}): null | SnapData;
|
|
@@ -6233,11 +6235,11 @@ export declare interface RichTextFontVisitorState {
|
|
|
6233
6235
|
|
|
6234
6236
|
/** @public */
|
|
6235
6237
|
export declare const ROTATE_CORNER_TO_SELECTION_CORNER: {
|
|
6236
|
-
readonly bottom_left_rotate:
|
|
6237
|
-
readonly bottom_right_rotate:
|
|
6238
|
-
readonly mobile_rotate:
|
|
6239
|
-
readonly top_left_rotate:
|
|
6240
|
-
readonly top_right_rotate:
|
|
6238
|
+
readonly bottom_left_rotate: 'bottom_left';
|
|
6239
|
+
readonly bottom_right_rotate: 'bottom_right';
|
|
6240
|
+
readonly mobile_rotate: 'top_left';
|
|
6241
|
+
readonly top_left_rotate: 'top_left';
|
|
6242
|
+
readonly top_right_rotate: 'top_right';
|
|
6241
6243
|
};
|
|
6242
6244
|
|
|
6243
6245
|
/** @public */
|
|
@@ -7236,7 +7238,7 @@ export declare type SharedStyle<T> = {
|
|
|
7236
7238
|
export declare function shortAngleDist(a0: number, a1: number): number;
|
|
7237
7239
|
|
|
7238
7240
|
/** @public */
|
|
7239
|
-
export declare const SIDES: readonly [
|
|
7241
|
+
export declare const SIDES: readonly ['top', 'right', 'bottom', 'left'];
|
|
7240
7242
|
|
|
7241
7243
|
/** @public */
|
|
7242
7244
|
export declare const SIN: (x: number) => number;
|
|
@@ -7957,7 +7959,7 @@ export declare interface TLDragShapesOverInfo {
|
|
|
7957
7959
|
}
|
|
7958
7960
|
|
|
7959
7961
|
/** @public @react */
|
|
7960
|
-
export declare const TldrawEditor: React_3.
|
|
7962
|
+
export declare const TldrawEditor: React_3.MemoExoticComponent<({ store, components, className, user: _user, options: _options, textOptions: _textOptions, deepLinks: _deepLinks, ...rest }: TldrawEditorProps) => JSX.Element>;
|
|
7961
7963
|
|
|
7962
7964
|
/**
|
|
7963
7965
|
* Base props for the {@link tldraw#Tldraw} and {@link TldrawEditor} components.
|
|
@@ -8511,6 +8513,38 @@ export declare interface TLEditorRunOptions extends TLHistoryBatchOptions {
|
|
|
8511
8513
|
ignoreShapeLock?: boolean;
|
|
8512
8514
|
}
|
|
8513
8515
|
|
|
8516
|
+
/**
|
|
8517
|
+
* A global registry of currently mounted editor instances. Use it to discover live editors from
|
|
8518
|
+
* outside the React tree, for example from sidebar chrome, keyboard shortcuts, or multi-editor
|
|
8519
|
+
* layouts.
|
|
8520
|
+
*
|
|
8521
|
+
* @example
|
|
8522
|
+
* ```ts
|
|
8523
|
+
* tleditors.getMounted() // readonly Editor[]
|
|
8524
|
+
*
|
|
8525
|
+
* const editors = useValue('mounted editors', () => tleditors.getMounted(), [])
|
|
8526
|
+
* ```
|
|
8527
|
+
*
|
|
8528
|
+
* @public
|
|
8529
|
+
*/
|
|
8530
|
+
export declare const tleditors: {
|
|
8531
|
+
/**
|
|
8532
|
+
* A reactive list of currently mounted editor instances.
|
|
8533
|
+
*
|
|
8534
|
+
* An editor is added when it emits the `mount` event and removed when it emits `unmount`
|
|
8535
|
+
* (including when the editor is disposed while still mounted).
|
|
8536
|
+
*
|
|
8537
|
+
* @public
|
|
8538
|
+
*/
|
|
8539
|
+
mounted: Signal<readonly Editor[]>;
|
|
8540
|
+
/**
|
|
8541
|
+
* Get the currently mounted editor instances.
|
|
8542
|
+
*
|
|
8543
|
+
* @public
|
|
8544
|
+
*/
|
|
8545
|
+
getMounted(): readonly Editor[];
|
|
8546
|
+
};
|
|
8547
|
+
|
|
8514
8548
|
/** @public */
|
|
8515
8549
|
export declare interface TLEditorSnapshot {
|
|
8516
8550
|
document: TLStoreSnapshot;
|
|
@@ -9008,7 +9042,7 @@ export declare const tlmenus: {
|
|
|
9008
9042
|
*
|
|
9009
9043
|
* @public
|
|
9010
9044
|
*/
|
|
9011
|
-
clearOpenMenus(contextId?: string
|
|
9045
|
+
clearOpenMenus(contextId?: string): void;
|
|
9012
9046
|
/**
|
|
9013
9047
|
* Delete an open menu.
|
|
9014
9048
|
*
|
|
@@ -9031,7 +9065,7 @@ export declare const tlmenus: {
|
|
|
9031
9065
|
*
|
|
9032
9066
|
* @public
|
|
9033
9067
|
*/
|
|
9034
|
-
getOpenMenus(contextId?: string
|
|
9068
|
+
getOpenMenus(contextId?: string): string[];
|
|
9035
9069
|
/**
|
|
9036
9070
|
* Get whether a menu is open for a given context.
|
|
9037
9071
|
*
|
|
@@ -9045,7 +9079,7 @@ export declare const tlmenus: {
|
|
|
9045
9079
|
*
|
|
9046
9080
|
* @public
|
|
9047
9081
|
*/
|
|
9048
|
-
isMenuOpen(id: string, contextId?: string
|
|
9082
|
+
isMenuOpen(id: string, contextId?: string): boolean;
|
|
9049
9083
|
/**
|
|
9050
9084
|
* Get whether any menus are open for a given context.
|
|
9051
9085
|
*
|
|
@@ -9083,7 +9117,7 @@ export declare const tlmenus: {
|
|
|
9083
9117
|
*
|
|
9084
9118
|
* @public
|
|
9085
9119
|
*/
|
|
9086
|
-
hideOpenMenus(contextId?: string
|
|
9120
|
+
hideOpenMenus(contextId?: string): void;
|
|
9087
9121
|
/**
|
|
9088
9122
|
* Show all hidden menus.
|
|
9089
9123
|
*
|
|
@@ -9097,7 +9131,7 @@ export declare const tlmenus: {
|
|
|
9097
9131
|
*
|
|
9098
9132
|
* @public
|
|
9099
9133
|
*/
|
|
9100
|
-
showOpenMenus(contextId?: string
|
|
9134
|
+
showOpenMenus(contextId?: string): void;
|
|
9101
9135
|
forContext(contextId: string): {
|
|
9102
9136
|
addOpenMenu: (id: string) => void;
|
|
9103
9137
|
clearOpenMenus: () => void;
|
|
@@ -10021,7 +10055,15 @@ export declare function useTransform(ref: React.RefObject<HTMLElement | null | S
|
|
|
10021
10055
|
*/
|
|
10022
10056
|
export declare function useUniqueSafeId(suffix?: string): SafeId;
|
|
10023
10057
|
|
|
10024
|
-
/**
|
|
10058
|
+
/**
|
|
10059
|
+
* The height of the visible viewport, including the visual viewport's own offset.
|
|
10060
|
+
*
|
|
10061
|
+
* @deprecated Read `window.visualViewport` directly: this flattens the visible rectangle to a
|
|
10062
|
+
* single scalar, and keeping UI clear of the software keyboard usually needs the other edges too.
|
|
10063
|
+
* Unused since v3.14; will be removed in a future release.
|
|
10064
|
+
*
|
|
10065
|
+
* @public
|
|
10066
|
+
*/
|
|
10025
10067
|
export declare function useViewportHeight(): number;
|
|
10026
10068
|
|
|
10027
10069
|
/* Excluded from this release type: ValidLicenseKeyResult */
|
package/dist-cjs/index.js
CHANGED
|
@@ -210,6 +210,7 @@ __export(index_exports, {
|
|
|
210
210
|
stopEventPropagation: () => import_dom.stopEventPropagation,
|
|
211
211
|
strokeShapeIndicators: () => import_strokeShapeIndicators.strokeShapeIndicators,
|
|
212
212
|
suffixSafeId: () => import_useSafeId.suffixSafeId,
|
|
213
|
+
tleditors: () => import_editors.tleditors,
|
|
213
214
|
tlenv: () => import_environment.tlenv,
|
|
214
215
|
tlenvReactive: () => import_environment.tlenvReactive,
|
|
215
216
|
tlmenus: () => import_menus.tlmenus,
|
|
@@ -321,6 +322,7 @@ var import_SvgExportContext = require("./lib/editor/types/SvgExportContext");
|
|
|
321
322
|
var import_domUtils = require("./lib/exports/domUtils");
|
|
322
323
|
var import_getSvgAsImage = require("./lib/exports/getSvgAsImage");
|
|
323
324
|
var import_environment = require("./lib/globals/environment");
|
|
325
|
+
var import_editors = require("./lib/globals/editors");
|
|
324
326
|
var import_menus = require("./lib/globals/menus");
|
|
325
327
|
var import_time = require("./lib/globals/time");
|
|
326
328
|
var import_useContainer = require("./lib/hooks/useContainer");
|
|
@@ -390,7 +392,7 @@ var import_uniq = require("./lib/utils/uniq");
|
|
|
390
392
|
var import_defaultThemes2 = require("./lib/editor/managers/ThemeManager/defaultThemes");
|
|
391
393
|
(0, import_utils.registerTldrawLibraryVersion)(
|
|
392
394
|
"@tldraw/editor",
|
|
393
|
-
"5.
|
|
395
|
+
"5.4.0-canary.042da660fa66",
|
|
394
396
|
"cjs"
|
|
395
397
|
);
|
|
396
398
|
//# sourceMappingURL=index.js.map
|
package/dist-cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\n\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/state'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/state-react'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/store'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/tlschema'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/utils'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/validate'\n\nexport { DefaultBackground } from './lib/components/default-components/DefaultBackground'\nexport {\n\tDefaultCanvas,\n\ttype TLCanvasComponentProps,\n} from './lib/components/default-components/DefaultCanvas'\nexport {\n\tDefaultCursor,\n\ttype TLCursorProps,\n} from './lib/components/default-components/DefaultCursor'\nexport {\n\tDefaultErrorFallback,\n\ttype TLErrorFallbackComponent,\n} from './lib/components/default-components/DefaultErrorFallback'\nexport { DefaultGrid, type TLGridProps } from './lib/components/default-components/DefaultGrid'\nexport { type TLShapeErrorFallbackComponent } from './lib/components/default-components/DefaultShapeErrorFallback'\nexport {\n\tDefaultShapeWrapper,\n\ttype TLShapeWrapperProps,\n} from './lib/components/default-components/DefaultShapeWrapper'\nexport { DefaultSpinner } from './lib/components/default-components/DefaultSpinner'\nexport { DefaultSvgDefs } from './lib/components/default-components/DefaultSvgDefs'\nexport {\n\tEditorPortal,\n\tuseEditorPortalHost,\n\ttype EditorPortalProps,\n} from './lib/components/EditorPortal'\nexport {\n\tErrorBoundary,\n\tOptionalErrorBoundary,\n\ttype TLErrorBoundaryProps,\n} from './lib/components/ErrorBoundary'\nexport { HTMLContainer, type HTMLContainerProps } from './lib/components/HTMLContainer'\nexport { MenuClickCapture } from './lib/components/MenuClickCapture'\nexport { SVGContainer, type SVGContainerProps } from './lib/components/SVGContainer'\nexport {\n\tcreateTLCurrentUser,\n\tuseTldrawCurrentUser,\n\ttype TLCurrentUser,\n} from './lib/config/createTLCurrentUser'\nexport {\n\tcreateTLSchemaFromUtils,\n\tcreateTLStore,\n\tdefaultUserStore,\n\tinlineBase64AssetStore,\n\ttype TLStoreBaseOptions,\n\ttype TLStoreEventInfo,\n\ttype TLStoreOptions,\n\ttype TLStoreSchemaOptions,\n} from './lib/config/createTLStore'\nexport { type TLAnyAssetUtilConstructor } from './lib/config/defaultAssets'\nexport { type TLAnyBindingUtilConstructor } from './lib/config/defaultBindings'\nexport { coreShapes, type TLAnyShapeUtilConstructor } from './lib/config/defaultShapes'\nexport {\n\tgetSnapshot,\n\tloadSnapshot,\n\ttype TLEditorSnapshot,\n\ttype TLLoadSnapshotOptions,\n} from './lib/config/TLEditorSnapshot'\nexport {\n\tcreateSessionStateSnapshotSignal,\n\textractSessionStateFromLegacySnapshot,\n\tloadSessionStateSnapshotIntoStore,\n\tTAB_ID,\n\ttype TLLoadSessionStateSnapshotOptions,\n\ttype TLSessionStateSnapshot,\n} from './lib/config/TLSessionStateSnapshot'\nexport {\n\tdefaultUserPreferences,\n\tgetFreshUserPreferences,\n\tgetUserPreferences,\n\tsetUserPreferences,\n\tUSER_COLORS,\n\tuserTypeValidator,\n\ttype TLUserPreferences,\n} from './lib/config/TLUserPreferences'\nexport { DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS, SIDES } from './lib/constants'\nexport { AssetUtil, type TLAssetUtilConstructor } from './lib/editor/assets/AssetUtil'\nexport {\n\tBindingUtil,\n\ttype BindingOnChangeOptions,\n\ttype BindingOnCreateOptions,\n\ttype BindingOnDeleteOptions,\n\ttype BindingOnShapeChangeOptions,\n\ttype BindingOnShapeDeleteOptions,\n\ttype BindingOnShapeIsolateOptions,\n\ttype TLBindingUtilConstructor,\n} from './lib/editor/bindings/BindingUtil'\nexport {\n\tEditor,\n\ttype TLEditorOptions,\n\ttype TLEditorRunOptions,\n\ttype TLRenderingShape,\n\ttype TLResizeShapeOptions,\n} from './lib/editor/Editor'\nexport { ClickManager, type TLClickState } from './lib/editor/managers/ClickManager/ClickManager'\nexport { EdgeScrollManager } from './lib/editor/managers/EdgeScrollManager/EdgeScrollManager'\nexport { FontManager } from './lib/editor/managers/FontManager/FontManager'\nexport { HistoryManager } from './lib/editor/managers/HistoryManager/HistoryManager'\nexport { EditorManager } from './lib/editor/managers/EditorManager'\nexport { InputsManager } from './lib/editor/managers/InputsManager/InputsManager'\nexport {\n\tScribbleManager,\n\ttype ScribbleItem,\n\ttype ScribbleSessionOptions,\n} from './lib/editor/managers/ScribbleManager/ScribbleManager'\nexport {\n\tBoundsSnaps,\n\ttype BoundsSnapGeometry,\n\ttype BoundsSnapPoint,\n} from './lib/editor/managers/SnapManager/BoundsSnaps'\nexport { HandleSnaps, type HandleSnapGeometry } from './lib/editor/managers/SnapManager/HandleSnaps'\nexport {\n\tSnapManager,\n\ttype GapsSnapIndicator,\n\ttype PointsSnapIndicator,\n\ttype SnapData,\n\ttype SnapIndicator,\n} from './lib/editor/managers/SnapManager/SnapManager'\nexport { SpatialIndexManager } from './lib/editor/managers/SpatialIndexManager/SpatialIndexManager'\nexport {\n\tTextManager,\n\tresolveLineHeightPx,\n\ttype BatchMeasurementRequest,\n\ttype TLMeasuredTextSize,\n\ttype TLMeasureTextOpts,\n\ttype TLMeasureTextSpanOpts,\n} from './lib/editor/managers/TextManager/TextManager'\nexport { DEFAULT_THEME } from './lib/editor/managers/ThemeManager/defaultThemes'\nexport { ThemeManager, resolveThemes } from './lib/editor/managers/ThemeManager/ThemeManager'\nexport { TickManager } from './lib/editor/managers/TickManager/TickManager'\nexport { CollaboratorsManager } from './lib/editor/managers/CollaboratorsManager/CollaboratorsManager'\nexport { PerformanceApiAdapter } from './lib/editor/managers/PerformanceManager/PerformanceApiAdapter'\nexport { PerformanceManager } from './lib/editor/managers/PerformanceManager/PerformanceManager'\nexport {\n\ttype TLCameraEndPerfEvent,\n\ttype TLCameraStartPerfEvent,\n\ttype TLFramePerfEvent,\n\ttype TLInteractionEndPerfEvent,\n\ttype TLInteractionStartPerfEvent,\n\ttype TLPerfEventMap,\n\ttype TLPerfFrameTimeStats,\n\ttype TLPerfLongAnimationFrame,\n\ttype TLPerfLongAnimationFrameScript,\n\ttype TLShapeOperationPerfEvent,\n\ttype TLUndoRedoPerfEvent,\n} from './lib/editor/managers/PerformanceManager/perf-types'\nexport { UserPreferencesManager } from './lib/editor/managers/UserPreferencesManager/UserPreferencesManager'\nexport { BaseBoxShapeUtil, type TLBaseBoxShape } from './lib/editor/shapes/BaseBoxShapeUtil'\nexport { BaseFrameLikeShapeUtil } from './lib/editor/shapes/BaseFrameLikeShapeUtil'\nexport { GroupShapeUtil } from './lib/editor/shapes/group/GroupShapeUtil'\nexport {\n\tShapeUtil,\n\ttype TLCropInfo,\n\ttype TLDragShapesInInfo,\n\ttype TLDragShapesOutInfo,\n\ttype TLDragShapesOverInfo,\n\ttype TLDropShapesOverInfo,\n\ttype TLEditStartInfo,\n\ttype TLGeometryOpts,\n\ttype TLHandleDragInfo,\n\ttype TLIndicatorPath,\n\ttype TLResizeInfo,\n\ttype TLResizeMode,\n\ttype TLShapeUtilCanBeLaidOutOpts,\n\ttype TLShapeUtilCanBindOpts,\n\ttype TLShapeUtilCanvasSvgDef,\n\ttype TLShapeUtilConstructor,\n} from './lib/editor/shapes/ShapeUtil'\nexport {\n\tgetOverlayDisplayValues,\n\ttype OverlayOptionsWithDisplayValues,\n} from './lib/editor/overlays/getOverlayDisplayValues'\nexport { OverlayManager, type TLOverlayEntry } from './lib/editor/overlays/OverlayManager'\nexport {\n\tOverlayUtil,\n\ttype TLAnyOverlayUtilConstructor,\n\ttype TLOverlay,\n\ttype TLOverlayUtilConstructor,\n} from './lib/editor/overlays/OverlayUtil'\nexport { strokeShapeIndicators } from './lib/editor/overlays/strokeShapeIndicators'\nexport {\n\tgetPerfectDashProps,\n\ttype PerfectDashTerminal,\n} from './lib/editor/shapes/shared/getPerfectDashProps'\nexport { resizeBox, type ResizeBoxOptions } from './lib/editor/shapes/shared/resizeBox'\nexport { resizeScaled } from './lib/editor/shapes/shared/resizeScaled'\nexport { BaseBoxShapeTool } from './lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool'\nexport { maybeSnapToGrid } from './lib/editor/tools/BaseBoxShapeTool/children/Pointing'\nexport { StateNode, type TLStateNodeConstructor } from './lib/editor/tools/StateNode'\nexport { type TLContent } from './lib/editor/types/clipboard-types'\nexport { type TLEventMap, type TLEventMapHandler } from './lib/editor/types/emit-types'\nexport {\n\tEVENT_NAME_MAP,\n\ttype TLBaseEventInfo,\n\ttype TLCancelEvent,\n\ttype TLCancelEventInfo,\n\ttype TLClickEvent,\n\ttype TLClickEventInfo,\n\ttype TLCLickEventName,\n\ttype TLCompleteEvent,\n\ttype TLCompleteEventInfo,\n\ttype TLEnterEventHandler,\n\ttype TLEventHandlers,\n\ttype TLEventInfo,\n\ttype TLEventName,\n\ttype TLExitEventHandler,\n\ttype TLInterruptEvent,\n\ttype TLInterruptEventInfo,\n\ttype TLKeyboardEvent,\n\ttype TLKeyboardEventInfo,\n\ttype TLKeyboardEventName,\n\ttype TLPinchEvent,\n\ttype TLPinchEventInfo,\n\ttype TLPinchEventName,\n\ttype TLPointerEvent,\n\ttype TLPointerEventInfo,\n\ttype TLPointerEventName,\n\ttype TLPointerEventTarget,\n\ttype TLTickEvent,\n\ttype TLTickEventInfo,\n\ttype TLWheelEvent,\n\ttype TLWheelEventInfo,\n\ttype UiEvent,\n\ttype UiEventType,\n} from './lib/editor/types/event-types'\nexport {\n\ttype TLBaseExternalContent,\n\ttype TLEmbedExternalContent,\n\ttype TLErrorExternalContentSource,\n\ttype TLExcalidrawExternalContent,\n\ttype TLExcalidrawExternalContentSource,\n\ttype TLExternalAsset,\n\ttype TLExternalContent,\n\ttype TLExternalContentSource,\n\ttype TLFileExternalAsset,\n\ttype TLFileReplaceExternalContent,\n\ttype TLFilesExternalContent,\n\ttype TLSvgTextExternalContent,\n\ttype TLTextExternalContent,\n\ttype TLTextExternalContentSource,\n\ttype TLTldrawExternalContent,\n\ttype TLTldrawExternalContentSource,\n\ttype TLUrlExternalAsset,\n\ttype TLUrlExternalContent,\n} from './lib/editor/types/external-content'\nexport {\n\ttype TLHistoryBatchOptions,\n\ttype TLHistoryDiff,\n\ttype TLHistoryEntry,\n\ttype TLHistoryMark,\n} from './lib/editor/types/history-types'\nexport {\n\ttype OptionalKeys,\n\ttype RequiredKeys,\n\ttype TLCameraConstraints,\n\ttype TLCameraMoveOptions,\n\ttype TLCameraOptions,\n\ttype TLExportType,\n\ttype TLGetShapeAtPointOptions,\n\ttype TLImageExportOptions,\n\ttype TLSvgExportOptions,\n\ttype TLUpdatePointerOptions,\n} from './lib/editor/types/misc-types'\nexport {\n\ttype TLAdjacentDirection,\n\ttype TLResizeHandle,\n\ttype TLSelectionHandle,\n} from './lib/editor/types/selection-types'\nexport {\n\tuseDelaySvgExport,\n\tuseSvgExportContext,\n\ttype SvgExportContext,\n\ttype SvgExportDef,\n} from './lib/editor/types/SvgExportContext'\nexport { getOwnerDocument, getOwnerWindow } from './lib/exports/domUtils'\nexport { getSvgAsImage } from './lib/exports/getSvgAsImage'\nexport { tlenv, tlenvReactive } from './lib/globals/environment'\nexport { tlmenus } from './lib/globals/menus'\nexport { tltime } from './lib/globals/time'\nexport {\n\tContainerProvider,\n\tuseContainer,\n\tuseContainerIfExists,\n\ttype ContainerProviderProps,\n} from './lib/hooks/useContainer'\nexport { useColorMode } from './lib/hooks/useColorMode'\nexport { getCursor } from './lib/hooks/useCursor'\nexport {\n\tEditorContext,\n\tEditorProvider,\n\tuseEditor,\n\tuseMaybeEditor,\n\ttype EditorProviderProps,\n} from './lib/hooks/useEditor'\nexport { useEditorComponents } from './lib/hooks/useEditorComponents'\nexport type { TLEditorComponents } from './lib/hooks/useEditorComponents'\nexport { useEvent, useReactiveEvent } from './lib/hooks/useEvent'\nexport { useGlobalMenuIsOpen } from './lib/hooks/useGlobalMenuIsOpen'\nexport { useShallowArrayIdentity, useShallowObjectIdentity } from './lib/hooks/useIdentity'\nexport { useIsCropping } from './lib/hooks/useIsCropping'\nexport { useIsEditing } from './lib/hooks/useIsEditing'\nexport { useLocalStore } from './lib/hooks/useLocalStore'\nexport { usePassThroughWheelEvents } from './lib/hooks/usePassThroughWheelEvents'\nexport { usePeerIds } from './lib/hooks/usePeerIds'\nexport { usePresence } from './lib/hooks/usePresence'\nexport { useRefState } from './lib/hooks/useRefState'\nexport {\n\tsanitizeId,\n\tsuffixSafeId,\n\tuseSharedSafeId,\n\tuseUniqueSafeId,\n\ttype SafeId,\n} from './lib/hooks/useSafeId'\nexport { useTransform } from './lib/hooks/useTransform'\nexport { isCursorInViewport } from './lib/utils/collaborators'\nexport { useTLSchemaFromUtils, useTLStore } from './lib/hooks/useTLStore'\nexport { useViewportHeight } from './lib/hooks/useViewportHeight'\nexport {\n\tLicenseManager,\n\ttype InvalidLicenseKeyResult,\n\ttype InvalidLicenseReason,\n\ttype LicenseFeatureName,\n\ttype LicenseFromKeyResult,\n\ttype LicenseInfo,\n\ttype LicenseState,\n\ttype ValidLicenseKeyResult,\n} from './lib/license/LicenseManager'\nexport {\n\tLICENSE_TIMEOUT,\n\tuseLicenseContext,\n\tuseMaybeLicenseManager,\n} from './lib/license/LicenseProvider'\nexport { useLicenseFeatureFlag } from './lib/license/useLicenseManagerState'\nexport {\n\tdefaultTldrawOptions,\n\ttype TLClipboardPasteRawInfo,\n\ttype TLClipboardWriteInfo,\n\ttype TldrawOptions,\n} from './lib/options'\nexport {\n\tBox,\n\tROTATE_CORNER_TO_SELECTION_CORNER,\n\trotateSelectionHandle,\n\ttype BoxLike,\n\ttype RotateCorner,\n\ttype SelectionCorner,\n\ttype SelectionEdge,\n\ttype SelectionHandle,\n} from './lib/primitives/Box'\nexport { EASINGS } from './lib/primitives/easings'\nexport { Arc2d } from './lib/primitives/geometry/Arc2d'\nexport { Circle2d } from './lib/primitives/geometry/Circle2d'\nexport { CubicBezier2d } from './lib/primitives/geometry/CubicBezier2d'\nexport { CubicSpline2d } from './lib/primitives/geometry/CubicSpline2d'\nexport { Edge2d } from './lib/primitives/geometry/Edge2d'\nexport { Ellipse2d } from './lib/primitives/geometry/Ellipse2d'\nexport { getVerticesCountForArcLength } from './lib/primitives/geometry/geometry-constants'\nexport {\n\tGeometry2d,\n\tGeometry2dFilters,\n\tTransformedGeometry2d,\n\ttype Geometry2dOptions,\n\ttype TransformedGeometry2dOptions,\n} from './lib/primitives/geometry/Geometry2d'\nexport { Group2d } from './lib/primitives/geometry/Group2d'\nexport { Point2d } from './lib/primitives/geometry/Point2d'\nexport { Polygon2d } from './lib/primitives/geometry/Polygon2d'\nexport { Polyline2d } from './lib/primitives/geometry/Polyline2d'\nexport { Rectangle2d } from './lib/primitives/geometry/Rectangle2d'\nexport { Stadium2d } from './lib/primitives/geometry/Stadium2d'\nexport {\n\tintersectCircleCircle,\n\tintersectCirclePolygon,\n\tintersectCirclePolyline,\n\tintersectLineSegmentCircle,\n\tintersectLineSegmentLineSegment,\n\tintersectLineSegmentPolygon,\n\tintersectLineSegmentPolyline,\n\tintersectPolygonBounds,\n\tintersectPolygonPolygon,\n\tlinesIntersect,\n\tpolygonIntersectsPolyline,\n\tpolygonsIntersect,\n} from './lib/primitives/intersect'\nexport { Mat, type MatLike, type MatModel } from './lib/primitives/Mat'\nexport {\n\tangleDistance,\n\tapproximately,\n\tareAnglesCompatible,\n\taverage,\n\tcanonicalizeRotation,\n\tcenterOfCircleFromThreePoints,\n\tclamp,\n\tclampRadians,\n\tclockwiseAngleDist,\n\tcounterClockwiseAngleDist,\n\tdegreesToRadians,\n\tgetArcMeasure,\n\tgetPointInArcT,\n\tgetPointOnCircle,\n\tgetPointsOnArc,\n\tgetPolygonVertices,\n\tHALF_PI,\n\tisSafeFloat,\n\tperimeterOfEllipse,\n\tPI,\n\tPI2,\n\tpointInPolygon,\n\tprecise,\n\tradiansToDegrees,\n\trangeIntersection,\n\tshortAngleDist,\n\tSIN,\n\tsnapAngle,\n\ttoDomPrecision,\n\ttoFixed,\n\ttoPrecision,\n} from './lib/primitives/utils'\nexport { Vec, type VecLike } from './lib/primitives/Vec'\nexport {\n\tErrorScreen,\n\tLoadingScreen,\n\tTldrawEditor,\n\tuseOnMount,\n\ttype LoadingScreenProps,\n\ttype TldrawEditorBaseProps,\n\ttype TldrawEditorProps,\n\ttype TldrawEditorStoreProps,\n\ttype TldrawEditorWithoutStoreProps,\n\ttype TldrawEditorWithStoreProps,\n\ttype TLOnMountHandler,\n} from './lib/TldrawEditor'\nexport { dataUrlToFile, getDefaultCdnBaseUrl } from './lib/utils/assets'\nexport { clampToBrowserMaxCanvasSize, type CanvasMaxSize } from './lib/utils/browserCanvasMaxSize'\nexport {\n\tcreateDebugValue,\n\tdebugFlags,\n\tfeatureFlags,\n\ttype DebugFlag,\n\ttype DebugFlagDef,\n\ttype DebugFlagDefaults,\n} from './lib/utils/debug-flags'\nexport {\n\tcreateDeepLinkString,\n\tparseDeepLinkString,\n\ttype TLDeepLink,\n\ttype TLDeepLinkOptions,\n} from './lib/utils/deepLinks'\nexport {\n\tactiveElementShouldCaptureKeys,\n\telementShouldCaptureKeys,\n\tgetGlobalDocument,\n\tgetGlobalWindow,\n\tloopToHtmlElement,\n\tmoveElementInto,\n\tpreventDefault,\n\treleasePointerCapture,\n\tsetPointerCapture,\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated\n\tstopEventPropagation,\n} from './lib/utils/dom'\nexport { EditorAtom } from './lib/utils/EditorAtom'\nexport { getIncrementedName } from './lib/utils/getIncrementedName'\nexport { getPointerInfo } from './lib/utils/getPointerInfo'\nexport { getSvgPathFromPoints } from './lib/utils/getSvgPathFromPoints'\nexport { isAccelKey } from './lib/utils/keyboard'\nexport { normalizeWheel } from './lib/utils/normalizeWheel'\nexport { getDroppedShapesToNewParents, kickoutOccludedShapes } from './lib/utils/reparenting'\nexport {\n\tgetFontsFromRichText,\n\ttype RichTextFontVisitor,\n\ttype RichTextFontVisitorState,\n\ttype TiptapEditor,\n\ttype TiptapNode,\n\ttype TLTextOptions,\n} from './lib/utils/richText'\nexport {\n\tapplyRotationToSnapshotShapes,\n\tgetRotationSnapshot,\n\ttype TLRotationSnapshot,\n} from './lib/utils/rotation'\nexport {\n\thardResetEditor,\n\topenWindow,\n\trefreshPage,\n\truntime,\n\tsetRuntimeOverrides,\n} from './lib/utils/runtime'\nexport {\n\tReadonlySharedStyleMap,\n\tSharedStyleMap,\n\ttype SharedStyle,\n} from './lib/utils/SharedStylesMap'\nexport { hardReset } from './lib/utils/sync/hardReset'\nexport { LocalIndexedDb, Table, type StoreName } from './lib/utils/sync/LocalIndexedDb'\nexport { type TLStoreWithStatus } from './lib/utils/sync/StoreWithStatus'\nexport { uniq } from './lib/utils/uniq'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n\nexport { getColorValue } from './lib/editor/managers/ThemeManager/defaultThemes'\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA6C;AAG7C,0BAAc,0BAHd;AAKA,0BAAc,gCALd;AAOA,0BAAc,0BAPd;AASA,0BAAc,6BATd;AAWA,0BAAc,0BAXd;AAaA,0BAAc,6BAbd;AAeA,+BAAkC;AAClC,2BAGO;AACP,2BAGO;AACP,kCAGO;AACP,yBAA8C;AAE9C,iCAGO;AACP,4BAA+B;AAC/B,4BAA+B;AAC/B,0BAIO;AACP,2BAIO;AACP,2BAAuD;AACvD,8BAAiC;AACjC,0BAAqD;AACrD,iCAIO;AACP,2BASO;AAGP,2BAA2D;AAC3D,8BAKO;AACP,oCAOO;AACP,+BAQO;AACP,uBAAyE;AACzE,uBAAuD;AACvD,yBASO;AACP,oBAMO;AACP,0BAAgD;AAChD,+BAAkC;AAClC,yBAA4B;AAC5B,4BAA+B;AAC/B,2BAA8B;AAC9B,2BAA8B;AAC9B,6BAIO;AACP,yBAIO;AACP,yBAAqD;AACrD,yBAMO;AACP,iCAAoC;AACpC,yBAOO;AACP,2BAA8B;AAC9B,0BAA4C;AAC5C,yBAA4B;AAC5B,kCAAqC;AACrC,mCAAsC;AACtC,gCAAmC;AAcnC,oCAAuC;AACvC,8BAAsD;AACtD,oCAAuC;AACvC,4BAA+B;AAC/B,uBAiBO;AACP,qCAGO;AACP,4BAAoD;AACpD,yBAKO;AACP,mCAAsC;AACtC,iCAGO;AACP,uBAAiD;AACjD,0BAA6B;AAC7B,8BAAiC;AACjC,sBAAgC;AAChC,uBAAuD;AAGvD,yBAiCO;AA4CP,8BAKO;AACP,sBAAiD;AACjD,2BAA8B;AAC9B,yBAAqC;AACrC,mBAAwB;AACxB,kBAAuB;AACvB,0BAKO;AACP,0BAA6B;AAC7B,uBAA0B;AAC1B,uBAMO;AACP,iCAAoC;AAEpC,sBAA2C;AAC3C,iCAAoC;AACpC,yBAAkE;AAClE,2BAA8B;AAC9B,0BAA6B;AAC7B,2BAA8B;AAC9B,uCAA0C;AAC1C,wBAA2B;AAC3B,yBAA4B;AAC5B,yBAA4B;AAC5B,uBAMO;AACP,0BAA6B;AAC7B,2BAAmC;AACnC,wBAAiD;
|
|
4
|
+
"sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\n\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/state'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/state-react'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/store'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/tlschema'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/utils'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/validate'\n\nexport { DefaultBackground } from './lib/components/default-components/DefaultBackground'\nexport {\n\tDefaultCanvas,\n\ttype TLCanvasComponentProps,\n} from './lib/components/default-components/DefaultCanvas'\nexport {\n\tDefaultCursor,\n\ttype TLCursorProps,\n} from './lib/components/default-components/DefaultCursor'\nexport {\n\tDefaultErrorFallback,\n\ttype TLErrorFallbackComponent,\n} from './lib/components/default-components/DefaultErrorFallback'\nexport { DefaultGrid, type TLGridProps } from './lib/components/default-components/DefaultGrid'\nexport { type TLShapeErrorFallbackComponent } from './lib/components/default-components/DefaultShapeErrorFallback'\nexport {\n\tDefaultShapeWrapper,\n\ttype TLShapeWrapperProps,\n} from './lib/components/default-components/DefaultShapeWrapper'\nexport { DefaultSpinner } from './lib/components/default-components/DefaultSpinner'\nexport { DefaultSvgDefs } from './lib/components/default-components/DefaultSvgDefs'\nexport {\n\tEditorPortal,\n\tuseEditorPortalHost,\n\ttype EditorPortalProps,\n} from './lib/components/EditorPortal'\nexport {\n\tErrorBoundary,\n\tOptionalErrorBoundary,\n\ttype TLErrorBoundaryProps,\n} from './lib/components/ErrorBoundary'\nexport { HTMLContainer, type HTMLContainerProps } from './lib/components/HTMLContainer'\nexport { MenuClickCapture } from './lib/components/MenuClickCapture'\nexport { SVGContainer, type SVGContainerProps } from './lib/components/SVGContainer'\nexport {\n\tcreateTLCurrentUser,\n\tuseTldrawCurrentUser,\n\ttype TLCurrentUser,\n} from './lib/config/createTLCurrentUser'\nexport {\n\tcreateTLSchemaFromUtils,\n\tcreateTLStore,\n\tdefaultUserStore,\n\tinlineBase64AssetStore,\n\ttype TLStoreBaseOptions,\n\ttype TLStoreEventInfo,\n\ttype TLStoreOptions,\n\ttype TLStoreSchemaOptions,\n} from './lib/config/createTLStore'\nexport { type TLAnyAssetUtilConstructor } from './lib/config/defaultAssets'\nexport { type TLAnyBindingUtilConstructor } from './lib/config/defaultBindings'\nexport { coreShapes, type TLAnyShapeUtilConstructor } from './lib/config/defaultShapes'\nexport {\n\tgetSnapshot,\n\tloadSnapshot,\n\ttype TLEditorSnapshot,\n\ttype TLLoadSnapshotOptions,\n} from './lib/config/TLEditorSnapshot'\nexport {\n\tcreateSessionStateSnapshotSignal,\n\textractSessionStateFromLegacySnapshot,\n\tloadSessionStateSnapshotIntoStore,\n\tTAB_ID,\n\ttype TLLoadSessionStateSnapshotOptions,\n\ttype TLSessionStateSnapshot,\n} from './lib/config/TLSessionStateSnapshot'\nexport {\n\tdefaultUserPreferences,\n\tgetFreshUserPreferences,\n\tgetUserPreferences,\n\tsetUserPreferences,\n\tUSER_COLORS,\n\tuserTypeValidator,\n\ttype TLUserPreferences,\n} from './lib/config/TLUserPreferences'\nexport { DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS, SIDES } from './lib/constants'\nexport { AssetUtil, type TLAssetUtilConstructor } from './lib/editor/assets/AssetUtil'\nexport {\n\tBindingUtil,\n\ttype BindingOnChangeOptions,\n\ttype BindingOnCreateOptions,\n\ttype BindingOnDeleteOptions,\n\ttype BindingOnShapeChangeOptions,\n\ttype BindingOnShapeDeleteOptions,\n\ttype BindingOnShapeIsolateOptions,\n\ttype TLBindingUtilConstructor,\n} from './lib/editor/bindings/BindingUtil'\nexport {\n\tEditor,\n\ttype TLEditorOptions,\n\ttype TLEditorRunOptions,\n\ttype TLRenderingShape,\n\ttype TLResizeShapeOptions,\n} from './lib/editor/Editor'\nexport { ClickManager, type TLClickState } from './lib/editor/managers/ClickManager/ClickManager'\nexport { EdgeScrollManager } from './lib/editor/managers/EdgeScrollManager/EdgeScrollManager'\nexport { FontManager } from './lib/editor/managers/FontManager/FontManager'\nexport { HistoryManager } from './lib/editor/managers/HistoryManager/HistoryManager'\nexport { EditorManager } from './lib/editor/managers/EditorManager'\nexport { InputsManager } from './lib/editor/managers/InputsManager/InputsManager'\nexport {\n\tScribbleManager,\n\ttype ScribbleItem,\n\ttype ScribbleSessionOptions,\n} from './lib/editor/managers/ScribbleManager/ScribbleManager'\nexport {\n\tBoundsSnaps,\n\ttype BoundsSnapGeometry,\n\ttype BoundsSnapPoint,\n} from './lib/editor/managers/SnapManager/BoundsSnaps'\nexport { HandleSnaps, type HandleSnapGeometry } from './lib/editor/managers/SnapManager/HandleSnaps'\nexport {\n\tSnapManager,\n\ttype GapsSnapIndicator,\n\ttype PointsSnapIndicator,\n\ttype SnapData,\n\ttype SnapIndicator,\n} from './lib/editor/managers/SnapManager/SnapManager'\nexport { SpatialIndexManager } from './lib/editor/managers/SpatialIndexManager/SpatialIndexManager'\nexport {\n\tTextManager,\n\tresolveLineHeightPx,\n\ttype BatchMeasurementRequest,\n\ttype TLMeasuredTextSize,\n\ttype TLMeasureTextOpts,\n\ttype TLMeasureTextSpanOpts,\n} from './lib/editor/managers/TextManager/TextManager'\nexport { DEFAULT_THEME } from './lib/editor/managers/ThemeManager/defaultThemes'\nexport { ThemeManager, resolveThemes } from './lib/editor/managers/ThemeManager/ThemeManager'\nexport { TickManager } from './lib/editor/managers/TickManager/TickManager'\nexport { CollaboratorsManager } from './lib/editor/managers/CollaboratorsManager/CollaboratorsManager'\nexport { PerformanceApiAdapter } from './lib/editor/managers/PerformanceManager/PerformanceApiAdapter'\nexport { PerformanceManager } from './lib/editor/managers/PerformanceManager/PerformanceManager'\nexport {\n\ttype TLCameraEndPerfEvent,\n\ttype TLCameraStartPerfEvent,\n\ttype TLFramePerfEvent,\n\ttype TLInteractionEndPerfEvent,\n\ttype TLInteractionStartPerfEvent,\n\ttype TLPerfEventMap,\n\ttype TLPerfFrameTimeStats,\n\ttype TLPerfLongAnimationFrame,\n\ttype TLPerfLongAnimationFrameScript,\n\ttype TLShapeOperationPerfEvent,\n\ttype TLUndoRedoPerfEvent,\n} from './lib/editor/managers/PerformanceManager/perf-types'\nexport { UserPreferencesManager } from './lib/editor/managers/UserPreferencesManager/UserPreferencesManager'\nexport { BaseBoxShapeUtil, type TLBaseBoxShape } from './lib/editor/shapes/BaseBoxShapeUtil'\nexport { BaseFrameLikeShapeUtil } from './lib/editor/shapes/BaseFrameLikeShapeUtil'\nexport { GroupShapeUtil } from './lib/editor/shapes/group/GroupShapeUtil'\nexport {\n\tShapeUtil,\n\ttype TLCropInfo,\n\ttype TLDragShapesInInfo,\n\ttype TLDragShapesOutInfo,\n\ttype TLDragShapesOverInfo,\n\ttype TLDropShapesOverInfo,\n\ttype TLEditStartInfo,\n\ttype TLGeometryOpts,\n\ttype TLHandleDragInfo,\n\ttype TLIndicatorPath,\n\ttype TLResizeInfo,\n\ttype TLResizeMode,\n\ttype TLShapeUtilCanBeLaidOutOpts,\n\ttype TLShapeUtilCanBindOpts,\n\ttype TLShapeUtilCanvasSvgDef,\n\ttype TLShapeUtilConstructor,\n} from './lib/editor/shapes/ShapeUtil'\nexport {\n\tgetOverlayDisplayValues,\n\ttype OverlayOptionsWithDisplayValues,\n} from './lib/editor/overlays/getOverlayDisplayValues'\nexport { OverlayManager, type TLOverlayEntry } from './lib/editor/overlays/OverlayManager'\nexport {\n\tOverlayUtil,\n\ttype TLAnyOverlayUtilConstructor,\n\ttype TLOverlay,\n\ttype TLOverlayUtilConstructor,\n} from './lib/editor/overlays/OverlayUtil'\nexport { strokeShapeIndicators } from './lib/editor/overlays/strokeShapeIndicators'\nexport {\n\tgetPerfectDashProps,\n\ttype PerfectDashTerminal,\n} from './lib/editor/shapes/shared/getPerfectDashProps'\nexport { resizeBox, type ResizeBoxOptions } from './lib/editor/shapes/shared/resizeBox'\nexport { resizeScaled } from './lib/editor/shapes/shared/resizeScaled'\nexport { BaseBoxShapeTool } from './lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool'\nexport { maybeSnapToGrid } from './lib/editor/tools/BaseBoxShapeTool/children/Pointing'\nexport { StateNode, type TLStateNodeConstructor } from './lib/editor/tools/StateNode'\nexport { type TLContent } from './lib/editor/types/clipboard-types'\nexport { type TLEventMap, type TLEventMapHandler } from './lib/editor/types/emit-types'\nexport {\n\tEVENT_NAME_MAP,\n\ttype TLBaseEventInfo,\n\ttype TLCancelEvent,\n\ttype TLCancelEventInfo,\n\ttype TLClickEvent,\n\ttype TLClickEventInfo,\n\ttype TLCLickEventName,\n\ttype TLCompleteEvent,\n\ttype TLCompleteEventInfo,\n\ttype TLEnterEventHandler,\n\ttype TLEventHandlers,\n\ttype TLEventInfo,\n\ttype TLEventName,\n\ttype TLExitEventHandler,\n\ttype TLInterruptEvent,\n\ttype TLInterruptEventInfo,\n\ttype TLKeyboardEvent,\n\ttype TLKeyboardEventInfo,\n\ttype TLKeyboardEventName,\n\ttype TLPinchEvent,\n\ttype TLPinchEventInfo,\n\ttype TLPinchEventName,\n\ttype TLPointerEvent,\n\ttype TLPointerEventInfo,\n\ttype TLPointerEventName,\n\ttype TLPointerEventTarget,\n\ttype TLTickEvent,\n\ttype TLTickEventInfo,\n\ttype TLWheelEvent,\n\ttype TLWheelEventInfo,\n\ttype UiEvent,\n\ttype UiEventType,\n} from './lib/editor/types/event-types'\nexport {\n\ttype TLBaseExternalContent,\n\ttype TLEmbedExternalContent,\n\ttype TLErrorExternalContentSource,\n\ttype TLExcalidrawExternalContent,\n\ttype TLExcalidrawExternalContentSource,\n\ttype TLExternalAsset,\n\ttype TLExternalContent,\n\ttype TLExternalContentSource,\n\ttype TLFileExternalAsset,\n\ttype TLFileReplaceExternalContent,\n\ttype TLFilesExternalContent,\n\ttype TLSvgTextExternalContent,\n\ttype TLTextExternalContent,\n\ttype TLTextExternalContentSource,\n\ttype TLTldrawExternalContent,\n\ttype TLTldrawExternalContentSource,\n\ttype TLUrlExternalAsset,\n\ttype TLUrlExternalContent,\n} from './lib/editor/types/external-content'\nexport {\n\ttype TLHistoryBatchOptions,\n\ttype TLHistoryDiff,\n\ttype TLHistoryEntry,\n\ttype TLHistoryMark,\n} from './lib/editor/types/history-types'\nexport {\n\ttype OptionalKeys,\n\ttype RequiredKeys,\n\ttype TLCameraConstraints,\n\ttype TLCameraMoveOptions,\n\ttype TLCameraOptions,\n\ttype TLExportType,\n\ttype TLGetShapeAtPointOptions,\n\ttype TLImageExportOptions,\n\ttype TLSvgExportOptions,\n\ttype TLUpdatePointerOptions,\n} from './lib/editor/types/misc-types'\nexport {\n\ttype TLAdjacentDirection,\n\ttype TLResizeHandle,\n\ttype TLSelectionHandle,\n} from './lib/editor/types/selection-types'\nexport {\n\tuseDelaySvgExport,\n\tuseSvgExportContext,\n\ttype SvgExportContext,\n\ttype SvgExportDef,\n} from './lib/editor/types/SvgExportContext'\nexport { getOwnerDocument, getOwnerWindow } from './lib/exports/domUtils'\nexport { getSvgAsImage } from './lib/exports/getSvgAsImage'\nexport { tlenv, tlenvReactive } from './lib/globals/environment'\nexport { tleditors } from './lib/globals/editors'\nexport { tlmenus } from './lib/globals/menus'\nexport { tltime } from './lib/globals/time'\nexport {\n\tContainerProvider,\n\tuseContainer,\n\tuseContainerIfExists,\n\ttype ContainerProviderProps,\n} from './lib/hooks/useContainer'\nexport { useColorMode } from './lib/hooks/useColorMode'\nexport { getCursor } from './lib/hooks/useCursor'\nexport {\n\tEditorContext,\n\tEditorProvider,\n\tuseEditor,\n\tuseMaybeEditor,\n\ttype EditorProviderProps,\n} from './lib/hooks/useEditor'\nexport { useEditorComponents } from './lib/hooks/useEditorComponents'\nexport type { TLEditorComponents } from './lib/hooks/useEditorComponents'\nexport { useEvent, useReactiveEvent } from './lib/hooks/useEvent'\nexport { useGlobalMenuIsOpen } from './lib/hooks/useGlobalMenuIsOpen'\nexport { useShallowArrayIdentity, useShallowObjectIdentity } from './lib/hooks/useIdentity'\nexport { useIsCropping } from './lib/hooks/useIsCropping'\nexport { useIsEditing } from './lib/hooks/useIsEditing'\nexport { useLocalStore } from './lib/hooks/useLocalStore'\nexport { usePassThroughWheelEvents } from './lib/hooks/usePassThroughWheelEvents'\nexport { usePeerIds } from './lib/hooks/usePeerIds'\nexport { usePresence } from './lib/hooks/usePresence'\nexport { useRefState } from './lib/hooks/useRefState'\nexport {\n\tsanitizeId,\n\tsuffixSafeId,\n\tuseSharedSafeId,\n\tuseUniqueSafeId,\n\ttype SafeId,\n} from './lib/hooks/useSafeId'\nexport { useTransform } from './lib/hooks/useTransform'\nexport { isCursorInViewport } from './lib/utils/collaborators'\nexport { useTLSchemaFromUtils, useTLStore } from './lib/hooks/useTLStore'\n// oxlint-disable-next-line typescript/no-deprecated\nexport { useViewportHeight } from './lib/hooks/useViewportHeight'\nexport {\n\tLicenseManager,\n\ttype InvalidLicenseKeyResult,\n\ttype InvalidLicenseReason,\n\ttype LicenseFeatureName,\n\ttype LicenseFromKeyResult,\n\ttype LicenseInfo,\n\ttype LicenseState,\n\ttype ValidLicenseKeyResult,\n} from './lib/license/LicenseManager'\nexport {\n\tLICENSE_TIMEOUT,\n\tuseLicenseContext,\n\tuseMaybeLicenseManager,\n} from './lib/license/LicenseProvider'\nexport { useLicenseFeatureFlag } from './lib/license/useLicenseManagerState'\nexport {\n\tdefaultTldrawOptions,\n\ttype TLClipboardPasteRawInfo,\n\ttype TLClipboardWriteInfo,\n\ttype TldrawOptions,\n} from './lib/options'\nexport {\n\tBox,\n\tROTATE_CORNER_TO_SELECTION_CORNER,\n\trotateSelectionHandle,\n\ttype BoxLike,\n\ttype RotateCorner,\n\ttype SelectionCorner,\n\ttype SelectionEdge,\n\ttype SelectionHandle,\n} from './lib/primitives/Box'\nexport { EASINGS } from './lib/primitives/easings'\nexport { Arc2d } from './lib/primitives/geometry/Arc2d'\nexport { Circle2d } from './lib/primitives/geometry/Circle2d'\nexport { CubicBezier2d } from './lib/primitives/geometry/CubicBezier2d'\nexport { CubicSpline2d } from './lib/primitives/geometry/CubicSpline2d'\nexport { Edge2d } from './lib/primitives/geometry/Edge2d'\nexport { Ellipse2d } from './lib/primitives/geometry/Ellipse2d'\nexport { getVerticesCountForArcLength } from './lib/primitives/geometry/geometry-constants'\nexport {\n\tGeometry2d,\n\tGeometry2dFilters,\n\tTransformedGeometry2d,\n\ttype Geometry2dOptions,\n\ttype TransformedGeometry2dOptions,\n} from './lib/primitives/geometry/Geometry2d'\nexport { Group2d } from './lib/primitives/geometry/Group2d'\nexport { Point2d } from './lib/primitives/geometry/Point2d'\nexport { Polygon2d } from './lib/primitives/geometry/Polygon2d'\nexport { Polyline2d } from './lib/primitives/geometry/Polyline2d'\nexport { Rectangle2d } from './lib/primitives/geometry/Rectangle2d'\nexport { Stadium2d } from './lib/primitives/geometry/Stadium2d'\nexport {\n\tintersectCircleCircle,\n\tintersectCirclePolygon,\n\tintersectCirclePolyline,\n\tintersectLineSegmentCircle,\n\tintersectLineSegmentLineSegment,\n\tintersectLineSegmentPolygon,\n\tintersectLineSegmentPolyline,\n\tintersectPolygonBounds,\n\tintersectPolygonPolygon,\n\tlinesIntersect,\n\tpolygonIntersectsPolyline,\n\tpolygonsIntersect,\n} from './lib/primitives/intersect'\nexport { Mat, type MatLike, type MatModel } from './lib/primitives/Mat'\nexport {\n\tangleDistance,\n\tapproximately,\n\tareAnglesCompatible,\n\taverage,\n\tcanonicalizeRotation,\n\tcenterOfCircleFromThreePoints,\n\tclamp,\n\tclampRadians,\n\tclockwiseAngleDist,\n\tcounterClockwiseAngleDist,\n\tdegreesToRadians,\n\tgetArcMeasure,\n\tgetPointInArcT,\n\tgetPointOnCircle,\n\tgetPointsOnArc,\n\tgetPolygonVertices,\n\tHALF_PI,\n\tisSafeFloat,\n\tperimeterOfEllipse,\n\tPI,\n\tPI2,\n\tpointInPolygon,\n\tprecise,\n\tradiansToDegrees,\n\trangeIntersection,\n\tshortAngleDist,\n\tSIN,\n\tsnapAngle,\n\ttoDomPrecision,\n\ttoFixed,\n\ttoPrecision,\n} from './lib/primitives/utils'\nexport { Vec, type VecLike } from './lib/primitives/Vec'\nexport {\n\tErrorScreen,\n\tLoadingScreen,\n\tTldrawEditor,\n\tuseOnMount,\n\ttype LoadingScreenProps,\n\ttype TldrawEditorBaseProps,\n\ttype TldrawEditorProps,\n\ttype TldrawEditorStoreProps,\n\ttype TldrawEditorWithoutStoreProps,\n\ttype TldrawEditorWithStoreProps,\n\ttype TLOnMountHandler,\n} from './lib/TldrawEditor'\nexport { dataUrlToFile, getDefaultCdnBaseUrl } from './lib/utils/assets'\nexport { clampToBrowserMaxCanvasSize, type CanvasMaxSize } from './lib/utils/browserCanvasMaxSize'\nexport {\n\tcreateDebugValue,\n\tdebugFlags,\n\tfeatureFlags,\n\ttype DebugFlag,\n\ttype DebugFlagDef,\n\ttype DebugFlagDefaults,\n} from './lib/utils/debug-flags'\nexport {\n\tcreateDeepLinkString,\n\tparseDeepLinkString,\n\ttype TLDeepLink,\n\ttype TLDeepLinkOptions,\n} from './lib/utils/deepLinks'\nexport {\n\tactiveElementShouldCaptureKeys,\n\telementShouldCaptureKeys,\n\tgetGlobalDocument,\n\tgetGlobalWindow,\n\tloopToHtmlElement,\n\tmoveElementInto,\n\tpreventDefault,\n\treleasePointerCapture,\n\tsetPointerCapture,\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated\n\tstopEventPropagation,\n} from './lib/utils/dom'\nexport { EditorAtom } from './lib/utils/EditorAtom'\nexport { getIncrementedName } from './lib/utils/getIncrementedName'\nexport { getPointerInfo } from './lib/utils/getPointerInfo'\nexport { getSvgPathFromPoints } from './lib/utils/getSvgPathFromPoints'\nexport { isAccelKey } from './lib/utils/keyboard'\nexport { normalizeWheel } from './lib/utils/normalizeWheel'\nexport { getDroppedShapesToNewParents, kickoutOccludedShapes } from './lib/utils/reparenting'\nexport {\n\tgetFontsFromRichText,\n\ttype RichTextFontVisitor,\n\ttype RichTextFontVisitorState,\n\ttype TiptapEditor,\n\ttype TiptapNode,\n\ttype TLTextOptions,\n} from './lib/utils/richText'\nexport {\n\tapplyRotationToSnapshotShapes,\n\tgetRotationSnapshot,\n\ttype TLRotationSnapshot,\n} from './lib/utils/rotation'\nexport {\n\thardResetEditor,\n\topenWindow,\n\trefreshPage,\n\truntime,\n\tsetRuntimeOverrides,\n} from './lib/utils/runtime'\nexport {\n\tReadonlySharedStyleMap,\n\tSharedStyleMap,\n\ttype SharedStyle,\n} from './lib/utils/SharedStylesMap'\nexport { hardReset } from './lib/utils/sync/hardReset'\nexport { LocalIndexedDb, Table, type StoreName } from './lib/utils/sync/LocalIndexedDb'\nexport { type TLStoreWithStatus } from './lib/utils/sync/StoreWithStatus'\nexport { uniq } from './lib/utils/uniq'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n\nexport { getColorValue } from './lib/editor/managers/ThemeManager/defaultThemes'\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA6C;AAG7C,0BAAc,0BAHd;AAKA,0BAAc,gCALd;AAOA,0BAAc,0BAPd;AASA,0BAAc,6BATd;AAWA,0BAAc,0BAXd;AAaA,0BAAc,6BAbd;AAeA,+BAAkC;AAClC,2BAGO;AACP,2BAGO;AACP,kCAGO;AACP,yBAA8C;AAE9C,iCAGO;AACP,4BAA+B;AAC/B,4BAA+B;AAC/B,0BAIO;AACP,2BAIO;AACP,2BAAuD;AACvD,8BAAiC;AACjC,0BAAqD;AACrD,iCAIO;AACP,2BASO;AAGP,2BAA2D;AAC3D,8BAKO;AACP,oCAOO;AACP,+BAQO;AACP,uBAAyE;AACzE,uBAAuD;AACvD,yBASO;AACP,oBAMO;AACP,0BAAgD;AAChD,+BAAkC;AAClC,yBAA4B;AAC5B,4BAA+B;AAC/B,2BAA8B;AAC9B,2BAA8B;AAC9B,6BAIO;AACP,yBAIO;AACP,yBAAqD;AACrD,yBAMO;AACP,iCAAoC;AACpC,yBAOO;AACP,2BAA8B;AAC9B,0BAA4C;AAC5C,yBAA4B;AAC5B,kCAAqC;AACrC,mCAAsC;AACtC,gCAAmC;AAcnC,oCAAuC;AACvC,8BAAsD;AACtD,oCAAuC;AACvC,4BAA+B;AAC/B,uBAiBO;AACP,qCAGO;AACP,4BAAoD;AACpD,yBAKO;AACP,mCAAsC;AACtC,iCAGO;AACP,uBAAiD;AACjD,0BAA6B;AAC7B,8BAAiC;AACjC,sBAAgC;AAChC,uBAAuD;AAGvD,yBAiCO;AA4CP,8BAKO;AACP,sBAAiD;AACjD,2BAA8B;AAC9B,yBAAqC;AACrC,qBAA0B;AAC1B,mBAAwB;AACxB,kBAAuB;AACvB,0BAKO;AACP,0BAA6B;AAC7B,uBAA0B;AAC1B,uBAMO;AACP,iCAAoC;AAEpC,sBAA2C;AAC3C,iCAAoC;AACpC,yBAAkE;AAClE,2BAA8B;AAC9B,0BAA6B;AAC7B,2BAA8B;AAC9B,uCAA0C;AAC1C,wBAA2B;AAC3B,yBAA4B;AAC5B,yBAA4B;AAC5B,uBAMO;AACP,0BAA6B;AAC7B,2BAAmC;AACnC,wBAAiD;AAEjD,+BAAkC;AAClC,4BASO;AACP,6BAIO;AACP,oCAAsC;AACtC,qBAKO;AACP,iBASO;AACP,qBAAwB;AACxB,mBAAsB;AACtB,sBAAyB;AACzB,2BAA8B;AAC9B,2BAA8B;AAC9B,oBAAuB;AACvB,uBAA0B;AAC1B,gCAA6C;AAC7C,wBAMO;AACP,qBAAwB;AACxB,qBAAwB;AACxB,uBAA0B;AAC1B,wBAA2B;AAC3B,yBAA4B;AAC5B,uBAA0B;AAC1B,uBAaO;AACP,iBAAiD;AACjD,IAAAA,gBAgCO;AACP,iBAAkC;AAClC,0BAYO;AACP,oBAAoD;AACpD,kCAAgE;AAChE,yBAOO;AACP,uBAKO;AACP,iBAYO;AACP,wBAA2B;AAC3B,gCAAmC;AACnC,4BAA+B;AAC/B,kCAAqC;AACrC,sBAA2B;AAC3B,4BAA+B;AAC/B,yBAAoE;AACpE,sBAOO;AACP,sBAIO;AACP,qBAMO;AACP,6BAIO;AACP,uBAA0B;AAC1B,4BAAsD;AAEtD,kBAAqB;AAQrB,IAAAC,wBAA8B;AAAA,IAN9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": ["import_utils", "import_defaultThemes"]
|
|
7
7
|
}
|