@tldraw/editor 4.4.0-canary.cba9b1552dc6 → 4.4.0-canary.cfef7eb24259
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 +273 -30
- package/dist-cjs/index.js +1 -6
- package/dist-cjs/index.js.map +3 -3
- package/dist-cjs/lib/TldrawEditor.js +20 -8
- package/dist-cjs/lib/TldrawEditor.js.map +2 -2
- package/dist-cjs/lib/components/LiveCollaborators.js +14 -24
- package/dist-cjs/lib/components/LiveCollaborators.js.map +2 -2
- package/dist-cjs/lib/components/Shape.js +12 -17
- package/dist-cjs/lib/components/Shape.js.map +2 -2
- package/dist-cjs/lib/components/default-components/CanvasShapeIndicators.js +226 -0
- package/dist-cjs/lib/components/default-components/CanvasShapeIndicators.js.map +7 -0
- package/dist-cjs/lib/components/default-components/DefaultCanvas.js +45 -15
- package/dist-cjs/lib/components/default-components/DefaultCanvas.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultShapeIndicator.js +3 -1
- package/dist-cjs/lib/components/default-components/DefaultShapeIndicator.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultShapeIndicators.js +13 -1
- package/dist-cjs/lib/components/default-components/DefaultShapeIndicators.js.map +2 -2
- package/dist-cjs/lib/config/createTLStore.js.map +1 -1
- package/dist-cjs/lib/editor/Editor.js +35 -17
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/derivations/notVisibleShapes.js +32 -13
- package/dist-cjs/lib/editor/derivations/notVisibleShapes.js.map +2 -2
- package/dist-cjs/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.js +2 -3
- package/dist-cjs/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.js.map +2 -2
- package/dist-cjs/lib/editor/managers/HistoryManager/HistoryManager.js +13 -38
- package/dist-cjs/lib/editor/managers/HistoryManager/HistoryManager.js.map +3 -3
- package/dist-cjs/lib/editor/managers/ScribbleManager/ScribbleManager.js +378 -89
- package/dist-cjs/lib/editor/managers/ScribbleManager/ScribbleManager.js.map +2 -2
- package/dist-cjs/lib/editor/shapes/ShapeUtil.js +29 -0
- package/dist-cjs/lib/editor/shapes/ShapeUtil.js.map +2 -2
- package/dist-cjs/lib/editor/tools/RootState.js +0 -13
- package/dist-cjs/lib/editor/tools/RootState.js.map +2 -2
- package/dist-cjs/lib/hooks/usePeerIds.js +35 -0
- package/dist-cjs/lib/hooks/usePeerIds.js.map +2 -2
- package/dist-cjs/lib/hooks/useShapeCulling.js +75 -0
- package/dist-cjs/lib/hooks/useShapeCulling.js.map +7 -0
- package/dist-cjs/lib/license/LicenseManager.js +6 -6
- package/dist-cjs/lib/license/LicenseManager.js.map +2 -2
- package/dist-cjs/lib/options.js +7 -1
- package/dist-cjs/lib/options.js.map +2 -2
- package/dist-cjs/lib/utils/collaboratorState.js +42 -0
- package/dist-cjs/lib/utils/collaboratorState.js.map +7 -0
- package/dist-cjs/version.js +3 -3
- package/dist-cjs/version.js.map +1 -1
- package/dist-esm/index.d.mts +273 -30
- package/dist-esm/index.mjs +1 -6
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/TldrawEditor.mjs +20 -8
- package/dist-esm/lib/TldrawEditor.mjs.map +2 -2
- package/dist-esm/lib/components/LiveCollaborators.mjs +17 -24
- package/dist-esm/lib/components/LiveCollaborators.mjs.map +2 -2
- package/dist-esm/lib/components/Shape.mjs +12 -17
- package/dist-esm/lib/components/Shape.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/CanvasShapeIndicators.mjs +206 -0
- package/dist-esm/lib/components/default-components/CanvasShapeIndicators.mjs.map +7 -0
- package/dist-esm/lib/components/default-components/DefaultCanvas.mjs +45 -15
- package/dist-esm/lib/components/default-components/DefaultCanvas.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultShapeIndicator.mjs +3 -1
- package/dist-esm/lib/components/default-components/DefaultShapeIndicator.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultShapeIndicators.mjs +13 -1
- package/dist-esm/lib/components/default-components/DefaultShapeIndicators.mjs.map +2 -2
- package/dist-esm/lib/config/createTLStore.mjs.map +1 -1
- package/dist-esm/lib/editor/Editor.mjs +35 -17
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/lib/editor/derivations/notVisibleShapes.mjs +32 -13
- package/dist-esm/lib/editor/derivations/notVisibleShapes.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.mjs +2 -3
- package/dist-esm/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/HistoryManager/HistoryManager.mjs +14 -39
- package/dist-esm/lib/editor/managers/HistoryManager/HistoryManager.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/ScribbleManager/ScribbleManager.mjs +378 -89
- package/dist-esm/lib/editor/managers/ScribbleManager/ScribbleManager.mjs.map +2 -2
- package/dist-esm/lib/editor/shapes/ShapeUtil.mjs +29 -0
- package/dist-esm/lib/editor/shapes/ShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/editor/tools/RootState.mjs +0 -13
- package/dist-esm/lib/editor/tools/RootState.mjs.map +2 -2
- package/dist-esm/lib/hooks/usePeerIds.mjs +39 -1
- package/dist-esm/lib/hooks/usePeerIds.mjs.map +2 -2
- package/dist-esm/lib/hooks/useShapeCulling.mjs +55 -0
- package/dist-esm/lib/hooks/useShapeCulling.mjs.map +7 -0
- package/dist-esm/lib/license/LicenseManager.mjs +6 -6
- package/dist-esm/lib/license/LicenseManager.mjs.map +2 -2
- package/dist-esm/lib/options.mjs +7 -1
- package/dist-esm/lib/options.mjs.map +2 -2
- package/dist-esm/lib/utils/collaboratorState.mjs +22 -0
- package/dist-esm/lib/utils/collaboratorState.mjs.map +7 -0
- package/dist-esm/version.mjs +3 -3
- package/dist-esm/version.mjs.map +1 -1
- package/editor.css +28 -11
- package/package.json +8 -11
- package/src/index.ts +2 -5
- package/src/lib/TldrawEditor.tsx +35 -13
- package/src/lib/components/LiveCollaborators.tsx +26 -37
- package/src/lib/components/Shape.tsx +15 -16
- package/src/lib/components/default-components/CanvasShapeIndicators.tsx +288 -0
- package/src/lib/components/default-components/DefaultCanvas.tsx +39 -3
- package/src/lib/components/default-components/DefaultShapeIndicator.tsx +6 -1
- package/src/lib/components/default-components/DefaultShapeIndicators.tsx +16 -1
- package/src/lib/config/createTLStore.ts +1 -1
- package/src/lib/editor/Editor.ts +62 -19
- package/src/lib/editor/derivations/notVisibleShapes.ts +39 -17
- package/src/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.test.ts +0 -35
- package/src/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.ts +4 -8
- package/src/lib/editor/managers/HistoryManager/HistoryManager.ts +19 -47
- package/src/lib/editor/managers/ScribbleManager/ScribbleManager.ts +491 -106
- package/src/lib/editor/shapes/ShapeUtil.ts +63 -5
- package/src/lib/editor/tools/RootState.ts +0 -16
- package/src/lib/hooks/usePeerIds.ts +53 -1
- package/src/lib/hooks/useShapeCulling.tsx +98 -0
- package/src/lib/license/LicenseManager.ts +6 -6
- package/src/lib/options.ts +48 -2
- package/src/lib/utils/collaboratorState.ts +54 -0
- package/src/version.ts +3 -3
- package/src/lib/editor/managers/ScribbleManager/ScribbleManager.test.ts +0 -621
package/dist-cjs/index.d.ts
CHANGED
|
@@ -857,6 +857,7 @@ export declare const defaultTldrawOptions: {
|
|
|
857
857
|
readonly actionShortcutsLocation: "swap";
|
|
858
858
|
readonly adjacentShapeMargin: 10;
|
|
859
859
|
readonly animationMediumMs: 320;
|
|
860
|
+
readonly camera: TLCameraOptions;
|
|
860
861
|
readonly cameraMovingTimeoutMs: 64;
|
|
861
862
|
readonly cameraSlideFriction: 0.09;
|
|
862
863
|
readonly coarseDragDistanceSquared: 36;
|
|
@@ -868,6 +869,7 @@ export declare const defaultTldrawOptions: {
|
|
|
868
869
|
readonly createTextOnCanvasDoubleClick: true;
|
|
869
870
|
readonly debouncedZoom: true;
|
|
870
871
|
readonly debouncedZoomThreshold: 500;
|
|
872
|
+
readonly deepLinks: undefined;
|
|
871
873
|
readonly defaultSvgPadding: 32;
|
|
872
874
|
readonly doubleClickDurationMs: 450;
|
|
873
875
|
readonly dragDistanceSquared: 16;
|
|
@@ -900,6 +902,7 @@ export declare const defaultTldrawOptions: {
|
|
|
900
902
|
readonly handleRadius: 12;
|
|
901
903
|
readonly hitTestMargin: 8;
|
|
902
904
|
readonly laserDelayMs: 1200;
|
|
905
|
+
readonly laserFadeoutMs: 500;
|
|
903
906
|
readonly longPressDurationMs: 500;
|
|
904
907
|
readonly maxExportDelayMs: 5000;
|
|
905
908
|
readonly maxFilesAtOnce: 100;
|
|
@@ -908,9 +911,11 @@ export declare const defaultTldrawOptions: {
|
|
|
908
911
|
readonly maxShapesPerPage: 4000;
|
|
909
912
|
readonly multiClickDurationMs: 200;
|
|
910
913
|
readonly nonce: undefined;
|
|
914
|
+
readonly quickZoomPreservesScreenBounds: true;
|
|
911
915
|
readonly snapThreshold: 8;
|
|
912
916
|
readonly spacebarPanning: true;
|
|
913
917
|
readonly temporaryAssetPreviewLifetimeMs: 180000;
|
|
918
|
+
readonly text: {};
|
|
914
919
|
readonly textShadowLod: 0.35;
|
|
915
920
|
readonly tooltipDelayMs: 700;
|
|
916
921
|
readonly uiCoarseDragDistanceSquared: 625;
|
|
@@ -1010,7 +1015,7 @@ export declare class EdgeScrollManager {
|
|
|
1010
1015
|
/** @public */
|
|
1011
1016
|
export declare class Editor extends EventEmitter<TLEventMap> {
|
|
1012
1017
|
readonly id: string;
|
|
1013
|
-
constructor({ store, user, shapeUtils, bindingUtils, tools, getContainer, cameraOptions,
|
|
1018
|
+
constructor({ store, user, shapeUtils, bindingUtils, tools, getContainer, cameraOptions, initialState, autoFocus, inferDarkMode, options: _options, textOptions: _textOptions, getShapeVisibility, fontAssetUrls, }: TLEditorOptions);
|
|
1014
1019
|
private readonly _getShapeVisibility?;
|
|
1015
1020
|
private getIsShapeHiddenCache;
|
|
1016
1021
|
isShapeHidden(shapeOrId: TLShape | TLShapeId): boolean;
|
|
@@ -1905,7 +1910,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1905
1910
|
getDebouncedZoomLevel(): number;
|
|
1906
1911
|
private _getAboveDebouncedZoomThreshold;
|
|
1907
1912
|
/**
|
|
1908
|
-
* Get the efficient zoom level. This returns the current zoom level if there are less than
|
|
1913
|
+
* Get the efficient zoom level. This returns the current zoom level if there are less than a certain number of shapes on the page,
|
|
1909
1914
|
* otherwise it returns the debounced zoom level. This can be used to avoid expensive re-renders during camera movements.
|
|
1910
1915
|
*
|
|
1911
1916
|
* @public
|
|
@@ -2258,10 +2263,10 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2258
2263
|
*/
|
|
2259
2264
|
stopFollowingUser(): this;
|
|
2260
2265
|
/* Excluded from this release type: getUnorderedRenderingShapes */
|
|
2261
|
-
private _cameraState;
|
|
2262
2266
|
private _cameraStateTimeoutRemaining;
|
|
2263
2267
|
private _decayCameraStateTimeout;
|
|
2264
2268
|
private _tickCameraState;
|
|
2269
|
+
private _setCameraState;
|
|
2265
2270
|
/**
|
|
2266
2271
|
* Whether the camera is moving or idle.
|
|
2267
2272
|
*
|
|
@@ -2760,7 +2765,24 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2760
2765
|
hitInside?: boolean;
|
|
2761
2766
|
margin?: number;
|
|
2762
2767
|
}): TLShape[];
|
|
2763
|
-
|
|
2768
|
+
/**
|
|
2769
|
+
* Get shape IDs within the given bounds.
|
|
2770
|
+
*
|
|
2771
|
+
* Note: Uses shape page bounds only. Frames with labels outside their bounds
|
|
2772
|
+
* may not be included even if the label is within the search bounds.
|
|
2773
|
+
*
|
|
2774
|
+
* Note: Results are unordered. If you need z-order, combine with sorted shapes:
|
|
2775
|
+
* ```ts
|
|
2776
|
+
* const candidates = editor.getShapeIdsInsideBounds(bounds)
|
|
2777
|
+
* const sorted = editor.getCurrentPageShapesSorted().filter(s => candidates.has(s.id))
|
|
2778
|
+
* ```
|
|
2779
|
+
*
|
|
2780
|
+
* @param bounds - The bounds to search within.
|
|
2781
|
+
* @returns Unordered set of shape IDs within the given bounds.
|
|
2782
|
+
*
|
|
2783
|
+
* @public
|
|
2784
|
+
*/
|
|
2785
|
+
getShapeIdsInsideBounds(bounds: Box): Set<TLShapeId>;
|
|
2764
2786
|
/**
|
|
2765
2787
|
* Test whether a point (in the current page space) will will a shape. This method takes into account masks,
|
|
2766
2788
|
* such as when a shape is the child of a frame and is partially clipped by the frame.
|
|
@@ -3902,7 +3924,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3902
3924
|
/**
|
|
3903
3925
|
* Handles navigating to the content specified by the query param in the given URL.
|
|
3904
3926
|
*
|
|
3905
|
-
* Use {@link Editor
|
|
3927
|
+
* Use {@link Editor.createDeepLink} to create a URL with a deep link query param.
|
|
3906
3928
|
*
|
|
3907
3929
|
* If no URL is provided, it will look for the param in the current `window.location.href`.
|
|
3908
3930
|
*
|
|
@@ -5339,27 +5361,106 @@ export declare interface ScribbleItem {
|
|
|
5339
5361
|
/** @public */
|
|
5340
5362
|
export declare class ScribbleManager {
|
|
5341
5363
|
private editor;
|
|
5342
|
-
|
|
5343
|
-
state: "paused" | "running";
|
|
5364
|
+
private sessions;
|
|
5344
5365
|
constructor(editor: Editor);
|
|
5366
|
+
/**
|
|
5367
|
+
* Start a new session for grouping scribbles.
|
|
5368
|
+
* Returns a session ID that can be used with other session methods.
|
|
5369
|
+
*
|
|
5370
|
+
* @param options - Session configuration
|
|
5371
|
+
* @returns Session ID
|
|
5372
|
+
* @public
|
|
5373
|
+
*/
|
|
5374
|
+
startSession(options?: ScribbleSessionOptions): string;
|
|
5375
|
+
/**
|
|
5376
|
+
* Add a scribble to a session.
|
|
5377
|
+
*
|
|
5378
|
+
* @param sessionId - The session ID
|
|
5379
|
+
* @param scribble - Partial scribble properties
|
|
5380
|
+
* @param scribbleId - Optional scribble ID
|
|
5381
|
+
* @public
|
|
5382
|
+
*/
|
|
5383
|
+
addScribbleToSession(sessionId: string, scribble: Partial<TLScribble>, scribbleId?: string): ScribbleItem;
|
|
5384
|
+
/**
|
|
5385
|
+
* Add a point to a scribble in a session.
|
|
5386
|
+
*
|
|
5387
|
+
* @param sessionId - The session ID
|
|
5388
|
+
* @param scribbleId - The scribble ID
|
|
5389
|
+
* @param x - X coordinate
|
|
5390
|
+
* @param y - Y coordinate
|
|
5391
|
+
* @param z - Z coordinate (pressure)
|
|
5392
|
+
* @public
|
|
5393
|
+
*/
|
|
5394
|
+
addPointToSession(sessionId: string, scribbleId: string, x: number, y: number, z?: number): ScribbleItem;
|
|
5395
|
+
/**
|
|
5396
|
+
* Extend a session, resetting its idle timeout.
|
|
5397
|
+
*
|
|
5398
|
+
* @param sessionId - The session ID
|
|
5399
|
+
* @public
|
|
5400
|
+
*/
|
|
5401
|
+
extendSession(sessionId: string): void;
|
|
5402
|
+
/**
|
|
5403
|
+
* Stop a session, triggering fade-out.
|
|
5404
|
+
*
|
|
5405
|
+
* @param sessionId - The session ID
|
|
5406
|
+
* @public
|
|
5407
|
+
*/
|
|
5408
|
+
stopSession(sessionId: string): void;
|
|
5409
|
+
/**
|
|
5410
|
+
* Clear all scribbles in a session immediately.
|
|
5411
|
+
*
|
|
5412
|
+
* @param sessionId - The session ID
|
|
5413
|
+
* @public
|
|
5414
|
+
*/
|
|
5415
|
+
clearSession(sessionId: string): void;
|
|
5416
|
+
/**
|
|
5417
|
+
* Check if a session is active.
|
|
5418
|
+
*
|
|
5419
|
+
* @param sessionId - The session ID
|
|
5420
|
+
* @public
|
|
5421
|
+
*/
|
|
5422
|
+
isSessionActive(sessionId: string): boolean;
|
|
5423
|
+
/**
|
|
5424
|
+
* Add a scribble using the default self-consuming behavior.
|
|
5425
|
+
* Creates an implicit session for the scribble.
|
|
5426
|
+
*
|
|
5427
|
+
* @param scribble - Partial scribble properties
|
|
5428
|
+
* @param id - Optional scribble id
|
|
5429
|
+
* @returns The created scribble item
|
|
5430
|
+
* @public
|
|
5431
|
+
*/
|
|
5345
5432
|
addScribble(scribble: Partial<TLScribble>, id?: string): ScribbleItem;
|
|
5346
|
-
reset(): void;
|
|
5347
5433
|
/**
|
|
5348
|
-
*
|
|
5434
|
+
* Add a point to a scribble. Searches all sessions.
|
|
5435
|
+
*
|
|
5436
|
+
* @param id - The scribble id
|
|
5437
|
+
* @param x - X coordinate
|
|
5438
|
+
* @param y - Y coordinate
|
|
5439
|
+
* @param z - Z coordinate (pressure)
|
|
5440
|
+
* @public
|
|
5441
|
+
*/
|
|
5442
|
+
addPoint(id: string, x: number, y: number, z?: number): ScribbleItem;
|
|
5443
|
+
/**
|
|
5444
|
+
* Mark a scribble as complete (done being drawn but not yet fading).
|
|
5445
|
+
* Searches all sessions.
|
|
5349
5446
|
*
|
|
5447
|
+
* @param id - The scribble id
|
|
5350
5448
|
* @public
|
|
5351
5449
|
*/
|
|
5352
|
-
|
|
5450
|
+
complete(id: string): ScribbleItem;
|
|
5353
5451
|
/**
|
|
5354
|
-
*
|
|
5452
|
+
* Stop a scribble. Searches all sessions.
|
|
5355
5453
|
*
|
|
5356
|
-
* @param id - The
|
|
5357
|
-
* @param x - The x coordinate of the point.
|
|
5358
|
-
* @param y - The y coordinate of the point.
|
|
5359
|
-
* @param z - The z coordinate of the point.
|
|
5454
|
+
* @param id - The scribble id
|
|
5360
5455
|
* @public
|
|
5361
5456
|
*/
|
|
5362
|
-
|
|
5457
|
+
stop(id: string): ScribbleItem;
|
|
5458
|
+
/**
|
|
5459
|
+
* Stop and remove all sessions.
|
|
5460
|
+
*
|
|
5461
|
+
* @public
|
|
5462
|
+
*/
|
|
5463
|
+
reset(): void;
|
|
5363
5464
|
/**
|
|
5364
5465
|
* Update on each animation frame.
|
|
5365
5466
|
*
|
|
@@ -5367,6 +5468,44 @@ export declare class ScribbleManager {
|
|
|
5367
5468
|
* @public
|
|
5368
5469
|
*/
|
|
5369
5470
|
tick(elapsed: number): void;
|
|
5471
|
+
private resetIdleTimeout;
|
|
5472
|
+
private clearIdleTimeout;
|
|
5473
|
+
private tickSession;
|
|
5474
|
+
private tickSessionItems;
|
|
5475
|
+
private tickPersistentItem;
|
|
5476
|
+
private tickSelfConsumingItem;
|
|
5477
|
+
private tickGroupedFade;
|
|
5478
|
+
}
|
|
5479
|
+
|
|
5480
|
+
/** @public */
|
|
5481
|
+
export declare interface ScribbleSessionOptions {
|
|
5482
|
+
/** Session id. Auto-generated if not provided. */
|
|
5483
|
+
id?: string;
|
|
5484
|
+
/**
|
|
5485
|
+
* Whether scribbles self-consume (shrink from start) while drawing.
|
|
5486
|
+
* - true: scribbles eat their own tail as you draw (default, used for eraser/select)
|
|
5487
|
+
* - false: scribbles persist until session stops (used for laser)
|
|
5488
|
+
*/
|
|
5489
|
+
selfConsume?: boolean;
|
|
5490
|
+
/**
|
|
5491
|
+
* How long to wait after last activity before auto-stopping the session.
|
|
5492
|
+
* Only applies when selfConsume is false.
|
|
5493
|
+
*/
|
|
5494
|
+
idleTimeoutMs?: number;
|
|
5495
|
+
/**
|
|
5496
|
+
* How scribbles fade when stopping.
|
|
5497
|
+
* - 'individual': each scribble fades on its own (default)
|
|
5498
|
+
* - 'grouped': all scribbles fade together as one sequence
|
|
5499
|
+
*/
|
|
5500
|
+
fadeMode?: 'grouped' | 'individual';
|
|
5501
|
+
/**
|
|
5502
|
+
* Easing for grouped fade.
|
|
5503
|
+
*/
|
|
5504
|
+
fadeEasing?: 'ease-in' | 'linear';
|
|
5505
|
+
/**
|
|
5506
|
+
* Duration of the fade in milliseconds.
|
|
5507
|
+
*/
|
|
5508
|
+
fadeDurationMs?: number;
|
|
5370
5509
|
}
|
|
5371
5510
|
|
|
5372
5511
|
/** @public */
|
|
@@ -5469,6 +5608,31 @@ export declare abstract class ShapeUtil<Shape extends TLShape = TLShape> {
|
|
|
5469
5608
|
* @public
|
|
5470
5609
|
*/
|
|
5471
5610
|
abstract indicator(shape: Shape): any;
|
|
5611
|
+
/**
|
|
5612
|
+
* Whether to use the legacy React-based indicator rendering.
|
|
5613
|
+
*
|
|
5614
|
+
* Override this to return `false` if your shape implements {@link ShapeUtil.getIndicatorPath}
|
|
5615
|
+
* for canvas-based indicator rendering.
|
|
5616
|
+
*
|
|
5617
|
+
* @returns `true` to use SVG indicators (default), `false` to use canvas indicators.
|
|
5618
|
+
* @public
|
|
5619
|
+
*/
|
|
5620
|
+
useLegacyIndicator(): boolean;
|
|
5621
|
+
/**
|
|
5622
|
+
* Get a Path2D for rendering the shape's indicator on the canvas.
|
|
5623
|
+
*
|
|
5624
|
+
* When implemented, this is used instead of {@link ShapeUtil.indicator} for more
|
|
5625
|
+
* efficient canvas-based indicator rendering. Shapes that return `undefined` will
|
|
5626
|
+
* fall back to SVG-based rendering via {@link ShapeUtil.indicator}.
|
|
5627
|
+
*
|
|
5628
|
+
* For complex indicators that need clipping (e.g., arrows with labels), return an
|
|
5629
|
+
* object with `path`, `clipPath`, and `additionalPaths` properties.
|
|
5630
|
+
*
|
|
5631
|
+
* @param shape - The shape.
|
|
5632
|
+
* @returns A Path2D to stroke, or an object with clipping info, or undefined to use SVG fallback.
|
|
5633
|
+
* @public
|
|
5634
|
+
*/
|
|
5635
|
+
getIndicatorPath(shape: Shape): TLIndicatorPath | undefined;
|
|
5472
5636
|
/**
|
|
5473
5637
|
* Get the font faces that should be rendered in the document in order for this shape to render
|
|
5474
5638
|
* correctly.
|
|
@@ -6684,29 +6848,35 @@ export declare interface TldrawEditorBaseProps {
|
|
|
6684
6848
|
inferDarkMode?: boolean;
|
|
6685
6849
|
/**
|
|
6686
6850
|
* Camera options for the editor.
|
|
6851
|
+
*
|
|
6852
|
+
* @deprecated Use `options.cameraOptions` instead. This will be removed in a future release.
|
|
6687
6853
|
*/
|
|
6688
6854
|
cameraOptions?: Partial<TLCameraOptions>;
|
|
6689
|
-
/**
|
|
6690
|
-
* Text options for the editor.
|
|
6691
|
-
*/
|
|
6692
|
-
textOptions?: TLTextOptions;
|
|
6693
6855
|
/**
|
|
6694
6856
|
* Options for the editor.
|
|
6695
6857
|
*/
|
|
6696
6858
|
options?: Partial<TldrawOptions>;
|
|
6859
|
+
/**
|
|
6860
|
+
* Text options for the editor.
|
|
6861
|
+
*
|
|
6862
|
+
* @deprecated Use `options.text` instead. This prop will be removed in a future release.
|
|
6863
|
+
*/
|
|
6864
|
+
textOptions?: TLTextOptions;
|
|
6697
6865
|
/**
|
|
6698
6866
|
* The license key.
|
|
6699
6867
|
*/
|
|
6700
6868
|
licenseKey?: string;
|
|
6701
6869
|
/**
|
|
6702
6870
|
* Options for syncing the editor's camera state with the URL.
|
|
6871
|
+
*
|
|
6872
|
+
* @deprecated Use `options.deepLinks` instead. This prop will be removed in a future release.
|
|
6703
6873
|
*/
|
|
6704
6874
|
deepLinks?: TLDeepLinkOptions | true;
|
|
6705
6875
|
/**
|
|
6706
6876
|
* Provides a way to hide shapes.
|
|
6707
6877
|
*
|
|
6708
6878
|
* Hidden shapes will not render in the editor, and they will not be eligible for hit test via
|
|
6709
|
-
* {@link Editor
|
|
6879
|
+
* {@link @tldraw/editor#Editor.getShapeAtPoint} and {@link @tldraw/editor#Editor.getShapesAtPoint}. But otherwise they will
|
|
6710
6880
|
* remain in the store and participate in all other operations.
|
|
6711
6881
|
*
|
|
6712
6882
|
* @example
|
|
@@ -6836,6 +7006,12 @@ export declare interface TldrawOptions {
|
|
|
6836
7006
|
readonly flattenImageBoundsExpand: number;
|
|
6837
7007
|
readonly flattenImageBoundsPadding: number;
|
|
6838
7008
|
readonly laserDelayMs: number;
|
|
7009
|
+
/**
|
|
7010
|
+
* How long (in milliseconds) to fade all laser scribbles after the session ends.
|
|
7011
|
+
* The total points across all scribbles will be removed proportionally over this duration.
|
|
7012
|
+
* Defaults to 500ms (0.5 seconds).
|
|
7013
|
+
*/
|
|
7014
|
+
readonly laserFadeoutMs: number;
|
|
6839
7015
|
readonly maxExportDelayMs: number;
|
|
6840
7016
|
readonly tooltipDelayMs: number;
|
|
6841
7017
|
/**
|
|
@@ -6873,13 +7049,13 @@ export declare interface TldrawOptions {
|
|
|
6873
7049
|
readonly branding?: string;
|
|
6874
7050
|
/**
|
|
6875
7051
|
* Whether to use debounced zoom level for certain rendering optimizations. When true,
|
|
6876
|
-
* `editor.
|
|
7052
|
+
* `editor.getEfficientZoomLevel()` returns a cached zoom value while the camera is moving,
|
|
6877
7053
|
* reducing re-renders. When false, it always returns the current zoom level.
|
|
6878
7054
|
*/
|
|
6879
7055
|
readonly debouncedZoom: boolean;
|
|
6880
7056
|
/**
|
|
6881
7057
|
* The number of shapes that must be on the page for the debounced zoom level to be used.
|
|
6882
|
-
* Defaults to
|
|
7058
|
+
* Defaults to 500 shapes.
|
|
6883
7059
|
*/
|
|
6884
7060
|
readonly debouncedZoomThreshold: number;
|
|
6885
7061
|
/**
|
|
@@ -6898,6 +7074,37 @@ export declare interface TldrawOptions {
|
|
|
6898
7074
|
* The distance (in screen pixels) at which shapes snap to guides and other shapes.
|
|
6899
7075
|
*/
|
|
6900
7076
|
readonly snapThreshold: number;
|
|
7077
|
+
/**
|
|
7078
|
+
* Options for the editor's camera. These are the initial camera options.
|
|
7079
|
+
* Use {@link Editor.setCameraOptions} to update camera options at runtime.
|
|
7080
|
+
*/
|
|
7081
|
+
readonly camera: Partial<TLCameraOptions>;
|
|
7082
|
+
/**
|
|
7083
|
+
* Options for the editor's text rendering. These include TipTap configuration and
|
|
7084
|
+
* font handling. These are the initial text options and cannot be changed at runtime.
|
|
7085
|
+
*/
|
|
7086
|
+
readonly text: TLTextOptions;
|
|
7087
|
+
/**
|
|
7088
|
+
* Options for syncing the editor's camera state with the URL. Set to `true` to enable
|
|
7089
|
+
* with default options, or pass an options object to customize behavior.
|
|
7090
|
+
*
|
|
7091
|
+
* @example
|
|
7092
|
+
* ```tsx
|
|
7093
|
+
* // Enable with defaults
|
|
7094
|
+
* <Tldraw options={{ deepLinks: true }} />
|
|
7095
|
+
*
|
|
7096
|
+
* // Enable with custom options
|
|
7097
|
+
* <Tldraw options={{ deepLinks: { param: 'd', debounceMs: 500 } }} />
|
|
7098
|
+
* ```
|
|
7099
|
+
*/
|
|
7100
|
+
readonly deepLinks: TLDeepLinkOptions | true | undefined;
|
|
7101
|
+
/**
|
|
7102
|
+
* Whether the quick-zoom brush preserves its screen-pixel size when the user
|
|
7103
|
+
* zooms the overview. When true, zooming in shrinks the target viewport (higher
|
|
7104
|
+
* return zoom); zooming out expands it. When false, the brush keeps the original
|
|
7105
|
+
* viewport's page dimensions regardless of overview zoom changes.
|
|
7106
|
+
*/
|
|
7107
|
+
readonly quickZoomPreservesScreenBounds: boolean;
|
|
6901
7108
|
}
|
|
6902
7109
|
|
|
6903
7110
|
/** @public */
|
|
@@ -6982,10 +7189,17 @@ export declare interface TLEditorOptions {
|
|
|
6982
7189
|
inferDarkMode?: boolean;
|
|
6983
7190
|
/**
|
|
6984
7191
|
* Options for the editor's camera.
|
|
7192
|
+
*
|
|
7193
|
+
* @deprecated Use `options.cameraOptions` instead. This will be removed in a future release.
|
|
6985
7194
|
*/
|
|
6986
7195
|
cameraOptions?: Partial<TLCameraOptions>;
|
|
6987
|
-
textOptions?: TLTextOptions;
|
|
6988
7196
|
options?: Partial<TldrawOptions>;
|
|
7197
|
+
/**
|
|
7198
|
+
* Text options for the editor.
|
|
7199
|
+
*
|
|
7200
|
+
* @deprecated Use `options.text` instead. This prop will be removed in a future release.
|
|
7201
|
+
*/
|
|
7202
|
+
textOptions?: TLTextOptions;
|
|
6989
7203
|
licenseKey?: string;
|
|
6990
7204
|
fontAssetUrls?: {
|
|
6991
7205
|
[key: string]: string | undefined;
|
|
@@ -7399,6 +7613,17 @@ export declare interface TLImageExportOptions extends TLSvgExportOptions {
|
|
|
7399
7613
|
format?: TLExportType;
|
|
7400
7614
|
}
|
|
7401
7615
|
|
|
7616
|
+
/**
|
|
7617
|
+
* Return type for {@link ShapeUtil.getIndicatorPath}. Can be either a simple Path2D
|
|
7618
|
+
* or an object with additional rendering info like clip paths for complex indicators.
|
|
7619
|
+
* @public
|
|
7620
|
+
*/
|
|
7621
|
+
export declare type TLIndicatorPath = {
|
|
7622
|
+
additionalPaths?: Path2D[];
|
|
7623
|
+
clipPath?: Path2D;
|
|
7624
|
+
path: Path2D;
|
|
7625
|
+
} | Path2D;
|
|
7626
|
+
|
|
7402
7627
|
/** @public */
|
|
7403
7628
|
export declare type TLInterruptEvent = (info: TLInterruptEventInfo) => void;
|
|
7404
7629
|
|
|
@@ -7842,17 +8067,35 @@ export declare interface TLShapeUtilCanBeLaidOutOpts {
|
|
|
7842
8067
|
|
|
7843
8068
|
/**
|
|
7844
8069
|
* Options passed to {@link ShapeUtil.canBind}. A binding that could be made. At least one of
|
|
7845
|
-
* `
|
|
8070
|
+
* `fromShape` or `toShape` will belong to this shape util.
|
|
8071
|
+
*
|
|
8072
|
+
* The shapes may be full {@link @tldraw/tlschema#TLShape} objects when available, or just
|
|
8073
|
+
* `{ type }` stubs when the shape hasn't been created yet (e.g. during arrow creation). Use
|
|
8074
|
+
* `'id' in shape` to check whether the full shape is available.
|
|
7846
8075
|
*
|
|
7847
8076
|
* @public
|
|
7848
8077
|
*/
|
|
7849
8078
|
export declare interface TLShapeUtilCanBindOpts<Shape extends TLShape = TLShape> {
|
|
7850
|
-
/** The
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
8079
|
+
/** The shape referenced by the `fromId` of the binding, or a `{ type }` stub if unavailable. */
|
|
8080
|
+
fromShape: {
|
|
8081
|
+
type: TLShape['type'];
|
|
8082
|
+
} | TLShape;
|
|
8083
|
+
/** The shape referenced by the `toId` of the binding, or a `{ type }` stub if unavailable. */
|
|
8084
|
+
toShape: {
|
|
8085
|
+
type: TLShape['type'];
|
|
8086
|
+
} | TLShape;
|
|
7854
8087
|
/** The type of binding. */
|
|
7855
8088
|
bindingType: string;
|
|
8089
|
+
/**
|
|
8090
|
+
* The type of shape referenced by the `fromId` of the binding.
|
|
8091
|
+
* @deprecated Use `fromShape.type` instead.
|
|
8092
|
+
*/
|
|
8093
|
+
fromShapeType: TLShape['type'];
|
|
8094
|
+
/**
|
|
8095
|
+
* The type of shape referenced by the `toId` of the binding.
|
|
8096
|
+
* @deprecated Use `toShape.type` instead.
|
|
8097
|
+
*/
|
|
8098
|
+
toShapeType: TLShape['type'];
|
|
7856
8099
|
}
|
|
7857
8100
|
|
|
7858
8101
|
/** @public */
|
|
@@ -7906,7 +8149,7 @@ export declare interface TLStoreBaseOptions {
|
|
|
7906
8149
|
defaultName?: string;
|
|
7907
8150
|
/** How should this store upload & resolve assets? */
|
|
7908
8151
|
assets?: TLAssetStore;
|
|
7909
|
-
/** Called when the store is connected to an {@link Editor}. */
|
|
8152
|
+
/** Called when the store is connected to an {@link @tldraw/editor#Editor}. */
|
|
7910
8153
|
onMount?(editor: Editor): (() => void) | void;
|
|
7911
8154
|
}
|
|
7912
8155
|
|
package/dist-cjs/index.js
CHANGED
|
@@ -238,11 +238,6 @@ __export(index_exports, {
|
|
|
238
238
|
});
|
|
239
239
|
module.exports = __toCommonJS(index_exports);
|
|
240
240
|
var import_utils = require("@tldraw/utils");
|
|
241
|
-
var import_at = require("core-js/stable/array/at.js");
|
|
242
|
-
var import_flat_map = require("core-js/stable/array/flat-map.js");
|
|
243
|
-
var import_flat = require("core-js/stable/array/flat.js");
|
|
244
|
-
var import_at2 = require("core-js/stable/string/at.js");
|
|
245
|
-
var import_replace_all = require("core-js/stable/string/replace-all.js");
|
|
246
241
|
__reExport(index_exports, require("@tldraw/state"), module.exports);
|
|
247
242
|
__reExport(index_exports, require("@tldraw/state-react"), module.exports);
|
|
248
243
|
__reExport(index_exports, require("@tldraw/store"), module.exports);
|
|
@@ -377,7 +372,7 @@ var import_uniq = require("./lib/utils/uniq");
|
|
|
377
372
|
var import_window_open = require("./lib/utils/window-open");
|
|
378
373
|
(0, import_utils.registerTldrawLibraryVersion)(
|
|
379
374
|
"@tldraw/editor",
|
|
380
|
-
"4.4.0-canary.
|
|
375
|
+
"4.4.0-canary.cfef7eb24259",
|
|
381
376
|
"cjs"
|
|
382
377
|
);
|
|
383
378
|
//# 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'\nimport 'core-js/stable/array/at.js'\nimport 'core-js/stable/array/flat-map.js'\nimport 'core-js/stable/array/flat.js'\nimport 'core-js/stable/string/at.js'\nimport 'core-js/stable/string/replace-all.js'\n\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/state'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/state-react'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/store'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/tlschema'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/utils'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/validate'\n\nexport { DefaultBackground } from './lib/components/default-components/DefaultBackground'\nexport { DefaultBrush, type TLBrushProps } from './lib/components/default-components/DefaultBrush'\nexport {\n\tDefaultCanvas,\n\ttype TLCanvasComponentProps,\n} from './lib/components/default-components/DefaultCanvas'\nexport {\n\tDefaultCollaboratorHint,\n\ttype TLCollaboratorHintProps,\n} from './lib/components/default-components/DefaultCollaboratorHint'\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 {\n\tDefaultHandle,\n\ttype TLHandleProps,\n} from './lib/components/default-components/DefaultHandle'\nexport {\n\tDefaultHandles,\n\ttype TLHandlesProps,\n} from './lib/components/default-components/DefaultHandles'\nexport {\n\tDefaultScribble,\n\ttype TLScribbleProps,\n} from './lib/components/default-components/DefaultScribble'\nexport {\n\tDefaultSelectionBackground,\n\ttype TLSelectionBackgroundProps,\n} from './lib/components/default-components/DefaultSelectionBackground'\nexport {\n\tDefaultSelectionForeground,\n\ttype TLSelectionForegroundProps,\n} from './lib/components/default-components/DefaultSelectionForeground'\nexport { type TLShapeErrorFallbackComponent } from './lib/components/default-components/DefaultShapeErrorFallback'\nexport {\n\tDefaultShapeIndicator,\n\ttype TLShapeIndicatorProps,\n} from './lib/components/default-components/DefaultShapeIndicator'\nexport { type TLShapeIndicatorErrorFallbackComponent } from './lib/components/default-components/DefaultShapeIndicatorErrorFallback'\nexport {\n\tDefaultShapeIndicators,\n\ttype TLShapeIndicatorsProps,\n} from './lib/components/default-components/DefaultShapeIndicators'\nexport {\n\tDefaultShapeWrapper,\n\ttype TLShapeWrapperProps,\n} from './lib/components/default-components/DefaultShapeWrapper'\nexport {\n\tDefaultSnapIndicator,\n\ttype TLSnapIndicatorProps,\n} from './lib/components/default-components/DefaultSnapIndictor'\nexport { DefaultSpinner } from './lib/components/default-components/DefaultSpinner'\nexport { DefaultSvgDefs } from './lib/components/default-components/DefaultSvgDefs'\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\tcreateTLSchemaFromUtils,\n\tcreateTLStore,\n\tinlineBase64AssetStore,\n\ttype TLStoreBaseOptions,\n\ttype TLStoreEventInfo,\n\ttype TLStoreOptions,\n\ttype TLStoreSchemaOptions,\n} from './lib/config/createTLStore'\nexport { createTLUser, useTldrawUser, type TLUser } from './lib/config/createTLUser'\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 {\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 {\n\tFontManager,\n\ttype TLFontFace,\n\ttype TLFontFaceSource,\n} from './lib/editor/managers/FontManager/FontManager'\nexport { HistoryManager } from './lib/editor/managers/HistoryManager/HistoryManager'\nexport { InputsManager } from './lib/editor/managers/InputsManager/InputsManager'\nexport {\n\tScribbleManager,\n\ttype ScribbleItem,\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\ttype TLMeasureTextOpts,\n\ttype TLMeasureTextSpanOpts,\n} from './lib/editor/managers/TextManager/TextManager'\nexport { TickManager } from './lib/editor/managers/TickManager/TickManager'\nexport { UserPreferencesManager } from './lib/editor/managers/UserPreferencesManager/UserPreferencesManager'\nexport { BaseBoxShapeUtil, type TLBaseBoxShape } from './lib/editor/shapes/BaseBoxShapeUtil'\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 TLResizeInfo,\n\ttype TLResizeMode,\n\ttype TLShapeUtilCanBeLaidOutOpts,\n\ttype TLShapeUtilCanBindOpts,\n\ttype TLShapeUtilCanvasSvgDef,\n\ttype TLShapeUtilConstructor,\n} from './lib/editor/shapes/ShapeUtil'\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 { 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 { 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 { useIsDarkMode } from './lib/hooks/useIsDarkMode'\nexport { useIsEditing } from './lib/hooks/useIsEditing'\nexport { useLocalStore } from './lib/hooks/useLocalStore'\nexport { usePassThroughMouseOverEvents } from './lib/hooks/usePassThroughMouseOverEvents'\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 { useSelectionEvents } from './lib/hooks/useSelectionEvents'\nexport { useTLSchemaFromUtils, useTLStore } from './lib/hooks/useTLStore'\nexport { useTransform } from './lib/hooks/useTransform'\nexport { useViewportHeight } from './lib/hooks/useViewportHeight'\nexport {\n\tLicenseManager,\n\ttype InvalidLicenseKeyResult,\n\ttype InvalidLicenseReason,\n\ttype LicenseFromKeyResult,\n\ttype LicenseInfo,\n\ttype LicenseState,\n\ttype ValidLicenseKeyResult,\n} from './lib/license/LicenseManager'\nexport { LICENSE_TIMEOUT } from './lib/license/LicenseProvider'\nexport { defaultTldrawOptions, type TldrawOptions } 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\tloopToHtmlElement,\n\tpreventDefault,\n\treleasePointerCapture,\n\tsetPointerCapture,\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 { hardResetEditor } from './lib/utils/hardResetEditor'\nexport { isAccelKey } from './lib/utils/keyboard'\nexport { normalizeWheel } from './lib/utils/normalizeWheel'\nexport { refreshPage } from './lib/utils/refreshPage'\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 { runtime, setRuntimeOverrides } 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'\nexport { openWindow } from './lib/utils/window-open'\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"],
|
|
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,mBAA6C;
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\n\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/state'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/state-react'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/store'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/tlschema'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/utils'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/validate'\n\nexport { DefaultBackground } from './lib/components/default-components/DefaultBackground'\nexport { DefaultBrush, type TLBrushProps } from './lib/components/default-components/DefaultBrush'\nexport {\n\tDefaultCanvas,\n\ttype TLCanvasComponentProps,\n} from './lib/components/default-components/DefaultCanvas'\nexport {\n\tDefaultCollaboratorHint,\n\ttype TLCollaboratorHintProps,\n} from './lib/components/default-components/DefaultCollaboratorHint'\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 {\n\tDefaultHandle,\n\ttype TLHandleProps,\n} from './lib/components/default-components/DefaultHandle'\nexport {\n\tDefaultHandles,\n\ttype TLHandlesProps,\n} from './lib/components/default-components/DefaultHandles'\nexport {\n\tDefaultScribble,\n\ttype TLScribbleProps,\n} from './lib/components/default-components/DefaultScribble'\nexport {\n\tDefaultSelectionBackground,\n\ttype TLSelectionBackgroundProps,\n} from './lib/components/default-components/DefaultSelectionBackground'\nexport {\n\tDefaultSelectionForeground,\n\ttype TLSelectionForegroundProps,\n} from './lib/components/default-components/DefaultSelectionForeground'\nexport { type TLShapeErrorFallbackComponent } from './lib/components/default-components/DefaultShapeErrorFallback'\nexport {\n\tDefaultShapeIndicator,\n\ttype TLShapeIndicatorProps,\n} from './lib/components/default-components/DefaultShapeIndicator'\nexport { type TLShapeIndicatorErrorFallbackComponent } from './lib/components/default-components/DefaultShapeIndicatorErrorFallback'\nexport {\n\tDefaultShapeIndicators,\n\ttype TLShapeIndicatorsProps,\n} from './lib/components/default-components/DefaultShapeIndicators'\nexport {\n\tDefaultShapeWrapper,\n\ttype TLShapeWrapperProps,\n} from './lib/components/default-components/DefaultShapeWrapper'\nexport {\n\tDefaultSnapIndicator,\n\ttype TLSnapIndicatorProps,\n} from './lib/components/default-components/DefaultSnapIndictor'\nexport { DefaultSpinner } from './lib/components/default-components/DefaultSpinner'\nexport { DefaultSvgDefs } from './lib/components/default-components/DefaultSvgDefs'\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\tcreateTLSchemaFromUtils,\n\tcreateTLStore,\n\tinlineBase64AssetStore,\n\ttype TLStoreBaseOptions,\n\ttype TLStoreEventInfo,\n\ttype TLStoreOptions,\n\ttype TLStoreSchemaOptions,\n} from './lib/config/createTLStore'\nexport { createTLUser, useTldrawUser, type TLUser } from './lib/config/createTLUser'\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 {\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 {\n\tFontManager,\n\ttype TLFontFace,\n\ttype TLFontFaceSource,\n} from './lib/editor/managers/FontManager/FontManager'\nexport { HistoryManager } from './lib/editor/managers/HistoryManager/HistoryManager'\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\ttype TLMeasureTextOpts,\n\ttype TLMeasureTextSpanOpts,\n} from './lib/editor/managers/TextManager/TextManager'\nexport { TickManager } from './lib/editor/managers/TickManager/TickManager'\nexport { UserPreferencesManager } from './lib/editor/managers/UserPreferencesManager/UserPreferencesManager'\nexport { BaseBoxShapeUtil, type TLBaseBoxShape } from './lib/editor/shapes/BaseBoxShapeUtil'\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\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 { 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 { 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 { useIsDarkMode } from './lib/hooks/useIsDarkMode'\nexport { useIsEditing } from './lib/hooks/useIsEditing'\nexport { useLocalStore } from './lib/hooks/useLocalStore'\nexport { usePassThroughMouseOverEvents } from './lib/hooks/usePassThroughMouseOverEvents'\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 { useSelectionEvents } from './lib/hooks/useSelectionEvents'\nexport { useTLSchemaFromUtils, useTLStore } from './lib/hooks/useTLStore'\nexport { useTransform } from './lib/hooks/useTransform'\nexport { useViewportHeight } from './lib/hooks/useViewportHeight'\nexport {\n\tLicenseManager,\n\ttype InvalidLicenseKeyResult,\n\ttype InvalidLicenseReason,\n\ttype LicenseFromKeyResult,\n\ttype LicenseInfo,\n\ttype LicenseState,\n\ttype ValidLicenseKeyResult,\n} from './lib/license/LicenseManager'\nexport { LICENSE_TIMEOUT } from './lib/license/LicenseProvider'\nexport { defaultTldrawOptions, type TldrawOptions } 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\tloopToHtmlElement,\n\tpreventDefault,\n\treleasePointerCapture,\n\tsetPointerCapture,\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 { hardResetEditor } from './lib/utils/hardResetEditor'\nexport { isAccelKey } from './lib/utils/keyboard'\nexport { normalizeWheel } from './lib/utils/normalizeWheel'\nexport { refreshPage } from './lib/utils/refreshPage'\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 { runtime, setRuntimeOverrides } 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'\nexport { openWindow } from './lib/utils/window-open'\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"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["import_utils"]
|
|
7
7
|
}
|