@tldraw/editor 3.16.0-canary.e1b1e53d3c16 → 3.16.0-canary.e372fad80b6d
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 +95 -104
- package/dist-cjs/index.js +6 -6
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/TldrawEditor.js +2 -6
- package/dist-cjs/lib/TldrawEditor.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultCanvas.js +12 -2
- package/dist-cjs/lib/components/default-components/DefaultCanvas.js.map +2 -2
- package/dist-cjs/lib/editor/Editor.js +23 -113
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/derivations/notVisibleShapes.js +4 -0
- package/dist-cjs/lib/editor/derivations/notVisibleShapes.js.map +2 -2
- package/dist-cjs/lib/editor/shapes/ShapeUtil.js +23 -0
- package/dist-cjs/lib/editor/shapes/ShapeUtil.js.map +2 -2
- package/dist-cjs/lib/editor/types/misc-types.js.map +1 -1
- package/dist-cjs/lib/exports/getSvgJsx.js +34 -14
- package/dist-cjs/lib/exports/getSvgJsx.js.map +2 -2
- package/dist-cjs/lib/hooks/useCanvasEvents.js +22 -17
- package/dist-cjs/lib/hooks/useCanvasEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/useDocumentEvents.js +5 -5
- package/dist-cjs/lib/hooks/useDocumentEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.js +1 -2
- package/dist-cjs/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/useGestureEvents.js +1 -1
- package/dist-cjs/lib/hooks/useGestureEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/useHandleEvents.js +3 -3
- package/dist-cjs/lib/hooks/useHandleEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/usePassThroughMouseOverEvents.js +4 -1
- package/dist-cjs/lib/hooks/usePassThroughMouseOverEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/useSelectionEvents.js +4 -4
- package/dist-cjs/lib/hooks/useSelectionEvents.js.map +2 -2
- package/dist-cjs/lib/license/LicenseManager.js +140 -53
- package/dist-cjs/lib/license/LicenseManager.js.map +2 -2
- package/dist-cjs/lib/license/LicenseProvider.js +39 -1
- package/dist-cjs/lib/license/LicenseProvider.js.map +2 -2
- package/dist-cjs/lib/license/Watermark.js +69 -7
- package/dist-cjs/lib/license/Watermark.js.map +3 -3
- package/dist-cjs/lib/license/useLicenseManagerState.js.map +2 -2
- package/dist-cjs/lib/primitives/Box.js +3 -0
- package/dist-cjs/lib/primitives/Box.js.map +2 -2
- package/dist-cjs/lib/primitives/Vec.js +0 -4
- package/dist-cjs/lib/primitives/Vec.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/Geometry2d.js +50 -20
- package/dist-cjs/lib/primitives/geometry/Geometry2d.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/Group2d.js +8 -1
- package/dist-cjs/lib/primitives/geometry/Group2d.js.map +2 -2
- package/dist-cjs/lib/utils/dom.js +12 -1
- package/dist-cjs/lib/utils/dom.js.map +2 -2
- package/dist-cjs/lib/utils/getPointerInfo.js +2 -2
- package/dist-cjs/lib/utils/getPointerInfo.js.map +2 -2
- package/dist-cjs/lib/utils/reparenting.js +2 -35
- package/dist-cjs/lib/utils/reparenting.js.map +3 -3
- package/dist-cjs/version.js +3 -3
- package/dist-cjs/version.js.map +1 -1
- package/dist-esm/index.d.mts +95 -104
- package/dist-esm/index.mjs +9 -7
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/TldrawEditor.mjs +3 -7
- package/dist-esm/lib/TldrawEditor.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultCanvas.mjs +13 -3
- package/dist-esm/lib/components/default-components/DefaultCanvas.mjs.map +2 -2
- package/dist-esm/lib/editor/Editor.mjs +23 -113
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/lib/editor/derivations/notVisibleShapes.mjs +4 -0
- package/dist-esm/lib/editor/derivations/notVisibleShapes.mjs.map +2 -2
- package/dist-esm/lib/editor/shapes/ShapeUtil.mjs +23 -0
- package/dist-esm/lib/editor/shapes/ShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/exports/getSvgJsx.mjs +34 -14
- package/dist-esm/lib/exports/getSvgJsx.mjs.map +2 -2
- package/dist-esm/lib/hooks/useCanvasEvents.mjs +24 -18
- package/dist-esm/lib/hooks/useCanvasEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/useDocumentEvents.mjs +11 -6
- package/dist-esm/lib/hooks/useDocumentEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.mjs +2 -3
- package/dist-esm/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/useGestureEvents.mjs +2 -2
- package/dist-esm/lib/hooks/useGestureEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/useHandleEvents.mjs +9 -4
- package/dist-esm/lib/hooks/useHandleEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/usePassThroughMouseOverEvents.mjs +4 -1
- package/dist-esm/lib/hooks/usePassThroughMouseOverEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/useSelectionEvents.mjs +6 -5
- package/dist-esm/lib/hooks/useSelectionEvents.mjs.map +2 -2
- package/dist-esm/lib/license/LicenseManager.mjs +141 -54
- package/dist-esm/lib/license/LicenseManager.mjs.map +2 -2
- package/dist-esm/lib/license/LicenseProvider.mjs +39 -2
- package/dist-esm/lib/license/LicenseProvider.mjs.map +2 -2
- package/dist-esm/lib/license/Watermark.mjs +70 -8
- package/dist-esm/lib/license/Watermark.mjs.map +3 -3
- package/dist-esm/lib/license/useLicenseManagerState.mjs.map +2 -2
- package/dist-esm/lib/primitives/Box.mjs +4 -1
- package/dist-esm/lib/primitives/Box.mjs.map +2 -2
- package/dist-esm/lib/primitives/Vec.mjs +0 -4
- package/dist-esm/lib/primitives/Vec.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/Geometry2d.mjs +53 -21
- package/dist-esm/lib/primitives/geometry/Geometry2d.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/Group2d.mjs +8 -1
- package/dist-esm/lib/primitives/geometry/Group2d.mjs.map +2 -2
- package/dist-esm/lib/utils/dom.mjs +12 -1
- package/dist-esm/lib/utils/dom.mjs.map +2 -2
- package/dist-esm/lib/utils/getPointerInfo.mjs +2 -2
- package/dist-esm/lib/utils/getPointerInfo.mjs.map +2 -2
- package/dist-esm/lib/utils/reparenting.mjs +3 -40
- package/dist-esm/lib/utils/reparenting.mjs.map +2 -2
- package/dist-esm/version.mjs +3 -3
- package/dist-esm/version.mjs.map +1 -1
- package/editor.css +16 -3
- package/package.json +7 -7
- package/src/index.ts +4 -9
- package/src/lib/TldrawEditor.tsx +3 -15
- package/src/lib/components/default-components/DefaultCanvas.tsx +10 -2
- package/src/lib/editor/Editor.test.ts +90 -0
- package/src/lib/editor/Editor.ts +36 -150
- package/src/lib/editor/derivations/notVisibleShapes.ts +6 -0
- package/src/lib/editor/shapes/ShapeUtil.ts +46 -0
- package/src/lib/editor/types/misc-types.ts +0 -6
- package/src/lib/exports/getSvgJsx.test.ts +868 -0
- package/src/lib/exports/getSvgJsx.tsx +76 -19
- package/src/lib/hooks/useCanvasEvents.ts +23 -17
- package/src/lib/hooks/useDocumentEvents.ts +11 -6
- package/src/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.ts +2 -2
- package/src/lib/hooks/useGestureEvents.ts +2 -2
- package/src/lib/hooks/useHandleEvents.ts +9 -4
- package/src/lib/hooks/usePassThroughMouseOverEvents.ts +4 -1
- package/src/lib/hooks/useSelectionEvents.ts +6 -5
- package/src/lib/license/LicenseManager.test.ts +721 -382
- package/src/lib/license/LicenseManager.ts +201 -58
- package/src/lib/license/LicenseProvider.tsx +74 -2
- package/src/lib/license/Watermark.tsx +75 -8
- package/src/lib/license/useLicenseManagerState.ts +2 -2
- package/src/lib/primitives/Box.test.ts +126 -0
- package/src/lib/primitives/Box.ts +10 -1
- package/src/lib/primitives/Vec.ts +0 -5
- package/src/lib/primitives/geometry/Geometry2d.test.ts +420 -0
- package/src/lib/primitives/geometry/Geometry2d.ts +78 -21
- package/src/lib/primitives/geometry/Group2d.ts +10 -1
- package/src/lib/test/InFrontOfTheCanvas.test.tsx +187 -0
- package/src/lib/utils/dom.test.ts +94 -0
- package/src/lib/utils/dom.ts +38 -1
- package/src/lib/utils/getPointerInfo.ts +2 -1
- package/src/lib/utils/reparenting.ts +3 -69
- package/src/version.ts +3 -3
package/dist-esm/index.d.mts
CHANGED
|
@@ -510,6 +510,7 @@ export declare class Box {
|
|
|
510
510
|
static ExpandBy(A: Box, n: number): Box;
|
|
511
511
|
static Collides(A: Box, B: Box): boolean;
|
|
512
512
|
static Contains(A: Box, B: Box): boolean;
|
|
513
|
+
static ContainsApproximately(A: Box, B: Box, precision?: number): boolean;
|
|
513
514
|
static Includes(A: Box, B: Box): boolean;
|
|
514
515
|
static ContainsPoint(A: Box, B: VecLike, margin?: number): boolean;
|
|
515
516
|
static Common(boxes: Box[]): Box;
|
|
@@ -760,11 +761,6 @@ export declare class CubicSpline2d extends Geometry2d {
|
|
|
760
761
|
/** @public */
|
|
761
762
|
export declare function dataUrlToFile(url: string, filename: string, mimeType: string): Promise<File>;
|
|
762
763
|
|
|
763
|
-
/**
|
|
764
|
-
* @deprecated Licensing is now enabled in the tldraw SDK.
|
|
765
|
-
* @public */
|
|
766
|
-
export declare function debugEnableLicensing(): void;
|
|
767
|
-
|
|
768
764
|
/* Excluded from this release type: DebugFlag */
|
|
769
765
|
|
|
770
766
|
/* Excluded from this release type: DebugFlagDef */
|
|
@@ -983,7 +979,7 @@ export declare class EdgeScrollManager {
|
|
|
983
979
|
/** @public */
|
|
984
980
|
export declare class Editor extends EventEmitter<TLEventMap> {
|
|
985
981
|
readonly id: string;
|
|
986
|
-
constructor({ store, user, shapeUtils, bindingUtils, tools, getContainer, cameraOptions, textOptions, initialState, autoFocus, inferDarkMode, options,
|
|
982
|
+
constructor({ store, user, shapeUtils, bindingUtils, tools, getContainer, cameraOptions, textOptions, initialState, autoFocus, inferDarkMode, options, getShapeVisibility, fontAssetUrls, }: TLEditorOptions);
|
|
987
983
|
private readonly _getShapeVisibility?;
|
|
988
984
|
private getIsShapeHiddenCache;
|
|
989
985
|
isShapeHidden(shapeOrId: TLShape | TLShapeId): boolean;
|
|
@@ -1050,22 +1046,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1050
1046
|
* @public
|
|
1051
1047
|
*/
|
|
1052
1048
|
readonly fonts: FontManager;
|
|
1053
|
-
/**
|
|
1054
|
-
* A manager for the editor's environment.
|
|
1055
|
-
*
|
|
1056
|
-
* @deprecated This is deprecated and will be removed in a future version. Use the `tlenv` global export instead.
|
|
1057
|
-
* @public
|
|
1058
|
-
*/
|
|
1059
|
-
readonly environment: {
|
|
1060
|
-
hasCanvasSupport: boolean;
|
|
1061
|
-
isAndroid: boolean;
|
|
1062
|
-
isChromeForIos: boolean;
|
|
1063
|
-
isDarwin: boolean;
|
|
1064
|
-
isFirefox: boolean;
|
|
1065
|
-
isIos: boolean;
|
|
1066
|
-
isSafari: boolean;
|
|
1067
|
-
isWebview: boolean;
|
|
1068
|
-
};
|
|
1069
1049
|
/**
|
|
1070
1050
|
* A manager for the editor's scribbles.
|
|
1071
1051
|
*
|
|
@@ -1208,22 +1188,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1208
1188
|
* @public
|
|
1209
1189
|
*/
|
|
1210
1190
|
getCanRedo(): boolean;
|
|
1211
|
-
/**
|
|
1212
|
-
* Create a new "mark", or stopping point, in the undo redo history. Creating a mark will clear
|
|
1213
|
-
* any redos.
|
|
1214
|
-
*
|
|
1215
|
-
* @example
|
|
1216
|
-
* ```ts
|
|
1217
|
-
* editor.mark()
|
|
1218
|
-
* editor.mark('flip shapes')
|
|
1219
|
-
* ```
|
|
1220
|
-
*
|
|
1221
|
-
* @param markId - The mark's id, usually the reason for adding the mark.
|
|
1222
|
-
*
|
|
1223
|
-
* @public
|
|
1224
|
-
* @deprecated use {@link Editor.markHistoryStoppingPoint} instead
|
|
1225
|
-
*/
|
|
1226
|
-
mark(markId?: string): this;
|
|
1227
1191
|
/**
|
|
1228
1192
|
* Create a new "mark", or stopping point, in the undo redo history. Creating a mark will clear
|
|
1229
1193
|
* any redos. You typically want to do this just before a user interaction begins or is handled.
|
|
@@ -1313,10 +1277,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1313
1277
|
* @public
|
|
1314
1278
|
*/
|
|
1315
1279
|
run(fn: () => void, opts?: TLEditorRunOptions): this;
|
|
1316
|
-
/**
|
|
1317
|
-
* @deprecated Use `Editor.run` instead.
|
|
1318
|
-
*/
|
|
1319
|
-
batch(fn: () => void, opts?: TLEditorRunOptions): this;
|
|
1320
1280
|
/* Excluded from this release type: annotateError */
|
|
1321
1281
|
/* Excluded from this release type: createErrorAnnotations */
|
|
1322
1282
|
/* Excluded from this release type: _crashingError */
|
|
@@ -1438,36 +1398,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1438
1398
|
hasOpenMenus: () => boolean;
|
|
1439
1399
|
isMenuOpen: (id: string) => boolean;
|
|
1440
1400
|
};
|
|
1441
|
-
/**
|
|
1442
|
-
* @deprecated Use `editor.menus.getOpenMenus` instead.
|
|
1443
|
-
*
|
|
1444
|
-
* @public
|
|
1445
|
-
*/
|
|
1446
|
-
getOpenMenus(): string[];
|
|
1447
|
-
/**
|
|
1448
|
-
* @deprecated Use `editor.menus.addOpenMenu` instead.
|
|
1449
|
-
*
|
|
1450
|
-
* @public
|
|
1451
|
-
*/
|
|
1452
|
-
addOpenMenu(id: string): this;
|
|
1453
|
-
/**
|
|
1454
|
-
* @deprecated Use `editor.menus.deleteOpenMenu` instead.
|
|
1455
|
-
*
|
|
1456
|
-
* @public
|
|
1457
|
-
*/
|
|
1458
|
-
deleteOpenMenu(id: string): this;
|
|
1459
|
-
/**
|
|
1460
|
-
* @deprecated Use `editor.menus.clearOpenMenus` instead.
|
|
1461
|
-
*
|
|
1462
|
-
* @public
|
|
1463
|
-
*/
|
|
1464
|
-
clearOpenMenus(): this;
|
|
1465
|
-
/**
|
|
1466
|
-
* @deprecated Use `editor.menus.hasAnyOpenMenus` instead.
|
|
1467
|
-
*
|
|
1468
|
-
* @public
|
|
1469
|
-
*/
|
|
1470
|
-
getIsMenuOpen(): boolean;
|
|
1471
1401
|
/**
|
|
1472
1402
|
* Set the cursor.
|
|
1473
1403
|
*
|
|
@@ -2916,8 +2846,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2916
2846
|
* @public
|
|
2917
2847
|
*/
|
|
2918
2848
|
getShapeAndDescendantIds(ids: TLShapeId[]): Set<TLShapeId>;
|
|
2919
|
-
/** @deprecated Use {@link Editor.getDraggingOverShape} instead */
|
|
2920
|
-
getDroppingOverShape(point: Vec, droppingShapes: TLShape[]): TLShape | undefined;
|
|
2921
2849
|
/**
|
|
2922
2850
|
* Get the shape that some shapes should be dropped on at a given point.
|
|
2923
2851
|
*
|
|
@@ -3629,14 +3557,20 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3629
3557
|
* Handle external content, such as files, urls, embeds, or plain text which has been put into the app, for example by pasting external text or dropping external images onto canvas.
|
|
3630
3558
|
*
|
|
3631
3559
|
* @param info - Info about the external content.
|
|
3560
|
+
* @param opts - Options for handling external content, including force flag to bypass readonly checks.
|
|
3632
3561
|
*/
|
|
3633
|
-
putExternalContent<E>(info: TLExternalContent<E
|
|
3562
|
+
putExternalContent<E>(info: TLExternalContent<E>, opts?: {
|
|
3563
|
+
force?: boolean;
|
|
3564
|
+
}): Promise<void>;
|
|
3634
3565
|
/**
|
|
3635
3566
|
* Handle replacing external content.
|
|
3636
3567
|
*
|
|
3637
3568
|
* @param info - Info about the external content.
|
|
3569
|
+
* @param opts - Options for handling external content, including force flag to bypass readonly checks.
|
|
3638
3570
|
*/
|
|
3639
|
-
replaceExternalContent<E>(info: TLExternalContent<E
|
|
3571
|
+
replaceExternalContent<E>(info: TLExternalContent<E>, opts?: {
|
|
3572
|
+
force?: boolean;
|
|
3573
|
+
}): Promise<void>;
|
|
3640
3574
|
/**
|
|
3641
3575
|
* Get content that can be exported for the given shape ids.
|
|
3642
3576
|
*
|
|
@@ -3692,8 +3626,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3692
3626
|
svg: string;
|
|
3693
3627
|
width: number;
|
|
3694
3628
|
} | undefined>;
|
|
3695
|
-
/** @deprecated Use {@link Editor.getSvgString} or {@link Editor.getSvgElement} instead. */
|
|
3696
|
-
getSvg(shapes: TLShape[] | TLShapeId[], opts?: TLSvgExportOptions): Promise<SVGSVGElement | undefined>;
|
|
3697
3629
|
/**
|
|
3698
3630
|
* Get an exported image of the given shapes.
|
|
3699
3631
|
*
|
|
@@ -4163,6 +4095,7 @@ export declare abstract class Geometry2d {
|
|
|
4163
4095
|
isLabel: boolean;
|
|
4164
4096
|
isEmptyLabel: boolean;
|
|
4165
4097
|
isInternal: boolean;
|
|
4098
|
+
excludeFromShapeBounds: boolean;
|
|
4166
4099
|
debugColor?: string;
|
|
4167
4100
|
ignore?: boolean;
|
|
4168
4101
|
constructor(opts: Geometry2dOptions);
|
|
@@ -4186,12 +4119,14 @@ export declare abstract class Geometry2d {
|
|
|
4186
4119
|
* along the edge it is as a fraction of the total length.
|
|
4187
4120
|
*/
|
|
4188
4121
|
uninterpolateAlongEdge(point: VecLike, _filters?: Geometry2dFilters): number;
|
|
4189
|
-
/** @deprecated Iterate the vertices instead. */
|
|
4190
|
-
nearestPointOnLineSegment(A: VecLike, B: VecLike): Vec;
|
|
4191
4122
|
isPointInBounds(point: VecLike, margin?: number): boolean;
|
|
4123
|
+
overlapsPolygon(_polygon: VecLike[]): boolean;
|
|
4192
4124
|
transform(transform: MatModel, opts?: TransformedGeometry2dOptions): Geometry2d;
|
|
4193
4125
|
private _vertices;
|
|
4194
4126
|
get vertices(): Vec[];
|
|
4127
|
+
getBoundsVertices(): Vec[];
|
|
4128
|
+
private _boundsVertices;
|
|
4129
|
+
get boundsVertices(): Vec[];
|
|
4195
4130
|
getBounds(): Box;
|
|
4196
4131
|
private _bounds;
|
|
4197
4132
|
get bounds(): Box;
|
|
@@ -4388,6 +4323,7 @@ export declare class Group2d extends Geometry2d {
|
|
|
4388
4323
|
hitTestLineSegment(A: VecLike, B: VecLike, zoom: number, filters?: Geometry2dFilters): boolean;
|
|
4389
4324
|
intersectLineSegment(A: VecLike, B: VecLike, filters?: Geometry2dFilters): VecLike[];
|
|
4390
4325
|
intersectCircle(center: VecLike, radius: number, filters?: Geometry2dFilters): VecLike[];
|
|
4326
|
+
getBoundsVertices(): Vec[];
|
|
4391
4327
|
intersectPolygon(polygon: VecLike[], filters?: Geometry2dFilters): VecLike[];
|
|
4392
4328
|
intersectPolyline(polyline: VecLike[], filters?: Geometry2dFilters): VecLike[];
|
|
4393
4329
|
interpolateAlongEdge(t: number, filters?: Geometry2dFilters): Vec;
|
|
@@ -4397,6 +4333,7 @@ export declare class Group2d extends Geometry2d {
|
|
|
4397
4333
|
toSimpleSvgPath(): string;
|
|
4398
4334
|
getLength(filters?: Geometry2dFilters): number;
|
|
4399
4335
|
getSvgPathData(): string;
|
|
4336
|
+
overlapsPolygon(polygon: VecLike[]): boolean;
|
|
4400
4337
|
}
|
|
4401
4338
|
|
|
4402
4339
|
/** @public */
|
|
@@ -4637,12 +4574,16 @@ export declare function kickoutOccludedShapes(editor: Editor, shapeIds: TLShapeI
|
|
|
4637
4574
|
filter?(parent: TLShape): boolean;
|
|
4638
4575
|
}): void;
|
|
4639
4576
|
|
|
4577
|
+
/* Excluded from this release type: LICENSE_TIMEOUT */
|
|
4578
|
+
|
|
4640
4579
|
/* Excluded from this release type: LicenseFromKeyResult */
|
|
4641
4580
|
|
|
4642
4581
|
/* Excluded from this release type: LicenseInfo */
|
|
4643
4582
|
|
|
4644
4583
|
/* Excluded from this release type: LicenseManager */
|
|
4645
4584
|
|
|
4585
|
+
/* Excluded from this release type: LicenseState */
|
|
4586
|
+
|
|
4646
4587
|
/** @public */
|
|
4647
4588
|
export declare function linesIntersect(A: VecLike, B: VecLike, C: VecLike, D: VecLike): boolean;
|
|
4648
4589
|
|
|
@@ -4675,6 +4616,23 @@ export declare function loadSnapshot(store: TLStore, _snapshot: Partial<TLEditor
|
|
|
4675
4616
|
/** @public */
|
|
4676
4617
|
export declare function loopToHtmlElement(elm: Element): HTMLElement;
|
|
4677
4618
|
|
|
4619
|
+
/**
|
|
4620
|
+
* In tldraw, events are sometimes handled by multiple components. For example, the shapes might
|
|
4621
|
+
* have events, but the canvas handles events too. The way that the canvas handles events can
|
|
4622
|
+
* interfere with the with the shapes event handlers - for example, it calls `.preventDefault()` on
|
|
4623
|
+
* `pointerDown`, which also prevents `click` events from firing on the shapes.
|
|
4624
|
+
*
|
|
4625
|
+
* You can use `.stopPropagation()` to prevent the event from propagating to the rest of the DOM,
|
|
4626
|
+
* but that can impact non-tldraw event handlers set up elsewhere. By using `markEventAsHandled`,
|
|
4627
|
+
* you'll stop other parts of tldraw from handling the event without impacting other, non-tldraw
|
|
4628
|
+
* event handlers. See also {@link wasEventAlreadyHandled}.
|
|
4629
|
+
*
|
|
4630
|
+
* @public
|
|
4631
|
+
*/
|
|
4632
|
+
export declare function markEventAsHandled(e: {
|
|
4633
|
+
nativeEvent: Event;
|
|
4634
|
+
} | Event): void;
|
|
4635
|
+
|
|
4678
4636
|
/** @public */
|
|
4679
4637
|
export declare class Mat {
|
|
4680
4638
|
constructor(a: number, b: number, c: number, d: number, e: number, f: number);
|
|
@@ -5248,7 +5206,34 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
|
|
|
5248
5206
|
* @public
|
|
5249
5207
|
*/
|
|
5250
5208
|
canBeLaidOut(_shape: Shape, _info: TLShapeUtilCanBeLaidOutOpts): boolean;
|
|
5209
|
+
/**
|
|
5210
|
+
* Whether this shape can be culled. By default, shapes are culled for
|
|
5211
|
+
* performance reasons when they are outside of the viewport. Culled shapes are still rendered
|
|
5212
|
+
* to the DOM, but have their `display` property set to `none`.
|
|
5213
|
+
*
|
|
5214
|
+
* @param shape - The shape.
|
|
5215
|
+
*/
|
|
5216
|
+
canCull(_shape: Shape): boolean;
|
|
5251
5217
|
/* Excluded from this release type: providesBackgroundForChildren */
|
|
5218
|
+
/**
|
|
5219
|
+
* Get the clip path to apply to this shape's children.
|
|
5220
|
+
*
|
|
5221
|
+
* @param shape - The shape to get the clip path for
|
|
5222
|
+
* @returns Array of points defining the clipping polygon in local coordinates, or undefined if no clipping
|
|
5223
|
+
* @public
|
|
5224
|
+
*/
|
|
5225
|
+
getClipPath?(shape: Shape): undefined | Vec[];
|
|
5226
|
+
/**
|
|
5227
|
+
* Whether a specific child shape should be clipped by this shape.
|
|
5228
|
+
* Only called if getClipPath returns a valid polygon.
|
|
5229
|
+
*
|
|
5230
|
+
* If not defined, the default behavior is to clip all children.
|
|
5231
|
+
*
|
|
5232
|
+
* @param child - The child shape to check
|
|
5233
|
+
* @returns boolean indicating if this child should be clipped
|
|
5234
|
+
* @public
|
|
5235
|
+
*/
|
|
5236
|
+
shouldClipChild?(child: TLShape): boolean;
|
|
5252
5237
|
/**
|
|
5253
5238
|
* Whether the shape should hide its resize handles when selected.
|
|
5254
5239
|
*
|
|
@@ -5279,6 +5264,17 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
|
|
|
5279
5264
|
* @public
|
|
5280
5265
|
*/
|
|
5281
5266
|
isAspectRatioLocked(_shape: Shape): boolean;
|
|
5267
|
+
/**
|
|
5268
|
+
* By default, the bounds of an image export are the bounds of all the shapes it contains, plus
|
|
5269
|
+
* some padding. If an export includes a shape where `isExportBoundsContainer` is true, then the
|
|
5270
|
+
* padding is skipped _if the bounds of that shape contains all the other shapes_. This is
|
|
5271
|
+
* useful in cases like annotating on top of an image, where you usually want to avoid extra
|
|
5272
|
+
* padding around the image if you don't need it.
|
|
5273
|
+
*
|
|
5274
|
+
* @param _shape - The shape to check
|
|
5275
|
+
* @returns True if this shape should be treated as an export bounds container
|
|
5276
|
+
*/
|
|
5277
|
+
isExportBoundsContainer(_shape: Shape): boolean;
|
|
5282
5278
|
/* Excluded from this release type: backgroundComponent */
|
|
5283
5279
|
/**
|
|
5284
5280
|
* Get the interpolated props for an animating shape. This is an optional method.
|
|
@@ -5834,7 +5830,14 @@ export declare abstract class StateNode implements Partial<TLEventHandlers> {
|
|
|
5834
5830
|
onExit?(info: any, to: string): void;
|
|
5835
5831
|
}
|
|
5836
5832
|
|
|
5837
|
-
/**
|
|
5833
|
+
/**
|
|
5834
|
+
* Calls `event.stopPropagation()`.
|
|
5835
|
+
*
|
|
5836
|
+
* @deprecated Use {@link markEventAsHandled} instead, or manually call `event.stopPropagation()` if
|
|
5837
|
+
* that's what you really want.
|
|
5838
|
+
*
|
|
5839
|
+
* @public
|
|
5840
|
+
*/
|
|
5838
5841
|
export declare const stopEventPropagation: (e: any) => any;
|
|
5839
5842
|
|
|
5840
5843
|
/* Excluded from this release type: StoreName */
|
|
@@ -6325,12 +6328,6 @@ export declare interface TldrawEditorBaseProps {
|
|
|
6325
6328
|
* Options for syncing the editor's camera state with the URL.
|
|
6326
6329
|
*/
|
|
6327
6330
|
deepLinks?: TLDeepLinkOptions | true;
|
|
6328
|
-
/**
|
|
6329
|
-
* Predicate for whether or not a shape should be hidden.
|
|
6330
|
-
*
|
|
6331
|
-
* @deprecated Use {@link TldrawEditorBaseProps#getShapeVisibility} instead.
|
|
6332
|
-
*/
|
|
6333
|
-
isShapeHidden?(shape: TLShape, editor: Editor): boolean;
|
|
6334
6331
|
/**
|
|
6335
6332
|
* Provides a way to hide shapes.
|
|
6336
6333
|
*
|
|
@@ -6592,15 +6589,6 @@ export declare interface TLEditorOptions {
|
|
|
6592
6589
|
fontAssetUrls?: {
|
|
6593
6590
|
[key: string]: string | undefined;
|
|
6594
6591
|
};
|
|
6595
|
-
/**
|
|
6596
|
-
* A predicate that should return true if the given shape should be hidden.
|
|
6597
|
-
*
|
|
6598
|
-
* @deprecated Use {@link Editor#getShapeVisibility} instead.
|
|
6599
|
-
*
|
|
6600
|
-
* @param shape - The shape to check.
|
|
6601
|
-
* @param editor - The editor instance.
|
|
6602
|
-
*/
|
|
6603
|
-
isShapeHidden?(shape: TLShape, editor: Editor): boolean;
|
|
6604
6592
|
/**
|
|
6605
6593
|
* Provides a way to hide shapes.
|
|
6606
6594
|
*
|
|
@@ -7591,12 +7579,6 @@ export declare interface TLSvgExportOptions {
|
|
|
7591
7579
|
preserveAspectRatio?: React.SVGAttributes<SVGSVGElement>['preserveAspectRatio'];
|
|
7592
7580
|
}
|
|
7593
7581
|
|
|
7594
|
-
/**
|
|
7595
|
-
* @public
|
|
7596
|
-
* @deprecated use {@link TLImageExportOptions} instead
|
|
7597
|
-
*/
|
|
7598
|
-
export declare type TLSvgOptions = TLImageExportOptions;
|
|
7599
|
-
|
|
7600
7582
|
/** @public */
|
|
7601
7583
|
export declare interface TLSvgTextExternalContent extends TLBaseExternalContent {
|
|
7602
7584
|
type: 'svg-text';
|
|
@@ -7750,6 +7732,7 @@ export declare class TransformedGeometry2d extends Geometry2d {
|
|
|
7750
7732
|
private readonly decomposed;
|
|
7751
7733
|
constructor(geometry: Geometry2d, matrix: MatModel, opts?: TransformedGeometry2dOptions);
|
|
7752
7734
|
getVertices(filters: Geometry2dFilters): Vec[];
|
|
7735
|
+
getBoundsVertices(): Vec[];
|
|
7753
7736
|
nearestPoint(point: VecLike, filters?: Geometry2dFilters): Vec;
|
|
7754
7737
|
hitTestPoint(point: VecLike, margin?: number, hitInside?: boolean, filters?: Geometry2dFilters): boolean;
|
|
7755
7738
|
distanceToPoint(point: VecLike, hitInside?: boolean, filters?: Geometry2dFilters): number;
|
|
@@ -7770,6 +7753,7 @@ export declare interface TransformedGeometry2dOptions {
|
|
|
7770
7753
|
isInternal?: boolean;
|
|
7771
7754
|
debugColor?: string;
|
|
7772
7755
|
ignore?: boolean;
|
|
7756
|
+
excludeFromShapeBounds?: boolean;
|
|
7773
7757
|
}
|
|
7774
7758
|
|
|
7775
7759
|
/** @public */
|
|
@@ -8004,8 +7988,6 @@ export declare class Vec {
|
|
|
8004
7988
|
lrp(B: VecLike, t: number): Vec;
|
|
8005
7989
|
equals(B: VecLike): boolean;
|
|
8006
7990
|
equalsXY(x: number, y: number): boolean;
|
|
8007
|
-
/** @deprecated use `uni` instead */
|
|
8008
|
-
norm(): this;
|
|
8009
7991
|
toFixed(): this;
|
|
8010
7992
|
toString(): string;
|
|
8011
7993
|
toJson(): VecModel;
|
|
@@ -8127,6 +8109,15 @@ export declare class Vec {
|
|
|
8127
8109
|
/** @public */
|
|
8128
8110
|
export declare type VecLike = Vec | VecModel;
|
|
8129
8111
|
|
|
8112
|
+
/**
|
|
8113
|
+
* Checks if an event has already been handled. See {@link markEventAsHandled}.
|
|
8114
|
+
*
|
|
8115
|
+
* @public
|
|
8116
|
+
*/
|
|
8117
|
+
export declare function wasEventAlreadyHandled(e: {
|
|
8118
|
+
nativeEvent: Event;
|
|
8119
|
+
} | Event): boolean;
|
|
8120
|
+
|
|
8130
8121
|
|
|
8131
8122
|
export * from "@tldraw/state";
|
|
8132
8123
|
export * from "@tldraw/state-react";
|
package/dist-esm/index.mjs
CHANGED
|
@@ -175,6 +175,7 @@ import { useViewportHeight } from "./lib/hooks/useViewportHeight.mjs";
|
|
|
175
175
|
import {
|
|
176
176
|
LicenseManager
|
|
177
177
|
} from "./lib/license/LicenseManager.mjs";
|
|
178
|
+
import { LICENSE_TIMEOUT } from "./lib/license/LicenseProvider.mjs";
|
|
178
179
|
import { defaultTldrawOptions } from "./lib/options.mjs";
|
|
179
180
|
import {
|
|
180
181
|
Box,
|
|
@@ -268,10 +269,12 @@ import {
|
|
|
268
269
|
import {
|
|
269
270
|
activeElementShouldCaptureKeys,
|
|
270
271
|
loopToHtmlElement,
|
|
272
|
+
markEventAsHandled,
|
|
271
273
|
preventDefault,
|
|
272
274
|
releasePointerCapture,
|
|
273
275
|
setPointerCapture,
|
|
274
|
-
stopEventPropagation
|
|
276
|
+
stopEventPropagation,
|
|
277
|
+
wasEventAlreadyHandled
|
|
275
278
|
} from "./lib/utils/dom.mjs";
|
|
276
279
|
import { EditorAtom } from "./lib/utils/EditorAtom.mjs";
|
|
277
280
|
import { getIncrementedName } from "./lib/utils/getIncrementedName.mjs";
|
|
@@ -298,12 +301,9 @@ import { hardReset } from "./lib/utils/sync/hardReset.mjs";
|
|
|
298
301
|
import { LocalIndexedDb, Table } from "./lib/utils/sync/LocalIndexedDb.mjs";
|
|
299
302
|
import { uniq } from "./lib/utils/uniq.mjs";
|
|
300
303
|
import { openWindow } from "./lib/utils/window-open.mjs";
|
|
301
|
-
function debugEnableLicensing() {
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
304
|
registerTldrawLibraryVersion(
|
|
305
305
|
"@tldraw/editor",
|
|
306
|
-
"3.16.0-canary.
|
|
306
|
+
"3.16.0-canary.e372fad80b6d",
|
|
307
307
|
"esm"
|
|
308
308
|
);
|
|
309
309
|
export {
|
|
@@ -358,6 +358,7 @@ export {
|
|
|
358
358
|
HTMLContainer,
|
|
359
359
|
HandleSnaps,
|
|
360
360
|
HistoryManager,
|
|
361
|
+
LICENSE_TIMEOUT,
|
|
361
362
|
LicenseManager,
|
|
362
363
|
LoadingScreen,
|
|
363
364
|
LocalIndexedDb,
|
|
@@ -409,7 +410,6 @@ export {
|
|
|
409
410
|
createTLStore,
|
|
410
411
|
createTLUser,
|
|
411
412
|
dataUrlToFile,
|
|
412
|
-
debugEnableLicensing,
|
|
413
413
|
debugFlags,
|
|
414
414
|
defaultTldrawOptions,
|
|
415
415
|
defaultUserPreferences,
|
|
@@ -454,6 +454,7 @@ export {
|
|
|
454
454
|
loadSessionStateSnapshotIntoStore,
|
|
455
455
|
loadSnapshot,
|
|
456
456
|
loopToHtmlElement,
|
|
457
|
+
markEventAsHandled,
|
|
457
458
|
maybeSnapToGrid,
|
|
458
459
|
normalizeWheel,
|
|
459
460
|
openWindow,
|
|
@@ -517,6 +518,7 @@ export {
|
|
|
517
518
|
useTransform,
|
|
518
519
|
useUniqueSafeId,
|
|
519
520
|
useViewportHeight,
|
|
520
|
-
userTypeValidator
|
|
521
|
+
userTypeValidator,
|
|
522
|
+
wasEventAlreadyHandled
|
|
521
523
|
};
|
|
522
524
|
//# sourceMappingURL=index.mjs.map
|
package/dist-esm/index.mjs.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,SAAS,oCAAoC;AAC7C,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AAGP,cAAc;AAEd,cAAc;AAEd,cAAc;AAEd,cAAc;AAEd,cAAc;AAEd,cAAc;AAEd,SAAS,yBAAyB;AAClC,SAAS,oBAAuC;AAChD;AAAA,EACC;AAAA,OAEM;AACP;AAAA,EACC;AAAA,OAEM;AACP;AAAA,EACC;AAAA,OAEM;AACP;AAAA,EACC;AAAA,OAEM;AACP,SAAS,mBAAqC;AAC9C;AAAA,EACC;AAAA,OAEM;AACP;AAAA,EACC;AAAA,OAEM;AACP;AAAA,EACC;AAAA,OAEM;AACP;AAAA,EACC;AAAA,OAEM;AACP;AAAA,EACC;AAAA,OAEM;AAEP;AAAA,EACC;AAAA,OAEM;AAEP;AAAA,EACC;AAAA,OAEM;AACP;AAAA,EACC;AAAA,OAEM;AACP;AAAA,EACC;AAAA,OAEM;AACP,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B;AAAA,EACC;AAAA,EACA;AAAA,OAEM;AACP,SAAS,qBAA8C;AACvD,SAAS,wBAAwB;AACjC,SAAS,oBAA4C;AACrD;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OAKM;AACP,SAAS,cAAc,qBAAkC;AAEzD,SAAS,kBAAkD;AAC3D;AAAA,EACC;AAAA,EACA;AAAA,OAGM;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGM;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEM;AACP,SAAS,2BAA2B,wBAAwB,aAAa;AACzE;AAAA,EACC;AAAA,OAQM;AACP;AAAA,EACC;AAAA,OAKM;AACP,SAAS,oBAAuC;AAChD,SAAS,yBAAyB;AAClC;AAAA,EACC;AAAA,OAGM;AACP,SAAS,sBAAsB;AAC/B;AAAA,EACC;AAAA,OAEM;AACP;AAAA,EACC;AAAA,OAGM;AACP,SAAS,mBAA4C;AACrD;AAAA,EACC;AAAA,OAKM;AACP;AAAA,EACC;AAAA,OAGM;AACP,SAAS,8BAA8B;AACvC,SAAS,wBAA6C;AACtD,SAAS,sBAAsB;AAC/B;AAAA,EACC;AAAA,OAcM;AACP;AAAA,EACC;AAAA,OAEM;AACP,SAAS,iBAAwC;AACjD,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,iBAA8C;AAGvD;AAAA,EACC;AAAA,OAgCM;
|
|
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 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 LicenseState,\n\ttype TestEnvironment,\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\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\tmarkEventAsHandled,\n\tpreventDefault,\n\treleasePointerCapture,\n\tsetPointerCapture,\n\tstopEventPropagation,\n\twasEventAlreadyHandled,\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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Store } from "@tldraw/store";
|
|
3
3
|
import { annotateError } from "@tldraw/utils";
|
|
4
|
+
import classNames from "classnames";
|
|
4
5
|
import React, {
|
|
5
6
|
memo,
|
|
6
7
|
useCallback,
|
|
@@ -11,7 +12,6 @@ import React, {
|
|
|
11
12
|
useState,
|
|
12
13
|
useSyncExternalStore
|
|
13
14
|
} from "react";
|
|
14
|
-
import classNames from "classnames";
|
|
15
15
|
import { version } from "../version.mjs";
|
|
16
16
|
import { DefaultErrorFallback } from "./components/default-components/DefaultErrorFallback.mjs";
|
|
17
17
|
import { OptionalErrorBoundary } from "./components/ErrorBoundary.mjs";
|
|
@@ -34,7 +34,7 @@ import { useStateAttribute } from "./hooks/useStateAttribute.mjs";
|
|
|
34
34
|
import { useZoomCss } from "./hooks/useZoomCss.mjs";
|
|
35
35
|
import { LicenseProvider } from "./license/LicenseProvider.mjs";
|
|
36
36
|
import { Watermark } from "./license/Watermark.mjs";
|
|
37
|
-
import {
|
|
37
|
+
import { markEventAsHandled } from "./utils/dom.mjs";
|
|
38
38
|
const EMPTY_SHAPE_UTILS_ARRAY = [];
|
|
39
39
|
const EMPTY_BINDING_UTILS_ARRAY = [];
|
|
40
40
|
const EMPTY_TOOLS_ARRAY = [];
|
|
@@ -66,7 +66,7 @@ const TldrawEditor = memo(function TldrawEditor2({
|
|
|
66
66
|
"data-tldraw": version,
|
|
67
67
|
draggable: false,
|
|
68
68
|
className: classNames(`${TL_CONTAINER_CLASS} tl-theme__light`, className),
|
|
69
|
-
onPointerDown:
|
|
69
|
+
onPointerDown: markEventAsHandled,
|
|
70
70
|
tabIndex: -1,
|
|
71
71
|
role: "application",
|
|
72
72
|
"aria-label": _options?.branding ?? "tldraw",
|
|
@@ -166,8 +166,6 @@ function TldrawEditorWithReadyStore({
|
|
|
166
166
|
options,
|
|
167
167
|
licenseKey,
|
|
168
168
|
deepLinks: _deepLinks,
|
|
169
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
170
|
-
isShapeHidden,
|
|
171
169
|
getShapeVisibility,
|
|
172
170
|
assetUrls
|
|
173
171
|
}) {
|
|
@@ -212,7 +210,6 @@ function TldrawEditorWithReadyStore({
|
|
|
212
210
|
textOptions,
|
|
213
211
|
options,
|
|
214
212
|
licenseKey,
|
|
215
|
-
isShapeHidden,
|
|
216
213
|
getShapeVisibility,
|
|
217
214
|
fontAssetUrls: assetUrls?.fonts
|
|
218
215
|
});
|
|
@@ -240,7 +237,6 @@ function TldrawEditorWithReadyStore({
|
|
|
240
237
|
user,
|
|
241
238
|
setEditor,
|
|
242
239
|
licenseKey,
|
|
243
|
-
isShapeHidden,
|
|
244
240
|
getShapeVisibility,
|
|
245
241
|
textOptions,
|
|
246
242
|
assetUrls
|