@mocanvas/editor 4.11.2 → 4.12.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/dist/index.d.ts +29 -2
- package/dist/index.js +26 -7
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -898,7 +898,6 @@ interface TransformedGeometry2dOptions {
|
|
|
898
898
|
debugColor?: string | undefined;
|
|
899
899
|
excludeFromShapeBounds?: boolean | undefined;
|
|
900
900
|
}
|
|
901
|
-
/** Base class for shape geometry. */
|
|
902
901
|
declare abstract class Geometry2d {
|
|
903
902
|
readonly isFilled: boolean;
|
|
904
903
|
readonly isClosed: boolean;
|
|
@@ -8317,6 +8316,12 @@ interface EditorConfig extends TldrawOptions {
|
|
|
8317
8316
|
}
|
|
8318
8317
|
declare const DEFAULT_EDITOR_CONFIG: EditorConfig;
|
|
8319
8318
|
interface HitTestOptions {
|
|
8319
|
+
/**
|
|
8320
|
+
* Extra tolerance around the shape, in page units — a caller working from a
|
|
8321
|
+
* screen distance divides it by the zoom level itself, as tldraw's callers do.
|
|
8322
|
+
* Defaults to the hit-test margin for the current pointer, which is a screen
|
|
8323
|
+
* distance and is converted here.
|
|
8324
|
+
*/
|
|
8320
8325
|
margin?: number;
|
|
8321
8326
|
hitInside?: boolean;
|
|
8322
8327
|
hitLocked?: boolean;
|
|
@@ -12786,6 +12791,16 @@ interface CanvasComponents {
|
|
|
12786
12791
|
* `TLComponents.Grid`. `null` draws none; omitted uses {@link DefaultGrid}.
|
|
12787
12792
|
*/
|
|
12788
12793
|
Grid: ((props: TLGridProps) => ReactNode) | null;
|
|
12794
|
+
/**
|
|
12795
|
+
* Drawn over the canvas, in screen space, under whatever chrome the app puts
|
|
12796
|
+
* on top. The layer itself takes no pointer events and its children take
|
|
12797
|
+
* them normally, so a badge pinned to a shape is clickable while the empty
|
|
12798
|
+
* space around it still pans the canvas.
|
|
12799
|
+
*
|
|
12800
|
+
* It belongs to the canvas rather than to the chrome, which is what makes it
|
|
12801
|
+
* survive `hideUi` — an app with no panels still gets its own overlay.
|
|
12802
|
+
*/
|
|
12803
|
+
InFrontOfTheCanvas: (() => ReactNode) | null;
|
|
12789
12804
|
/**
|
|
12790
12805
|
* Rendered in place of the whole editor once it has thrown. `null` renders
|
|
12791
12806
|
* nothing — the choice a host with its own error UI outside the canvas
|
|
@@ -12807,6 +12822,18 @@ interface CanvasComponents {
|
|
|
12807
12822
|
* — and for any util still on the deprecated `indicator()` hook.
|
|
12808
12823
|
*/
|
|
12809
12824
|
declare function Canvas(props: CanvasProps): react.JSX.Element;
|
|
12825
|
+
/**
|
|
12826
|
+
* Publishes the canvas's slots to every `<Canvas>` below, whoever renders it.
|
|
12827
|
+
*
|
|
12828
|
+
* `Mocanvas` wraps the editor in this, so the slots an app passed in
|
|
12829
|
+
* `components` reach the canvas even when the app builds it itself — the
|
|
12830
|
+
* `ContextMenu` case, where the chrome renders the app's component and the app
|
|
12831
|
+
* renders `DefaultCanvas`, which takes no props.
|
|
12832
|
+
*/
|
|
12833
|
+
declare function CanvasComponentsProvider({ components, children, }: {
|
|
12834
|
+
components: Partial<CanvasComponents> | undefined;
|
|
12835
|
+
children: ReactNode;
|
|
12836
|
+
}): react.JSX.Element;
|
|
12810
12837
|
/**
|
|
12811
12838
|
* The outline to draw over one shape: whatever its util's `indicator()`
|
|
12812
12839
|
* returns, or a rectangle around the shape's geometry bounds when the util has
|
|
@@ -14188,4 +14215,4 @@ declare function setDefaultCdnBaseUrl(url: string): void;
|
|
|
14188
14215
|
/** Forget every asset id in `ids`. Exported for stores that batch their deletes. */
|
|
14189
14216
|
type AssetIdList = readonly AssetId[];
|
|
14190
14217
|
|
|
14191
|
-
export { ARROWHEAD_KINDS, ARROW_LABEL_FONT_SIZES, 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_HATCH_SPACING, DEFAULT_HATCH_TOKENS, 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, DefaultShapeErrorFallback, 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, LABEL_FONT_SIZES, 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, getCameraCssVars, 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, useCameraCssVars, 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 };
|
|
14218
|
+
export { ARROWHEAD_KINDS, ARROW_LABEL_FONT_SIZES, 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, CanvasComponentsProvider, 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_HATCH_SPACING, DEFAULT_HATCH_TOKENS, 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, DefaultShapeErrorFallback, 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, LABEL_FONT_SIZES, 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, getCameraCssVars, 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, useCameraCssVars, 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
|
@@ -1582,6 +1582,7 @@ var Geometry2dFilters = {
|
|
|
1582
1582
|
EXCLUDE_LABELS: { includeInternal: true, includeLabels: false },
|
|
1583
1583
|
EXCLUDE_NON_STANDARD: { includeInternal: false, includeLabels: false }
|
|
1584
1584
|
};
|
|
1585
|
+
var HIT_TEST_EPSILON = 1e-9;
|
|
1585
1586
|
var Geometry2d = class {
|
|
1586
1587
|
isFilled;
|
|
1587
1588
|
isClosed;
|
|
@@ -1716,7 +1717,7 @@ var Geometry2d = class {
|
|
|
1716
1717
|
*/
|
|
1717
1718
|
hitTestPoint(point, margin = 0, hitInside = false, _filters) {
|
|
1718
1719
|
if ((hitInside || this.isFilled) && this.isClosed && pointInPolygon(point, this.vertices)) return true;
|
|
1719
|
-
return Vec.Dist(point, this.nearestPoint(point)) <= margin;
|
|
1720
|
+
return Vec.Dist(point, this.nearestPoint(point)) <= margin + HIT_TEST_EPSILON;
|
|
1720
1721
|
}
|
|
1721
1722
|
/** Whether `point` lies within the bounding box, which is the cheap pre-test. */
|
|
1722
1723
|
isPointInBounds(point, margin = 0) {
|
|
@@ -1905,7 +1906,7 @@ var TransformedGeometry2d = class extends Geometry2d {
|
|
|
1905
1906
|
}
|
|
1906
1907
|
hitTestPoint(point, margin = 0, hitInside = false, filters) {
|
|
1907
1908
|
if ((hitInside || this.isFilled) && this.isClosed && pointInPolygon(point, this.vertices)) return true;
|
|
1908
|
-
return Vec.Dist(point, this.nearestPoint(point, filters)) <= margin;
|
|
1909
|
+
return Vec.Dist(point, this.nearestPoint(point, filters)) <= margin + HIT_TEST_EPSILON;
|
|
1909
1910
|
}
|
|
1910
1911
|
ignoreHit(point) {
|
|
1911
1912
|
return this.geometry.ignoreHit(this.toLocal(point));
|
|
@@ -8731,7 +8732,7 @@ var Editor = class extends EventEmitter {
|
|
|
8731
8732
|
}
|
|
8732
8733
|
getShapeAtPoint(point, opts = {}) {
|
|
8733
8734
|
this.flushEngine();
|
|
8734
|
-
const margin =
|
|
8735
|
+
const margin = opts.margin ?? this.getHitTestMargin() / this.getZoomLevel();
|
|
8735
8736
|
const filter = this.hitFilter(opts);
|
|
8736
8737
|
if (!filter && !opts.hitInside) {
|
|
8737
8738
|
const h = this.engine.hitTest(point.x, point.y, margin, this.hitFilterBits(opts));
|
|
@@ -8743,7 +8744,7 @@ var Editor = class extends EventEmitter {
|
|
|
8743
8744
|
/** Shapes under a point, topmost first. */
|
|
8744
8745
|
getShapesAtPoint(point, opts = {}) {
|
|
8745
8746
|
this.flushEngine();
|
|
8746
|
-
const margin =
|
|
8747
|
+
const margin = opts.margin ?? this.getHitTestMargin() / this.getZoomLevel();
|
|
8747
8748
|
const filter = this.hitFilter(opts);
|
|
8748
8749
|
const out = [];
|
|
8749
8750
|
let candidates;
|
|
@@ -14977,7 +14978,23 @@ function hasFrameWork(editor) {
|
|
|
14977
14978
|
return editor.scribbles.hasPendingWork() || editor.edgeScrollManager.getIsEnabled();
|
|
14978
14979
|
}
|
|
14979
14980
|
function Canvas(props) {
|
|
14980
|
-
|
|
14981
|
+
const components = useInheritedCanvasComponents(props.components);
|
|
14982
|
+
return /* @__PURE__ */ jsx(CanvasComponentsContext.Provider, { value: components, children: /* @__PURE__ */ jsx(EditorBoundary, { children: /* @__PURE__ */ jsx(CanvasBody, { ...props, ...components ? { components } : {} }) }) });
|
|
14983
|
+
}
|
|
14984
|
+
function useInheritedCanvasComponents(own) {
|
|
14985
|
+
const outer = useContext(CanvasComponentsContext);
|
|
14986
|
+
return useMemo(() => {
|
|
14987
|
+
if (outer === void 0) return own;
|
|
14988
|
+
if (own === void 0) return outer;
|
|
14989
|
+
return { ...outer, ...own };
|
|
14990
|
+
}, [outer, own]);
|
|
14991
|
+
}
|
|
14992
|
+
function CanvasComponentsProvider({
|
|
14993
|
+
components,
|
|
14994
|
+
children
|
|
14995
|
+
}) {
|
|
14996
|
+
const value = useInheritedCanvasComponents(components);
|
|
14997
|
+
return /* @__PURE__ */ jsx(CanvasComponentsContext.Provider, { value, children });
|
|
14981
14998
|
}
|
|
14982
14999
|
function EditorBoundary({ children }) {
|
|
14983
15000
|
const Fallback = useErrorSlot("ErrorFallback", DefaultErrorFallback);
|
|
@@ -15084,6 +15101,7 @@ function CanvasBody({ editor, className, style, children, components, indicatorO
|
|
|
15084
15101
|
const Indicators = components?.Indicators ?? DefaultIndicators;
|
|
15085
15102
|
const Brush = components?.Brush ?? (hasOverlay(editor, "brush") ? null : DefaultBrush);
|
|
15086
15103
|
const Background = components?.Background;
|
|
15104
|
+
const InFrontOfTheCanvas = components?.InFrontOfTheCanvas;
|
|
15087
15105
|
return /* @__PURE__ */ jsx(EditorProvider, { editor, children: /* @__PURE__ */ jsxs(
|
|
15088
15106
|
"div",
|
|
15089
15107
|
{
|
|
@@ -15108,7 +15126,8 @@ function CanvasBody({ editor, className, style, children, components, indicatorO
|
|
|
15108
15126
|
hasOverlay(editor, "snapIndicator") ? null : /* @__PURE__ */ jsx(SnapLines, { editor }),
|
|
15109
15127
|
Brush ? /* @__PURE__ */ jsx(Brush, { editor }) : null
|
|
15110
15128
|
] }),
|
|
15111
|
-
children
|
|
15129
|
+
children,
|
|
15130
|
+
InFrontOfTheCanvas ? /* @__PURE__ */ jsx("div", { className: "mocanvas-in-front-of-canvas", style: { ...layerStyle, pointerEvents: "none" }, children: /* @__PURE__ */ jsx(InFrontOfTheCanvas, {}) }) : null
|
|
15112
15131
|
]
|
|
15113
15132
|
}
|
|
15114
15133
|
) });
|
|
@@ -15881,6 +15900,6 @@ function setDefaultCdnBaseUrl(url) {
|
|
|
15881
15900
|
cdnBaseUrl = url.replace(/\/+$/, "");
|
|
15882
15901
|
}
|
|
15883
15902
|
|
|
15884
|
-
export { ARROWHEAD_KINDS, ARROW_LABEL_FONT_SIZES, 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_HATCH_SPACING, DEFAULT_HATCH_TOKENS, 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, DefaultShapeErrorFallback, 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, LABEL_FONT_SIZES, 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, getCameraCssVars, 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, useCameraCssVars, 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 };
|
|
15903
|
+
export { ARROWHEAD_KINDS, ARROW_LABEL_FONT_SIZES, 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, CanvasComponentsProvider, 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_HATCH_SPACING, DEFAULT_HATCH_TOKENS, 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, DefaultShapeErrorFallback, 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, LABEL_FONT_SIZES, 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, getCameraCssVars, 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, useCameraCssVars, 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 };
|
|
15885
15904
|
//# sourceMappingURL=index.js.map
|
|
15886
15905
|
//# sourceMappingURL=index.js.map
|