@mocanvas/editor 4.1.0 → 4.1.1

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/MIGRATION.md CHANGED
@@ -663,6 +663,8 @@ aspirational.
663
663
  | `ShapeUtil.toSvg`, `ShapeUtil.toBackgroundSvg` | Not `ShapeUtil` members. Custom shapes contribute to SVG export through `registerShapeSvgRenderer(type, renderer)`; without one they fall back to `geometryFallbackSvg`. |
664
664
  | Sync protocol | Wire compatibility with tldraw's own sync protocol is not planned. `@mocanvas/sync` is a working transport of its own — presence records, `store.mergeRemoteChanges`, and a relay — but it does not speak tldraw's wire format. |
665
665
  | `image` shape on the GPU | The texture path exists in the engine (`StyleWords.texture` + `uploadTexture`) but the `image` shape still draws an `<img>` in the DOM overlay. |
666
+ | `FrameShapeUtil` default size | mocanvas creates a frame at **160×90**; tldraw creates one at 320×180. Same aspect, half the size. It only bites code that creates a frame *programmatically* without passing `w`/`h` — drawing one with the tool sizes it from the drag either way. Pass explicit dimensions if the size matters to you. Aligning the default is a behaviour change and is not being made in a patch release. |
667
+ | An unregistered shape type in `store.put()` | Accepted, deliberately, and confirmed rather than fixed. A `.tldr` written by a build that knows a shape type this one does not must survive a load/save round trip instead of being dropped on the next save, so an unknown `type` passes its props through untouched. Its *other* fields are still validated — `x` must be a number whatever the type is — and a type you did register is validated in full. See `COMPAT.md`. |
666
668
  | Text rendering | DOM overlay. Glyph-atlas text in WASM is phase 3. |
667
669
  | GPU frame clipping | The `CLIP` flag and `isClipShape` hook are wired end to end, but no built-in shape enables it yet (phase 3). |
668
670
  | WebGPU backend | Phase 3. WebGL2 is the only backend today, behind `RenderBackend`. |
package/dist/index.d.ts CHANGED
@@ -4323,6 +4323,20 @@ interface CreateStoreOptions {
4323
4323
  * in-memory store.
4324
4324
  */
4325
4325
  assets?: AssetStore;
4326
+ /**
4327
+ * Give a brand new store its document and first page. Defaults to `true`.
4328
+ *
4329
+ * The seeded page uses {@link DEFAULT_PAGE_ID} at {@link FIRST_PAGE_INDEX},
4330
+ * so two replicas that each built their own store meet on one page. Turn it
4331
+ * OFF when the caller owns the document structure and will put its own page
4332
+ * in afterwards — a headless pipeline, a fold that replays records, a test
4333
+ * that builds a fixture by hand. Leaving it on there gives the store *two*
4334
+ * pages at the same index, and equal indices have no defined order.
4335
+ *
4336
+ * Already off, without asking, whenever `initialData` or `snapshot` is
4337
+ * supplied: those bring their own pages.
4338
+ */
4339
+ seed?: boolean;
4326
4340
  }
4327
4341
  /**
4328
4342
  * Build the editor's schema.
@@ -7057,8 +7071,30 @@ declare abstract class OverlayUtil<H extends OverlayHost = OverlayHost, O extend
7057
7071
  get type(): string;
7058
7072
  /** This util's options, read off the class it was constructed from. */
7059
7073
  get options(): O;
7060
- /** Paint this overlay. Implementations must leave `ctx` in the state they found it. */
7061
- abstract render(ctx: CanvasRenderingContext2D): void;
7074
+ /**
7075
+ * Paint this overlay. Implementations must leave `ctx` in the state they
7076
+ * found it.
7077
+ *
7078
+ * `overlays` is what {@link getOverlays} returned this frame, handed over so
7079
+ * a subclass can paint a subset and delegate the rest:
7080
+ *
7081
+ * ```ts
7082
+ * override render(ctx: CanvasRenderingContext2D, overlays = this.getOverlays()) {
7083
+ * const [mine, theirs] = partition(overlays, isMine)
7084
+ * this.paintMine(ctx, mine)
7085
+ * super.render(ctx, theirs)
7086
+ * }
7087
+ * ```
7088
+ *
7089
+ * Without it the only way to narrow what gets painted was to override
7090
+ * `getOverlays()` — which also narrows what hit-testing, the cursor lookup
7091
+ * and `onPointerDown` see, for every caller and not just the painter.
7092
+ *
7093
+ * A util that ignores the parameter is unaffected: a one-argument `render`
7094
+ * still satisfies this signature, and the manager passes what it already
7095
+ * computed either way.
7096
+ */
7097
+ abstract render(ctx: CanvasRenderingContext2D, overlays?: OverlayLike[]): void;
7062
7098
  /**
7063
7099
  * Whether this util has anything to contribute this frame. A util that does
7064
7100
  * not implement it is always active.
@@ -11396,6 +11432,22 @@ declare function createShapeValidator<Type extends string, Props extends object>
11396
11432
  * through untouched let `{ x: "NOT A NUMBER" }` into the store.
11397
11433
  */
11398
11434
  declare function createBaseShapeValidator(): Validator<BaseShape<string, object>>;
11435
+ /**
11436
+ * The validator for an asset type, from its prop map.
11437
+ *
11438
+ * Same policy as {@link createShapeValidator}: an `unknownProps: "keep"` asset
11439
+ * is one the store is holding, and a `.tldr` from a newer build may carry asset
11440
+ * props this one cannot describe.
11441
+ */
11442
+ declare function createAssetPropsValidator<Type extends string, Props extends object>(type: Type, props: PropsMap, options?: RecordValidatorOptions): Validator<BaseAsset<Type, Props>>;
11443
+ /**
11444
+ * The fields every asset has whatever its type — everything but `props`.
11445
+ *
11446
+ * For an asset type this build has no prop map for. See
11447
+ * {@link createBaseShapeValidator}: forward compatibility is about `props`, and
11448
+ * an id that is not an `asset:` id is corruption in any generation.
11449
+ */
11450
+ declare function createBaseAssetValidator(): Validator<BaseAsset<string, object>>;
11399
11451
  /** The counterpart of {@link createBaseShapeValidator} for bindings. */
11400
11452
  declare function createBaseBindingValidator(): Validator<BaseBinding<string, object>>;
11401
11453
  /**
@@ -13874,21 +13926,21 @@ declare const arrowBindingVersions: {
13874
13926
  declare const assetIdValidator: Validator<AssetId>;
13875
13927
  /** `w`, `h`, `src` and the file metadata an image or video asset carries. */
13876
13928
  declare const imageAssetPropsValidator: ObjectValidator<ObjectValidatorType<{
13877
- readonly w: Validator<number>;
13878
- readonly h: Validator<number>;
13879
- readonly name: Validator<string>;
13880
- readonly isAnimated: Validator<boolean>;
13881
- readonly mimeType: Validator<string | null>;
13882
- readonly src: Validator<string | null>;
13883
- readonly fileSize: Validator<number | undefined>;
13929
+ w: Validator<number>;
13930
+ h: Validator<number>;
13931
+ name: Validator<string>;
13932
+ isAnimated: Validator<boolean>;
13933
+ mimeType: Validator<string | null>;
13934
+ src: Validator<string | null>;
13935
+ fileSize: Validator<number | undefined>;
13884
13936
  }>>;
13885
13937
  /** The unfurled metadata a bookmark asset caches for its card. */
13886
13938
  declare const bookmarkAssetPropsValidator: ObjectValidator<ObjectValidatorType<{
13887
- readonly title: Validator<string>;
13888
- readonly description: Validator<string>;
13889
- readonly image: Validator<string>;
13890
- readonly favicon: Validator<string>;
13891
- readonly src: Validator<string | null>;
13939
+ title: Validator<string>;
13940
+ description: Validator<string>;
13941
+ image: Validator<string>;
13942
+ favicon: Validator<string>;
13943
+ src: Validator<string | null>;
13892
13944
  }>>;
13893
13945
  /** A bitmap asset: an image the canvas paints inside an `image` shape. */
13894
13946
  declare const imageAssetValidator: Validator<ImageAsset>;
@@ -13964,4 +14016,4 @@ declare function setDefaultCdnBaseUrl(url: string): void;
13964
14016
  /** Forget every asset id in `ids`. Exported for stores that batch their deletes. */
13965
14017
  type AssetIdList = readonly AssetId[];
13966
14018
 
