@ibodr/editor 0.2.14 → 0.2.16

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/index.d.ts CHANGED
@@ -2293,6 +2293,12 @@ interface DrLodStyle {
2293
2293
  * picture with a flat stand-in.
2294
2294
  */
2295
2295
  unmountWhenCulled?: boolean;
2296
+ /**
2297
+ * Below this screen size (CSS pixels on the longer side), if the shape is not
2298
+ * selected, the editor paints a captured bitmap on the lod canvas and unmounts
2299
+ * the DOM. Zooming in or selecting the shape mounts the real component again.
2300
+ */
2301
+ snapshotBelowPx?: number;
2296
2302
  }
2297
2303
  interface DrCropInfo<T extends DrShape> {
2298
2304
  handle: SelectionHandle;
@@ -10921,4 +10927,10 @@ declare function uniq<T>(array: {
10921
10927
  readonly [n: number]: T;
10922
10928
  } | null | undefined): T[];
10923
10929
 
10924
- export { Arc2d, AssetUtil, BaseBoxShapeTool, BaseBoxShapeUtil, BaseFrameLikeShapeUtil, type BatchMeasurementRequest, type BindingOnChangeOptions, type BindingOnCreateOptions, type BindingOnDeleteOptions, type BindingOnShapeChangeOptions, type BindingOnShapeDeleteOptions, type BindingOnShapeIsolateOptions, BindingUtil, type BoundsSnapGeometry, type BoundsSnapPoint, BoundsSnaps, Box, type BoxLike, type CanvasMaxSize, Circle2d, ClickManager, CollaboratorsManager, ContainerProvider, type ContainerProviderProps, CubicBezier2d, CubicSpline2d, DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS, DEFAULT_THEME, type DebugFlag, type DebugFlagDef, type DebugFlagDefaults, DefaultBackground, DefaultCanvas, DefaultCursor, DefaultErrorFallback, DefaultGrid, DefaultShapeWrapper, DefaultSpinner, DefaultSvgDefs, type DrAdjacentDirection, type DrAnyAssetUtilConstructor, type DrAnyBindingUtilConstructor, type DrAnyOverlayUtilConstructor, type DrAnyShapeUtilConstructor, type DrAssetUtilConstructor, type DrBackgroundProps, type DrBaseBoxShape, type DrBaseEventInfo, type DrBaseExternalContent, type DrBindingUtilConstructor, type DrCLickEventName, type DrCameraConstraints, type DrCameraEndPerfEvent, type DrCameraMoveOptions, type DrCameraOptions, type DrCameraStartPerfEvent, type DrCancelEvent, type DrCancelEventInfo, type DrCanvasComponentProps, type DrClickEvent, type DrClickEventInfo, type DrClickState, type DrClipboardPasteRawInfo, type DrClipboardWriteInfo, type DrCollaboratorCursorLayout, type DrCollaboratorCursorProps, type DrCompleteEvent, type DrCompleteEventInfo, type DrContent, type DrCropInfo, type DrCurrentUser, type DrCursorProps, type DrDeepLink, type DrDeepLinkOptions, type DrDragShapesInInfo, type DrDragShapesOutInfo, type DrDragShapesOverInfo, type DrDrawExternalContent, type DrDrawExternalContentSource, type DrDropShapesOverInfo, type DrEditStartInfo, type DrEditorComponents, type DrEditorOptions, type DrEditorRunOptions, type DrEditorSnapshot, type DrEmbedExternalContent, type DrEnterEventHandler, type DrErrorBoundaryProps, type DrErrorExternalContentSource, type DrErrorFallbackComponent, type DrErrorFallbackProps, type DrEventHandlers, type DrEventInfo, type DrEventMap, type DrEventMapHandler, type DrEventName, type DrExcalidrawExternalContent, type DrExcalidrawExternalContentSource, type DrExitEventHandler, type DrExportType, type DrExternalAsset, type DrExternalContent, type DrExternalContentSource, type DrFileExternalAsset, type DrFileReplaceExternalContent, type DrFilesExternalContent, type DrFramePerfEvent, type DrGeometryOpts, type DrGetShapeAtPointOptions, type DrGridProps, type DrHandleDragInfo, type DrHistoryBatchOptions, type DrHistoryDiff, type DrHistoryEntry, type DrHistoryMark, type DrImageExportOptions, type DrIndicatorPath, type DrInteractionEndPerfEvent, type DrInteractionStartPerfEvent, type DrInterruptEvent, type DrInterruptEventInfo, type DrKeyboardEvent, type DrKeyboardEventInfo, type DrKeyboardEventName, type DrLoadSessionStateSnapshotOptions, type DrLoadSnapshotOptions, type DrLodStyle, type DrMeasureTextOpts, type DrMeasureTextSpanOpts, type DrMeasuredTextSize, type DrMiroExternalContent, type DrMiroExternalContentSource, type DrOnMountHandler, type DrOverlay, type DrOverlayEntry, type DrOverlayUtilConstructor, type DrPerfEventMap, type DrPerfFrameTimeStats, type DrPerfLongAnimationFrame, type DrPerfLongAnimationFrameScript, type DrPinchEvent, type DrPinchEventInfo, type DrPinchEventName, type DrPointerEvent, type DrPointerEventInfo, type DrPointerEventName, type DrPointerEventTarget, type DrRenderingShape, type DrResizeHandle, type DrResizeInfo, type DrResizeMode, type DrResizeShapeOptions, type DrRotationSnapshot, type DrSelectionHandle, type DrSessionStateSnapshot, type DrShapeErrorFallbackComponent, type DrShapeOperationPerfEvent, type DrShapeUtilCanBeLaidOutOpts, type DrShapeUtilCanBindOpts, type DrShapeUtilCanvasSvgDef, type DrShapeUtilConstructor, type DrShapeWrapperProps, type DrSpinnerProps, type DrStateNodeConstructor, type DrStoreBaseOptions, type DrStoreEventInfo, type DrStoreOptions, type DrStoreSchemaOptions, type DrStoreWithStatus, type DrSvgExportOptions, type DrSvgTextExternalContent, type DrTextExternalContent, type DrTextExternalContentSource, type DrTextOptions, type DrTickEvent, type DrTickEventInfo, type DrUndoRedoPerfEvent, type DrUpdatePointerOptions, type DrUrlExternalAsset, type DrUrlExternalContent, type DrUserPreferences, type DrWheelEvent, type DrWheelEventInfo, DrawEditor, type DrawEditorBaseProps, type DrawEditorProps, type DrawEditorStoreProps, type DrawEditorWithStoreProps, type DrawEditorWithoutStoreProps, type DrawOptions, EASINGS, EVENT_NAME_MAP, Edge2d, EdgeScrollManager, Editor, EditorAtom, EditorContext, EditorManager, EditorPortal, type EditorPortalProps, EditorProvider, type EditorProviderProps, Ellipse2d, ErrorBoundary, ErrorScreen, FontManager, type GapsSnapIndicator, Geometry2d, Geometry2dFilters, type Geometry2dOptions, Group2d, GroupShapeUtil, HALF_PI, HTMLContainer, type HTMLContainerProps, type HandleSnapGeometry, HandleSnaps, HistoryManager, InputsManager, LoadingScreen, type LoadingScreenProps, LocalIndexedDb, Mat, type MatLike, type MatModel, MenuClickCapture, OptionalErrorBoundary, type OptionalKeys, OverlayManager, type OverlayOptionsWithDisplayValues, OverlayUtil, PI, PI2, type PerfectDashTerminal, PerformanceApiAdapter, PerformanceManager, Point2d, type PointsSnapIndicator, Polygon2d, Polyline2d, ROTATE_CORNER_TO_SELECTION_CORNER, ReadonlySharedStyleMap, Rectangle2d, type RequiredKeys, type ResizeBoxOptions, type RichTextFontVisitor, type RichTextFontVisitorState, type RotateCorner, SIDES, SIN, SVGContainer, type SVGContainerProps, type SafeId, type ScribbleItem, ScribbleManager, type ScribbleSessionOptions, type SelectionCorner, type SelectionEdge, type SelectionHandle, ShapeUtil, type SharedStyle, SharedStyleMap, type SnapData, type SnapIndicator, SnapManager, SpatialIndexManager, Stadium2d, StateNode, type StoreName, type SvgExportContext, type SvgExportDef, TAB_ID, Table, TextManager, ThemeManager, TickManager, type TiptapEditor, type TiptapNode, TransformedGeometry2d, type TransformedGeometry2dOptions, USER_COLORS, type UiEvent, type UiEventType, UserPreferencesManager, Vec, type VecLike, activeElementShouldCaptureKeys, angleDistance, applyRotationToSnapshotShapes, approximately, areAnglesCompatible, average, canonicalizeRotation, centerOfCircleFromThreePoints, clamp, clampRadians, clampToBrowserMaxCanvasSize, clockwiseAngleDist, coreShapes, counterClockwiseAngleDist, createDebugValue, createDeepLinkString, createDrCurrentUser, createDrSchemaFromUtils, createDrStore, createSessionStateSnapshotSignal, dataUrlToFile, debugFlags, defaultDrawOptions, defaultUserPreferences, defaultUserStore, degreesToRadians, elementShouldCaptureKeys, extractSessionStateFromLegacySnapshot, featureFlags, getArcMeasure, getColorValue, getCursor, getDefaultCdnBaseUrl, getDroppedShapesToNewParents, getFontsFromRichText, getFreshUserPreferences, getGlobalDocument, getGlobalWindow, getIncrementedName, getOverlayDisplayValues, getOwnerDocument, getOwnerWindow, getPerfectDashProps, getPointInArcT, getPointOnCircle, getPointerInfo, getPointsOnArc, getPolygonVertices, getRotationSnapshot, getSnapshot, getSvgAsImage, getSvgPathFromPoints, getUserPreferences, getVerticesCountForArcLength, hardReset, hardResetEditor, inlineBase64AssetStore, intersectCircleCircle, intersectCirclePolygon, intersectCirclePolyline, intersectLineSegmentCircle, intersectLineSegmentLineSegment, intersectLineSegmentPolygon, intersectLineSegmentPolyline, intersectPolygonBounds, intersectPolygonPolygon, isAccelKey, isCursorInViewport, isSafeFloat, kickoutOccludedShapes, linesIntersect, loadSessionStateSnapshotIntoStore, loadSnapshot, loopToHtmlElement, maybeSnapToGrid, moveElementInto, normalizeWheel, openWindow, parseDeepLinkString, perimeterOfEllipse, pointInPolygon, polygonIntersectsPolyline, polygonsIntersect, precise, preventDefault, radiansToDegrees, rangeIntersection, refreshPage, releasePointerCapture, resizeBox, resizeScaled, resolveLineHeightPx, resolveThemes, rotateSelectionHandle, runtime, sanitizeId, setPointerCapture, setRuntimeOverrides, setUserPreferences, shortAngleDist, snapAngle, stopEventPropagation, strokeShapeIndicators, suffixSafeId, tleditors, tlenv, tlenvReactive, tlmenus, tltime, toDomPrecision, toFixed, toPrecision, uniq, useColorMode, useContainer, useContainerIfExists, useDelaySvgExport, useDrSchemaFromUtils, useDrStore, useDrawCurrentUser, useEditor, useEditorComponents, useEditorPortalHost, useEvent, useGlobalMenuIsOpen, useIsCropping, useIsEditing, useLocalStore, useMaybeEditor, useOnMount, usePassThroughWheelEvents, usePeerIds, usePresence, useReactiveEvent, useRefState, useShallowArrayIdentity, useShallowObjectIdentity, useSharedSafeId, useSvgExportContext, useTransform, useUniqueSafeId, useViewportHeight, userTypeValidator };
10930
+ /**
10931
+ * Heavy HTML shapes (images, PDF, decks) that opt in via `snapshotBelowPx`
10932
+ * leave the DOM below this screen size and are painted from a captured bitmap.
10933
+ */
10934
+ declare const LOD_SNAPSHOT_SCREEN_PX = 180;
10935
+
10936
+ export { Arc2d, AssetUtil, BaseBoxShapeTool, BaseBoxShapeUtil, BaseFrameLikeShapeUtil, type BatchMeasurementRequest, type BindingOnChangeOptions, type BindingOnCreateOptions, type BindingOnDeleteOptions, type BindingOnShapeChangeOptions, type BindingOnShapeDeleteOptions, type BindingOnShapeIsolateOptions, BindingUtil, type BoundsSnapGeometry, type BoundsSnapPoint, BoundsSnaps, Box, type BoxLike, type CanvasMaxSize, Circle2d, ClickManager, CollaboratorsManager, ContainerProvider, type ContainerProviderProps, CubicBezier2d, CubicSpline2d, DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS, DEFAULT_THEME, type DebugFlag, type DebugFlagDef, type DebugFlagDefaults, DefaultBackground, DefaultCanvas, DefaultCursor, DefaultErrorFallback, DefaultGrid, DefaultShapeWrapper, DefaultSpinner, DefaultSvgDefs, type DrAdjacentDirection, type DrAnyAssetUtilConstructor, type DrAnyBindingUtilConstructor, type DrAnyOverlayUtilConstructor, type DrAnyShapeUtilConstructor, type DrAssetUtilConstructor, type DrBackgroundProps, type DrBaseBoxShape, type DrBaseEventInfo, type DrBaseExternalContent, type DrBindingUtilConstructor, type DrCLickEventName, type DrCameraConstraints, type DrCameraEndPerfEvent, type DrCameraMoveOptions, type DrCameraOptions, type DrCameraStartPerfEvent, type DrCancelEvent, type DrCancelEventInfo, type DrCanvasComponentProps, type DrClickEvent, type DrClickEventInfo, type DrClickState, type DrClipboardPasteRawInfo, type DrClipboardWriteInfo, type DrCollaboratorCursorLayout, type DrCollaboratorCursorProps, type DrCompleteEvent, type DrCompleteEventInfo, type DrContent, type DrCropInfo, type DrCurrentUser, type DrCursorProps, type DrDeepLink, type DrDeepLinkOptions, type DrDragShapesInInfo, type DrDragShapesOutInfo, type DrDragShapesOverInfo, type DrDrawExternalContent, type DrDrawExternalContentSource, type DrDropShapesOverInfo, type DrEditStartInfo, type DrEditorComponents, type DrEditorOptions, type DrEditorRunOptions, type DrEditorSnapshot, type DrEmbedExternalContent, type DrEnterEventHandler, type DrErrorBoundaryProps, type DrErrorExternalContentSource, type DrErrorFallbackComponent, type DrErrorFallbackProps, type DrEventHandlers, type DrEventInfo, type DrEventMap, type DrEventMapHandler, type DrEventName, type DrExcalidrawExternalContent, type DrExcalidrawExternalContentSource, type DrExitEventHandler, type DrExportType, type DrExternalAsset, type DrExternalContent, type DrExternalContentSource, type DrFileExternalAsset, type DrFileReplaceExternalContent, type DrFilesExternalContent, type DrFramePerfEvent, type DrGeometryOpts, type DrGetShapeAtPointOptions, type DrGridProps, type DrHandleDragInfo, type DrHistoryBatchOptions, type DrHistoryDiff, type DrHistoryEntry, type DrHistoryMark, type DrImageExportOptions, type DrIndicatorPath, type DrInteractionEndPerfEvent, type DrInteractionStartPerfEvent, type DrInterruptEvent, type DrInterruptEventInfo, type DrKeyboardEvent, type DrKeyboardEventInfo, type DrKeyboardEventName, type DrLoadSessionStateSnapshotOptions, type DrLoadSnapshotOptions, type DrLodStyle, type DrMeasureTextOpts, type DrMeasureTextSpanOpts, type DrMeasuredTextSize, type DrMiroExternalContent, type DrMiroExternalContentSource, type DrOnMountHandler, type DrOverlay, type DrOverlayEntry, type DrOverlayUtilConstructor, type DrPerfEventMap, type DrPerfFrameTimeStats, type DrPerfLongAnimationFrame, type DrPerfLongAnimationFrameScript, type DrPinchEvent, type DrPinchEventInfo, type DrPinchEventName, type DrPointerEvent, type DrPointerEventInfo, type DrPointerEventName, type DrPointerEventTarget, type DrRenderingShape, type DrResizeHandle, type DrResizeInfo, type DrResizeMode, type DrResizeShapeOptions, type DrRotationSnapshot, type DrSelectionHandle, type DrSessionStateSnapshot, type DrShapeErrorFallbackComponent, type DrShapeOperationPerfEvent, type DrShapeUtilCanBeLaidOutOpts, type DrShapeUtilCanBindOpts, type DrShapeUtilCanvasSvgDef, type DrShapeUtilConstructor, type DrShapeWrapperProps, type DrSpinnerProps, type DrStateNodeConstructor, type DrStoreBaseOptions, type DrStoreEventInfo, type DrStoreOptions, type DrStoreSchemaOptions, type DrStoreWithStatus, type DrSvgExportOptions, type DrSvgTextExternalContent, type DrTextExternalContent, type DrTextExternalContentSource, type DrTextOptions, type DrTickEvent, type DrTickEventInfo, type DrUndoRedoPerfEvent, type DrUpdatePointerOptions, type DrUrlExternalAsset, type DrUrlExternalContent, type DrUserPreferences, type DrWheelEvent, type DrWheelEventInfo, DrawEditor, type DrawEditorBaseProps, type DrawEditorProps, type DrawEditorStoreProps, type DrawEditorWithStoreProps, type DrawEditorWithoutStoreProps, type DrawOptions, EASINGS, EVENT_NAME_MAP, Edge2d, EdgeScrollManager, Editor, EditorAtom, EditorContext, EditorManager, EditorPortal, type EditorPortalProps, EditorProvider, type EditorProviderProps, Ellipse2d, ErrorBoundary, ErrorScreen, FontManager, type GapsSnapIndicator, Geometry2d, Geometry2dFilters, type Geometry2dOptions, Group2d, GroupShapeUtil, HALF_PI, HTMLContainer, type HTMLContainerProps, type HandleSnapGeometry, HandleSnaps, HistoryManager, InputsManager, LOD_SNAPSHOT_SCREEN_PX, LoadingScreen, type LoadingScreenProps, LocalIndexedDb, Mat, type MatLike, type MatModel, MenuClickCapture, OptionalErrorBoundary, type OptionalKeys, OverlayManager, type OverlayOptionsWithDisplayValues, OverlayUtil, PI, PI2, type PerfectDashTerminal, PerformanceApiAdapter, PerformanceManager, Point2d, type PointsSnapIndicator, Polygon2d, Polyline2d, ROTATE_CORNER_TO_SELECTION_CORNER, ReadonlySharedStyleMap, Rectangle2d, type RequiredKeys, type ResizeBoxOptions, type RichTextFontVisitor, type RichTextFontVisitorState, type RotateCorner, SIDES, SIN, SVGContainer, type SVGContainerProps, type SafeId, type ScribbleItem, ScribbleManager, type ScribbleSessionOptions, type SelectionCorner, type SelectionEdge, type SelectionHandle, ShapeUtil, type SharedStyle, SharedStyleMap, type SnapData, type SnapIndicator, SnapManager, SpatialIndexManager, Stadium2d, StateNode, type StoreName, type SvgExportContext, type SvgExportDef, TAB_ID, Table, TextManager, ThemeManager, TickManager, type TiptapEditor, type TiptapNode, TransformedGeometry2d, type TransformedGeometry2dOptions, USER_COLORS, type UiEvent, type UiEventType, UserPreferencesManager, Vec, type VecLike, activeElementShouldCaptureKeys, angleDistance, applyRotationToSnapshotShapes, approximately, areAnglesCompatible, average, canonicalizeRotation, centerOfCircleFromThreePoints, clamp, clampRadians, clampToBrowserMaxCanvasSize, clockwiseAngleDist, coreShapes, counterClockwiseAngleDist, createDebugValue, createDeepLinkString, createDrCurrentUser, createDrSchemaFromUtils, createDrStore, createSessionStateSnapshotSignal, dataUrlToFile, debugFlags, defaultDrawOptions, defaultUserPreferences, defaultUserStore, degreesToRadians, elementShouldCaptureKeys, extractSessionStateFromLegacySnapshot, featureFlags, getArcMeasure, getColorValue, getCursor, getDefaultCdnBaseUrl, getDroppedShapesToNewParents, getFontsFromRichText, getFreshUserPreferences, getGlobalDocument, getGlobalWindow, getIncrementedName, getOverlayDisplayValues, getOwnerDocument, getOwnerWindow, getPerfectDashProps, getPointInArcT, getPointOnCircle, getPointerInfo, getPointsOnArc, getPolygonVertices, getRotationSnapshot, getSnapshot, getSvgAsImage, getSvgPathFromPoints, getUserPreferences, getVerticesCountForArcLength, hardReset, hardResetEditor, inlineBase64AssetStore, intersectCircleCircle, intersectCirclePolygon, intersectCirclePolyline, intersectLineSegmentCircle, intersectLineSegmentLineSegment, intersectLineSegmentPolygon, intersectLineSegmentPolyline, intersectPolygonBounds, intersectPolygonPolygon, isAccelKey, isCursorInViewport, isSafeFloat, kickoutOccludedShapes, linesIntersect, loadSessionStateSnapshotIntoStore, loadSnapshot, loopToHtmlElement, maybeSnapToGrid, moveElementInto, normalizeWheel, openWindow, parseDeepLinkString, perimeterOfEllipse, pointInPolygon, polygonIntersectsPolyline, polygonsIntersect, precise, preventDefault, radiansToDegrees, rangeIntersection, refreshPage, releasePointerCapture, resizeBox, resizeScaled, resolveLineHeightPx, resolveThemes, rotateSelectionHandle, runtime, sanitizeId, setPointerCapture, setRuntimeOverrides, setUserPreferences, shortAngleDist, snapAngle, stopEventPropagation, strokeShapeIndicators, suffixSafeId, tleditors, tlenv, tlenvReactive, tlmenus, tltime, toDomPrecision, toFixed, toPrecision, uniq, useColorMode, useContainer, useContainerIfExists, useDelaySvgExport, useDrSchemaFromUtils, useDrStore, useDrawCurrentUser, useEditor, useEditorComponents, useEditorPortalHost, useEvent, useGlobalMenuIsOpen, useIsCropping, useIsEditing, useLocalStore, useMaybeEditor, useOnMount, usePassThroughWheelEvents, usePeerIds, usePresence, useReactiveEvent, useRefState, useShallowArrayIdentity, useShallowObjectIdentity, useSharedSafeId, useSvgExportContext, useTransform, useUniqueSafeId, useViewportHeight, userTypeValidator };
package/dist/index.mjs CHANGED
@@ -4462,15 +4462,153 @@ function drawGeometryStroke(ctx, geometry) {
4462
4462
  var LOD_KEEP_SCREEN_PX = 36;
4463
4463
  var LOD_KEEP_TEXT_PX = 7;
4464
4464
  var LOD_CULL_MARGIN = 0.75;
4465
+ var LOD_SNAPSHOT_SCREEN_PX = 180;
4466
+ var LOD_OVERVIEW_ZOOM = 0.2;
4465
4467
  function getShapeRenderMode(input) {
4466
4468
  if (!input.hasLodStyle || input.interactive) return "dom";
4467
4469
  if (input.outsideViewport) return "unmounted";
4468
- if (input.unmountWhenCulled) return "dom";
4469
4470
  const screenMax = Math.max(input.pageWidth, input.pageHeight) * input.zoom;
4470
4471
  const textScreen = (input.labelSize ?? 0) * input.zoom;
4472
+ if (input.zoom < LOD_OVERVIEW_ZOOM && !input.unmountWhenCulled) return "canvas";
4473
+ const snapshotBelow = input.snapshotBelowPx ?? 0;
4474
+ if (snapshotBelow > 0 && screenMax < snapshotBelow) {
4475
+ return input.hasSnapshot ? "canvas" : "dom";
4476
+ }
4477
+ if (input.unmountWhenCulled) return "dom";
4471
4478
  if (screenMax >= LOD_KEEP_SCREEN_PX || textScreen >= LOD_KEEP_TEXT_PX) return "dom";
4472
4479
  return "canvas";
4473
4480
  }
4481
+ var SNAPSHOT_MAX_EDGE = 768;
4482
+ var MAX_SNAPSHOTS = 48;
4483
+ var MAX_CAPTURE_ATTEMPTS = 8;
4484
+ var snapshots = /* @__PURE__ */ new Map();
4485
+ var attempts = /* @__PURE__ */ new WeakMap();
4486
+ var lodSnapshotEpoch = atom("lod-snapshot-epoch", 0);
4487
+ var retryTimer = 0;
4488
+ var notifyTimer = 0;
4489
+ function notifySnapshotEpoch() {
4490
+ if (notifyTimer !== 0 || typeof window === "undefined") return;
4491
+ notifyTimer = window.setTimeout(() => {
4492
+ notifyTimer = 0;
4493
+ lodSnapshotEpoch.set(lodSnapshotEpoch.get() + 1);
4494
+ }, 0);
4495
+ }
4496
+ function contentKey(shape) {
4497
+ const props = shape.props;
4498
+ const crop = props.crop;
4499
+ return [
4500
+ shape.type,
4501
+ props.assetId ?? "",
4502
+ props.src ?? "",
4503
+ props.w ?? "",
4504
+ props.h ?? "",
4505
+ props.currentPage ?? "",
4506
+ props.pagesVisible ?? "",
4507
+ props.currentSlide ?? "",
4508
+ props.isFlipped ?? "",
4509
+ crop ? JSON.stringify(crop) : ""
4510
+ ].join("");
4511
+ }
4512
+ function lodSnapshotCovers(shape, _screenPx) {
4513
+ const entry = snapshots.get(shape.id);
4514
+ return Boolean(entry && entry.key === contentKey(shape) && entry.canvas.width > 1);
4515
+ }
4516
+ function getLodSnapshot(shape) {
4517
+ const entry = snapshots.get(shape.id);
4518
+ if (!entry || entry.key !== contentKey(shape) || entry.canvas.width < 2) return null;
4519
+ return entry.canvas;
4520
+ }
4521
+ function releaseCanvas(canvas) {
4522
+ canvas.width = 0;
4523
+ canvas.height = 0;
4524
+ }
4525
+ function storeLodSnapshot(shape, canvas, _screenPx) {
4526
+ const key = contentKey(shape);
4527
+ const previous = snapshots.get(shape.id);
4528
+ if (previous && previous.canvas !== canvas) releaseCanvas(previous.canvas);
4529
+ if (!previous && snapshots.size >= MAX_SNAPSHOTS) {
4530
+ releaseCanvas(canvas);
4531
+ return false;
4532
+ }
4533
+ if (previous) snapshots.delete(shape.id);
4534
+ snapshots.set(shape.id, { key, canvas });
4535
+ attempts.delete(shape);
4536
+ return true;
4537
+ }
4538
+ function scheduleLodSnapshotPass() {
4539
+ if (retryTimer !== 0 || typeof window === "undefined") return;
4540
+ retryTimer = window.setTimeout(() => {
4541
+ retryTimer = 0;
4542
+ notifySnapshotEpoch();
4543
+ }, 250);
4544
+ }
4545
+ function captureShapeSnapshot(element) {
4546
+ const rect = element.getBoundingClientRect();
4547
+ if (rect.width < 2 || rect.height < 2) return null;
4548
+ const sources = [];
4549
+ for (const node of element.querySelectorAll("canvas, img")) {
4550
+ if (node instanceof HTMLCanvasElement) {
4551
+ if (node.width < 2 || node.height < 2) continue;
4552
+ sources.push(node);
4553
+ } else if (node instanceof HTMLImageElement) {
4554
+ if (!node.complete || node.naturalWidth < 2) continue;
4555
+ sources.push(node);
4556
+ }
4557
+ }
4558
+ if (sources.length === 0) return null;
4559
+ const long = Math.max(rect.width, rect.height);
4560
+ const scale = Math.min(SNAPSHOT_MAX_EDGE / long, (window.devicePixelRatio || 1) * 2);
4561
+ const width = Math.max(1, Math.round(rect.width * scale));
4562
+ const height = Math.max(1, Math.round(rect.height * scale));
4563
+ const canvas = document.createElement("canvas");
4564
+ canvas.width = width;
4565
+ canvas.height = height;
4566
+ const ctx = canvas.getContext("2d");
4567
+ if (!ctx) return null;
4568
+ ctx.imageSmoothingEnabled = true;
4569
+ ctx.imageSmoothingQuality = "high";
4570
+ const sx = width / rect.width;
4571
+ const sy = height / rect.height;
4572
+ let drew = false;
4573
+ for (const source of sources) {
4574
+ const box = source.getBoundingClientRect();
4575
+ if (box.width < 1 || box.height < 1) continue;
4576
+ try {
4577
+ ctx.drawImage(
4578
+ source,
4579
+ (box.left - rect.left) * sx,
4580
+ (box.top - rect.top) * sy,
4581
+ box.width * sx,
4582
+ box.height * sy
4583
+ );
4584
+ drew = true;
4585
+ } catch {
4586
+ }
4587
+ }
4588
+ if (!drew) {
4589
+ releaseCanvas(canvas);
4590
+ return null;
4591
+ }
4592
+ return canvas;
4593
+ }
4594
+ function findShapeElement(container, shapeId) {
4595
+ const selector = `[data-shape-id="${CSS.escape(shapeId)}"]`;
4596
+ const nodes = container.querySelectorAll(selector);
4597
+ let fallback = null;
4598
+ for (const node of nodes) {
4599
+ if (!(node instanceof HTMLElement)) continue;
4600
+ if (node.querySelector("canvas, img")) return node;
4601
+ fallback = fallback ?? node;
4602
+ }
4603
+ return fallback;
4604
+ }
4605
+ function noteSnapshotMiss(shape) {
4606
+ const count = (attempts.get(shape) ?? 0) + 1;
4607
+ attempts.set(shape, count);
4608
+ if (count > MAX_CAPTURE_ATTEMPTS) return false;
4609
+ scheduleLodSnapshotPass();
4610
+ return true;
4611
+ }
4474
4612
  var MAX_LOD_POINTS = 48;
4475
4613
  var meshCache = /* @__PURE__ */ new WeakMap();
4476
4614
  var styleCache = /* @__PURE__ */ new WeakMap();
@@ -4612,18 +4750,28 @@ function ownRenderMode(editor, shape, frame, outsideViewport) {
4612
4750
  const style = lodStyleFor(editor, shape);
4613
4751
  const mesh = style && !style.unmountWhenCulled ? meshFor(editor, shape, style) : null;
4614
4752
  const pageBounds = editor.getShapePageBounds(shape);
4753
+ const pageWidth = pageBounds?.w ?? mesh?.w ?? 0;
4754
+ const pageHeight = pageBounds?.h ?? mesh?.h ?? 0;
4755
+ Math.max(pageWidth, pageHeight) * frame.zoom;
4615
4756
  return getShapeRenderMode({
4616
4757
  zoom: frame.zoom,
4617
4758
  lodZoom: frame.lodZoom,
4618
- hasLodStyle: Boolean(style && (mesh || style.unmountWhenCulled)),
4759
+ hasLodStyle: Boolean(
4760
+ style && (mesh || style.unmountWhenCulled || (style.snapshotBelowPx ?? 0) > 0)
4761
+ ),
4619
4762
  interactive: isInteractive(editor, shape, frame.selected, frame.editingId),
4620
4763
  outsideViewport,
4621
4764
  unmountWhenCulled: Boolean(style?.unmountWhenCulled),
4622
- pageWidth: pageBounds?.w ?? mesh?.w ?? 0,
4623
- pageHeight: pageBounds?.h ?? mesh?.h ?? 0,
4624
- labelSize: style?.labelSize ?? 0
4765
+ pageWidth,
4766
+ pageHeight,
4767
+ labelSize: style?.labelSize ?? 0,
4768
+ snapshotBelowPx: style?.snapshotBelowPx,
4769
+ hasSnapshot: snapshotCoversShape(shape)
4625
4770
  });
4626
4771
  }
4772
+ function snapshotCoversShape(shape, screenMax) {
4773
+ return lodSnapshotCovers(shape);
4774
+ }
4627
4775
  function coveredByDomBackground(editor, shape, frame) {
4628
4776
  let parentId = shape.parentId;
4629
4777
  for (let depth = 0; depth < 32; depth++) {
@@ -4694,9 +4842,30 @@ function paintShape(ctx, camera, dpr, matrix, mesh, padPx = 0) {
4694
4842
  Math.PI * 2
4695
4843
  );
4696
4844
  ctx.fill();
4845
+ } else {
4846
+ ctx.fillStyle = "rgba(0, 0, 0, 0.08)";
4847
+ ctx.fillRect(mesh.x, mesh.y, Math.max(mesh.w, 1), Math.max(mesh.h, 1));
4697
4848
  }
4698
4849
  paintLodLabel(ctx, mesh);
4699
4850
  }
4851
+ function paintSnapshot(ctx, camera, dpr, matrix, mesh, bitmap, padPx = 0) {
4852
+ if (mesh.opacity <= 0 || bitmap.width < 1 || bitmap.height < 1) return;
4853
+ const z = camera.z || 1;
4854
+ ctx.save();
4855
+ ctx.globalAlpha = mesh.opacity;
4856
+ ctx.imageSmoothingEnabled = true;
4857
+ ctx.imageSmoothingQuality = "high";
4858
+ ctx.setTransform(
4859
+ dpr * z * matrix.a,
4860
+ dpr * z * matrix.b,
4861
+ dpr * z * matrix.c,
4862
+ dpr * z * matrix.d,
4863
+ dpr * z * (matrix.e + camera.x) + padPx,
4864
+ dpr * z * (matrix.f + camera.y) + padPx
4865
+ );
4866
+ ctx.drawImage(bitmap, mesh.x, mesh.y, Math.max(mesh.w, 1), Math.max(mesh.h, 1));
4867
+ ctx.restore();
4868
+ }
4700
4869
  function paintLodLabel(ctx, mesh) {
4701
4870
  const text = mesh.label?.trim();
4702
4871
  if (!text) return;
@@ -4735,6 +4904,7 @@ var LOD_OVERSCAN_SCREEN_PX = 192;
4735
4904
  var LOD_BITMAP_MAX_PX = 8192;
4736
4905
  function lodBitmapCovers(bitmap, camera, viewport, dpr, shapes, frame, theme, colorMode) {
4737
4906
  if (bitmap.zoom !== camera.z || bitmap.dpr !== dpr) return false;
4907
+ if (bitmap.snapshotEpoch !== lodSnapshotEpoch.get()) return false;
4738
4908
  if (bitmap.shapes !== shapes || bitmap.selectedIds !== frame.selectedIds) return false;
4739
4909
  if (bitmap.editingId !== frame.editingId || bitmap.theme !== theme || bitmap.colorMode !== colorMode) {
4740
4910
  return false;
@@ -4767,14 +4937,23 @@ function paintVisibleLodShapes(ctx, editor, camera, dpr, shapes, frame, paintBou
4767
4937
  for (const shape of shapes) {
4768
4938
  if (editor.isShapeHidden(shape)) continue;
4769
4939
  const style = lodStyleFor(editor, shape);
4770
- if (!style || style.unmountWhenCulled) continue;
4940
+ if (!style) continue;
4941
+ const mode = ownRenderMode(editor, shape, frame, false);
4942
+ if (mode === "unmounted" || frame.debug) continue;
4943
+ if (mode === "canvas" && coveredByDomBackground(editor, shape, frame)) continue;
4771
4944
  const mesh = meshFor(editor, shape, style);
4772
4945
  if (!mesh) continue;
4773
- if (ownRenderMode(editor, shape, frame, false) !== "canvas") continue;
4774
- if (coveredByDomBackground(editor, shape, frame)) continue;
4775
- if (frame.debug) continue;
4776
4946
  const matrix = editor.getShapePageTransform(shape);
4777
4947
  if (!paintBounds.collides(transformedBounds(matrix, mesh))) continue;
4948
+ const snapshot = getLodSnapshot(shape);
4949
+ const page = editor.getShapePageBounds(shape);
4950
+ const screenMax = page ? Math.max(page.w, page.h) * (camera.z || 1) : 0;
4951
+ const nearFreeze = (style.snapshotBelowPx ?? 0) > 0 && screenMax < (style.snapshotBelowPx ?? 0) * 1.35;
4952
+ if (snapshot && (mode === "canvas" || nearFreeze)) {
4953
+ paintSnapshot(ctx, camera, dpr, matrix, mesh, snapshot, padPx);
4954
+ if (mode !== "dom") continue;
4955
+ }
4956
+ if (mode !== "canvas") continue;
4778
4957
  paintShape(ctx, camera, dpr, matrix, mesh, padPx);
4779
4958
  }
4780
4959
  }
@@ -4784,6 +4963,7 @@ function useMountedRenderingShapes() {
4784
4963
  return useValue(
4785
4964
  "mounted rendering shapes",
4786
4965
  () => {
4966
+ lodSnapshotEpoch.get();
4787
4967
  const rendering = editor.getRenderingShapes();
4788
4968
  const shapes = editor.getCurrentPageShapesSorted();
4789
4969
  editor.getCurrentTheme();
@@ -4810,6 +4990,47 @@ function useMountedRenderingShapes() {
4810
4990
  [editor]
4811
4991
  );
4812
4992
  }
4993
+ var CAPTURES_PER_PASS = 2;
4994
+ function captureDueSnapshots(editor) {
4995
+ const frame = readFrame(editor);
4996
+ if (frame.moving || frame.debug || frame.zoom < LOD_OVERVIEW_ZOOM) return;
4997
+ let container;
4998
+ try {
4999
+ container = editor.getContainer();
5000
+ } catch {
5001
+ return;
5002
+ }
5003
+ let captured = 0;
5004
+ let deferred = false;
5005
+ let changed = false;
5006
+ for (const shape of editor.getCurrentPageShapesSorted()) {
5007
+ if (editor.isShapeHidden(shape)) continue;
5008
+ const style = lodStyleFor(editor, shape);
5009
+ const below = style?.snapshotBelowPx ?? 0;
5010
+ if (below <= 0) continue;
5011
+ if (isInteractive(editor, shape, frame.selected, frame.editingId)) continue;
5012
+ const bounds = editor.getShapePageBounds(shape);
5013
+ if (!bounds || !frame.expanded.collides(bounds)) continue;
5014
+ const screenMax = Math.max(bounds.w, bounds.h) * frame.zoom;
5015
+ if (screenMax < 8 || screenMax > below * 1.35) continue;
5016
+ if (lodSnapshotCovers(shape)) continue;
5017
+ if (captured >= CAPTURES_PER_PASS) {
5018
+ deferred = true;
5019
+ break;
5020
+ }
5021
+ const element = findShapeElement(container, shape.id);
5022
+ const bitmap = element ? captureShapeSnapshot(element) : null;
5023
+ if (!bitmap) {
5024
+ noteSnapshotMiss(shape);
5025
+ continue;
5026
+ }
5027
+ if (storeLodSnapshot(shape, bitmap)) {
5028
+ captured += 1;
5029
+ changed = true;
5030
+ }
5031
+ }
5032
+ if (changed || deferred) notifySnapshotEpoch();
5033
+ }
4813
5034
  function LodCanvas() {
4814
5035
  const editor = useEditor();
4815
5036
  const canvasRef = useRef(null);
@@ -4817,6 +5038,7 @@ function LodCanvas() {
4817
5038
  useQuickReactor(
4818
5039
  "lod canvas",
4819
5040
  () => {
5041
+ lodSnapshotEpoch.get();
4820
5042
  const canvas = canvasRef.current;
4821
5043
  if (!canvas) return;
4822
5044
  const camera = editor.getCamera();
@@ -4878,7 +5100,8 @@ function LodCanvas() {
4878
5100
  editingId: frame.editingId,
4879
5101
  theme,
4880
5102
  colorMode,
4881
- canvas: target
5103
+ canvas: target,
5104
+ snapshotEpoch: lodSnapshotEpoch.get()
4882
5105
  };
4883
5106
  bitmapRef.current = bitmap;
4884
5107
  blitLodBitmap(ctx, width, height, bitmap, camera);
@@ -4887,6 +5110,18 @@ function LodCanvas() {
4887
5110
  },
4888
5111
  [editor]
4889
5112
  );
5113
+ useQuickReactor(
5114
+ "capture lod snapshots",
5115
+ () => {
5116
+ lodSnapshotEpoch.get();
5117
+ editor.getCamera();
5118
+ editor.getCameraState();
5119
+ editor.getSelectedShapeIds();
5120
+ editor.getEditingShapeId();
5121
+ unsafe__withoutCapture(() => captureDueSnapshots(editor));
5122
+ },
5123
+ [editor]
5124
+ );
4890
5125
  return /* @__PURE__ */ jsx("canvas", { ref: canvasRef, className: "dr-lod-canvas", "aria-hidden": "true" });
4891
5126
  }
4892
5127
  function DefaultCanvas({ className }) {
@@ -26315,7 +26550,7 @@ function getFontsFromRichText(editor, richText, initialState2) {
26315
26550
  // src/index.ts
26316
26551
  registerDrawLibraryVersion(
26317
26552
  "@ibodr/editor",
26318
- "0.2.14",
26553
+ "0.2.16",
26319
26554
  "esm"
26320
26555
  );
26321
26556
  /*!
@@ -26339,6 +26574,6 @@ registerDrawLibraryVersion(
26339
26574
  * while using the virtual keyboard.
26340
26575
  */
26341
26576
 
26342
- export { Arc2d, AssetUtil, BaseBoxShapeTool, BaseBoxShapeUtil, BaseFrameLikeShapeUtil, BindingUtil, BoundsSnaps, Box, Circle2d, ClickManager, CollaboratorsManager, ContainerProvider, CubicBezier2d, CubicSpline2d, DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS, DEFAULT_THEME, DefaultBackground, DefaultCanvas, DefaultCursor, DefaultErrorFallback, DefaultGrid, DefaultShapeWrapper, DefaultSpinner, DefaultSvgDefs, DrawEditor, EASINGS, EVENT_NAME_MAP, Edge2d, EdgeScrollManager, Editor, EditorAtom, EditorContext, EditorManager, EditorPortal, EditorProvider, Ellipse2d, ErrorBoundary, ErrorScreen, FontManager, Geometry2d, Geometry2dFilters, Group2d, GroupShapeUtil, HALF_PI, HTMLContainer, HandleSnaps, HistoryManager, InputsManager, LoadingScreen, LocalIndexedDb, Mat, MenuClickCapture, OptionalErrorBoundary, OverlayManager, OverlayUtil, PI, PI2, PerformanceApiAdapter, PerformanceManager, Point2d, Polygon2d, Polyline2d, ROTATE_CORNER_TO_SELECTION_CORNER, ReadonlySharedStyleMap, Rectangle2d, SIDES, SIN, SVGContainer, ScribbleManager, ShapeUtil, SharedStyleMap, SnapManager, SpatialIndexManager, Stadium2d, StateNode, TAB_ID, Table, TextManager, ThemeManager, TickManager, TransformedGeometry2d, USER_COLORS, UserPreferencesManager, Vec, activeElementShouldCaptureKeys, angleDistance, applyRotationToSnapshotShapes, approximately, areAnglesCompatible, average, canonicalizeRotation, centerOfCircleFromThreePoints, clamp2 as clamp, clampRadians, clampToBrowserMaxCanvasSize, clockwiseAngleDist, coreShapes, counterClockwiseAngleDist, createDebugValue, createDeepLinkString, createDrCurrentUser, createDrSchemaFromUtils, createDrStore, createSessionStateSnapshotSignal, dataUrlToFile, debugFlags, defaultDrawOptions, defaultUserPreferences, defaultUserStore, degreesToRadians, elementShouldCaptureKeys, extractSessionStateFromLegacySnapshot, featureFlags, getArcMeasure, getColorValue, getCursor, getDefaultCdnBaseUrl, getDroppedShapesToNewParents, getFontsFromRichText, getFreshUserPreferences, getGlobalDocument, getGlobalWindow, getIncrementedName, getOverlayDisplayValues, getOwnerDocument, getOwnerWindow, getPerfectDashProps, getPointInArcT, getPointOnCircle, getPointerInfo, getPointsOnArc, getPolygonVertices, getRotationSnapshot, getSnapshot, getSvgAsImage, getSvgPathFromPoints, getUserPreferences, getVerticesCountForArcLength, hardReset, hardResetEditor, inlineBase64AssetStore, intersectCircleCircle, intersectCirclePolygon, intersectCirclePolyline, intersectLineSegmentCircle, intersectLineSegmentLineSegment, intersectLineSegmentPolygon, intersectLineSegmentPolyline, intersectPolygonBounds, intersectPolygonPolygon, isAccelKey, isCursorInViewport, isSafeFloat, kickoutOccludedShapes, linesIntersect, loadSessionStateSnapshotIntoStore, loadSnapshot, loopToHtmlElement, maybeSnapToGrid, moveElementInto, normalizeWheel, openWindow, parseDeepLinkString, perimeterOfEllipse, pointInPolygon, polygonIntersectsPolyline, polygonsIntersect, precise, preventDefault, radiansToDegrees, rangeIntersection, refreshPage, releasePointerCapture, resizeBox, resizeScaled, resolveLineHeightPx, resolveThemes, rotateSelectionHandle, runtime, sanitizeId, setPointerCapture, setRuntimeOverrides, setUserPreferences, shortAngleDist, snapAngle, stopEventPropagation, strokeShapeIndicators, suffixSafeId, tleditors, tlenv, tlenvReactive, tlmenus, tltime, toDomPrecision, toFixed2 as toFixed, toPrecision, uniq, useColorMode, useContainer, useContainerIfExists, useDelaySvgExport, useDrSchemaFromUtils, useDrStore, useDrawCurrentUser, useEditor, useEditorComponents, useEditorPortalHost, useEvent, useGlobalMenuIsOpen, useIsCropping, useIsEditing, useLocalStore, useMaybeEditor, useOnMount, usePassThroughWheelEvents, usePeerIds, usePresence, useReactiveEvent, useRefState, useShallowArrayIdentity, useShallowObjectIdentity, useSharedSafeId, useSvgExportContext, useTransform, useUniqueSafeId, useViewportHeight, userTypeValidator };
26577
+ export { Arc2d, AssetUtil, BaseBoxShapeTool, BaseBoxShapeUtil, BaseFrameLikeShapeUtil, BindingUtil, BoundsSnaps, Box, Circle2d, ClickManager, CollaboratorsManager, ContainerProvider, CubicBezier2d, CubicSpline2d, DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS, DEFAULT_THEME, DefaultBackground, DefaultCanvas, DefaultCursor, DefaultErrorFallback, DefaultGrid, DefaultShapeWrapper, DefaultSpinner, DefaultSvgDefs, DrawEditor, EASINGS, EVENT_NAME_MAP, Edge2d, EdgeScrollManager, Editor, EditorAtom, EditorContext, EditorManager, EditorPortal, EditorProvider, Ellipse2d, ErrorBoundary, ErrorScreen, FontManager, Geometry2d, Geometry2dFilters, Group2d, GroupShapeUtil, HALF_PI, HTMLContainer, HandleSnaps, HistoryManager, InputsManager, LOD_SNAPSHOT_SCREEN_PX, LoadingScreen, LocalIndexedDb, Mat, MenuClickCapture, OptionalErrorBoundary, OverlayManager, OverlayUtil, PI, PI2, PerformanceApiAdapter, PerformanceManager, Point2d, Polygon2d, Polyline2d, ROTATE_CORNER_TO_SELECTION_CORNER, ReadonlySharedStyleMap, Rectangle2d, SIDES, SIN, SVGContainer, ScribbleManager, ShapeUtil, SharedStyleMap, SnapManager, SpatialIndexManager, Stadium2d, StateNode, TAB_ID, Table, TextManager, ThemeManager, TickManager, TransformedGeometry2d, USER_COLORS, UserPreferencesManager, Vec, activeElementShouldCaptureKeys, angleDistance, applyRotationToSnapshotShapes, approximately, areAnglesCompatible, average, canonicalizeRotation, centerOfCircleFromThreePoints, clamp2 as clamp, clampRadians, clampToBrowserMaxCanvasSize, clockwiseAngleDist, coreShapes, counterClockwiseAngleDist, createDebugValue, createDeepLinkString, createDrCurrentUser, createDrSchemaFromUtils, createDrStore, createSessionStateSnapshotSignal, dataUrlToFile, debugFlags, defaultDrawOptions, defaultUserPreferences, defaultUserStore, degreesToRadians, elementShouldCaptureKeys, extractSessionStateFromLegacySnapshot, featureFlags, getArcMeasure, getColorValue, getCursor, getDefaultCdnBaseUrl, getDroppedShapesToNewParents, getFontsFromRichText, getFreshUserPreferences, getGlobalDocument, getGlobalWindow, getIncrementedName, getOverlayDisplayValues, getOwnerDocument, getOwnerWindow, getPerfectDashProps, getPointInArcT, getPointOnCircle, getPointerInfo, getPointsOnArc, getPolygonVertices, getRotationSnapshot, getSnapshot, getSvgAsImage, getSvgPathFromPoints, getUserPreferences, getVerticesCountForArcLength, hardReset, hardResetEditor, inlineBase64AssetStore, intersectCircleCircle, intersectCirclePolygon, intersectCirclePolyline, intersectLineSegmentCircle, intersectLineSegmentLineSegment, intersectLineSegmentPolygon, intersectLineSegmentPolyline, intersectPolygonBounds, intersectPolygonPolygon, isAccelKey, isCursorInViewport, isSafeFloat, kickoutOccludedShapes, linesIntersect, loadSessionStateSnapshotIntoStore, loadSnapshot, loopToHtmlElement, maybeSnapToGrid, moveElementInto, normalizeWheel, openWindow, parseDeepLinkString, perimeterOfEllipse, pointInPolygon, polygonIntersectsPolyline, polygonsIntersect, precise, preventDefault, radiansToDegrees, rangeIntersection, refreshPage, releasePointerCapture, resizeBox, resizeScaled, resolveLineHeightPx, resolveThemes, rotateSelectionHandle, runtime, sanitizeId, setPointerCapture, setRuntimeOverrides, setUserPreferences, shortAngleDist, snapAngle, stopEventPropagation, strokeShapeIndicators, suffixSafeId, tleditors, tlenv, tlenvReactive, tlmenus, tltime, toDomPrecision, toFixed2 as toFixed, toPrecision, uniq, useColorMode, useContainer, useContainerIfExists, useDelaySvgExport, useDrSchemaFromUtils, useDrStore, useDrawCurrentUser, useEditor, useEditorComponents, useEditorPortalHost, useEvent, useGlobalMenuIsOpen, useIsCropping, useIsEditing, useLocalStore, useMaybeEditor, useOnMount, usePassThroughWheelEvents, usePeerIds, usePresence, useReactiveEvent, useRefState, useShallowArrayIdentity, useShallowObjectIdentity, useSharedSafeId, useSvgExportContext, useTransform, useUniqueSafeId, useViewportHeight, userTypeValidator };
26343
26578
  //# sourceMappingURL=index.mjs.map
26344
26579
  //# sourceMappingURL=index.mjs.map