@tldraw/editor 3.16.0-internal.51e99e128bd4 → 3.16.0-internal.a478398270c6
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 +16 -217
- package/dist-cjs/index.js +1 -8
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/TldrawEditor.js +1 -3
- package/dist-cjs/lib/TldrawEditor.js.map +2 -2
- package/dist-cjs/lib/components/MenuClickCapture.js +5 -0
- package/dist-cjs/lib/components/MenuClickCapture.js.map +2 -2
- package/dist-cjs/lib/components/SVGContainer.js +1 -1
- package/dist-cjs/lib/components/SVGContainer.js.map +2 -2
- package/dist-cjs/lib/components/Shape.js +26 -4
- package/dist-cjs/lib/components/Shape.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultBrush.js +1 -1
- package/dist-cjs/lib/components/default-components/DefaultBrush.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultCanvas.js +1 -1
- package/dist-cjs/lib/components/default-components/DefaultCanvas.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultCollaboratorHint.js +2 -2
- package/dist-cjs/lib/components/default-components/DefaultCollaboratorHint.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultCursor.js +1 -1
- package/dist-cjs/lib/components/default-components/DefaultCursor.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultErrorFallback.js +1 -1
- package/dist-cjs/lib/components/default-components/DefaultErrorFallback.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultGrid.js +1 -1
- package/dist-cjs/lib/components/default-components/DefaultGrid.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultHandles.js +1 -1
- package/dist-cjs/lib/components/default-components/DefaultHandles.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultScribble.js +1 -1
- package/dist-cjs/lib/components/default-components/DefaultScribble.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultShapeIndicator.js +1 -9
- package/dist-cjs/lib/components/default-components/DefaultShapeIndicator.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultSnapIndictor.js +1 -1
- package/dist-cjs/lib/components/default-components/DefaultSnapIndictor.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultSpinner.js +15 -27
- package/dist-cjs/lib/components/default-components/DefaultSpinner.js.map +3 -3
- package/dist-cjs/lib/config/TLUserPreferences.js +3 -15
- package/dist-cjs/lib/config/TLUserPreferences.js.map +2 -2
- package/dist-cjs/lib/editor/Editor.js +67 -134
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.js +4 -14
- package/dist-cjs/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.js.map +2 -2
- package/dist-cjs/lib/editor/shapes/ShapeUtil.js.map +2 -2
- package/dist-cjs/lib/editor/tools/StateNode.js +1 -20
- package/dist-cjs/lib/editor/tools/StateNode.js.map +2 -2
- package/dist-cjs/lib/editor/types/misc-types.js.map +1 -1
- package/dist-cjs/lib/exports/getSvgJsx.js +2 -1
- package/dist-cjs/lib/exports/getSvgJsx.js.map +2 -2
- package/dist-cjs/lib/hooks/useCanvasEvents.js +20 -24
- package/dist-cjs/lib/hooks/useCanvasEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/useEditor.js +4 -1
- package/dist-cjs/lib/hooks/useEditor.js.map +2 -2
- package/dist-cjs/lib/hooks/useEditorComponents.js +0 -2
- package/dist-cjs/lib/hooks/useEditorComponents.js.map +2 -2
- package/dist-cjs/lib/license/Watermark.js +8 -8
- package/dist-cjs/lib/license/Watermark.js.map +2 -2
- package/dist-cjs/lib/options.js +0 -7
- package/dist-cjs/lib/options.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/Arc2d.js +1 -1
- package/dist-cjs/lib/primitives/geometry/Arc2d.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/Circle2d.js +1 -1
- package/dist-cjs/lib/primitives/geometry/Circle2d.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/CubicBezier2d.js +1 -3
- package/dist-cjs/lib/primitives/geometry/CubicBezier2d.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/Ellipse2d.js +1 -1
- package/dist-cjs/lib/primitives/geometry/Ellipse2d.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/geometry-constants.js +2 -2
- package/dist-cjs/lib/primitives/geometry/geometry-constants.js.map +2 -2
- package/dist-cjs/lib/primitives/intersect.js +4 -4
- package/dist-cjs/lib/primitives/intersect.js.map +2 -2
- package/dist-cjs/lib/primitives/utils.js +0 -4
- package/dist-cjs/lib/primitives/utils.js.map +2 -2
- package/dist-cjs/lib/utils/sync/TLLocalSyncClient.js +1 -0
- package/dist-cjs/lib/utils/sync/TLLocalSyncClient.js.map +2 -2
- package/dist-cjs/version.js +3 -3
- package/dist-cjs/version.js.map +1 -1
- package/dist-esm/index.d.mts +16 -217
- package/dist-esm/index.mjs +2 -16
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/TldrawEditor.mjs +1 -3
- package/dist-esm/lib/TldrawEditor.mjs.map +2 -2
- package/dist-esm/lib/components/MenuClickCapture.mjs +5 -0
- package/dist-esm/lib/components/MenuClickCapture.mjs.map +2 -2
- package/dist-esm/lib/components/SVGContainer.mjs +1 -1
- package/dist-esm/lib/components/SVGContainer.mjs.map +2 -2
- package/dist-esm/lib/components/Shape.mjs +26 -4
- package/dist-esm/lib/components/Shape.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultBrush.mjs +1 -1
- package/dist-esm/lib/components/default-components/DefaultBrush.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultCanvas.mjs +1 -1
- package/dist-esm/lib/components/default-components/DefaultCanvas.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultCollaboratorHint.mjs +2 -2
- package/dist-esm/lib/components/default-components/DefaultCollaboratorHint.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultCursor.mjs +1 -1
- package/dist-esm/lib/components/default-components/DefaultCursor.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultErrorFallback.mjs +1 -1
- package/dist-esm/lib/components/default-components/DefaultErrorFallback.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultGrid.mjs +1 -1
- package/dist-esm/lib/components/default-components/DefaultGrid.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultHandles.mjs +1 -1
- package/dist-esm/lib/components/default-components/DefaultHandles.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultScribble.mjs +1 -1
- package/dist-esm/lib/components/default-components/DefaultScribble.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultShapeIndicator.mjs +1 -9
- package/dist-esm/lib/components/default-components/DefaultShapeIndicator.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultSnapIndictor.mjs +1 -1
- package/dist-esm/lib/components/default-components/DefaultSnapIndictor.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultSpinner.mjs +15 -17
- package/dist-esm/lib/components/default-components/DefaultSpinner.mjs.map +2 -2
- package/dist-esm/lib/config/TLUserPreferences.mjs +3 -15
- package/dist-esm/lib/config/TLUserPreferences.mjs.map +2 -2
- package/dist-esm/lib/editor/Editor.mjs +67 -134
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.mjs +4 -14
- package/dist-esm/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.mjs.map +2 -2
- package/dist-esm/lib/editor/shapes/ShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/editor/tools/StateNode.mjs +1 -20
- package/dist-esm/lib/editor/tools/StateNode.mjs.map +2 -2
- package/dist-esm/lib/exports/getSvgJsx.mjs +2 -2
- package/dist-esm/lib/exports/getSvgJsx.mjs.map +2 -2
- package/dist-esm/lib/hooks/useCanvasEvents.mjs +21 -25
- package/dist-esm/lib/hooks/useCanvasEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/useEditor.mjs +4 -1
- package/dist-esm/lib/hooks/useEditor.mjs.map +2 -2
- package/dist-esm/lib/hooks/useEditorComponents.mjs +0 -4
- package/dist-esm/lib/hooks/useEditorComponents.mjs.map +2 -2
- package/dist-esm/lib/license/Watermark.mjs +8 -8
- package/dist-esm/lib/license/Watermark.mjs.map +2 -2
- package/dist-esm/lib/options.mjs +0 -7
- package/dist-esm/lib/options.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/Arc2d.mjs +2 -2
- package/dist-esm/lib/primitives/geometry/Arc2d.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/Circle2d.mjs +2 -2
- package/dist-esm/lib/primitives/geometry/Circle2d.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/CubicBezier2d.mjs +1 -3
- package/dist-esm/lib/primitives/geometry/CubicBezier2d.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/Ellipse2d.mjs +2 -2
- package/dist-esm/lib/primitives/geometry/Ellipse2d.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/geometry-constants.mjs +2 -2
- package/dist-esm/lib/primitives/geometry/geometry-constants.mjs.map +2 -2
- package/dist-esm/lib/primitives/intersect.mjs +5 -5
- package/dist-esm/lib/primitives/intersect.mjs.map +2 -2
- package/dist-esm/lib/primitives/utils.mjs +0 -4
- package/dist-esm/lib/primitives/utils.mjs.map +2 -2
- package/dist-esm/lib/utils/sync/TLLocalSyncClient.mjs +1 -0
- package/dist-esm/lib/utils/sync/TLLocalSyncClient.mjs.map +2 -2
- package/dist-esm/version.mjs +3 -3
- package/dist-esm/version.mjs.map +1 -1
- package/editor.css +313 -312
- package/package.json +38 -16
- package/src/index.ts +1 -15
- package/src/lib/TldrawEditor.tsx +5 -7
- package/src/lib/components/MenuClickCapture.tsx +8 -0
- package/src/lib/components/SVGContainer.tsx +1 -1
- package/src/lib/components/Shape.tsx +21 -6
- package/src/lib/components/default-components/DefaultBrush.tsx +1 -1
- package/src/lib/components/default-components/DefaultCanvas.tsx +1 -1
- package/src/lib/components/default-components/DefaultCollaboratorHint.tsx +2 -2
- package/src/lib/components/default-components/DefaultCursor.tsx +1 -1
- package/src/lib/components/default-components/DefaultErrorFallback.tsx +1 -1
- package/src/lib/components/default-components/DefaultGrid.tsx +1 -1
- package/src/lib/components/default-components/DefaultHandles.tsx +1 -5
- package/src/lib/components/default-components/DefaultScribble.tsx +1 -1
- package/src/lib/components/default-components/DefaultShapeIndicator.tsx +2 -6
- package/src/lib/components/default-components/DefaultSnapIndictor.tsx +1 -1
- package/src/lib/components/default-components/DefaultSpinner.tsx +12 -12
- package/src/lib/config/TLUserPreferences.ts +1 -15
- package/src/lib/editor/Editor.test.ts +8 -416
- package/src/lib/editor/Editor.ts +92 -177
- package/src/lib/editor/managers/ClickManager/ClickManager.test.ts +14 -15
- package/src/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.test.ts +15 -16
- package/src/lib/editor/managers/FocusManager/FocusManager.test.ts +48 -49
- package/src/lib/editor/managers/FontManager/FontManager.test.ts +23 -24
- package/src/lib/editor/managers/HistoryManager/HistoryManager.test.ts +6 -7
- package/src/lib/editor/managers/ScribbleManager/ScribbleManager.test.ts +11 -12
- package/src/lib/editor/managers/SnapManager/SnapManager.test.ts +50 -57
- package/src/lib/editor/managers/TextManager/TextManager.test.ts +26 -51
- package/src/lib/editor/managers/TickManager/TickManager.test.ts +13 -14
- package/src/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.test.ts +26 -55
- package/src/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.ts +1 -14
- package/src/lib/editor/shapes/ShapeUtil.ts +0 -57
- package/src/lib/editor/tools/StateNode.ts +1 -27
- package/src/lib/editor/types/misc-types.ts +1 -73
- package/src/lib/exports/getSvgJsx.tsx +2 -2
- package/src/lib/hooks/useCanvasEvents.ts +32 -39
- package/src/lib/hooks/useEditor.tsx +5 -6
- package/src/lib/hooks/useEditorComponents.tsx +2 -8
- package/src/lib/license/LicenseManager.test.ts +1 -3
- package/src/lib/license/Watermark.test.tsx +1 -2
- package/src/lib/license/Watermark.tsx +8 -8
- package/src/lib/options.ts +0 -8
- package/src/lib/primitives/geometry/Arc2d.ts +2 -2
- package/src/lib/primitives/geometry/Circle2d.ts +2 -2
- package/src/lib/primitives/geometry/CubicBezier2d.ts +1 -4
- package/src/lib/primitives/geometry/Ellipse2d.ts +2 -2
- package/src/lib/primitives/geometry/geometry-constants.ts +1 -2
- package/src/lib/primitives/intersect.ts +5 -12
- package/src/lib/primitives/utils.ts +0 -11
- package/src/lib/test/currentToolIdMask.test.ts +49 -0
- package/src/lib/utils/sync/LocalIndexedDb.test.ts +1 -2
- package/src/lib/utils/sync/TLLocalSyncClient.test.ts +15 -15
- package/src/lib/utils/sync/TLLocalSyncClient.ts +1 -0
- package/src/version.ts +3 -3
- package/dist-cjs/lib/components/default-components/DefaultShapeWrapper.js +0 -53
- package/dist-cjs/lib/components/default-components/DefaultShapeWrapper.js.map +0 -7
- package/dist-cjs/lib/hooks/useStateAttribute.js +0 -35
- package/dist-cjs/lib/hooks/useStateAttribute.js.map +0 -7
- package/dist-cjs/lib/utils/EditorAtom.js +0 -45
- package/dist-cjs/lib/utils/EditorAtom.js.map +0 -7
- package/dist-esm/lib/components/default-components/DefaultShapeWrapper.mjs +0 -23
- package/dist-esm/lib/components/default-components/DefaultShapeWrapper.mjs.map +0 -7
- package/dist-esm/lib/hooks/useStateAttribute.mjs +0 -15
- package/dist-esm/lib/hooks/useStateAttribute.mjs.map +0 -7
- package/dist-esm/lib/utils/EditorAtom.mjs +0 -25
- package/dist-esm/lib/utils/EditorAtom.mjs.map +0 -7
- package/src/lib/components/default-components/DefaultShapeWrapper.tsx +0 -35
- package/src/lib/editor/tools/StateNode.test.ts +0 -285
- package/src/lib/hooks/useStateAttribute.ts +0 -15
- package/src/lib/primitives/intersect.test.ts +0 -946
- package/src/lib/utils/EditorAtom.ts +0 -37
package/dist-cjs/index.d.ts
CHANGED
|
@@ -4,10 +4,9 @@ import { ComponentType } from 'react';
|
|
|
4
4
|
import { Computed } from '@tldraw/state';
|
|
5
5
|
import { Dispatch } from 'react';
|
|
6
6
|
import { Editor as Editor_2 } from '@tiptap/core';
|
|
7
|
-
import { EditorProviderProps
|
|
7
|
+
import { EditorProviderProps } from '@tiptap/react';
|
|
8
8
|
import EventEmitter from 'eventemitter3';
|
|
9
9
|
import { ExoticComponent } from 'react';
|
|
10
|
-
import { ForwardRefExoticComponent } from 'react';
|
|
11
10
|
import { HistoryEntry } from '@tldraw/store';
|
|
12
11
|
import { IndexKey } from '@tldraw/utils';
|
|
13
12
|
import { JsonObject } from '@tldraw/utils';
|
|
@@ -24,7 +23,6 @@ import { ReactElement } from 'react';
|
|
|
24
23
|
import { ReactNode } from 'react';
|
|
25
24
|
import { RecordProps } from '@tldraw/tlschema';
|
|
26
25
|
import { RecordsDiff } from '@tldraw/store';
|
|
27
|
-
import { RefAttributes } from 'react';
|
|
28
26
|
import { RefObject } from 'react';
|
|
29
27
|
import { SerializedSchema } from '@tldraw/store';
|
|
30
28
|
import { SerializedStore } from '@tldraw/store';
|
|
@@ -727,12 +725,10 @@ export declare class CubicBezier2d extends Polyline2d {
|
|
|
727
725
|
private _b;
|
|
728
726
|
private _c;
|
|
729
727
|
private _d;
|
|
730
|
-
private _resolution;
|
|
731
728
|
constructor(config: Omit<Geometry2dOptions, 'isClosed' | 'isFilled'> & {
|
|
732
729
|
cp1: Vec;
|
|
733
730
|
cp2: Vec;
|
|
734
731
|
end: Vec;
|
|
735
|
-
resolution?: number;
|
|
736
732
|
start: Vec;
|
|
737
733
|
});
|
|
738
734
|
getVertices(): Vec[];
|
|
@@ -819,14 +815,11 @@ export declare const DefaultShapeIndicator: NamedExoticComponent<TLShapeIndicato
|
|
|
819
815
|
/** @public @react */
|
|
820
816
|
export declare const DefaultShapeIndicators: NamedExoticComponent<TLShapeIndicatorsProps>;
|
|
821
817
|
|
|
822
|
-
/** @public @react */
|
|
823
|
-
export declare const DefaultShapeWrapper: ForwardRefExoticComponent<TLShapeWrapperProps & RefAttributes<HTMLDivElement>>;
|
|
824
|
-
|
|
825
818
|
/** @public @react */
|
|
826
819
|
export declare function DefaultSnapIndicator({ className, line, zoom }: TLSnapIndicatorProps): JSX_2.Element;
|
|
827
820
|
|
|
828
821
|
/** @public @react */
|
|
829
|
-
export declare function DefaultSpinner(
|
|
822
|
+
export declare function DefaultSpinner(): JSX_2.Element;
|
|
830
823
|
|
|
831
824
|
/** @public @react */
|
|
832
825
|
export declare const DefaultSvgDefs: () => null;
|
|
@@ -889,15 +882,11 @@ export declare const defaultTldrawOptions: {
|
|
|
889
882
|
readonly nonce: undefined;
|
|
890
883
|
readonly temporaryAssetPreviewLifetimeMs: 180000;
|
|
891
884
|
readonly textShadowLod: 0.35;
|
|
892
|
-
readonly tooltipDelayMs: 700;
|
|
893
|
-
readonly uiCoarseDragDistanceSquared: 625;
|
|
894
|
-
readonly uiDragDistanceSquared: 16;
|
|
895
885
|
};
|
|
896
886
|
|
|
897
887
|
/** @public */
|
|
898
888
|
export declare const defaultUserPreferences: Readonly<{
|
|
899
889
|
animationSpeed: 0 | 1;
|
|
900
|
-
areKeyboardShortcutsEnabled: true;
|
|
901
890
|
color: "#02B1CC" | "#11B3A3" | "#39B178" | "#55B467" | "#7B66DC" | "#9D5BD2" | "#BD54C6" | "#E34BA9" | "#EC5E41" | "#F04F88" | "#F2555A" | "#FF802B";
|
|
902
891
|
colorScheme: "light";
|
|
903
892
|
edgeScrollSpeed: 1;
|
|
@@ -907,7 +896,6 @@ export declare const defaultUserPreferences: Readonly<{
|
|
|
907
896
|
isWrapMode: false;
|
|
908
897
|
locale: "ar" | "bn" | "ca" | "cs" | "da" | "de" | "el" | "en" | "es" | "fa" | "fi" | "fr" | "gl" | "gu-in" | "he" | "hi-in" | "hr" | "hu" | "id" | "it" | "ja" | "km-kh" | "kn" | "ko-kr" | "ml" | "mr" | "ms" | "ne" | "nl" | "no" | "pa" | "pl" | "pt-br" | "pt-pt" | "ro" | "ru" | "sl" | "so" | "sv" | "ta" | "te" | "th" | "tl" | "tr" | "uk" | "ur" | "vi" | "zh-cn" | "zh-tw";
|
|
909
898
|
name: "";
|
|
910
|
-
showUiLabels: false;
|
|
911
899
|
}>;
|
|
912
900
|
|
|
913
901
|
/**
|
|
@@ -1564,9 +1552,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1564
1552
|
*/
|
|
1565
1553
|
deselect(...shapes: TLShape[] | TLShapeId[]): this;
|
|
1566
1554
|
/**
|
|
1567
|
-
* Select all
|
|
1568
|
-
* select all shapes within that parent. If the user has not selected any shapes,
|
|
1569
|
-
* or if the shapes shapes are only on select all shapes on the current page.
|
|
1555
|
+
* Select all direct children of the current page.
|
|
1570
1556
|
*
|
|
1571
1557
|
* @example
|
|
1572
1558
|
* ```ts
|
|
@@ -1600,7 +1586,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1600
1586
|
*
|
|
1601
1587
|
* @public
|
|
1602
1588
|
*/
|
|
1603
|
-
getNearestAdjacentShape(
|
|
1589
|
+
getNearestAdjacentShape(currentShapeId: TLShapeId, direction: 'down' | 'left' | 'right' | 'up'): TLShapeId;
|
|
1604
1590
|
selectParentShape(): void;
|
|
1605
1591
|
selectFirstChildShape(): void;
|
|
1606
1592
|
private _selectShapesAndZoom;
|
|
@@ -2694,7 +2680,15 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2694
2680
|
*
|
|
2695
2681
|
* @returns The shape at the given point, or undefined if there is no shape at the point.
|
|
2696
2682
|
*/
|
|
2697
|
-
getShapeAtPoint(point: VecLike, opts?:
|
|
2683
|
+
getShapeAtPoint(point: VecLike, opts?: {
|
|
2684
|
+
filter?(shape: TLShape): boolean;
|
|
2685
|
+
hitFrameInside?: boolean;
|
|
2686
|
+
hitInside?: boolean;
|
|
2687
|
+
hitLabels?: boolean;
|
|
2688
|
+
hitLocked?: boolean;
|
|
2689
|
+
margin?: number;
|
|
2690
|
+
renderingOnly?: boolean;
|
|
2691
|
+
}): TLShape | undefined;
|
|
2698
2692
|
/**
|
|
2699
2693
|
* Get the shapes, if any, at a given page point.
|
|
2700
2694
|
*
|
|
@@ -3794,21 +3788,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3794
3788
|
* @public
|
|
3795
3789
|
*/
|
|
3796
3790
|
complete(): this;
|
|
3797
|
-
/**
|
|
3798
|
-
* Dispatch a pointer move event in the current position of the pointer. This is useful when
|
|
3799
|
-
* external circumstances have changed (e.g. the camera moved or a shape was moved) and you want
|
|
3800
|
-
* the current interaction to respond to that change.
|
|
3801
|
-
*
|
|
3802
|
-
* @example
|
|
3803
|
-
* ```ts
|
|
3804
|
-
* editor.updatePointer()
|
|
3805
|
-
* ```
|
|
3806
|
-
*
|
|
3807
|
-
* @param options - The options for updating the pointer.
|
|
3808
|
-
* @returns The editor instance.
|
|
3809
|
-
* @public
|
|
3810
|
-
*/
|
|
3811
|
-
updatePointer(options?: TLUpdatePointerOptions): this;
|
|
3812
3791
|
/**
|
|
3813
3792
|
* Puts the editor into focused mode.
|
|
3814
3793
|
*
|
|
@@ -4032,38 +4011,9 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
4032
4011
|
/* Excluded from this release type: maybeTrackPerformance */
|
|
4033
4012
|
}
|
|
4034
4013
|
|
|
4035
|
-
/**
|
|
4036
|
-
* An Atom that is scoped to the lifetime of an Editor.
|
|
4037
|
-
*
|
|
4038
|
-
* This is useful for storing UI state for tldraw applications. Keeping state scoped to an editor
|
|
4039
|
-
* instead of stored in a global atom can prevent issues with state being shared between editors
|
|
4040
|
-
* when navigating between pages, or when multiple editor instances are used on the same page.
|
|
4041
|
-
*
|
|
4042
|
-
* @public
|
|
4043
|
-
*/
|
|
4044
|
-
export declare class EditorAtom<T> {
|
|
4045
|
-
private name;
|
|
4046
|
-
private getInitialState;
|
|
4047
|
-
private states;
|
|
4048
|
-
constructor(name: string, getInitialState: (editor: Editor) => T);
|
|
4049
|
-
getAtom(editor: Editor): Atom<T>;
|
|
4050
|
-
get(editor: Editor): T;
|
|
4051
|
-
update(editor: Editor, update: (state: T) => T): T;
|
|
4052
|
-
set(editor: Editor, state: T): T;
|
|
4053
|
-
}
|
|
4054
|
-
|
|
4055
4014
|
/** @public */
|
|
4056
4015
|
export declare const EditorContext: React_3.Context<Editor | null>;
|
|
4057
4016
|
|
|
4058
|
-
/** @public @react */
|
|
4059
|
-
export declare function EditorProvider({ editor, children }: EditorProviderProps): JSX_2.Element;
|
|
4060
|
-
|
|
4061
|
-
/** @public */
|
|
4062
|
-
export declare interface EditorProviderProps {
|
|
4063
|
-
editor: Editor;
|
|
4064
|
-
children: React_3.ReactNode;
|
|
4065
|
-
}
|
|
4066
|
-
|
|
4067
4017
|
/** @public */
|
|
4068
4018
|
export declare class Ellipse2d extends Geometry2d {
|
|
4069
4019
|
config: Omit<Geometry2dOptions, 'isClosed'> & {
|
|
@@ -4358,8 +4308,6 @@ export declare function getSvgPathFromPoints(points: VecLike[], closed?: boolean
|
|
|
4358
4308
|
/** @public */
|
|
4359
4309
|
export declare function getUserPreferences(): TLUserPreferences;
|
|
4360
4310
|
|
|
4361
|
-
/* Excluded from this release type: getVerticesCountForArcLength */
|
|
4362
|
-
|
|
4363
4311
|
/** @public */
|
|
4364
4312
|
export declare class Group2d extends Geometry2d {
|
|
4365
4313
|
children: Geometry2d[];
|
|
@@ -4559,7 +4507,7 @@ export declare function intersectLineSegmentCircle(a1: VecLike, a2: VecLike, c:
|
|
|
4559
4507
|
* @param b2 - The second segment's second point.
|
|
4560
4508
|
* @public
|
|
4561
4509
|
*/
|
|
4562
|
-
export declare function intersectLineSegmentLineSegment(a1: VecLike, a2: VecLike, b1: VecLike, b2: VecLike
|
|
4510
|
+
export declare function intersectLineSegmentLineSegment(a1: VecLike, a2: VecLike, b1: VecLike, b2: VecLike): null | Vec;
|
|
4563
4511
|
|
|
4564
4512
|
/**
|
|
4565
4513
|
* Find the intersections between a line segment and a closed polygon.
|
|
@@ -5454,14 +5402,6 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
|
|
|
5454
5402
|
* @public
|
|
5455
5403
|
*/
|
|
5456
5404
|
onResizeEnd?(initial: Shape, current: Shape): TLShapePartial<Shape> | void;
|
|
5457
|
-
/**
|
|
5458
|
-
* A callback called when a shape resize is cancelled.
|
|
5459
|
-
*
|
|
5460
|
-
* @param initial - The shape at the start of the resize.
|
|
5461
|
-
* @param current - The current shape.
|
|
5462
|
-
* @public
|
|
5463
|
-
*/
|
|
5464
|
-
onResizeCancel?(initial: Shape, current: Shape): void;
|
|
5465
5405
|
/**
|
|
5466
5406
|
* A callback called when a shape starts being translated.
|
|
5467
5407
|
*
|
|
@@ -5488,23 +5428,6 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
|
|
|
5488
5428
|
* @public
|
|
5489
5429
|
*/
|
|
5490
5430
|
onTranslateEnd?(initial: Shape, current: Shape): TLShapePartial<Shape> | void;
|
|
5491
|
-
/**
|
|
5492
|
-
* A callback called when a shape translation is cancelled.
|
|
5493
|
-
*
|
|
5494
|
-
* @param initial - The shape at the start of the translation.
|
|
5495
|
-
* @param current - The current shape.
|
|
5496
|
-
* @public
|
|
5497
|
-
*/
|
|
5498
|
-
onTranslateCancel?(initial: Shape, current: Shape): void;
|
|
5499
|
-
/**
|
|
5500
|
-
* A callback called when a shape's handle starts being dragged.
|
|
5501
|
-
*
|
|
5502
|
-
* @param shape - The shape.
|
|
5503
|
-
* @param info - An object containing the handle and whether the handle is 'precise' or not.
|
|
5504
|
-
* @returns A change to apply to the shape, or void.
|
|
5505
|
-
* @public
|
|
5506
|
-
*/
|
|
5507
|
-
onHandleDragStart?(shape: Shape, info: TLHandleDragInfo<Shape>): TLShapePartial<Shape> | void;
|
|
5508
5431
|
/**
|
|
5509
5432
|
* A callback called when a shape's handle changes.
|
|
5510
5433
|
*
|
|
@@ -5514,23 +5437,6 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
|
|
|
5514
5437
|
* @public
|
|
5515
5438
|
*/
|
|
5516
5439
|
onHandleDrag?(shape: Shape, info: TLHandleDragInfo<Shape>): TLShapePartial<Shape> | void;
|
|
5517
|
-
/**
|
|
5518
|
-
* A callback called when a shape's handle finishes being dragged.
|
|
5519
|
-
*
|
|
5520
|
-
* @param current - The current shape.
|
|
5521
|
-
* @param info - An object containing the handle and whether the handle is 'precise' or not.
|
|
5522
|
-
* @returns A change to apply to the shape, or void.
|
|
5523
|
-
* @public
|
|
5524
|
-
*/
|
|
5525
|
-
onHandleDragEnd?(current: Shape, info: TLHandleDragInfo<Shape>): TLShapePartial<Shape> | void;
|
|
5526
|
-
/**
|
|
5527
|
-
* A callback called when a shape's handle drag is cancelled.
|
|
5528
|
-
*
|
|
5529
|
-
* @param current - The current shape.
|
|
5530
|
-
* @param info - An object containing the handle and whether the handle is 'precise' or not.
|
|
5531
|
-
* @public
|
|
5532
|
-
*/
|
|
5533
|
-
onHandleDragCancel?(current: Shape, info: TLHandleDragInfo<Shape>): void;
|
|
5534
5440
|
/**
|
|
5535
5441
|
* A callback called when a shape starts being rotated.
|
|
5536
5442
|
*
|
|
@@ -5557,14 +5463,6 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
|
|
|
5557
5463
|
* @public
|
|
5558
5464
|
*/
|
|
5559
5465
|
onRotateEnd?(initial: Shape, current: Shape): TLShapePartial<Shape> | void;
|
|
5560
|
-
/**
|
|
5561
|
-
* A callback called when a shape rotation is cancelled.
|
|
5562
|
-
*
|
|
5563
|
-
* @param initial - The shape at the start of the rotation.
|
|
5564
|
-
* @param current - The current shape.
|
|
5565
|
-
* @public
|
|
5566
|
-
*/
|
|
5567
|
-
onRotateCancel?(initial: Shape, current: Shape): void;
|
|
5568
5466
|
/* Excluded from this release type: onBindingChange */
|
|
5569
5467
|
/**
|
|
5570
5468
|
* A callback called when a shape's children change.
|
|
@@ -5793,12 +5691,6 @@ export declare abstract class StateNode implements Partial<TLEventHandlers> {
|
|
|
5793
5691
|
_currentToolIdMask: Atom<string | undefined, unknown>;
|
|
5794
5692
|
getCurrentToolIdMask(): string | undefined;
|
|
5795
5693
|
setCurrentToolIdMask(id: string | undefined): void;
|
|
5796
|
-
/**
|
|
5797
|
-
* Add a child node to this state node.
|
|
5798
|
-
*
|
|
5799
|
-
* @public
|
|
5800
|
-
*/
|
|
5801
|
-
addChild(childConstructor: TLStateNodeConstructor): this;
|
|
5802
5694
|
onWheel?(info: TLWheelEventInfo): void;
|
|
5803
5695
|
onPointerDown?(info: TLPointerEventInfo): void;
|
|
5804
5696
|
onPointerMove?(info: TLPointerEventInfo): void;
|
|
@@ -6424,8 +6316,6 @@ export declare interface TldrawOptions {
|
|
|
6424
6316
|
readonly multiClickDurationMs: number;
|
|
6425
6317
|
readonly coarseDragDistanceSquared: number;
|
|
6426
6318
|
readonly dragDistanceSquared: number;
|
|
6427
|
-
readonly uiDragDistanceSquared: number;
|
|
6428
|
-
readonly uiCoarseDragDistanceSquared: number;
|
|
6429
6319
|
readonly defaultSvgPadding: number;
|
|
6430
6320
|
readonly cameraSlideFriction: number;
|
|
6431
6321
|
readonly gridSteps: readonly {
|
|
@@ -6452,7 +6342,6 @@ export declare interface TldrawOptions {
|
|
|
6452
6342
|
readonly flattenImageBoundsPadding: number;
|
|
6453
6343
|
readonly laserDelayMs: number;
|
|
6454
6344
|
readonly maxExportDelayMs: number;
|
|
6455
|
-
readonly tooltipDelayMs: number;
|
|
6456
6345
|
/**
|
|
6457
6346
|
* How long should previews created by {@link Editor.createTemporaryAssetPreview} last before
|
|
6458
6347
|
* they expire? Defaults to 3 minutes.
|
|
@@ -6518,9 +6407,8 @@ export declare interface TLEditorComponents {
|
|
|
6518
6407
|
SelectionForeground?: ComponentType<TLSelectionForegroundProps> | null;
|
|
6519
6408
|
ShapeIndicator?: ComponentType<TLShapeIndicatorProps> | null;
|
|
6520
6409
|
ShapeIndicators?: ComponentType | null;
|
|
6521
|
-
ShapeWrapper?: ComponentType<TLShapeWrapperProps & RefAttributes<HTMLDivElement>> | null;
|
|
6522
6410
|
SnapIndicator?: ComponentType<TLSnapIndicatorProps> | null;
|
|
6523
|
-
Spinner?: ComponentType
|
|
6411
|
+
Spinner?: ComponentType | null;
|
|
6524
6412
|
SvgDefs?: ComponentType | null;
|
|
6525
6413
|
ZoomBrush?: ComponentType<TLBrushProps> | null;
|
|
6526
6414
|
ErrorFallback?: TLErrorFallbackComponent;
|
|
@@ -6854,59 +6742,6 @@ export declare interface TLGeometryOpts {
|
|
|
6854
6742
|
context?: string;
|
|
6855
6743
|
}
|
|
6856
6744
|
|
|
6857
|
-
/**
|
|
6858
|
-
* Options to {@link Editor.getShapeAtPoint}.
|
|
6859
|
-
*
|
|
6860
|
-
* @public
|
|
6861
|
-
*/
|
|
6862
|
-
export declare interface TLGetShapeAtPointOptions {
|
|
6863
|
-
/**
|
|
6864
|
-
* The margin to apply to the shape.
|
|
6865
|
-
* If a number, it will be applied to both the inside and outside of the shape.
|
|
6866
|
-
* If an array, the first element will be applied to the inside of the shape, and the second element will be applied to the outside.
|
|
6867
|
-
*
|
|
6868
|
-
* @example
|
|
6869
|
-
* ```ts
|
|
6870
|
-
* // Get the shape at the center of the screen
|
|
6871
|
-
* const shape = editor.getShapeAtProps({
|
|
6872
|
-
* margin: 10,
|
|
6873
|
-
* })
|
|
6874
|
-
*
|
|
6875
|
-
* // Get the shape at the center of the screen with a 10px inner margin and a 5px outer margin
|
|
6876
|
-
* const shape = editor.getShapeAtProps({
|
|
6877
|
-
* margin: [10, 5],
|
|
6878
|
-
* })
|
|
6879
|
-
* ```
|
|
6880
|
-
*/
|
|
6881
|
-
margin?: [number, number] | number;
|
|
6882
|
-
/**
|
|
6883
|
-
* Whether to register hits inside of shapes (beyond the margin), such as the inside of a solid shape.
|
|
6884
|
-
*/
|
|
6885
|
-
hitInside?: boolean;
|
|
6886
|
-
/**
|
|
6887
|
-
* Whether to register hits on locked shapes.
|
|
6888
|
-
*/
|
|
6889
|
-
hitLocked?: boolean;
|
|
6890
|
-
/**
|
|
6891
|
-
* Whether to register hits on labels.
|
|
6892
|
-
*/
|
|
6893
|
-
hitLabels?: boolean;
|
|
6894
|
-
/**
|
|
6895
|
-
* Whether to only return hits on shapes that are currently being rendered.
|
|
6896
|
-
* todo: rename this to hitCulled or hitNotRendering
|
|
6897
|
-
*/
|
|
6898
|
-
renderingOnly?: boolean;
|
|
6899
|
-
/**
|
|
6900
|
-
* Whether to register hits on the inside of frame shapes.
|
|
6901
|
-
* todo: rename this to hitInsideFrames
|
|
6902
|
-
*/
|
|
6903
|
-
hitFrameInside?: boolean;
|
|
6904
|
-
/**
|
|
6905
|
-
* A filter function to apply to the shapes.
|
|
6906
|
-
*/
|
|
6907
|
-
filter?(shape: TLShape): boolean;
|
|
6908
|
-
}
|
|
6909
|
-
|
|
6910
6745
|
/** @public */
|
|
6911
6746
|
export declare interface TLGridProps {
|
|
6912
6747
|
x: number;
|
|
@@ -6919,7 +6754,6 @@ export declare interface TLGridProps {
|
|
|
6919
6754
|
export declare interface TLHandleDragInfo<T extends TLShape> {
|
|
6920
6755
|
handle: TLHandle;
|
|
6921
6756
|
isPrecise: boolean;
|
|
6922
|
-
isCreatingShape: boolean;
|
|
6923
6757
|
initial?: T | undefined;
|
|
6924
6758
|
}
|
|
6925
6759
|
|
|
@@ -7446,16 +7280,6 @@ export declare interface TLShapeUtilConstructor<T extends TLUnknownShape, U exte
|
|
|
7446
7280
|
migrations?: LegacyMigrations | MigrationSequence | TLPropsMigrations;
|
|
7447
7281
|
}
|
|
7448
7282
|
|
|
7449
|
-
/** @public */
|
|
7450
|
-
export declare interface TLShapeWrapperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7451
|
-
/** The shape being rendered. */
|
|
7452
|
-
shape: TLShape;
|
|
7453
|
-
/** Whether this is the shapes regular, or background component. */
|
|
7454
|
-
isBackground: boolean;
|
|
7455
|
-
/** The shape's rendered component. */
|
|
7456
|
-
children: ReactNode;
|
|
7457
|
-
}
|
|
7458
|
-
|
|
7459
7283
|
/** @public */
|
|
7460
7284
|
export declare interface TLSnapIndicatorProps {
|
|
7461
7285
|
className?: string;
|
|
@@ -7605,7 +7429,7 @@ export declare interface TLTextExternalContentSource {
|
|
|
7605
7429
|
|
|
7606
7430
|
/** @public */
|
|
7607
7431
|
export declare interface TLTextOptions {
|
|
7608
|
-
tipTapConfig?:
|
|
7432
|
+
tipTapConfig?: EditorProviderProps;
|
|
7609
7433
|
addFontsFromNode?: RichTextFontVisitor;
|
|
7610
7434
|
}
|
|
7611
7435
|
|
|
@@ -7638,25 +7462,6 @@ export declare interface TLTldrawExternalContentSource {
|
|
|
7638
7462
|
data: TLContent;
|
|
7639
7463
|
}
|
|
7640
7464
|
|
|
7641
|
-
/** @public */
|
|
7642
|
-
export declare interface TLUpdatePointerOptions {
|
|
7643
|
-
/** Whether to update the pointer immediately, rather than on the next tick. */
|
|
7644
|
-
immediate?: boolean;
|
|
7645
|
-
/**
|
|
7646
|
-
* The point, in screen-space, to update the pointer to. Defaults to the position of the last
|
|
7647
|
-
* pointer event.
|
|
7648
|
-
*/
|
|
7649
|
-
point?: VecLike;
|
|
7650
|
-
pointerId?: number;
|
|
7651
|
-
ctrlKey?: boolean;
|
|
7652
|
-
altKey?: boolean;
|
|
7653
|
-
shiftKey?: boolean;
|
|
7654
|
-
metaKey?: boolean;
|
|
7655
|
-
accelKey?: boolean;
|
|
7656
|
-
isPen?: boolean;
|
|
7657
|
-
button?: number;
|
|
7658
|
-
}
|
|
7659
|
-
|
|
7660
7465
|
/** @public */
|
|
7661
7466
|
export declare interface TLUrlExternalAsset {
|
|
7662
7467
|
type: 'url';
|
|
@@ -7686,14 +7491,12 @@ export declare interface TLUserPreferences {
|
|
|
7686
7491
|
color?: null | string;
|
|
7687
7492
|
locale?: null | string;
|
|
7688
7493
|
animationSpeed?: null | number;
|
|
7689
|
-
areKeyboardShortcutsEnabled?: boolean | null;
|
|
7690
7494
|
edgeScrollSpeed?: null | number;
|
|
7691
7495
|
colorScheme?: 'dark' | 'light' | 'system';
|
|
7692
7496
|
isSnapMode?: boolean | null;
|
|
7693
7497
|
isWrapMode?: boolean | null;
|
|
7694
7498
|
isDynamicSizeMode?: boolean | null;
|
|
7695
7499
|
isPasteAtCursorMode?: boolean | null;
|
|
7696
|
-
showUiLabels?: boolean | null;
|
|
7697
7500
|
}
|
|
7698
7501
|
|
|
7699
7502
|
/** @public */
|
|
@@ -7856,7 +7659,6 @@ export declare class UserPreferencesManager {
|
|
|
7856
7659
|
updateUserPreferences(userPreferences: Partial<TLUserPreferences>): void;
|
|
7857
7660
|
getUserPreferences(): {
|
|
7858
7661
|
animationSpeed: number;
|
|
7859
|
-
areKeyboardShortcutsEnabled: boolean;
|
|
7860
7662
|
color: string;
|
|
7861
7663
|
colorScheme: "dark" | "light" | "system" | undefined;
|
|
7862
7664
|
id: string;
|
|
@@ -7866,7 +7668,6 @@ export declare class UserPreferencesManager {
|
|
|
7866
7668
|
isWrapMode: boolean;
|
|
7867
7669
|
locale: string;
|
|
7868
7670
|
name: string;
|
|
7869
|
-
showUiLabels: boolean;
|
|
7870
7671
|
};
|
|
7871
7672
|
getIsDarkMode(): boolean;
|
|
7872
7673
|
/**
|
|
@@ -7874,7 +7675,6 @@ export declare class UserPreferencesManager {
|
|
|
7874
7675
|
*/
|
|
7875
7676
|
getEdgeScrollSpeed(): number;
|
|
7876
7677
|
getAnimationSpeed(): number;
|
|
7877
|
-
getAreKeyboardShortcutsEnabled(): boolean;
|
|
7878
7678
|
getId(): string;
|
|
7879
7679
|
getName(): string;
|
|
7880
7680
|
getLocale(): string;
|
|
@@ -7883,7 +7683,6 @@ export declare class UserPreferencesManager {
|
|
|
7883
7683
|
getIsWrapMode(): boolean;
|
|
7884
7684
|
getIsDynamicResizeMode(): boolean;
|
|
7885
7685
|
getIsPasteAtCursorMode(): boolean;
|
|
7886
|
-
getShowUiLabels(): boolean;
|
|
7887
7686
|
}
|
|
7888
7687
|
|
|
7889
7688
|
/** @public */
|
package/dist-cjs/index.js
CHANGED
|
@@ -46,7 +46,6 @@ __export(index_exports, {
|
|
|
46
46
|
DefaultSelectionForeground: () => import_DefaultSelectionForeground.DefaultSelectionForeground,
|
|
47
47
|
DefaultShapeIndicator: () => import_DefaultShapeIndicator.DefaultShapeIndicator,
|
|
48
48
|
DefaultShapeIndicators: () => import_DefaultShapeIndicators.DefaultShapeIndicators,
|
|
49
|
-
DefaultShapeWrapper: () => import_DefaultShapeWrapper.DefaultShapeWrapper,
|
|
50
49
|
DefaultSnapIndicator: () => import_DefaultSnapIndictor.DefaultSnapIndicator,
|
|
51
50
|
DefaultSpinner: () => import_DefaultSpinner.DefaultSpinner,
|
|
52
51
|
DefaultSvgDefs: () => import_DefaultSvgDefs.DefaultSvgDefs,
|
|
@@ -55,9 +54,7 @@ __export(index_exports, {
|
|
|
55
54
|
Edge2d: () => import_Edge2d.Edge2d,
|
|
56
55
|
EdgeScrollManager: () => import_EdgeScrollManager.EdgeScrollManager,
|
|
57
56
|
Editor: () => import_Editor.Editor,
|
|
58
|
-
EditorAtom: () => import_EditorAtom.EditorAtom,
|
|
59
57
|
EditorContext: () => import_useEditor.EditorContext,
|
|
60
|
-
EditorProvider: () => import_useEditor.EditorProvider,
|
|
61
58
|
Ellipse2d: () => import_Ellipse2d.Ellipse2d,
|
|
62
59
|
ErrorBoundary: () => import_ErrorBoundary.ErrorBoundary,
|
|
63
60
|
ErrorScreen: () => import_TldrawEditor.ErrorScreen,
|
|
@@ -146,7 +143,6 @@ __export(index_exports, {
|
|
|
146
143
|
getSvgAsImage: () => import_getSvgAsImage.getSvgAsImage,
|
|
147
144
|
getSvgPathFromPoints: () => import_getSvgPathFromPoints.getSvgPathFromPoints,
|
|
148
145
|
getUserPreferences: () => import_TLUserPreferences.getUserPreferences,
|
|
149
|
-
getVerticesCountForArcLength: () => import_geometry_constants.getVerticesCountForArcLength,
|
|
150
146
|
hardReset: () => import_hardReset.hardReset,
|
|
151
147
|
hardResetEditor: () => import_hardResetEditor.hardResetEditor,
|
|
152
148
|
inlineBase64AssetStore: () => import_createTLStore.inlineBase64AssetStore,
|
|
@@ -258,7 +254,6 @@ var import_DefaultSelectionBackground = require("./lib/components/default-compon
|
|
|
258
254
|
var import_DefaultSelectionForeground = require("./lib/components/default-components/DefaultSelectionForeground");
|
|
259
255
|
var import_DefaultShapeIndicator = require("./lib/components/default-components/DefaultShapeIndicator");
|
|
260
256
|
var import_DefaultShapeIndicators = require("./lib/components/default-components/DefaultShapeIndicators");
|
|
261
|
-
var import_DefaultShapeWrapper = require("./lib/components/default-components/DefaultShapeWrapper");
|
|
262
257
|
var import_DefaultSnapIndictor = require("./lib/components/default-components/DefaultSnapIndictor");
|
|
263
258
|
var import_DefaultSpinner = require("./lib/components/default-components/DefaultSpinner");
|
|
264
259
|
var import_DefaultSvgDefs = require("./lib/components/default-components/DefaultSvgDefs");
|
|
@@ -331,7 +326,6 @@ var import_CubicBezier2d = require("./lib/primitives/geometry/CubicBezier2d");
|
|
|
331
326
|
var import_CubicSpline2d = require("./lib/primitives/geometry/CubicSpline2d");
|
|
332
327
|
var import_Edge2d = require("./lib/primitives/geometry/Edge2d");
|
|
333
328
|
var import_Ellipse2d = require("./lib/primitives/geometry/Ellipse2d");
|
|
334
|
-
var import_geometry_constants = require("./lib/primitives/geometry/geometry-constants");
|
|
335
329
|
var import_Geometry2d = require("./lib/primitives/geometry/Geometry2d");
|
|
336
330
|
var import_Group2d = require("./lib/primitives/geometry/Group2d");
|
|
337
331
|
var import_Point2d = require("./lib/primitives/geometry/Point2d");
|
|
@@ -349,7 +343,6 @@ var import_browserCanvasMaxSize = require("./lib/utils/browserCanvasMaxSize");
|
|
|
349
343
|
var import_debug_flags = require("./lib/utils/debug-flags");
|
|
350
344
|
var import_deepLinks = require("./lib/utils/deepLinks");
|
|
351
345
|
var import_dom = require("./lib/utils/dom");
|
|
352
|
-
var import_EditorAtom = require("./lib/utils/EditorAtom");
|
|
353
346
|
var import_getIncrementedName = require("./lib/utils/getIncrementedName");
|
|
354
347
|
var import_getPointerInfo = require("./lib/utils/getPointerInfo");
|
|
355
348
|
var import_getSvgPathFromPoints = require("./lib/utils/getSvgPathFromPoints");
|
|
@@ -371,7 +364,7 @@ function debugEnableLicensing() {
|
|
|
371
364
|
}
|
|
372
365
|
(0, import_utils.registerTldrawLibraryVersion)(
|
|
373
366
|
"@tldraw/editor",
|
|
374
|
-
"3.16.0-internal.
|
|
367
|
+
"3.16.0-internal.a478398270c6",
|
|
375
368
|
"cjs"
|
|
376
369
|
);
|
|
377
370
|
//# 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 {\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 {\n\tTextManager,\n\ttype TLMeasureTextOpts,\n\ttype TLMeasureTextSpanOpts,\n} from './lib/editor/managers/TextManager/TextManager'\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 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 TLSvgOptions,\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 } 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 TestEnvironment,\n\ttype ValidLicenseKeyResult,\n} from './lib/license/LicenseManager'\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\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\n/**\n * @deprecated Licensing is now enabled in the tldraw SDK.\n * @public */\nexport function debugEnableLicensing() {\n\t// noop\n\treturn\n}\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
|
|
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\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 {\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 {\n\tTextManager,\n\ttype TLMeasureTextOpts,\n\ttype TLMeasureTextSpanOpts,\n} from './lib/editor/managers/TextManager/TextManager'\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 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 TLImageExportOptions,\n\ttype TLSvgExportOptions,\n\ttype TLSvgOptions,\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 } 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 { EditorContext, useEditor, useMaybeEditor } 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 TestEnvironment,\n\ttype ValidLicenseKeyResult,\n} from './lib/license/LicenseManager'\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 {\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\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 { 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\n/**\n * @deprecated Licensing is now enabled in the tldraw SDK.\n * @public */\nexport function debugEnableLicensing() {\n\t// noop\n\treturn\n}\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,mBAA6C;AAC7C,gBAAO;AACP,sBAAO;AACP,kBAAO;AACP,IAAAA,aAAO;AACP,yBAAO;AAGP,0BAAc,0BARd;AAUA,0BAAc,gCAVd;AAYA,0BAAc,0BAZd;AAcA,0BAAc,6BAdd;AAgBA,0BAAc,0BAhBd;AAkBA,0BAAc,6BAlBd;AAoBA,+BAAkC;AAClC,0BAAgD;AAChD,2BAGO;AACP,qCAGO;AACP,2BAGO;AACP,kCAGO;AACP,yBAA8C;AAC9C,2BAGO;AACP,4BAGO;AACP,6BAGO;AACP,wCAGO;AACP,wCAGO;AAEP,mCAGO;AAEP,oCAGO;AACP,iCAGO;AACP,4BAA+B;AAC/B,4BAA+B;AAC/B,2BAIO;AACP,2BAAuD;AACvD,8BAAiC;AACjC,0BAAqD;AACrD,2BAQO;AACP,0BAAyD;AAEzD,2BAA2D;AAC3D,8BAKO;AACP,oCAOO;AACP,+BAQO;AACP,uBAAyE;AACzE,yBASO;AACP,oBAMO;AACP,0BAAgD;AAChD,+BAAkC;AAClC,yBAIO;AACP,4BAA+B;AAC/B,6BAGO;AACP,yBAIO;AACP,yBAAqD;AACrD,yBAMO;AACP,yBAIO;AACP,oCAAuC;AACvC,8BAAsD;AACtD,4BAA+B;AAC/B,uBAeO;AACP,iCAGO;AACP,uBAAiD;AACjD,0BAA6B;AAC7B,8BAAiC;AACjC,sBAAgC;AAChC,uBAAuD;AAGvD,yBAiCO;AA2CP,8BAKO;AACP,2BAA8B;AAC9B,yBAAsB;AACtB,mBAAwB;AACxB,kBAAuB;AACvB,0BAKO;AACP,uBAA0B;AAC1B,uBAAyD;AACzD,iCAAoC;AAEpC,sBAA2C;AAC3C,iCAAoC;AACpC,yBAAkE;AAClE,2BAA8B;AAC9B,2BAA8B;AAC9B,0BAA6B;AAC7B,2BAA8B;AAC9B,2CAA8C;AAC9C,uCAA0C;AAC1C,wBAA2B;AAC3B,yBAA4B;AAC5B,yBAA4B;AAC5B,uBAMO;AACP,gCAAmC;AACnC,wBAAiD;AACjD,0BAA6B;AAC7B,+BAAkC;AAClC,4BAQO;AACP,qBAAyD;AACzD,iBASO;AACP,qBAAwB;AACxB,mBAAsB;AACtB,sBAAyB;AACzB,2BAA8B;AAC9B,2BAA8B;AAC9B,oBAAuB;AACvB,uBAA0B;AAC1B,wBAMO;AACP,qBAAwB;AACxB,qBAAwB;AACxB,uBAA0B;AAC1B,wBAA2B;AAC3B,yBAA4B;AAC5B,uBAA0B;AAC1B,uBAaO;AACP,iBAAiD;AACjD,IAAAC,gBAgCO;AACP,iBAAkC;AAClC,0BAYO;AACP,oBAAoD;AACpD,kCAAgE;AAChE,yBAMO;AACP,uBAKO;AACP,iBAOO;AACP,gCAAmC;AACnC,4BAA+B;AAC/B,kCAAqC;AACrC,6BAAgC;AAChC,sBAA2B;AAC3B,4BAA+B;AAC/B,yBAA4B;AAC5B,yBAAoE;AACpE,sBAOO;AACP,sBAIO;AACP,qBAA6C;AAC7C,6BAIO;AACP,uBAA0B;AAC1B,4BAAsD;AAEtD,kBAAqB;AACrB,yBAA2B;AAKpB,SAAS,uBAAuB;AAEtC;AACD;AAAA,IAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": ["import_at", "import_utils"]
|
|
7
7
|
}
|
|
@@ -44,8 +44,8 @@ var import_utils = require("@tldraw/utils");
|
|
|
44
44
|
var import_react = __toESM(require("react"));
|
|
45
45
|
var import_classnames = __toESM(require("classnames"));
|
|
46
46
|
var import_version = require("../version");
|
|
47
|
-
var import_DefaultErrorFallback = require("./components/default-components/DefaultErrorFallback");
|
|
48
47
|
var import_ErrorBoundary = require("./components/ErrorBoundary");
|
|
48
|
+
var import_DefaultErrorFallback = require("./components/default-components/DefaultErrorFallback");
|
|
49
49
|
var import_createTLUser = require("./config/createTLUser");
|
|
50
50
|
var import_Editor = require("./editor/Editor");
|
|
51
51
|
var import_useContainer = require("./hooks/useContainer");
|
|
@@ -58,7 +58,6 @@ var import_useForceUpdate = require("./hooks/useForceUpdate");
|
|
|
58
58
|
var import_useIdentity = require("./hooks/useIdentity");
|
|
59
59
|
var import_useLocalStore = require("./hooks/useLocalStore");
|
|
60
60
|
var import_useRefState = require("./hooks/useRefState");
|
|
61
|
-
var import_useStateAttribute = require("./hooks/useStateAttribute");
|
|
62
61
|
var import_useZoomCss = require("./hooks/useZoomCss");
|
|
63
62
|
var import_LicenseProvider = require("./license/LicenseProvider");
|
|
64
63
|
var import_Watermark = require("./license/Watermark");
|
|
@@ -365,7 +364,6 @@ function Layout({ children, onMount }) {
|
|
|
365
364
|
(0, import_useCursor.useCursor)();
|
|
366
365
|
(0, import_useDarkMode.useDarkMode)();
|
|
367
366
|
(0, import_useForceUpdate.useForceUpdate)();
|
|
368
|
-
(0, import_useStateAttribute.useStateAttribute)();
|
|
369
367
|
useOnMount((editor) => {
|
|
370
368
|
const teardownStore = editor.store.props.onMount(editor);
|
|
371
369
|
const teardownCallback = onMount?.(editor);
|