13967
- export { ARROWHEAD_KINDS, ARROW_SHAPE_KINDS, ASSET_MIGRATION_SEQUENCE_PREFIX, Arc2d, ArrayOfValidator, ArrowShapeArrowheadEndStyle, type ArrowShapeArrowheadKind, ArrowShapeArrowheadStartStyle, type ArrowShapeKind, ArrowShapeKindStyle, type Asset, type AssetContext, type AssetCreate, type AssetId, type AssetIdList, type AssetPartial, type AssetPropsForType, AssetRecordType, type AssetStore, type AssetType, type AssetTypeName, type AssetUploadResult, AssetUrlsProvider, type AssetUrlsProviderProps, AssetUtil, AssetUtilRegistry, type B64VecPoint, BINDING_MIGRATION_SEQUENCE_PREFIX, BUILTIN_ASSET_MIGRATION_SEQUENCE_PREFIX, BUILTIN_BINDING_MIGRATION_SEQUENCE_PREFIX, BUILTIN_SHAPE_MIGRATION_SEQUENCE_PREFIX, type BaseAsset, type BaseBinding, BaseBoxShapeUtil, type BaseEventInfo, BaseFrameLikeShapeUtil, type BaseShape, type BatchMeasurementRequest, type Binding, type BindingCanBindOptions, type BindingCreate, type BindingId, type BindingOnChangeOptions, type BindingOnCreateOptions, type BindingOnDeleteOptions, type BindingOnShapeChangeOptions, type BindingOnShapeDeleteOptions, type BindingOnShapeIsolateOptions, type BindingPartial, type BindingPropsForType, BindingRecordType, type BindingTypeName, BindingUtil, type BindingUtilConstructor, type BookmarkAsset, type BookmarkAssetProps, type BoundsSnapGeometry, type BoundsSnapPoint, type BoundsSnapResizeOptions, type BoundsSnapTranslateOptions, BoundsSnaps, Box, type BoxHandle, type BoxLike, type BoxModel, CANVAS_THEME_VARS, COLLABORATOR_INACTIVE_TIMEOUT, CURRENT_SESSION_SCHEMA_VERSION, CURSOR_TYPES, CUSTOM_RECORD_MIGRATION_SEQUENCE_PREFIX, CUSTOM_RECORD_TYPE_NAME, type CachedUserResolve, type Camera, type CameraId, CameraRecordType, CameraStateTracker, type CancelEventInfo, Canvas, type CanvasComponents, type CanvasProps, Circle2d, type ClickEventInfo, type ClickEventName, ClickManager, CollaboratorsManager, type ColorScheme, type DefaultColorStyle$1 as ColorValue, CommentReactionRecordType, CommentRecordType, CommentThreadRecordType, type CompleteEventInfo, type ContainerDocument, ContainerProvider, type ContainerProviderProps, type ContainerWindow, type ContentElementHost, ContentElementManager, type ContentElementSource, type CreateCachedUserResolveOptions, type CreatePresenceStateDerivationOpts, type CreateStoreOptions, CubicBezier2d, type CubicSegmentLike, CubicSpline2d, type CurrentUser, type CustomRecordInfo, type CustomRecordPropsForType, DEFAULT_ASSET_CONTEXT, DEFAULT_CAMERA_OPTIONS, DEFAULT_COLORS, DEFAULT_DARK_COLORS, DEFAULT_DASHES, DEFAULT_EDITOR_CONFIG, DEFAULT_FILLS, DEFAULT_FILL_TOKENS, DEFAULT_FONTS, DEFAULT_FONT_FAMILIES, DEFAULT_H_ALIGNS, DEFAULT_LIGHT_COLORS, DEFAULT_LINE_HEIGHT, DEFAULT_MENU_CONTEXT, DEFAULT_PAGE_ID, DEFAULT_SHAPE_INDICATOR_OPTIONS, DEFAULT_SIZES, DEFAULT_TEXT_ALIGNS, DEFAULT_THEME, DEFAULT_TIME_CONTEXT, DEFAULT_V_ALIGNS, DIM_2D, DIM_3D, DOCUMENT_ID, type DefaultDashStyle$1 as DashValue, type DecodedDrawPoint, type DecomposedMat, DefaultBackground, DefaultCanvas, DefaultColorStyle, DefaultCursor, DefaultDashStyle, DefaultErrorFallback, DefaultFillStyle, DefaultFontFaces, DefaultFontFamilies, DefaultFontStyle, DefaultGrid, DefaultHorizontalAlignStyle, DefaultLabelColorStyle, DefaultShapeWrapper, DefaultSizeStyle, DefaultSpinner, DefaultSvgDefs, DefaultTextAlignStyle, DefaultVerticalAlignStyle, DictValidator, type Document$1 as Document, type DocumentId, DocumentRecordType, type DrawOptions, EASINGS, ELBOW_ARROW_SNAP_MODES, EVENT_NAME_MAP, Edge2d, EdgeScrollManager, Editor, EditorAtom, type EditorConfig, EditorContext, type EditorEngineProvider, type EditorEvents, type EditorExportImplementation, type EditorImageExportOptions, type EditorImageExportResult, type EditorInputs, EditorManager, type EditorOptions, EditorPortal, type EditorPortalProps, EditorProvider, type EditorProviderProps, type EditorRecord, type EditorStore, type EditorStoreProps, type EditorStoreSnapshot, type EditorSvgExportOptions, type EditorSvgExportResult, type EditorTextHtmlMeasurement, type EditorTextMeasure, type EditorTextMeasureHtmlOptions, type EditorTextMeasureOptions, type EditorTextMeasureProvider, type EditorTextMeasurement, ElbowArrowSnap, type ElbowArrowSnapMode, Ellipse2d, type EngineGeometry, EnumStyleProp, ErrorBoundary, type ErrorBoundaryProps, ErrorScreen, type ErrorScreenProps, EventEmitter, type EventHandlers, type EventInfo, type ExternalAssetContent, type ExternalAssetHandler, type ExternalAssetType, type ExternalContent, type ExternalContentHandler, type ExternalContentType, type ExtractShapeByProps, FIRST_PAGE_INDEX, FONT_SIZES, type DefaultFillStyle$1 as FillValue, FontManager, type DefaultFontStyle$1 as FontValue, type FrameLikeShape, GEO_SHAPE_KINDS, type GapsSnapIndicator, GeoShapeGeoStyle, type GeoShapeKind, Geometry2d, Geometry2dFilters, type Geometry2dOptions, type GetSvgAsImageOptions, Group2d, HALF_PI, HANDLE_HIT_RADIUS, type DefaultHorizontalAlignStyle$1 as HAlignValue, HTMLContainer, type HTMLContainerProps, type HandleSnapGeometry, type HandleSnapOptions, HandleSnaps, HandleTable, HistoryManager, type HitTestOptions, INSTANCE_ID, type ImageAsset, type ImageAssetProps, ImageShapeCrop, type IndicatorPathSource, type IndicatorShapeUtil, type IndicatorSource, InputsManager, type Instance, type InstanceId, type InstancePageState, type InstancePageStateId, InstancePageStateRecordType, type InstancePresence, type InstancePresenceId, InstancePresenceRecordType, InstanceRecordType, type InterruptEventInfo, type JsonObject, type JsonPrimitive, type JsonValue, type KeyboardEventInfo, type KeyboardEventName, LIGHT_THEME, LINE_SPLINE_KINDS, LOCAL_STATE_PREFIX, type LegacyDrawShapeSegment, type LineShapeSplineKind, LineShapeSplineStyle, LoadingScreen, type LoadingScreenProps, MAX_TEXTURE_RESOLUTION, MAX_TEXTURE_ZOOM, Mat, type MatLike, type MatModel, MenuClickCapture, MenuManager, type MigratableProps, type MocanvasUiContextValue, MocanvasUiProvider, type MocanvasUiProviderProps, type NormalizeOptions, type NormalizeResult, ObjectValidator, type ObjectValidatorType, type OptionalKeys, type OverlayEntry, type OverlayHost, type OverlayLike, OverlayManager, type OverlayOptionsWithDisplayValues, OverlayUtil, type OverlayUtilOptions, PI, PI2, PRESENCE_COLORS, type Page, type PageId, PageRecordType, type ParentId, type PerfectDashOptions, type PerfectDashProps, type PerfectDashTerminal, PerformanceApiAdapter, type PerformanceApiAdapterOptions, type PerformanceEventName, type PerformanceEvents, PerformanceManager, type PinchEventInfo, Point2d, type PointLike, type PointerEventInfo, type PointerEventName, PointerRecordType, type PointerSource, type PointerTarget, type PointsSnapIndicator, Polygon2d, Polyline2d, type PresenceStateDerivationOptions, type PresenceUser, type PropsMigration, type PropsMigrationSource, type PropsMigrationTarget, type PropsMigrations, type RGBA, ROTATE_CORNER_TO_SELECTION_CORNER, ROTATE_HANDLE_OFFSET, ReadonlySharedStyleMap, type RecordPropValidator, type RecordProps, type RecordPropsType, type RecordValidatorOptions, Rectangle2d, type RegisteredAssetType, type RegisteredBindingType, type RegisteredCustomRecordType, type RegisteredShapeType, type RenderBackend, type RequiredKeys, type ResizeBoxOptions, type ResizeInfo, type ResizeShapeOptions, type RichTextFontVisitor, type RichTextFontVisitorState, RootState, type RotateCorner, SHAPE_MIGRATION_SEQUENCE_PREFIX, SIDES, SIN, STROKE_SIZES, SVGContainer, type SVGContainerProps, type SafeId, type SchemaPropsInfo, type SchemaPropsInfoMap, type SchemaUtilSource, type Scribble, type ScribbleItem, ScribbleManager, type ScribbleSessionOptions, type SelectionCorner, type SelectionEdge, type SelectionHandle, type SelectionHandleHit, type SetValue, type Shape, type ShapeCreate, type ShapeHandle, type ShapeId, ShapeIndicatorCompositor, type ShapePartial, type ShapePropsForType, ShapeRecordType, type ShapeRef, type ShapeSvgContext, type ShapeSvgResult, type ShapeTypeName, ShapeUtil, type ShapeUtilClass, type ShapeUtilConstructor, type ShapeUtilOptions, type ShapeUtilOptionsPatch, type ShapeWithCrop, type SharedStyle, SharedStyleMap, type DefaultSizeStyle$1 as SizeValue, type SnapData, type SnapIndicator, type SnapLine, SnapManager, type SnapResult, Stadium2d, StateNode, type StateNodeClass, type StateNodeConstructor, type StateNodeType, type StrokeShapeIndicatorsOptions, StyleProp, type StylePropValue, SvgExportContextProvider, type SvgExportContextProviderProps, type SvgExportDef, T, TAB_ID, type TLActionShortcutsLocation, type TLAdjacentDirection, type TLAnimationOptions, type TLAnyAssetUtilConstructor, type TLAnyOverlayUtilConstructor, type TLArrowShapeArrowheadStyle, type TLArrowShapeKind, type TLAssetShape, type TLAssetUrls, type TLAssetUtilClass, type TLAssetUtilConstructor, type TLAssetUtilConstructorLike, type TLAssetUtilLike, type TLAssetUtilOptions, type TLBaseBoxShape, type TLBaseExternalContent, type TLBindingUpdate, type TLCLickEventName, type TLCameraConstraints, type TLCameraConstraintsZoom, type TLCameraEndPerfEvent, type TLCameraMoveOptions, type TLCameraOptions, type TLCameraStartPerfEvent, type TLCameraState, type TLCancelEvent, type TLCanvasComponentProps, type TLCanvasUiColor, type TLClickEvent, type TLClickEventInfo, type TLClickState, type TLClipboardPasteRawInfo, type TLClipboardWriteInfo, type TLColorMode, type TLColorScheme, type TLColorSchemeWindow, type TLComment, type TLCommentAnchor, type TLCommentId, type TLCommentReaction, type TLCommentReactionId, type TLCommentThread, type TLCommentThreadId, type TLCompleteEvent, type TLComponents, type TLComponentsResolved, type TLContent, type TLCreateShapePartial, type TLCropInfo, type TLCursor, type TLCursorProps, type TLCursorSlotProps, type TLCursorType, type TLCursorViewportSource, type TLCustomRecord, type TLCustomRecordId, type TLDeepLink, type TLDeepLinkOptions, type TLDefaultAsset, type TLDefaultBinding, type TLDefaultColor, type TLDefaultColorVariant, type TLDefaultDisplayValues, type TLDefaultRecord, type TLDefaultShape, type TLDefaultTextAlignStyle, type TLDisplayValuesSource, type TLDragShapesInInfo, type TLDragShapesInfo, type TLDragShapesOutInfo, type TLDragShapesOverInfo, type TLDrawShapeSegment, type TLDropShapesOverInfo, type TLEasingType, type TLEditStartInfo, type TLEditorAssetUrls, type TLEditorComponents, type TLEditorComponentsEditor, type TLEditorRunOptions, type TLEditorSnapshot, TLEditorsRegistry, type TLEmbedExternalContent, type TLEnterEventHandler, type TLEnvironment, type TLErrorBoundaryProps, type TLErrorExternalContentSource, type TLErrorFallbackComponent, type TLErrorFallbackProps, type TLErrorSlotProps, type TLEventMap, type TLEventMapHandler, type TLEventName, type TLExcalidrawExternalContent, type TLExcalidrawExternalContentSource, type TLExitEventHandler, type TLExportType, type TLExternalAsset, type TLExternalContentSource, type TLFileExternalAsset, type TLFileReplaceExternalContent, type TLFilesExternalContent, type TLFontFace, type TLFontFaceSet, type TLFontFaceSource, type TLFontLoadState, type TLFramePerfEvent, type TLGeometryOpts, type TLGetCustomDisplayValues, type TLGetCustomOverlayDisplayValues, type TLGetDefaultDisplayValues, type TLGetDefaultOverlayDisplayValues, type TLGetShapeAtPointOptions, type TLGetShapeVisibility, type TLGlobalAssetPropsMap, type TLGlobalBindingPropsMap, type TLGlobalRecordPropsMap, type TLGlobalShapePropsMap, type TLGridProps, type TLGridStep, type TLHandleDragInfo, type TLHandleType, type TLHistoryBatchOptions, type TLHistoryDiff, type TLHistoryEntry, type TLHistoryMark, type TLHistoryRecordingMode, type TLImageExportOptions, type TLIndexedAssets, type TLIndexedBindings, type TLIndexedRecords, type TLIndexedShapes, type TLIndicatorContext, type TLIndicatorHost, type TLIndicatorOverlay, type TLIndicatorPath, type TLIndicatorPathResult, type TLIndicatorTransform, type TLInstancePresenceID, type TLInteractionEndPerfEvent, type TLInteractionStartPerfEvent, type TLInterpolationProgress, type TLInterruptEvent, type TLKeyboardEvent, type TLLineShapeSplineStyle, type TLLoadSessionStateSnapshotOptions, type TLLoadSnapshotOptions, type TLMeasureTextOpts, type TLMeasureTextSpanOpts, type TLMeasuredTextSize, type TLMenus, type TLOpacityType, type TLOverlay, type TLOverlayDisplayValuesSource, type TLOverlayEntry, type TLOverlayUtilConstructor, TLPOINTER_ID, type TLPerfEventMap, type TLPerfFrameTimeStats, type TLPerfLongAnimationFrame, type TLPerfLongAnimationFrameScript, type TLPinchEvent, type TLPinchEventName, type TLPointInShapeOptions, type TLPointer, type TLPointerEvent, type TLPointerEventTarget, type TLPointerId, type TLPointerInfo, type TLPresenceStateInfo, type TLReactiveEnvironment, type TLRegisteredAsset, type TLRemovedDefaultThemeColors, type TLRenderingShape, type TLResettableEditor, type TLResizeHandle, type TLResizeMode, type TLRichTextFontSource, type TLRuntime, type TLSchema, type TLScribbleState, type TLSessionPageState, type TLSessionStateSnapshot, type TLShapeCrop, type TLShapeErrorFallbackComponent, type TLShapeIndicatorOptions, type TLShapeOperationPerfEvent, type TLShapeUtilCanBeLaidOutOpts, type TLShapeUtilCanBindOpts, type TLShapeUtilCanvasSvgDef, type TLShapeVisibility, type TLShapeWrapperProps, type TLShapeWrapperSlotProps, type TLSharedOpacity, type TLStoreBaseOptions, type TLStoreEventInfo, type TLStoreOptions, type TLStoreProps, type TLStoreSchemaOptions, type TLStoreWithStatus, type TLStyledShape, type TLStyledShapeProps, type TLSvgExportContext, type TLSvgTextExternalContent, type TLTemporaryAssetPreview, type TLTextExternalContent, type TLTextExternalContentSource, type TLTextOptions, type TLTextSpan, type TLTheme, type TLThemeColors, type TLThemeDefaultColors, type TLThemeFont, type TLThemeFonts, type TLThemeHost, type TLThemeId, type TLThemePatch, type TLThemeUiColorKeys, type TLThemes, type TLThemesInput, type TLTickEvent, type TLTime, type TLTimeContext, type TLTldrawExternalContent, type TLTldrawExternalContentSource, type TLUiActionItem, type TLUiActionsBuilder, type TLUiActionsContextType, type TLUiAssetUrls, type TLUiComponentSlot, type TLUiEventSource, type TLUiOverrideHelpers, type TLUiOverrides, type TLUiToolItem, type TLUiToolsBuilder, type TLUiToolsContextType, type TLUiTranslations, type TLUndoRedoPerfEvent, type TLUnknownAsset, type TLUpdatePointerOptions, type TLUrlExternalAsset, type TLUrlExternalContent, type TLWheelEvent, TL_CANVAS_UI_COLOR_TYPES, TL_CURSOR_TYPES, TL_HANDLE_TYPES, TL_SCRIBBLE_STATES, type DefaultTextAlignStyle$1 as TextAlignValue, TextManager, type TextureInfo, type TextureLoader, TextureManager, type TextureManagerOptions, type TextureOptions, type TextureSource, type TextureState, type ThemeColor, ThemeManager, type ThemeManagerOptions, type TickEventInfo, Timers, type TiptapEditor, type TiptapNode, type TldrawEditorBaseProps, type TldrawEditorProps, type TldrawEditorWithStoreProps, type TldrawEditorWithoutStoreProps, type TldrawOptions, TransformedGeometry2d, type TransformedGeometry2dOptions, type TranslateInfo, type TypeOf, UNKNOWN_EDIT_START_INFO, USER_PREFERENCES_DEFAULTS, type UiEvent, type UiEventType, UnionValidator, type UnionValidatorConfig, type UnknownBinding, type UnknownCustomRecord, type UnknownPropsPolicy, type UnknownRecordProps, type UnknownShape, type UseCurrentUserOptions, type User, type UserId, type UserPreferences, type UserPreferencesInit, UserPreferencesManager, type UserPreferencesState, type UserRecordId, UserRecordType, type UserSchemaInfo, type UserStore, type DefaultVerticalAlignStyle$1 as VAlignValue, type Validatable, ValidationError, type ValidationLibrary, type ValidationPathSegment, Validator, Vec, type VecLike, type VecModel, type VideoAsset, type VideoAssetProps, WebGL2Backend, type WheelEventInfo, angleDistance, animateShape, animateShapes, applyThemePatch, approximately, areAnglesCompatible, arrowBindingVersions, assetIdValidator, assetMigrations, assetPropsMigrationSequenceId, assetValidator, assetValidators, average, b64Vecs, bindingIdValidator, bindingPropsMigrationSequenceId, bookmarkAssetMigrations, bookmarkAssetProps, bookmarkAssetPropsValidator, bookmarkAssetValidator, boundsIndicatorPath, boxModelValidator, bucketTextureResolution, canBindShapes, canBuildIndicatorPaths, canCreateShape, canCreateShapes, canCropShape, canEditShape, canonicalizeRotation, canvasUiColorTypeValidator, centerOfCircleFromThreePoints, clamp, clampRadians, clockwiseAngleDist, commentAnchorValidator, commentReactionRecordConfig, commentReactionValidator, commentRecordConfig, commentSchemaRecords, commentThreadRecordConfig, commentThreadValidator, commentValidator, compressLegacySegments, coreShapes, counterClockwiseAngleDist, createAssetId, createAssetPropsMigrationIds, createAssetPropsMigrationSequence, createAssetValidator, createBackend, createBaseBindingValidator, createBaseShapeValidator, createBindingId, createBindingPropsMigrationIds, createBindingPropsMigrationSequence, createBindingValidator, createBuiltInAssetPropsMigrationIds, createBuiltInBindingPropsMigrationIds, createBuiltInShapePropsMigrationIds, createCachedUserResolve, createComment, createCommentId, createCommentReaction, createCommentReactionId, createCommentThread, createCommentThreadId, createCurrentUser, createCustomRecord, createCustomRecordId, createCustomRecordMigrationIds, createCustomRecordMigrationSequence, createCustomRecordMigrationSequences, createCustomRecordType, createCustomRecordTypeMap, createCustomRecordValidator, createDeepLinkString, createInMemoryAssetStore, createMemoryUserStore, createPresenceStateDerivation, createPropsMigrationSequences, createRootState, createSchema, createSessionStateSnapshotSignal, createShapeId, createShapePropsMigrationIds, createShapePropsMigrationSequence, createShapeValidator, createStore, createTLCurrentUser, createTLSchemaFromUtils, createTheme, createUserId, createUserPreferences, createUserRecordType, cursorTypeValidator, cursorValidator, customRecordMigrationSequenceId, dataUrlToFile, decodeDrawSegmentPath, defaultAssetMigrations, defaultAssetSchemas, defaultBindingSchemas, defaultShapeSchemas, defaultTldrawOptions, defaultUserPreferences, defaultUserStore, degreesToRadians, deselect, drawShapeSegmentValidator, dropShapesOnFrameLike, duplicatePage, easeInOutCubic, fileToBase64DataUrl, fileToDataUrl, findCommonAncestor, findShapeAncestor, fontKey, formatValidationPath, getArcMeasure, getAssetSrc, getBaseZoomForCameraOptions, getColorNamesFromThemes, getColorValue, getCulledShapes, getCurrentPageRenderingShapesSorted, getCurrentPageShapesInReadingOrder, getCursor, getCustomRecordIdType, getDefaultAssetContext, getDefaultCdnBaseUrl, getDefaultCrop, getDefaultDisplayValues, getDefaultUserPresence, getDefaultUserProperties, getDisplayValues, getDroppedShapesToNewParents, getEngineProvider, getExportImplementation, getFocusedGroup, getFocusedGroupId, getFontNamesFromThemes, getFontsFromRichText, getFrameLikeDropTarget, getFreshUserPreferences, getHandleHitRadius, getIncrementedName, getIndicatorSource, getInitialMetaForShape, getLocaleChain, getNearestAdjacentShape, getNotVisibleShapes, getOnlySelectedShapeId, getOverlayDisplayValues, getOwnerDocument, getOwnerWindow, getPageStates, getPaletteEntries, getPerfectDashProps, getPointInArcT, getPointOnCircle, getPointerInfo, getPointsOnArc, getPolygonVertices, getRenderingShapes, getSelectedShapeAtPoint, getSelectionHandlePositions, getSelectionRotatedPageBounds, getSelectionRotatedScreenBounds, getSelectionScreenBounds, getSessionStateSnapshot, getSessionStateSnapshotFromStore, getShapeAndDescendantIds, getShapeClipPath, getShapeHandles, getShapeIdsInsideBounds, getShapeIndicatorNode, getShapeIndicatorPath, getShapeMaskedPageBounds, getShapeStyleIfExists, getShapesPageBounds, getSharedOpacity, getSnapshot, getStylePropsOf, getSvgAsImage, getSvgPathFromPoints, getTextMeasureProvider, getThemeCssVars, getUncroppedSize, getUserPreferences, handleTypeValidator, hardReset, hardResetEditor, hasAncestor, hexToRgba, hitTestSelectionBounds, hitTestSelectionHandles, idValidator, imageAssetMigrations, imageAssetProps, imageAssetPropsValidator, imageAssetValidator, inlineBase64AssetStore, intersectCircleCircle, intersectCirclePolygon, intersectCirclePolyline, intersectLineSegmentCircle, intersectLineSegmentLineSegment, intersectLineSegmentPolygon, intersectLineSegmentPolyline, intersectPolygonBounds, intersectPolygonPolygon, isAncestorSelected, isAsset, isAssetId, isBinding, isBindingId, isCommentId, isCommentReactionId, isCommentThreadId, isCursorInViewport, isCustomRecord, isCustomRecordId, isDocument, isFullCrop, isInstancePresenceId, isOptionalValidator, isPage, isPageId, isPointInShape, isPropsMigrations, isSafeFloat, isShape, isShapeHidden, isShapeId, isShapeInPage, isUserId, isValidProps, kickoutOccludedShapes, lerp, linesIntersect, loadSessionStateSnapshotIntoStore, loadSnapshot, loopToHtmlElement, maybeSnapToGrid, mixHexColors, moveElementInto, moveShapesToPage, normalizeIndicatorPath, normalizeLoadedRecords, noteReactivePointerType, opacityValidator, openWindow, packShapes, pageIdValidator, parentIdValidator, parseDeepLinkString, perimeterOfEllipse, pointInPolygon, pointerValidator, polygonIntersectsPolyline, polygonsIntersect, popFocusedGroupId, precise, prefixError, preventDefault, radiansToDegrees, randomPresenceColor, rangeIntersection, refreshPage, refreshReactiveEnvironment, registerColorsFromThemes, registerCoreShape, registerDefaultAssetSchema, registerDefaultBindingSchema, registerDefaultShapeSchema, registerEngineProvider, registerExportImplementation, registerFontsFromThemes, registerTextMeasureImplementation, releasePointerCapture, resizeBox, resizeScaled, resizeToBounds, resolveAssetUrl, resolveLineHeightPx, resolveShape, resolveThemes, resolveUiMessage, richTextToPlainText, rootBindingMigrations, rootShapeMigrations, rotateSelectionHandle, runtime, sanitizeId, scribbleValidator, selectAdjacentShape, selectFirstChildShape, selectParentShape, setDefaultCdnBaseUrl, setFocusedGroup, setOpacityForNextShapes, setOpacityForSelectedShapes, setPointerCapture, setRuntimeOverrides, setUserPreferences, shapeIdValidator, shapePropsMigrationSequenceId, shortAngleDist, snapAngle, stopEventPropagation, strokeShapeIndicators, suffixSafeId, tleditors, tlenv, tlenvReactive, tlmenus, tltime, toCustomRecordMigrationSequence, toDomPrecision, toFixed, toMigrationSequence, toPrecision, trackPointer, uniq, updatePage, useActions, useAssetUrls, useColorMode, useContainer, useContainerIfExists, useCurrentTheme, useCurrentUser, useDelaySvgExport, useEditor, useEditorComponents, useEditorPortalHost, useGlobalMenuIsOpen, useIsCropping, useIsEditing, useIsToolSelected, useMaybeEditor, useMocanvasUi, usePassThroughWheelEvents, useSharedSafeId, useSvgExportContext, useTLSchemaFromUtils, useTLStore, useThemeColors, useThemeCssVars, useTools, useTransform, useUniqueSafeId, useViewportHeight, userIdValidator, userPreferencesValidator, userTypeValidator, userValidator, validateCustomRecordInfos, validateProps, vecModelValidator, videoAssetMigrations, videoAssetProps, videoAssetValidator, visitDescendants, warnOnce, withCoreShapes };
14019
+ export { ARROWHEAD_KINDS, ARROW_SHAPE_KINDS, ASSET_MIGRATION_SEQUENCE_PREFIX, Arc2d, ArrayOfValidator, ArrowShapeArrowheadEndStyle, type ArrowShapeArrowheadKind, ArrowShapeArrowheadStartStyle, type ArrowShapeKind, ArrowShapeKindStyle, type Asset, type AssetContext, type AssetCreate, type AssetId, type AssetIdList, type AssetPartial, type AssetPropsForType, AssetRecordType, type AssetStore, type AssetType, type AssetTypeName, type AssetUploadResult, AssetUrlsProvider, type AssetUrlsProviderProps, AssetUtil, AssetUtilRegistry, type B64VecPoint, BINDING_MIGRATION_SEQUENCE_PREFIX, BUILTIN_ASSET_MIGRATION_SEQUENCE_PREFIX, BUILTIN_BINDING_MIGRATION_SEQUENCE_PREFIX, BUILTIN_SHAPE_MIGRATION_SEQUENCE_PREFIX, type BaseAsset, type BaseBinding, BaseBoxShapeUtil, type BaseEventInfo, BaseFrameLikeShapeUtil, type BaseShape, type BatchMeasurementRequest, type Binding, type BindingCanBindOptions, type BindingCreate, type BindingId, type BindingOnChangeOptions, type BindingOnCreateOptions, type BindingOnDeleteOptions, type BindingOnShapeChangeOptions, type BindingOnShapeDeleteOptions, type BindingOnShapeIsolateOptions, type BindingPartial, type BindingPropsForType, BindingRecordType, type BindingTypeName, BindingUtil, type BindingUtilConstructor, type BookmarkAsset, type BookmarkAssetProps, type BoundsSnapGeometry, type BoundsSnapPoint, type BoundsSnapResizeOptions, type BoundsSnapTranslateOptions, BoundsSnaps, Box, type BoxHandle, type BoxLike, type BoxModel, CANVAS_THEME_VARS, COLLABORATOR_INACTIVE_TIMEOUT, CURRENT_SESSION_SCHEMA_VERSION, CURSOR_TYPES, CUSTOM_RECORD_MIGRATION_SEQUENCE_PREFIX, CUSTOM_RECORD_TYPE_NAME, type CachedUserResolve, type Camera, type CameraId, CameraRecordType, CameraStateTracker, type CancelEventInfo, Canvas, type CanvasComponents, type CanvasProps, Circle2d, type ClickEventInfo, type ClickEventName, ClickManager, CollaboratorsManager, type ColorScheme, type DefaultColorStyle$1 as ColorValue, CommentReactionRecordType, CommentRecordType, CommentThreadRecordType, type CompleteEventInfo, type ContainerDocument, ContainerProvider, type ContainerProviderProps, type ContainerWindow, type ContentElementHost, ContentElementManager, type ContentElementSource, type CreateCachedUserResolveOptions, type CreatePresenceStateDerivationOpts, type CreateStoreOptions, CubicBezier2d, type CubicSegmentLike, CubicSpline2d, type CurrentUser, type CustomRecordInfo, type CustomRecordPropsForType, DEFAULT_ASSET_CONTEXT, DEFAULT_CAMERA_OPTIONS, DEFAULT_COLORS, DEFAULT_DARK_COLORS, DEFAULT_DASHES, DEFAULT_EDITOR_CONFIG, DEFAULT_FILLS, DEFAULT_FILL_TOKENS, DEFAULT_FONTS, DEFAULT_FONT_FAMILIES, DEFAULT_H_ALIGNS, DEFAULT_LIGHT_COLORS, DEFAULT_LINE_HEIGHT, DEFAULT_MENU_CONTEXT, DEFAULT_PAGE_ID, DEFAULT_SHAPE_INDICATOR_OPTIONS, DEFAULT_SIZES, DEFAULT_TEXT_ALIGNS, DEFAULT_THEME, DEFAULT_TIME_CONTEXT, DEFAULT_V_ALIGNS, DIM_2D, DIM_3D, DOCUMENT_ID, type DefaultDashStyle$1 as DashValue, type DecodedDrawPoint, type DecomposedMat, DefaultBackground, DefaultCanvas, DefaultColorStyle, DefaultCursor, DefaultDashStyle, DefaultErrorFallback, DefaultFillStyle, DefaultFontFaces, DefaultFontFamilies, DefaultFontStyle, DefaultGrid, DefaultHorizontalAlignStyle, DefaultLabelColorStyle, DefaultShapeWrapper, DefaultSizeStyle, DefaultSpinner, DefaultSvgDefs, DefaultTextAlignStyle, DefaultVerticalAlignStyle, DictValidator, type Document$1 as Document, type DocumentId, DocumentRecordType, type DrawOptions, EASINGS, ELBOW_ARROW_SNAP_MODES, EVENT_NAME_MAP, Edge2d, EdgeScrollManager, Editor, EditorAtom, type EditorConfig, EditorContext, type EditorEngineProvider, type EditorEvents, type EditorExportImplementation, type EditorImageExportOptions, type EditorImageExportResult, type EditorInputs, EditorManager, type EditorOptions, EditorPortal, type EditorPortalProps, EditorProvider, type EditorProviderProps, type EditorRecord, type EditorStore, type EditorStoreProps, type EditorStoreSnapshot, type EditorSvgExportOptions, type EditorSvgExportResult, type EditorTextHtmlMeasurement, type EditorTextMeasure, type EditorTextMeasureHtmlOptions, type EditorTextMeasureOptions, type EditorTextMeasureProvider, type EditorTextMeasurement, ElbowArrowSnap, type ElbowArrowSnapMode, Ellipse2d, type EngineGeometry, EnumStyleProp, ErrorBoundary, type ErrorBoundaryProps, ErrorScreen, type ErrorScreenProps, EventEmitter, type EventHandlers, type EventInfo, type ExternalAssetContent, type ExternalAssetHandler, type ExternalAssetType, type ExternalContent, type ExternalContentHandler, type ExternalContentType, type ExtractShapeByProps, FIRST_PAGE_INDEX, FONT_SIZES, type DefaultFillStyle$1 as FillValue, FontManager, type DefaultFontStyle$1 as FontValue, type FrameLikeShape, GEO_SHAPE_KINDS, type GapsSnapIndicator, GeoShapeGeoStyle, type GeoShapeKind, Geometry2d, Geometry2dFilters, type Geometry2dOptions, type GetSvgAsImageOptions, Group2d, HALF_PI, HANDLE_HIT_RADIUS, type DefaultHorizontalAlignStyle$1 as HAlignValue, HTMLContainer, type HTMLContainerProps, type HandleSnapGeometry, type HandleSnapOptions, HandleSnaps, HandleTable, HistoryManager, type HitTestOptions, INSTANCE_ID, type ImageAsset, type ImageAssetProps, ImageShapeCrop, type IndicatorPathSource, type IndicatorShapeUtil, type IndicatorSource, InputsManager, type Instance, type InstanceId, type InstancePageState, type InstancePageStateId, InstancePageStateRecordType, type InstancePresence, type InstancePresenceId, InstancePresenceRecordType, InstanceRecordType, type InterruptEventInfo, type JsonObject, type JsonPrimitive, type JsonValue, type KeyboardEventInfo, type KeyboardEventName, LIGHT_THEME, LINE_SPLINE_KINDS, LOCAL_STATE_PREFIX, type LegacyDrawShapeSegment, type LineShapeSplineKind, LineShapeSplineStyle, LoadingScreen, type LoadingScreenProps, MAX_TEXTURE_RESOLUTION, MAX_TEXTURE_ZOOM, Mat, type MatLike, type MatModel, MenuClickCapture, MenuManager, type MigratableProps, type MocanvasUiContextValue, MocanvasUiProvider, type MocanvasUiProviderProps, type NormalizeOptions, type NormalizeResult, ObjectValidator, type ObjectValidatorType, type OptionalKeys, type OverlayEntry, type OverlayHost, type OverlayLike, OverlayManager, type OverlayOptionsWithDisplayValues, OverlayUtil, type OverlayUtilOptions, PI, PI2, PRESENCE_COLORS, type Page, type PageId, PageRecordType, type ParentId, type PerfectDashOptions, type PerfectDashProps, type PerfectDashTerminal, PerformanceApiAdapter, type PerformanceApiAdapterOptions, type PerformanceEventName, type PerformanceEvents, PerformanceManager, type PinchEventInfo, Point2d, type PointLike, type PointerEventInfo, type PointerEventName, PointerRecordType, type PointerSource, type PointerTarget, type PointsSnapIndicator, Polygon2d, Polyline2d, type PresenceStateDerivationOptions, type PresenceUser, type PropsMigration, type PropsMigrationSource, type PropsMigrationTarget, type PropsMigrations, type RGBA, ROTATE_CORNER_TO_SELECTION_CORNER, ROTATE_HANDLE_OFFSET, ReadonlySharedStyleMap, type RecordPropValidator, type RecordProps, type RecordPropsType, type RecordValidatorOptions, Rectangle2d, type RegisteredAssetType, type RegisteredBindingType, type RegisteredCustomRecordType, type RegisteredShapeType, type RenderBackend, type RequiredKeys, type ResizeBoxOptions, type ResizeInfo, type ResizeShapeOptions, type RichTextFontVisitor, type RichTextFontVisitorState, RootState, type RotateCorner, SHAPE_MIGRATION_SEQUENCE_PREFIX, SIDES, SIN, STROKE_SIZES, SVGContainer, type SVGContainerProps, type SafeId, type SchemaPropsInfo, type SchemaPropsInfoMap, type SchemaUtilSource, type Scribble, type ScribbleItem, ScribbleManager, type ScribbleSessionOptions, type SelectionCorner, type SelectionEdge, type SelectionHandle, type SelectionHandleHit, type SetValue, type Shape, type ShapeCreate, type ShapeHandle, type ShapeId, ShapeIndicatorCompositor, type ShapePartial, type ShapePropsForType, ShapeRecordType, type ShapeRef, type ShapeSvgContext, type ShapeSvgResult, type ShapeTypeName, ShapeUtil, type ShapeUtilClass, type ShapeUtilConstructor, type ShapeUtilOptions, type ShapeUtilOptionsPatch, type ShapeWithCrop, type SharedStyle, SharedStyleMap, type DefaultSizeStyle$1 as SizeValue, type SnapData, type SnapIndicator, type SnapLine, SnapManager, type SnapResult, Stadium2d, StateNode, type StateNodeClass, type StateNodeConstructor, type StateNodeType, type StrokeShapeIndicatorsOptions, StyleProp, type StylePropValue, SvgExportContextProvider, type SvgExportContextProviderProps, type SvgExportDef, T, TAB_ID, type TLActionShortcutsLocation, type TLAdjacentDirection, type TLAnimationOptions, type TLAnyAssetUtilConstructor, type TLAnyOverlayUtilConstructor, type TLArrowShapeArrowheadStyle, type TLArrowShapeKind, type TLAssetShape, type TLAssetUrls, type TLAssetUtilClass, type TLAssetUtilConstructor, type TLAssetUtilConstructorLike, type TLAssetUtilLike, type TLAssetUtilOptions, type TLBaseBoxShape, type TLBaseExternalContent, type TLBindingUpdate, type TLCLickEventName, type TLCameraConstraints, type TLCameraConstraintsZoom, type TLCameraEndPerfEvent, type TLCameraMoveOptions, type TLCameraOptions, type TLCameraStartPerfEvent, type TLCameraState, type TLCancelEvent, type TLCanvasComponentProps, type TLCanvasUiColor, type TLClickEvent, type TLClickEventInfo, type TLClickState, type TLClipboardPasteRawInfo, type TLClipboardWriteInfo, type TLColorMode, type TLColorScheme, type TLColorSchemeWindow, type TLComment, type TLCommentAnchor, type TLCommentId, type TLCommentReaction, type TLCommentReactionId, type TLCommentThread, type TLCommentThreadId, type TLCompleteEvent, type TLComponents, type TLComponentsResolved, type TLContent, type TLCreateShapePartial, type TLCropInfo, type TLCursor, type TLCursorProps, type TLCursorSlotProps, type TLCursorType, type TLCursorViewportSource, type TLCustomRecord, type TLCustomRecordId, type TLDeepLink, type TLDeepLinkOptions, type TLDefaultAsset, type TLDefaultBinding, type TLDefaultColor, type TLDefaultColorVariant, type TLDefaultDisplayValues, type TLDefaultRecord, type TLDefaultShape, type TLDefaultTextAlignStyle, type TLDisplayValuesSource, type TLDragShapesInInfo, type TLDragShapesInfo, type TLDragShapesOutInfo, type TLDragShapesOverInfo, type TLDrawShapeSegment, type TLDropShapesOverInfo, type TLEasingType, type TLEditStartInfo, type TLEditorAssetUrls, type TLEditorComponents, type TLEditorComponentsEditor, type TLEditorRunOptions, type TLEditorSnapshot, TLEditorsRegistry, type TLEmbedExternalContent, type TLEnterEventHandler, type TLEnvironment, type TLErrorBoundaryProps, type TLErrorExternalContentSource, type TLErrorFallbackComponent, type TLErrorFallbackProps, type TLErrorSlotProps, type TLEventMap, type TLEventMapHandler, type TLEventName, type TLExcalidrawExternalContent, type TLExcalidrawExternalContentSource, type TLExitEventHandler, type TLExportType, type TLExternalAsset, type TLExternalContentSource, type TLFileExternalAsset, type TLFileReplaceExternalContent, type TLFilesExternalContent, type TLFontFace, type TLFontFaceSet, type TLFontFaceSource, type TLFontLoadState, type TLFramePerfEvent, type TLGeometryOpts, type TLGetCustomDisplayValues, type TLGetCustomOverlayDisplayValues, type TLGetDefaultDisplayValues, type TLGetDefaultOverlayDisplayValues, type TLGetShapeAtPointOptions, type TLGetShapeVisibility, type TLGlobalAssetPropsMap, type TLGlobalBindingPropsMap, type TLGlobalRecordPropsMap, type TLGlobalShapePropsMap, type TLGridProps, type TLGridStep, type TLHandleDragInfo, type TLHandleType, type TLHistoryBatchOptions, type TLHistoryDiff, type TLHistoryEntry, type TLHistoryMark, type TLHistoryRecordingMode, type TLImageExportOptions, type TLIndexedAssets, type TLIndexedBindings, type TLIndexedRecords, type TLIndexedShapes, type TLIndicatorContext, type TLIndicatorHost, type TLIndicatorOverlay, type TLIndicatorPath, type TLIndicatorPathResult, type TLIndicatorTransform, type TLInstancePresenceID, type TLInteractionEndPerfEvent, type TLInteractionStartPerfEvent, type TLInterpolationProgress, type TLInterruptEvent, type TLKeyboardEvent, type TLLineShapeSplineStyle, type TLLoadSessionStateSnapshotOptions, type TLLoadSnapshotOptions, type TLMeasureTextOpts, type TLMeasureTextSpanOpts, type TLMeasuredTextSize, type TLMenus, type TLOpacityType, type TLOverlay, type TLOverlayDisplayValuesSource, type TLOverlayEntry, type TLOverlayUtilConstructor, TLPOINTER_ID, type TLPerfEventMap, type TLPerfFrameTimeStats, type TLPerfLongAnimationFrame, type TLPerfLongAnimationFrameScript, type TLPinchEvent, type TLPinchEventName, type TLPointInShapeOptions, type TLPointer, type TLPointerEvent, type TLPointerEventTarget, type TLPointerId, type TLPointerInfo, type TLPresenceStateInfo, type TLReactiveEnvironment, type TLRegisteredAsset, type TLRemovedDefaultThemeColors, type TLRenderingShape, type TLResettableEditor, type TLResizeHandle, type TLResizeMode, type TLRichTextFontSource, type TLRuntime, type TLSchema, type TLScribbleState, type TLSessionPageState, type TLSessionStateSnapshot, type TLShapeCrop, type TLShapeErrorFallbackComponent, type TLShapeIndicatorOptions, type TLShapeOperationPerfEvent, type TLShapeUtilCanBeLaidOutOpts, type TLShapeUtilCanBindOpts, type TLShapeUtilCanvasSvgDef, type TLShapeVisibility, type TLShapeWrapperProps, type TLShapeWrapperSlotProps, type TLSharedOpacity, type TLStoreBaseOptions, type TLStoreEventInfo, type TLStoreOptions, type TLStoreProps, type TLStoreSchemaOptions, type TLStoreWithStatus, type TLStyledShape, type TLStyledShapeProps, type TLSvgExportContext, type TLSvgTextExternalContent, type TLTemporaryAssetPreview, type TLTextExternalContent, type TLTextExternalContentSource, type TLTextOptions, type TLTextSpan, type TLTheme, type TLThemeColors, type TLThemeDefaultColors, type TLThemeFont, type TLThemeFonts, type TLThemeHost, type TLThemeId, type TLThemePatch, type TLThemeUiColorKeys, type TLThemes, type TLThemesInput, type TLTickEvent, type TLTime, type TLTimeContext, type TLTldrawExternalContent, type TLTldrawExternalContentSource, type TLUiActionItem, type TLUiActionsBuilder, type TLUiActionsContextType, type TLUiAssetUrls, type TLUiComponentSlot, type TLUiEventSource, type TLUiOverrideHelpers, type TLUiOverrides, type TLUiToolItem, type TLUiToolsBuilder, type TLUiToolsContextType, type TLUiTranslations, type TLUndoRedoPerfEvent, type TLUnknownAsset, type TLUpdatePointerOptions, type TLUrlExternalAsset, type TLUrlExternalContent, type TLWheelEvent, TL_CANVAS_UI_COLOR_TYPES, TL_CURSOR_TYPES, TL_HANDLE_TYPES, TL_SCRIBBLE_STATES, type DefaultTextAlignStyle$1 as TextAlignValue, TextManager, type TextureInfo, type TextureLoader, TextureManager, type TextureManagerOptions, type TextureOptions, type TextureSource, type TextureState, type ThemeColor, ThemeManager, type ThemeManagerOptions, type TickEventInfo, Timers, type TiptapEditor, type TiptapNode, type TldrawEditorBaseProps, type TldrawEditorProps, type TldrawEditorWithStoreProps, type TldrawEditorWithoutStoreProps, type TldrawOptions, TransformedGeometry2d, type TransformedGeometry2dOptions, type TranslateInfo, type TypeOf, UNKNOWN_EDIT_START_INFO, USER_PREFERENCES_DEFAULTS, type UiEvent, type UiEventType, UnionValidator, type UnionValidatorConfig, type UnknownBinding, type UnknownCustomRecord, type UnknownPropsPolicy, type UnknownRecordProps, type UnknownShape, type UseCurrentUserOptions, type User, type UserId, type UserPreferences, type UserPreferencesInit, UserPreferencesManager, type UserPreferencesState, type UserRecordId, UserRecordType, type UserSchemaInfo, type UserStore, type DefaultVerticalAlignStyle$1 as VAlignValue, type Validatable, ValidationError, type ValidationLibrary, type ValidationPathSegment, Validator, Vec, type VecLike, type VecModel, type VideoAsset, type VideoAssetProps, WebGL2Backend, type WheelEventInfo, angleDistance, animateShape, animateShapes, applyThemePatch, approximately, areAnglesCompatible, arrowBindingVersions, assetIdValidator, assetMigrations, assetPropsMigrationSequenceId, assetValidator, assetValidators, average, b64Vecs, bindingIdValidator, bindingPropsMigrationSequenceId, bookmarkAssetMigrations, bookmarkAssetProps, bookmarkAssetPropsValidator, bookmarkAssetValidator, boundsIndicatorPath, boxModelValidator, bucketTextureResolution, canBindShapes, canBuildIndicatorPaths, canCreateShape, canCreateShapes, canCropShape, canEditShape, canonicalizeRotation, canvasUiColorTypeValidator, centerOfCircleFromThreePoints, clamp, clampRadians, clockwiseAngleDist, commentAnchorValidator, commentReactionRecordConfig, commentReactionValidator, commentRecordConfig, commentSchemaRecords, commentThreadRecordConfig, commentThreadValidator, commentValidator, compressLegacySegments, coreShapes, counterClockwiseAngleDist, createAssetId, createAssetPropsMigrationIds, createAssetPropsMigrationSequence, createAssetPropsValidator, createAssetValidator, createBackend, createBaseAssetValidator, createBaseBindingValidator, createBaseShapeValidator, createBindingId, createBindingPropsMigrationIds, createBindingPropsMigrationSequence, createBindingValidator, createBuiltInAssetPropsMigrationIds, createBuiltInBindingPropsMigrationIds, createBuiltInShapePropsMigrationIds, createCachedUserResolve, createComment, createCommentId, createCommentReaction, createCommentReactionId, createCommentThread, createCommentThreadId, createCurrentUser, createCustomRecord, createCustomRecordId, createCustomRecordMigrationIds, createCustomRecordMigrationSequence, createCustomRecordMigrationSequences, createCustomRecordType, createCustomRecordTypeMap, createCustomRecordValidator, createDeepLinkString, createInMemoryAssetStore, createMemoryUserStore, createPresenceStateDerivation, createPropsMigrationSequences, createRootState, createSchema, createSessionStateSnapshotSignal, createShapeId, createShapePropsMigrationIds, createShapePropsMigrationSequence, createShapeValidator, createStore, createTLCurrentUser, createTLSchemaFromUtils, createTheme, createUserId, createUserPreferences, createUserRecordType, cursorTypeValidator, cursorValidator, customRecordMigrationSequenceId, dataUrlToFile, decodeDrawSegmentPath, defaultAssetMigrations, defaultAssetSchemas, defaultBindingSchemas, defaultShapeSchemas, defaultTldrawOptions, defaultUserPreferences, defaultUserStore, degreesToRadians, deselect, drawShapeSegmentValidator, dropShapesOnFrameLike, duplicatePage, easeInOutCubic, fileToBase64DataUrl, fileToDataUrl, findCommonAncestor, findShapeAncestor, fontKey, formatValidationPath, getArcMeasure, getAssetSrc, getBaseZoomForCameraOptions, getColorNamesFromThemes, getColorValue, getCulledShapes, getCurrentPageRenderingShapesSorted, getCurrentPageShapesInReadingOrder, getCursor, getCustomRecordIdType, getDefaultAssetContext, getDefaultCdnBaseUrl, getDefaultCrop, getDefaultDisplayValues, getDefaultUserPresence, getDefaultUserProperties, getDisplayValues, getDroppedShapesToNewParents, getEngineProvider, getExportImplementation, getFocusedGroup, getFocusedGroupId, getFontNamesFromThemes, getFontsFromRichText, getFrameLikeDropTarget, getFreshUserPreferences, getHandleHitRadius, getIncrementedName, getIndicatorSource, getInitialMetaForShape, getLocaleChain, getNearestAdjacentShape, getNotVisibleShapes, getOnlySelectedShapeId, getOverlayDisplayValues, getOwnerDocument, getOwnerWindow, getPageStates, getPaletteEntries, getPerfectDashProps, getPointInArcT, getPointOnCircle, getPointerInfo, getPointsOnArc, getPolygonVertices, getRenderingShapes, getSelectedShapeAtPoint, getSelectionHandlePositions, getSelectionRotatedPageBounds, getSelectionRotatedScreenBounds, getSelectionScreenBounds, getSessionStateSnapshot, getSessionStateSnapshotFromStore, getShapeAndDescendantIds, getShapeClipPath, getShapeHandles, getShapeIdsInsideBounds, getShapeIndicatorNode, getShapeIndicatorPath, getShapeMaskedPageBounds, getShapeStyleIfExists, getShapesPageBounds, getSharedOpacity, getSnapshot, getStylePropsOf, getSvgAsImage, getSvgPathFromPoints, getTextMeasureProvider, getThemeCssVars, getUncroppedSize, getUserPreferences, handleTypeValidator, hardReset, hardResetEditor, hasAncestor, hexToRgba, hitTestSelectionBounds, hitTestSelectionHandles, idValidator, imageAssetMigrations, imageAssetProps, imageAssetPropsValidator, imageAssetValidator, inlineBase64AssetStore, intersectCircleCircle, intersectCirclePolygon, intersectCirclePolyline, intersectLineSegmentCircle, intersectLineSegmentLineSegment, intersectLineSegmentPolygon, intersectLineSegmentPolyline, intersectPolygonBounds, intersectPolygonPolygon, isAncestorSelected, isAsset, isAssetId, isBinding, isBindingId, isCommentId, isCommentReactionId, isCommentThreadId, isCursorInViewport, isCustomRecord, isCustomRecordId, isDocument, isFullCrop, isInstancePresenceId, isOptionalValidator, isPage, isPageId, isPointInShape, isPropsMigrations, isSafeFloat, isShape, isShapeHidden, isShapeId, isShapeInPage, isUserId, isValidProps, kickoutOccludedShapes, lerp, linesIntersect, loadSessionStateSnapshotIntoStore, loadSnapshot, loopToHtmlElement, maybeSnapToGrid, mixHexColors, moveElementInto, moveShapesToPage, normalizeIndicatorPath, normalizeLoadedRecords, noteReactivePointerType, opacityValidator, openWindow, packShapes, pageIdValidator, parentIdValidator, parseDeepLinkString, perimeterOfEllipse, pointInPolygon, pointerValidator, polygonIntersectsPolyline, polygonsIntersect, popFocusedGroupId, precise, prefixError, preventDefault, radiansToDegrees, randomPresenceColor, rangeIntersection, refreshPage, refreshReactiveEnvironment, registerColorsFromThemes, registerCoreShape, registerDefaultAssetSchema, registerDefaultBindingSchema, registerDefaultShapeSchema, registerEngineProvider, registerExportImplementation, registerFontsFromThemes, registerTextMeasureImplementation, releasePointerCapture, resizeBox, resizeScaled, resizeToBounds, resolveAssetUrl, resolveLineHeightPx, resolveShape, resolveThemes, resolveUiMessage, richTextToPlainText, rootBindingMigrations, rootShapeMigrations, rotateSelectionHandle, runtime, sanitizeId, scribbleValidator, selectAdjacentShape, selectFirstChildShape, selectParentShape, setDefaultCdnBaseUrl, setFocusedGroup, setOpacityForNextShapes, setOpacityForSelectedShapes, setPointerCapture, setRuntimeOverrides, setUserPreferences, shapeIdValidator, shapePropsMigrationSequenceId, shortAngleDist, snapAngle, stopEventPropagation, strokeShapeIndicators, suffixSafeId, tleditors, tlenv, tlenvReactive, tlmenus, tltime, toCustomRecordMigrationSequence, toDomPrecision, toFixed, toMigrationSequence, toPrecision, trackPointer, uniq, updatePage, useActions, useAssetUrls, useColorMode, useContainer, useContainerIfExists, useCurrentTheme, useCurrentUser, useDelaySvgExport, useEditor, useEditorComponents, useEditorPortalHost, useGlobalMenuIsOpen, useIsCropping, useIsEditing, useIsToolSelected, useMaybeEditor, useMocanvasUi, usePassThroughWheelEvents, useSharedSafeId, useSvgExportContext, useTLSchemaFromUtils, useTLStore, useThemeColors, useThemeCssVars, useTools, useTransform, useUniqueSafeId, useViewportHeight, userIdValidator, userPreferencesValidator, userTypeValidator, userValidator, validateCustomRecordInfos, validateProps, vecModelValidator, videoAssetMigrations, videoAssetProps, videoAssetValidator, visitDescendants, warnOnce, withCoreShapes };
package/dist/index.js CHANGED
@@ -7558,7 +7558,7 @@ var OverlayManager = class extends EditorManager {
7558
7558
  for (const util of this.getOverlayUtilsInZOrder()) {
7559
7559
  const interactive = util;
7560
7560
  if (interactive.isActive && !interactive.isActive()) continue;
7561
- util.render(ctx);
7561
+ util.render(ctx, interactive.getOverlays?.());
7562
7562
  }
7563
7563
  }
7564
7564
  /** The minimap pass: only utils that opt in by implementing `renderMinimap`. */
@@ -11853,6 +11853,30 @@ function createBaseShapeValidator() {
11853
11853
  })
11854
11854
  );
11855
11855
  }
11856
+ function createAssetPropsValidator(type, props, options) {
11857
+ return T.model(
11858
+ `${type}_asset`,
11859
+ T.object({
11860
+ id: T.idOfType("asset"),
11861
+ typeName: T.literal("asset"),
11862
+ type: T.literal(type),
11863
+ props: propsValidator(props, options?.unknownProps),
11864
+ meta: T.jsonObject
11865
+ })
11866
+ );
11867
+ }
11868
+ function createBaseAssetValidator() {
11869
+ return T.model(
11870
+ "asset",
11871
+ T.object({
11872
+ id: T.idOfType("asset"),
11873
+ typeName: T.literal("asset"),
11874
+ type: T.string,
11875
+ props: T.jsonObject,
11876
+ meta: T.jsonObject
11877
+ })
11878
+ );
11879
+ }
11856
11880
  function createBaseBindingValidator() {
11857
11881
  return T.model(
11858
11882
  "binding",
@@ -11950,6 +11974,17 @@ function createShapeRecordType(propsByType) {
11950
11974
  validator: dispatchingValidator("shape", byType, createBaseShapeValidator())
11951
11975
  }).withDefaultProperties(() => ({ x: 0, y: 0, rotation: 0, isLocked: false, opacity: 1, meta: {} }));
11952
11976
  }
11977
+ function createAssetRecordType(propsByType) {
11978
+ const byType = new Map(
11979
+ Object.entries(propsByType).map(
11980
+ ([type, props]) => [type, createAssetPropsValidator(type, props, { unknownProps: "keep" })]
11981
+ )
11982
+ );
11983
+ return createRecordType("asset", {
11984
+ scope: "document",
11985
+ validator: dispatchingValidator("asset", byType, createBaseAssetValidator())
11986
+ }).withDefaultProperties(() => ({ meta: {} }));
11987
+ }
11953
11988
  function createBindingRecordType(propsByType) {
11954
11989
  const byType = new Map(
11955
11990
  Object.entries(propsByType).map(
@@ -12125,13 +12160,14 @@ function createSchemaWithMigrations(migrations, records, utils = {}) {
12125
12160
  const customRecords = createCustomRecordTypeMap(records);
12126
12161
  const shapeRecords = createShapeRecordType(collectProps(utils.shapeUtils, defaultShapeSchemas));
12127
12162
  const bindingRecords = createBindingRecordType(collectProps(utils.bindingUtils, defaultBindingSchemas));
12163
+ const assetRecords = createAssetRecordType(collectProps(void 0, defaultAssetSchemas));
12128
12164
  return StoreSchema.create(
12129
12165
  {
12130
12166
  document: DocumentRecordType,
12131
12167
  page: PageRecordType,
12132
12168
  shape: shapeRecords,
12133
12169
  binding: bindingRecords,
12134
- asset: AssetRecordType,
12170
+ asset: assetRecords,
12135
12171
  camera: CameraRecordType,
12136
12172
  instance: InstanceRecordType,
12137
12173
  instance_page_state: InstancePageStateRecordType,
@@ -12157,7 +12193,7 @@ function createStore(options = {}) {
12157
12193
  props: { defaultName: options.defaultName ?? "", assets: options.assets ?? createInMemoryAssetStore() }
12158
12194
  });
12159
12195
  if (options.snapshot) store.loadStoreSnapshot(options.snapshot);
12160
- else seedBaseRecords(store);
12196
+ else if (options.seed ?? true) seedBaseRecords(store);
12161
12197
  return store;
12162
12198
  }
12163
12199
  function seedBaseRecords(store) {
@@ -15498,7 +15534,7 @@ var arrowBindingVersions = createBuiltInBindingPropsMigrationIds("arrow", {
15498
15534
 
15499
15535
  // src/assets/assetValidators.ts
15500
15536
  var assetIdValidator = T.idOfType("asset");
15501
- var imageAssetPropsValidator = T.object({
15537
+ var imageAssetProps2 = {
15502
15538
  w: T.number,
15503
15539
  h: T.number,
15504
15540
  name: T.string,
@@ -15506,14 +15542,16 @@ var imageAssetPropsValidator = T.object({
15506
15542
  mimeType: T.string.nullable(),
15507
15543
  src: T.srcUrl.nullable(),
15508
15544
  fileSize: T.number.optional()
15509
- });
15510
- var bookmarkAssetPropsValidator = T.object({
15545
+ };
15546
+ var bookmarkAssetProps2 = {
15511
15547
  title: T.string,
15512
15548
  description: T.string,
15513
15549
  image: T.srcUrl,
15514
15550
  favicon: T.srcUrl,
15515
15551
  src: T.linkUrl.nullable()
15516
- });
15552
+ };
15553
+ var imageAssetPropsValidator = T.object(imageAssetProps2);
15554
+ var bookmarkAssetPropsValidator = T.object(bookmarkAssetProps2);
15517
15555
  function assetValidatorFor(type, props) {
15518
15556
  return T.model(
15519
15557
  `${type}_asset`,
@@ -15551,6 +15589,9 @@ var assetValidators = {
15551
15589
  video: videoAssetValidator,
15552
15590
  bookmark: bookmarkAssetValidator
15553
15591
  };
15592
+ registerDefaultAssetSchema("image", { props: imageAssetProps2 });
15593
+ registerDefaultAssetSchema("video", { props: imageAssetProps2 });
15594
+ registerDefaultAssetSchema("bookmark", { props: bookmarkAssetProps2 });
15554
15595
 
15555
15596
  // src/assets/AssetUtil.ts
15556
15597
  var AssetUtil = class {
@@ -15673,6 +15714,6 @@ function setDefaultCdnBaseUrl(url) {
15673
15714
  cdnBaseUrl = url.replace(/\/+$/, "");
15674
15715
  }
15675
15716
 
15676
- export { ARROWHEAD_KINDS, ARROW_SHAPE_KINDS, ASSET_MIGRATION_SEQUENCE_PREFIX, Arc2d, ArrayOfValidator, ArrowShapeArrowheadEndStyle, ArrowShapeArrowheadStartStyle, ArrowShapeKindStyle, AssetRecordType, AssetUrlsProvider, AssetUtil, AssetUtilRegistry, BINDING_MIGRATION_SEQUENCE_PREFIX, BUILTIN_ASSET_MIGRATION_SEQUENCE_PREFIX, BUILTIN_BINDING_MIGRATION_SEQUENCE_PREFIX, BUILTIN_SHAPE_MIGRATION_SEQUENCE_PREFIX, BaseBoxShapeUtil, BaseFrameLikeShapeUtil, BindingRecordType, BindingUtil, BoundsSnaps, Box, CANVAS_THEME_VARS, COLLABORATOR_INACTIVE_TIMEOUT, CURRENT_SESSION_SCHEMA_VERSION, CURSOR_TYPES, CUSTOM_RECORD_MIGRATION_SEQUENCE_PREFIX, CUSTOM_RECORD_TYPE_NAME, CameraRecordType, CameraStateTracker, Canvas, Circle2d, ClickManager, CollaboratorsManager, CommentReactionRecordType, CommentRecordType, CommentThreadRecordType, ContainerProvider, ContentElementManager, CubicBezier2d, CubicSpline2d, DEFAULT_ASSET_CONTEXT, DEFAULT_CAMERA_OPTIONS, DEFAULT_COLORS, DEFAULT_DARK_COLORS, DEFAULT_DASHES, DEFAULT_EDITOR_CONFIG, DEFAULT_FILLS, DEFAULT_FILL_TOKENS, DEFAULT_FONTS, DEFAULT_FONT_FAMILIES, DEFAULT_H_ALIGNS, DEFAULT_LIGHT_COLORS, DEFAULT_LINE_HEIGHT, DEFAULT_MENU_CONTEXT, DEFAULT_PAGE_ID, DEFAULT_SHAPE_INDICATOR_OPTIONS, DEFAULT_SIZES, DEFAULT_TEXT_ALIGNS, DEFAULT_THEME, DEFAULT_TIME_CONTEXT, DEFAULT_V_ALIGNS, DIM_2D, DIM_3D, DOCUMENT_ID, DefaultBackground, DefaultCanvas, DefaultColorStyle, DefaultCursor, DefaultDashStyle, DefaultErrorFallback, DefaultFillStyle, DefaultFontFaces, DefaultFontFamilies, DefaultFontStyle, DefaultGrid, DefaultHorizontalAlignStyle, DefaultLabelColorStyle, DefaultShapeWrapper, DefaultSizeStyle, DefaultSpinner, DefaultSvgDefs, DefaultTextAlignStyle, DefaultVerticalAlignStyle, DictValidator, DocumentRecordType, EASINGS, ELBOW_ARROW_SNAP_MODES, EVENT_NAME_MAP, Edge2d, EdgeScrollManager, Editor, EditorAtom, EditorContext, EditorManager, EditorPortal, EditorProvider, ElbowArrowSnap, Ellipse2d, EnumStyleProp, ErrorBoundary, ErrorScreen, EventEmitter, FIRST_PAGE_INDEX, FONT_SIZES, FontManager, GEO_SHAPE_KINDS, GeoShapeGeoStyle, Geometry2d, Geometry2dFilters, Group2d, HALF_PI, HANDLE_HIT_RADIUS, HTMLContainer, HandleSnaps, HandleTable, HistoryManager, INSTANCE_ID, ImageShapeCrop, InputsManager, InstancePageStateRecordType, InstancePresenceRecordType, InstanceRecordType, LIGHT_THEME, LINE_SPLINE_KINDS, LOCAL_STATE_PREFIX, LineShapeSplineStyle, LoadingScreen, MAX_TEXTURE_RESOLUTION, MAX_TEXTURE_ZOOM, Mat, MenuClickCapture, MenuManager, MocanvasUiProvider, ObjectValidator, OverlayManager, OverlayUtil, PI, PI2, PRESENCE_COLORS, PageRecordType, PerformanceApiAdapter, PerformanceManager, Point2d, PointerRecordType, Polygon2d, Polyline2d, ROTATE_CORNER_TO_SELECTION_CORNER, ROTATE_HANDLE_OFFSET, ReadonlySharedStyleMap, Rectangle2d, RootState, SHAPE_MIGRATION_SEQUENCE_PREFIX, SIDES, SIN, STROKE_SIZES, SVGContainer, ScribbleManager, ShapeIndicatorCompositor, ShapeRecordType, ShapeUtil, SharedStyleMap, SnapManager, Stadium2d, StateNode, StyleProp, SvgExportContextProvider, T, TAB_ID, TLEditorsRegistry, TLPOINTER_ID, TL_CANVAS_UI_COLOR_TYPES, TL_CURSOR_TYPES, TL_HANDLE_TYPES, TL_SCRIBBLE_STATES, TextManager, TextureManager, ThemeManager, Timers, TransformedGeometry2d, UNKNOWN_EDIT_START_INFO, USER_PREFERENCES_DEFAULTS, UnionValidator, UserPreferencesManager, UserRecordType, ValidationError, Validator, Vec, WebGL2Backend, angleDistance, animateShape, animateShapes, applyThemePatch, approximately, areAnglesCompatible, arrowBindingVersions, assetIdValidator, assetMigrations, assetPropsMigrationSequenceId, assetValidator, assetValidators, average, b64Vecs, bindingIdValidator, bindingPropsMigrationSequenceId, bookmarkAssetMigrations, bookmarkAssetProps, bookmarkAssetPropsValidator, bookmarkAssetValidator, boundsIndicatorPath, boxModelValidator, bucketTextureResolution, canBindShapes, canBuildIndicatorPaths, canCreateShape, canCreateShapes, canCropShape, canEditShape, canonicalizeRotation, canvasUiColorTypeValidator, centerOfCircleFromThreePoints, clamp, clampRadians, clockwiseAngleDist, commentAnchorValidator, commentReactionRecordConfig, commentReactionValidator, commentRecordConfig, commentSchemaRecords, commentThreadRecordConfig, commentThreadValidator, commentValidator, compressLegacySegments, coreShapes, counterClockwiseAngleDist, createAssetId, createAssetPropsMigrationIds, createAssetPropsMigrationSequence, createAssetValidator, createBackend, createBaseBindingValidator, createBaseShapeValidator, createBindingId, createBindingPropsMigrationIds, createBindingPropsMigrationSequence, createBindingValidator, createBuiltInAssetPropsMigrationIds, createBuiltInBindingPropsMigrationIds, createBuiltInShapePropsMigrationIds, createCachedUserResolve, createComment, createCommentId, createCommentReaction, createCommentReactionId, createCommentThread, createCommentThreadId, createCurrentUser, createCustomRecord, createCustomRecordId, createCustomRecordMigrationIds, createCustomRecordMigrationSequence, createCustomRecordMigrationSequences, createCustomRecordType, createCustomRecordTypeMap, createCustomRecordValidator, createDeepLinkString, createInMemoryAssetStore, createMemoryUserStore, createPresenceStateDerivation, createPropsMigrationSequences, createRootState, createSchema, createSessionStateSnapshotSignal, createShapeId, createShapePropsMigrationIds, createShapePropsMigrationSequence, createShapeValidator, createStore, createTLCurrentUser, createTLSchemaFromUtils, createTheme, createUserId, createUserPreferences, createUserRecordType, cursorTypeValidator, cursorValidator, customRecordMigrationSequenceId, dataUrlToFile, decodeDrawSegmentPath, defaultAssetMigrations, defaultAssetSchemas, defaultBindingSchemas, defaultShapeSchemas, defaultTldrawOptions, defaultUserPreferences, defaultUserStore, degreesToRadians, deselect, drawShapeSegmentValidator, dropShapesOnFrameLike, duplicatePage, easeInOutCubic, fileToBase64DataUrl, fileToDataUrl, findCommonAncestor, findShapeAncestor, fontKey, formatValidationPath, getArcMeasure, getAssetSrc, getBaseZoomForCameraOptions, getColorNamesFromThemes, getColorValue, getCulledShapes, getCurrentPageRenderingShapesSorted, getCurrentPageShapesInReadingOrder, getCursor, getCustomRecordIdType, getDefaultAssetContext, getDefaultCdnBaseUrl, getDefaultCrop, getDefaultDisplayValues, getDefaultUserPresence, getDefaultUserProperties, getDisplayValues, getDroppedShapesToNewParents, getEngineProvider, getExportImplementation, getFocusedGroup, getFocusedGroupId, getFontNamesFromThemes, getFontsFromRichText, getFrameLikeDropTarget, getFreshUserPreferences, getHandleHitRadius, getIncrementedName, getIndicatorSource, getInitialMetaForShape, getLocaleChain, getNearestAdjacentShape, getNotVisibleShapes, getOnlySelectedShapeId, getOverlayDisplayValues, getOwnerDocument, getOwnerWindow, getPageStates, getPaletteEntries, getPerfectDashProps, getPointInArcT, getPointOnCircle, getPointerInfo, getPointsOnArc, getPolygonVertices, getRenderingShapes, getSelectedShapeAtPoint, getSelectionHandlePositions, getSelectionRotatedPageBounds, getSelectionRotatedScreenBounds, getSelectionScreenBounds, getSessionStateSnapshot, getSessionStateSnapshotFromStore, getShapeAndDescendantIds, getShapeClipPath, getShapeHandles, getShapeIdsInsideBounds, getShapeIndicatorNode, getShapeIndicatorPath, getShapeMaskedPageBounds, getShapeStyleIfExists, getShapesPageBounds, getSharedOpacity, getSnapshot, getStylePropsOf, getSvgAsImage, getSvgPathFromPoints, getTextMeasureProvider, getThemeCssVars, getUncroppedSize, getUserPreferences, handleTypeValidator, hardReset, hardResetEditor, hasAncestor, hexToRgba, hitTestSelectionBounds, hitTestSelectionHandles, idValidator, imageAssetMigrations, imageAssetProps, imageAssetPropsValidator, imageAssetValidator, inlineBase64AssetStore, intersectCircleCircle, intersectCirclePolygon, intersectCirclePolyline, intersectLineSegmentCircle, intersectLineSegmentLineSegment, intersectLineSegmentPolygon, intersectLineSegmentPolyline, intersectPolygonBounds, intersectPolygonPolygon, isAncestorSelected, isAsset, isAssetId, isBinding, isBindingId, isCommentId, isCommentReactionId, isCommentThreadId, isCursorInViewport, isCustomRecord, isCustomRecordId, isDocument, isFullCrop, isInstancePresenceId, isOptionalValidator, isPage, isPageId, isPointInShape, isPropsMigrations, isSafeFloat, isShape, isShapeHidden, isShapeId, isShapeInPage, isUserId, isValidProps, kickoutOccludedShapes, lerp, linesIntersect, loadSessionStateSnapshotIntoStore, loadSnapshot, loopToHtmlElement, maybeSnapToGrid, mixHexColors, moveElementInto, moveShapesToPage, normalizeIndicatorPath, normalizeLoadedRecords, noteReactivePointerType, opacityValidator, openWindow, packShapes, pageIdValidator, parentIdValidator, parseDeepLinkString, perimeterOfEllipse, pointInPolygon, pointerValidator, polygonIntersectsPolyline, polygonsIntersect, popFocusedGroupId, precise, prefixError, preventDefault, radiansToDegrees, randomPresenceColor, rangeIntersection, refreshPage, refreshReactiveEnvironment, registerColorsFromThemes, registerCoreShape, registerDefaultAssetSchema, registerDefaultBindingSchema, registerDefaultShapeSchema, registerEngineProvider, registerExportImplementation, registerFontsFromThemes, registerTextMeasureImplementation, releasePointerCapture, resizeBox, resizeScaled, resizeToBounds, resolveAssetUrl, resolveLineHeightPx, resolveShape, resolveThemes, resolveUiMessage, richTextToPlainText, rootBindingMigrations, rootShapeMigrations, rotateSelectionHandle, runtime, sanitizeId, scribbleValidator, selectAdjacentShape, selectFirstChildShape, selectParentShape, setDefaultCdnBaseUrl, setFocusedGroup, setOpacityForNextShapes, setOpacityForSelectedShapes, setPointerCapture, setRuntimeOverrides, setUserPreferences, shapeIdValidator, shapePropsMigrationSequenceId, shortAngleDist, snapAngle, stopEventPropagation, strokeShapeIndicators, suffixSafeId, tleditors, tlenv, tlenvReactive, tlmenus, tltime, toCustomRecordMigrationSequence, toDomPrecision, toFixed, toMigrationSequence, toPrecision, trackPointer, uniq, updatePage, useActions, useAssetUrls, useColorMode, useContainer, useContainerIfExists, useCurrentTheme, useCurrentUser, useDelaySvgExport, useEditor, useEditorComponents, useEditorPortalHost, useGlobalMenuIsOpen, useIsCropping, useIsEditing, useIsToolSelected, useMaybeEditor, useMocanvasUi, usePassThroughWheelEvents, useSharedSafeId, useSvgExportContext, useTLSchemaFromUtils, useTLStore, useThemeColors, useThemeCssVars, useTools, useTransform, useUniqueSafeId, useViewportHeight, userIdValidator, userPreferencesValidator, userTypeValidator, userValidator, validateCustomRecordInfos, validateProps, vecModelValidator, videoAssetMigrations, videoAssetProps, videoAssetValidator, visitDescendants, warnOnce, withCoreShapes };
15717
+ export { ARROWHEAD_KINDS, ARROW_SHAPE_KINDS, ASSET_MIGRATION_SEQUENCE_PREFIX, Arc2d, ArrayOfValidator, ArrowShapeArrowheadEndStyle, ArrowShapeArrowheadStartStyle, ArrowShapeKindStyle, AssetRecordType, AssetUrlsProvider, AssetUtil, AssetUtilRegistry, BINDING_MIGRATION_SEQUENCE_PREFIX, BUILTIN_ASSET_MIGRATION_SEQUENCE_PREFIX, BUILTIN_BINDING_MIGRATION_SEQUENCE_PREFIX, BUILTIN_SHAPE_MIGRATION_SEQUENCE_PREFIX, BaseBoxShapeUtil, BaseFrameLikeShapeUtil, BindingRecordType, BindingUtil, BoundsSnaps, Box, CANVAS_THEME_VARS, COLLABORATOR_INACTIVE_TIMEOUT, CURRENT_SESSION_SCHEMA_VERSION, CURSOR_TYPES, CUSTOM_RECORD_MIGRATION_SEQUENCE_PREFIX, CUSTOM_RECORD_TYPE_NAME, CameraRecordType, CameraStateTracker, Canvas, Circle2d, ClickManager, CollaboratorsManager, CommentReactionRecordType, CommentRecordType, CommentThreadRecordType, ContainerProvider, ContentElementManager, CubicBezier2d, CubicSpline2d, DEFAULT_ASSET_CONTEXT, DEFAULT_CAMERA_OPTIONS, DEFAULT_COLORS, DEFAULT_DARK_COLORS, DEFAULT_DASHES, DEFAULT_EDITOR_CONFIG, DEFAULT_FILLS, DEFAULT_FILL_TOKENS, DEFAULT_FONTS, DEFAULT_FONT_FAMILIES, DEFAULT_H_ALIGNS, DEFAULT_LIGHT_COLORS, DEFAULT_LINE_HEIGHT, DEFAULT_MENU_CONTEXT, DEFAULT_PAGE_ID, DEFAULT_SHAPE_INDICATOR_OPTIONS, DEFAULT_SIZES, DEFAULT_TEXT_ALIGNS, DEFAULT_THEME, DEFAULT_TIME_CONTEXT, DEFAULT_V_ALIGNS, DIM_2D, DIM_3D, DOCUMENT_ID, DefaultBackground, DefaultCanvas, DefaultColorStyle, DefaultCursor, DefaultDashStyle, DefaultErrorFallback, DefaultFillStyle, DefaultFontFaces, DefaultFontFamilies, DefaultFontStyle, DefaultGrid, DefaultHorizontalAlignStyle, DefaultLabelColorStyle, DefaultShapeWrapper, DefaultSizeStyle, DefaultSpinner, DefaultSvgDefs, DefaultTextAlignStyle, DefaultVerticalAlignStyle, DictValidator, DocumentRecordType, EASINGS, ELBOW_ARROW_SNAP_MODES, EVENT_NAME_MAP, Edge2d, EdgeScrollManager, Editor, EditorAtom, EditorContext, EditorManager, EditorPortal, EditorProvider, ElbowArrowSnap, Ellipse2d, EnumStyleProp, ErrorBoundary, ErrorScreen, EventEmitter, FIRST_PAGE_INDEX, FONT_SIZES, FontManager, GEO_SHAPE_KINDS, GeoShapeGeoStyle, Geometry2d, Geometry2dFilters, Group2d, HALF_PI, HANDLE_HIT_RADIUS, HTMLContainer, HandleSnaps, HandleTable, HistoryManager, INSTANCE_ID, ImageShapeCrop, InputsManager, InstancePageStateRecordType, InstancePresenceRecordType, InstanceRecordType, LIGHT_THEME, LINE_SPLINE_KINDS, LOCAL_STATE_PREFIX, LineShapeSplineStyle, LoadingScreen, MAX_TEXTURE_RESOLUTION, MAX_TEXTURE_ZOOM, Mat, MenuClickCapture, MenuManager, MocanvasUiProvider, ObjectValidator, OverlayManager, OverlayUtil, PI, PI2, PRESENCE_COLORS, PageRecordType, PerformanceApiAdapter, PerformanceManager, Point2d, PointerRecordType, Polygon2d, Polyline2d, ROTATE_CORNER_TO_SELECTION_CORNER, ROTATE_HANDLE_OFFSET, ReadonlySharedStyleMap, Rectangle2d, RootState, SHAPE_MIGRATION_SEQUENCE_PREFIX, SIDES, SIN, STROKE_SIZES, SVGContainer, ScribbleManager, ShapeIndicatorCompositor, ShapeRecordType, ShapeUtil, SharedStyleMap, SnapManager, Stadium2d, StateNode, StyleProp, SvgExportContextProvider, T, TAB_ID, TLEditorsRegistry, TLPOINTER_ID, TL_CANVAS_UI_COLOR_TYPES, TL_CURSOR_TYPES, TL_HANDLE_TYPES, TL_SCRIBBLE_STATES, TextManager, TextureManager, ThemeManager, Timers, TransformedGeometry2d, UNKNOWN_EDIT_START_INFO, USER_PREFERENCES_DEFAULTS, UnionValidator, UserPreferencesManager, UserRecordType, ValidationError, Validator, Vec, WebGL2Backend, angleDistance, animateShape, animateShapes, applyThemePatch, approximately, areAnglesCompatible, arrowBindingVersions, assetIdValidator, assetMigrations, assetPropsMigrationSequenceId, assetValidator, assetValidators, average, b64Vecs, bindingIdValidator, bindingPropsMigrationSequenceId, bookmarkAssetMigrations, bookmarkAssetProps, bookmarkAssetPropsValidator, bookmarkAssetValidator, boundsIndicatorPath, boxModelValidator, bucketTextureResolution, canBindShapes, canBuildIndicatorPaths, canCreateShape, canCreateShapes, canCropShape, canEditShape, canonicalizeRotation, canvasUiColorTypeValidator, centerOfCircleFromThreePoints, clamp, clampRadians, clockwiseAngleDist, commentAnchorValidator, commentReactionRecordConfig, commentReactionValidator, commentRecordConfig, commentSchemaRecords, commentThreadRecordConfig, commentThreadValidator, commentValidator, compressLegacySegments, coreShapes, counterClockwiseAngleDist, createAssetId, createAssetPropsMigrationIds, createAssetPropsMigrationSequence, createAssetPropsValidator, createAssetValidator, createBackend, createBaseAssetValidator, createBaseBindingValidator, createBaseShapeValidator, createBindingId, createBindingPropsMigrationIds, createBindingPropsMigrationSequence, createBindingValidator, createBuiltInAssetPropsMigrationIds, createBuiltInBindingPropsMigrationIds, createBuiltInShapePropsMigrationIds, createCachedUserResolve, createComment, createCommentId, createCommentReaction, createCommentReactionId, createCommentThread, createCommentThreadId, createCurrentUser, createCustomRecord, createCustomRecordId, createCustomRecordMigrationIds, createCustomRecordMigrationSequence, createCustomRecordMigrationSequences, createCustomRecordType, createCustomRecordTypeMap, createCustomRecordValidator, createDeepLinkString, createInMemoryAssetStore, createMemoryUserStore, createPresenceStateDerivation, createPropsMigrationSequences, createRootState, createSchema, createSessionStateSnapshotSignal, createShapeId, createShapePropsMigrationIds, createShapePropsMigrationSequence, createShapeValidator, createStore, createTLCurrentUser, createTLSchemaFromUtils, createTheme, createUserId, createUserPreferences, createUserRecordType, cursorTypeValidator, cursorValidator, customRecordMigrationSequenceId, dataUrlToFile, decodeDrawSegmentPath, defaultAssetMigrations, defaultAssetSchemas, defaultBindingSchemas, defaultShapeSchemas, defaultTldrawOptions, defaultUserPreferences, defaultUserStore, degreesToRadians, deselect, drawShapeSegmentValidator, dropShapesOnFrameLike, duplicatePage, easeInOutCubic, fileToBase64DataUrl, fileToDataUrl, findCommonAncestor, findShapeAncestor, fontKey, formatValidationPath, getArcMeasure, getAssetSrc, getBaseZoomForCameraOptions, getColorNamesFromThemes, getColorValue, getCulledShapes, getCurrentPageRenderingShapesSorted, getCurrentPageShapesInReadingOrder, getCursor, getCustomRecordIdType, getDefaultAssetContext, getDefaultCdnBaseUrl, getDefaultCrop, getDefaultDisplayValues, getDefaultUserPresence, getDefaultUserProperties, getDisplayValues, getDroppedShapesToNewParents, getEngineProvider, getExportImplementation, getFocusedGroup, getFocusedGroupId, getFontNamesFromThemes, getFontsFromRichText, getFrameLikeDropTarget, getFreshUserPreferences, getHandleHitRadius, getIncrementedName, getIndicatorSource, getInitialMetaForShape, getLocaleChain, getNearestAdjacentShape, getNotVisibleShapes, getOnlySelectedShapeId, getOverlayDisplayValues, getOwnerDocument, getOwnerWindow, getPageStates, getPaletteEntries, getPerfectDashProps, getPointInArcT, getPointOnCircle, getPointerInfo, getPointsOnArc, getPolygonVertices, getRenderingShapes, getSelectedShapeAtPoint, getSelectionHandlePositions, getSelectionRotatedPageBounds, getSelectionRotatedScreenBounds, getSelectionScreenBounds, getSessionStateSnapshot, getSessionStateSnapshotFromStore, getShapeAndDescendantIds, getShapeClipPath, getShapeHandles, getShapeIdsInsideBounds, getShapeIndicatorNode, getShapeIndicatorPath, getShapeMaskedPageBounds, getShapeStyleIfExists, getShapesPageBounds, getSharedOpacity, getSnapshot, getStylePropsOf, getSvgAsImage, getSvgPathFromPoints, getTextMeasureProvider, getThemeCssVars, getUncroppedSize, getUserPreferences, handleTypeValidator, hardReset, hardResetEditor, hasAncestor, hexToRgba, hitTestSelectionBounds, hitTestSelectionHandles, idValidator, imageAssetMigrations, imageAssetProps, imageAssetPropsValidator, imageAssetValidator, inlineBase64AssetStore, intersectCircleCircle, intersectCirclePolygon, intersectCirclePolyline, intersectLineSegmentCircle, intersectLineSegmentLineSegment, intersectLineSegmentPolygon, intersectLineSegmentPolyline, intersectPolygonBounds, intersectPolygonPolygon, isAncestorSelected, isAsset, isAssetId, isBinding, isBindingId, isCommentId, isCommentReactionId, isCommentThreadId, isCursorInViewport, isCustomRecord, isCustomRecordId, isDocument, isFullCrop, isInstancePresenceId, isOptionalValidator, isPage, isPageId, isPointInShape, isPropsMigrations, isSafeFloat, isShape, isShapeHidden, isShapeId, isShapeInPage, isUserId, isValidProps, kickoutOccludedShapes, lerp, linesIntersect, loadSessionStateSnapshotIntoStore, loadSnapshot, loopToHtmlElement, maybeSnapToGrid, mixHexColors, moveElementInto, moveShapesToPage, normalizeIndicatorPath, normalizeLoadedRecords, noteReactivePointerType, opacityValidator, openWindow, packShapes, pageIdValidator, parentIdValidator, parseDeepLinkString, perimeterOfEllipse, pointInPolygon, pointerValidator, polygonIntersectsPolyline, polygonsIntersect, popFocusedGroupId, precise, prefixError, preventDefault, radiansToDegrees, randomPresenceColor, rangeIntersection, refreshPage, refreshReactiveEnvironment, registerColorsFromThemes, registerCoreShape, registerDefaultAssetSchema, registerDefaultBindingSchema, registerDefaultShapeSchema, registerEngineProvider, registerExportImplementation, registerFontsFromThemes, registerTextMeasureImplementation, releasePointerCapture, resizeBox, resizeScaled, resizeToBounds, resolveAssetUrl, resolveLineHeightPx, resolveShape, resolveThemes, resolveUiMessage, richTextToPlainText, rootBindingMigrations, rootShapeMigrations, rotateSelectionHandle, runtime, sanitizeId, scribbleValidator, selectAdjacentShape, selectFirstChildShape, selectParentShape, setDefaultCdnBaseUrl, setFocusedGroup, setOpacityForNextShapes, setOpacityForSelectedShapes, setPointerCapture, setRuntimeOverrides, setUserPreferences, shapeIdValidator, shapePropsMigrationSequenceId, shortAngleDist, snapAngle, stopEventPropagation, strokeShapeIndicators, suffixSafeId, tleditors, tlenv, tlenvReactive, tlmenus, tltime, toCustomRecordMigrationSequence, toDomPrecision, toFixed, toMigrationSequence, toPrecision, trackPointer, uniq, updatePage, useActions, useAssetUrls, useColorMode, useContainer, useContainerIfExists, useCurrentTheme, useCurrentUser, useDelaySvgExport, useEditor, useEditorComponents, useEditorPortalHost, useGlobalMenuIsOpen, useIsCropping, useIsEditing, useIsToolSelected, useMaybeEditor, useMocanvasUi, usePassThroughWheelEvents, useSharedSafeId, useSvgExportContext, useTLSchemaFromUtils, useTLStore, useThemeColors, useThemeCssVars, useTools, useTransform, useUniqueSafeId, useViewportHeight, userIdValidator, userPreferencesValidator, userTypeValidator, userValidator, validateCustomRecordInfos, validateProps, vecModelValidator, videoAssetMigrations, videoAssetProps, videoAssetValidator, visitDescendants, warnOnce, withCoreShapes };
15677
15718
  //# sourceMappingURL=index.js.map
15678
15719
  //# sourceMappingURL=index.js.map