@mocanvas/editor 4.4.2 → 4.5.0
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 +388 -353
- package/dist/index.js +199 -139
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { ComputedCache, ComputedCacheContext, CreateComputedCacheOptions, IndexK
|
|
|
4
4
|
import { StyleWords, FrameBuffers, CameraState, EngineBridge, ClipRect } from '@mocanvas/wasm';
|
|
5
5
|
export { CameraState, ClipRect, EngineBridge, FLAG, GEO_FLAG, GEO_KIND, PATH_OP, StyleWords, getLoadedEngine, loadEngine, loadEngineSync } from '@mocanvas/wasm';
|
|
6
6
|
import * as react from 'react';
|
|
7
|
-
import { ReactNode, ComponentType, CSSProperties, HTMLAttributes, Ref, SVGAttributes,
|
|
7
|
+
import { ReactNode, ComponentType, Component, ErrorInfo, CSSProperties, HTMLAttributes, Ref, SVGAttributes, RefObject } from 'react';
|
|
8
8
|
import { Signal, Atom } from '@mocanvas/state';
|
|
9
9
|
export { AtomMap, atom, computed, react, reactor, transact, transaction } from '@mocanvas/state';
|
|
10
10
|
export { track, useAtom, useComputed, useQuickReactor, useReactor, useStateTracking, useValue } from '@mocanvas/state/react';
|
|
@@ -12250,251 +12250,6 @@ declare class WebGL2Backend implements RenderBackend {
|
|
|
12250
12250
|
*/
|
|
12251
12251
|
declare function createBackend(canvas: HTMLCanvasElement): RenderBackend;
|
|
12252
12252
|
|
|
12253
|
-
/**
|
|
12254
|
-
* What the `Canvas` component slot is handed.
|
|
12255
|
-
*
|
|
12256
|
-
* A host replacing the canvas gets only presentation: a class name and
|
|
12257
|
-
* children. It deliberately does *not* receive the editor as a prop — the
|
|
12258
|
-
* replacement is rendered inside the editor's provider and reads it with
|
|
12259
|
-
* `useEditor()`, so a slot cannot be rendered against a different editor than
|
|
12260
|
-
* the one it is inside of.
|
|
12261
|
-
*/
|
|
12262
|
-
interface TLCanvasComponentProps {
|
|
12263
|
-
className?: string;
|
|
12264
|
-
children?: ReactNode;
|
|
12265
|
-
}
|
|
12266
|
-
interface CanvasProps {
|
|
12267
|
-
editor: Editor;
|
|
12268
|
-
className?: string;
|
|
12269
|
-
style?: CSSProperties;
|
|
12270
|
-
/** Extra layers rendered above the canvas (UI, menus). */
|
|
12271
|
-
children?: ReactNode;
|
|
12272
|
-
/** Override the default selection/brush indicators. */
|
|
12273
|
-
components?: Partial<CanvasComponents>;
|
|
12274
|
-
/**
|
|
12275
|
-
* The overlay util that paints shape indicators onto the canvas layer.
|
|
12276
|
-
*
|
|
12277
|
-
* A *class*, not an instance — one is constructed per editor. Pass
|
|
12278
|
-
* `ShapeIndicatorCompositor.configure({ lineWidth })` to restyle, or a
|
|
12279
|
-
* subclass to control which shapes get an outline.
|
|
12280
|
-
*/
|
|
12281
|
-
indicatorOverlayUtil?: typeof ShapeIndicatorCompositor;
|
|
12282
|
-
}
|
|
12283
|
-
interface CanvasComponents {
|
|
12284
|
-
Indicators: (props: {
|
|
12285
|
-
editor: Editor;
|
|
12286
|
-
}) => ReactNode;
|
|
12287
|
-
Brush: (props: {
|
|
12288
|
-
editor: Editor;
|
|
12289
|
-
}) => ReactNode;
|
|
12290
|
-
Background: (props: {
|
|
12291
|
-
editor: Editor;
|
|
12292
|
-
}) => ReactNode;
|
|
12293
|
-
}
|
|
12294
|
-
/**
|
|
12295
|
-
* The canvas: a WebGL2 surface driven by the engine, a DOM overlay for shapes
|
|
12296
|
-
* that render through `ShapeUtil.component`, a 2D canvas overlay for shape
|
|
12297
|
-
* indicators, and an SVG layer for the selection handles, snap lines, the brush
|
|
12298
|
-
* — and for any util still on the deprecated `indicator()` hook.
|
|
12299
|
-
*/
|
|
12300
|
-
declare function Canvas({ editor, className, style, children, components, indicatorOverlayUtil }: CanvasProps): react.JSX.Element;
|
|
12301
|
-
/**
|
|
12302
|
-
* The outline to draw over one shape: whatever its util's `indicator()`
|
|
12303
|
-
* returns, or a rectangle around the shape's geometry bounds when the util has
|
|
12304
|
-
* no indicator (or returns nothing). Both are expressed in *shape-local*
|
|
12305
|
-
* coordinates; the caller wraps them in the shape's page transform.
|
|
12306
|
-
*
|
|
12307
|
-
* Pure and exported so a custom `Indicators` component can reuse the same rule
|
|
12308
|
-
* instead of guessing at it.
|
|
12309
|
-
*
|
|
12310
|
-
* @deprecated The SVG indicator layer only draws utils still on the deprecated
|
|
12311
|
-
* `indicator()` hook. A util that implements `getIndicatorPath` is stroked on
|
|
12312
|
-
* the canvas overlay by `ShapeIndicatorCompositor` instead.
|
|
12313
|
-
*/
|
|
12314
|
-
declare function getShapeIndicatorNode<T extends UnknownShape>(util: {
|
|
12315
|
-
indicator?(shape: T): ReactNode;
|
|
12316
|
-
}, shape: T, bounds: {
|
|
12317
|
-
x: number;
|
|
12318
|
-
y: number;
|
|
12319
|
-
w: number;
|
|
12320
|
-
h: number;
|
|
12321
|
-
} | undefined): ReactNode;
|
|
12322
|
-
|
|
12323
|
-
declare const EditorContext: react.Context<Editor | null>;
|
|
12324
|
-
/** The editor of the nearest `<EditorProvider>` / `<Canvas>`. */
|
|
12325
|
-
declare function useEditor(): Editor;
|
|
12326
|
-
declare function useMaybeEditor(): Editor | null;
|
|
12327
|
-
/** Props of {@link EditorProvider}. */
|
|
12328
|
-
interface EditorProviderProps {
|
|
12329
|
-
/** The editor every `useEditor()` below this point resolves to. */
|
|
12330
|
-
editor: Editor;
|
|
12331
|
-
children?: ReactNode;
|
|
12332
|
-
}
|
|
12333
|
-
/**
|
|
12334
|
-
* Publishes an editor to the React tree.
|
|
12335
|
-
*
|
|
12336
|
-
* Takes the editor as `editor` rather than a context provider's `value`, so a
|
|
12337
|
-
* test — or an app rendering chrome outside `<Canvas>` — writes
|
|
12338
|
-
* `<EditorProvider editor={editor}>` and never has to know that a context is
|
|
12339
|
-
* what is underneath. {@link EditorContext} is still exported for the rare
|
|
12340
|
-
* caller that wants the raw provider (to publish `null`, say).
|
|
12341
|
-
*/
|
|
12342
|
-
declare function EditorProvider({ editor, children }: EditorProviderProps): react.JSX.Element;
|
|
12343
|
-
|
|
12344
|
-
interface HTMLContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
12345
|
-
children?: ReactNode;
|
|
12346
|
-
ref?: Ref<HTMLDivElement>;
|
|
12347
|
-
}
|
|
12348
|
-
/**
|
|
12349
|
-
* The DOM body of a shape. Fills the shape's bounds; anything else — size,
|
|
12350
|
-
* pointer-events, overflow, a class of your own — is set through `style` and
|
|
12351
|
-
* `className`, which are merged over the defaults rather than replacing them.
|
|
12352
|
-
*/
|
|
12353
|
-
declare function HTMLContainer({ children, className, style, ...rest }: HTMLContainerProps): react.JSX.Element;
|
|
12354
|
-
interface SVGContainerProps extends SVGAttributes<SVGSVGElement> {
|
|
12355
|
-
children?: ReactNode;
|
|
12356
|
-
ref?: Ref<SVGSVGElement>;
|
|
12357
|
-
}
|
|
12358
|
-
/**
|
|
12359
|
-
* The SVG body of a shape: an `<svg>` filling the shape's bounds, whose user
|
|
12360
|
-
* space is the shape's own local coordinate space, so a `<path>` drawn at
|
|
12361
|
-
* `(0, 0)` sits at the shape's origin at any pan, zoom or rotation.
|
|
12362
|
-
*/
|
|
12363
|
-
declare function SVGContainer({ children, className, style, ...rest }: SVGContainerProps): react.JSX.Element;
|
|
12364
|
-
/**
|
|
12365
|
-
* Stop an event travelling any further up the tree.
|
|
12366
|
-
*
|
|
12367
|
-
* The canvas listens for pointer events on its container, so a click on a
|
|
12368
|
-
* piece of chrome rendered over it — a toolbar button, a menu, a panel —
|
|
12369
|
-
* would also start a canvas interaction. Hanging this on the chrome's root
|
|
12370
|
-
* (`onPointerDown={stopEventPropagation}`) keeps the two apart.
|
|
12371
|
-
*
|
|
12372
|
-
* Typed structurally rather than against `React.SyntheticEvent` so it can be
|
|
12373
|
-
* handed to a native listener, a React handler, or a test double alike.
|
|
12374
|
-
*/
|
|
12375
|
-
declare function stopEventPropagation(event: {
|
|
12376
|
-
stopPropagation(): void;
|
|
12377
|
-
}): void;
|
|
12378
|
-
|
|
12379
|
-
/**
|
|
12380
|
-
* The bridge from the theme to CSS: the canvas container stamps the theme's
|
|
12381
|
-
* surface colours as custom properties, and everything drawn in CSS or SVG
|
|
12382
|
-
* reads them.
|
|
12383
|
-
*
|
|
12384
|
-
* Only the *surface* half of a ramp is published — the colours that belong to
|
|
12385
|
-
* the canvas rather than to any one shape. A shape's paint comes from its
|
|
12386
|
-
* style props through `getDisplayValues`, not from a variable, because a
|
|
12387
|
-
* shape is drawn on the GPU where a CSS variable means nothing.
|
|
12388
|
-
*/
|
|
12389
|
-
/**
|
|
12390
|
-
* Which theme colour each custom property carries.
|
|
12391
|
-
*
|
|
12392
|
-
* The names are the ones `ui.css` already declares and `Canvas` already reads,
|
|
12393
|
-
* so an app that themed mocanvas by overriding the variables by hand keeps
|
|
12394
|
-
* working: the theme now writes the same variables it used to have to be told.
|
|
12395
|
-
*/
|
|
12396
|
-
declare const CANVAS_THEME_VARS: {
|
|
12397
|
-
readonly "--mocanvas-selection": "selectStroke";
|
|
12398
|
-
readonly "--mocanvas-selection-fg": "background";
|
|
12399
|
-
readonly "--mocanvas-brush-fill": "selectFill";
|
|
12400
|
-
readonly "--mocanvas-brush-stroke": "selectStroke";
|
|
12401
|
-
readonly "--mocanvas-snap": "hint";
|
|
12402
|
-
readonly "--mocanvas-background": "background";
|
|
12403
|
-
readonly "--mocanvas-surface": "solid";
|
|
12404
|
-
readonly "--mocanvas-text": "text";
|
|
12405
|
-
readonly "--mocanvas-grid": "grid";
|
|
12406
|
-
};
|
|
12407
|
-
/**
|
|
12408
|
-
* The camera, as custom properties.
|
|
12409
|
-
*
|
|
12410
|
-
* Separate from the colours because these change on every zoom rather than on
|
|
12411
|
-
* a theme swap, and because they are the two variables an app most often needs
|
|
12412
|
-
* in CSS: anything drawn in the DOM over a zooming canvas has to divide by the
|
|
12413
|
-
* zoom to keep a constant on-screen size. `@mocanvas/compat` maps tldraw's
|
|
12414
|
-
* `--tl-zoom` and `--tl-scale` onto them; without them every `calc()` in a
|
|
12415
|
-
* migrated stylesheet resolved to nothing and took its whole declaration with
|
|
12416
|
-
* it.
|
|
12417
|
-
*/
|
|
12418
|
-
declare function getCameraCssVars(zoom: number): CSSProperties;
|
|
12419
|
-
/** {@link getCameraCssVars} for an editor, tracked reactively. */
|
|
12420
|
-
declare function useCameraCssVars(editor: Editor): CSSProperties;
|
|
12421
|
-
/**
|
|
12422
|
-
* The custom properties for one resolved ramp.
|
|
12423
|
-
*
|
|
12424
|
-
* SEMANTICS-ASSUMED: `--mocanvas-selection-fg` is the fill of a solid
|
|
12425
|
-
* selection handle, and is mapped to the theme's `background`. A handle is a
|
|
12426
|
-
* chip of the page punched out of the selection stroke, so it has to match the
|
|
12427
|
-
* page it sits on or it reads as a light dot on a dark canvas — which is
|
|
12428
|
-
* exactly what the hard-coded `#ffffff` did before the theme existed.
|
|
12429
|
-
*
|
|
12430
|
-
* A colour the ramp does not carry is skipped rather than written as
|
|
12431
|
-
* `undefined`, so the literal fallback in `var(--x, …)` still applies.
|
|
12432
|
-
*/
|
|
12433
|
-
declare function getThemeCssVars(colors: TLThemeColors | undefined): CSSProperties;
|
|
12434
|
-
/**
|
|
12435
|
-
* The theme's custom properties for an editor, tracked reactively — swapping a
|
|
12436
|
-
* theme or flipping to dark restamps the container without anything being
|
|
12437
|
-
* invalidated by hand.
|
|
12438
|
-
*
|
|
12439
|
-
* Takes the editor rather than reading it from context, because the element
|
|
12440
|
-
* that carries the variables is the canvas container itself: the hook runs
|
|
12441
|
-
* above the provider that would supply it. The theme manager is read
|
|
12442
|
-
* defensively for the same reason `useColorMode` does — a stand-in editor in a
|
|
12443
|
-
* chrome test has no theme at all.
|
|
12444
|
-
*/
|
|
12445
|
-
declare function useThemeCssVars(editor: Editor): CSSProperties;
|
|
12446
|
-
|
|
12447
|
-
/**
|
|
12448
|
-
* Where an app self-hosts the files the UI loads at runtime.
|
|
12449
|
-
*
|
|
12450
|
-
* mocanvas itself needs none of them — its icons are inline SVG and it ships
|
|
12451
|
-
* no translation bundles — so the map is carried, not consumed: it exists so a
|
|
12452
|
-
* component an app drops into a chrome slot can ask for the same base paths
|
|
12453
|
-
* the host configured, instead of every such component growing a prop for it.
|
|
12454
|
-
*
|
|
12455
|
-
* Kept as nested string maps rather than a fixed shape because the categories
|
|
12456
|
-
* are the app's, not ours; the four named below are only the ones a
|
|
12457
|
-
* self-hosting setup usually has.
|
|
12458
|
-
*/
|
|
12459
|
-
interface TLAssetUrls {
|
|
12460
|
-
fonts?: Readonly<Record<string, string>>;
|
|
12461
|
-
icons?: Readonly<Record<string, string>>;
|
|
12462
|
-
embedIcons?: Readonly<Record<string, string>>;
|
|
12463
|
-
translations?: Readonly<Record<string, string>>;
|
|
12464
|
-
[category: string]: Readonly<Record<string, string>> | undefined;
|
|
12465
|
-
}
|
|
12466
|
-
/**
|
|
12467
|
-
* The editor's half of the map: the fonts the canvas loads.
|
|
12468
|
-
*
|
|
12469
|
-
* A separate name from {@link TLAssetUrls} because the editor package can only
|
|
12470
|
-
* promise what it itself uses — the UI layer adds icons and translations on
|
|
12471
|
-
* top, as {@link TLUiAssetUrls}.
|
|
12472
|
-
*/
|
|
12473
|
-
interface TLEditorAssetUrls extends TLAssetUrls {
|
|
12474
|
-
fonts?: Readonly<Record<string, string>>;
|
|
12475
|
-
}
|
|
12476
|
-
/**
|
|
12477
|
-
* The UI layer's half: the icons and translation bundles a self-hosting app
|
|
12478
|
-
* serves itself.
|
|
12479
|
-
*/
|
|
12480
|
-
interface TLUiAssetUrls extends TLEditorAssetUrls {
|
|
12481
|
-
icons?: Readonly<Record<string, string>>;
|
|
12482
|
-
embedIcons?: Readonly<Record<string, string>>;
|
|
12483
|
-
translations?: Readonly<Record<string, string>>;
|
|
12484
|
-
}
|
|
12485
|
-
interface AssetUrlsProviderProps {
|
|
12486
|
-
assetUrls: TLAssetUrls;
|
|
12487
|
-
children?: ReactNode;
|
|
12488
|
-
}
|
|
12489
|
-
/** Publishes an {@link TLAssetUrls} map to everything below it. */
|
|
12490
|
-
declare function AssetUrlsProvider({ assetUrls, children }: AssetUrlsProviderProps): react.JSX.Element;
|
|
12491
|
-
/**
|
|
12492
|
-
* The asset urls the host configured. Empty outside a provider — a component
|
|
12493
|
-
* that needs a file should fall back to its own default rather than fail,
|
|
12494
|
-
* because most mounts configure nothing at all.
|
|
12495
|
-
*/
|
|
12496
|
-
declare function useAssetUrls(): TLAssetUrls;
|
|
12497
|
-
|
|
12498
12253
|
/**
|
|
12499
12254
|
* The UI override surface: the types an app uses to replace mocanvas's chrome
|
|
12500
12255
|
* and to add its own tools to it.
|
|
@@ -12808,15 +12563,384 @@ interface TLUiOverrides {
|
|
|
12808
12563
|
type TLUiTranslations = Record<string, Record<string, string>>;
|
|
12809
12564
|
|
|
12810
12565
|
/**
|
|
12811
|
-
*
|
|
12566
|
+
* Failure containment for the editor's React tree.
|
|
12812
12567
|
*
|
|
12813
|
-
*
|
|
12814
|
-
*
|
|
12568
|
+
* One badly-behaved shape component should cost you that shape, not the
|
|
12569
|
+
* document: `<Canvas>` wraps each shape body in a boundary of its own, and the
|
|
12570
|
+
* editor as a whole is wrapped in another. Without this, a `TypeError` inside
|
|
12571
|
+
* one custom `ShapeUtil.component` unmounts the whole editor and the user
|
|
12572
|
+
* loses the canvas.
|
|
12815
12573
|
*/
|
|
12816
|
-
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
-
|
|
12574
|
+
interface TLErrorFallbackProps {
|
|
12575
|
+
/** What was thrown. Not necessarily an `Error`. */
|
|
12576
|
+
error: unknown;
|
|
12577
|
+
/** Re-mount the subtree. Undefined when the boundary was told not to retry. */
|
|
12578
|
+
resetError?(): void;
|
|
12579
|
+
}
|
|
12580
|
+
interface TLErrorBoundaryProps {
|
|
12581
|
+
children: ReactNode;
|
|
12582
|
+
/** Rendered in place of the subtree once it has thrown. */
|
|
12583
|
+
fallback: (props: TLErrorFallbackProps) => ReactNode;
|
|
12584
|
+
/** Reported to the host app: logging, error tracking. */
|
|
12585
|
+
onError?(error: unknown, info?: ErrorInfo): void;
|
|
12586
|
+
}
|
|
12587
|
+
/** The pre-`TL` spelling of {@link TLErrorBoundaryProps}. The same type. */
|
|
12588
|
+
type ErrorBoundaryProps = TLErrorBoundaryProps;
|
|
12589
|
+
/**
|
|
12590
|
+
* A replacement for the editor-wide error screen, or `null` to render nothing
|
|
12591
|
+
* at all.
|
|
12592
|
+
*
|
|
12593
|
+
* `null` is a real choice, not an oversight: a host that shows its own error UI
|
|
12594
|
+
* outside the canvas wants the editor to fail silently rather than to draw a
|
|
12595
|
+
* second, competing message.
|
|
12596
|
+
*/
|
|
12597
|
+
type TLErrorFallbackComponent = ComponentType<TLErrorFallbackProps> | null;
|
|
12598
|
+
/**
|
|
12599
|
+
* A replacement for the fallback drawn in place of a single broken shape, or
|
|
12600
|
+
* `null` to draw nothing.
|
|
12601
|
+
*
|
|
12602
|
+
* Separate from {@link TLErrorFallbackComponent} because the situations are not
|
|
12603
|
+
* comparable: one shape failing should cost that shape, and the fallback is
|
|
12604
|
+
* drawn *in the canvas*, at the shape's position, where a whole error screen
|
|
12605
|
+
* would be absurd.
|
|
12606
|
+
*/
|
|
12607
|
+
type TLShapeErrorFallbackComponent = ComponentType<{
|
|
12608
|
+
error: unknown;
|
|
12609
|
+
}> | null;
|
|
12610
|
+
interface ErrorBoundaryState {
|
|
12611
|
+
error: unknown;
|
|
12612
|
+
hasError: boolean;
|
|
12613
|
+
}
|
|
12614
|
+
/**
|
|
12615
|
+
* Catches a render-time throw in its subtree and renders `fallback` instead.
|
|
12616
|
+
*
|
|
12617
|
+
* Class component because that is the only form React gives an error boundary;
|
|
12618
|
+
* there is no hook equivalent.
|
|
12619
|
+
*/
|
|
12620
|
+
declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
12621
|
+
state: ErrorBoundaryState;
|
|
12622
|
+
static getDerivedStateFromError(error: unknown): ErrorBoundaryState;
|
|
12623
|
+
componentDidCatch(error: unknown, info: ErrorInfo): void;
|
|
12624
|
+
private readonly resetError;
|
|
12625
|
+
render(): ReactNode;
|
|
12626
|
+
}
|
|
12627
|
+
/**
|
|
12628
|
+
* What an unhandled error looks like when nothing better is configured: the
|
|
12629
|
+
* message, and a button that re-mounts the subtree.
|
|
12630
|
+
*
|
|
12631
|
+
* Deliberately plain and self-contained — it must render correctly when the
|
|
12632
|
+
* failure is in the very stylesheet or provider the rest of the chrome needs.
|
|
12633
|
+
*/
|
|
12634
|
+
declare function DefaultErrorFallback({ error, resetError }: TLErrorFallbackProps): react.JSX.Element;
|
|
12635
|
+
interface ErrorScreenProps {
|
|
12636
|
+
children?: ReactNode;
|
|
12637
|
+
}
|
|
12638
|
+
/**
|
|
12639
|
+
* A full-bleed error surface, for a failure that happened before there was an
|
|
12640
|
+
* editor to put a fallback inside of — a store that would not load, a schema
|
|
12641
|
+
* that would not migrate.
|
|
12642
|
+
*/
|
|
12643
|
+
declare function ErrorScreen({ children }: ErrorScreenProps): react.JSX.Element;
|
|
12644
|
+
/**
|
|
12645
|
+
* The indeterminate progress mark, sized to the text around it.
|
|
12646
|
+
*
|
|
12647
|
+
* Uses SMIL rather than a CSS keyframe so it also animates when the editor is
|
|
12648
|
+
* mounted without `ui.css` — the case a loading screen is most likely to hit,
|
|
12649
|
+
* since it is on screen before anything else has been set up.
|
|
12650
|
+
*/
|
|
12651
|
+
declare function DefaultSpinner(): react.JSX.Element;
|
|
12652
|
+
interface LoadingScreenProps {
|
|
12653
|
+
children?: ReactNode;
|
|
12654
|
+
}
|
|
12655
|
+
/**
|
|
12656
|
+
* What is on screen while the editor's store and engine are still coming up.
|
|
12657
|
+
*
|
|
12658
|
+
* Occupies the editor's whole box so the layout does not jump when the canvas
|
|
12659
|
+
* replaces it, and is labelled as a live region so a screen reader is told
|
|
12660
|
+
* that something is loading rather than that the page is empty.
|
|
12661
|
+
*/
|
|
12662
|
+
declare function LoadingScreen({ children }: LoadingScreenProps): react.JSX.Element;
|
|
12663
|
+
|
|
12664
|
+
/**
|
|
12665
|
+
* What the `Canvas` component slot is handed.
|
|
12666
|
+
*
|
|
12667
|
+
* A host replacing the canvas gets only presentation: a class name and
|
|
12668
|
+
* children. It deliberately does *not* receive the editor as a prop — the
|
|
12669
|
+
* replacement is rendered inside the editor's provider and reads it with
|
|
12670
|
+
* `useEditor()`, so a slot cannot be rendered against a different editor than
|
|
12671
|
+
* the one it is inside of.
|
|
12672
|
+
*/
|
|
12673
|
+
interface TLCanvasComponentProps {
|
|
12674
|
+
className?: string;
|
|
12675
|
+
children?: ReactNode;
|
|
12676
|
+
}
|
|
12677
|
+
interface CanvasProps {
|
|
12678
|
+
editor: Editor;
|
|
12679
|
+
className?: string;
|
|
12680
|
+
style?: CSSProperties;
|
|
12681
|
+
/** Extra layers rendered above the canvas (UI, menus). */
|
|
12682
|
+
children?: ReactNode;
|
|
12683
|
+
/**
|
|
12684
|
+
* The canvas's own slots: the indicators, the brush, the background, the
|
|
12685
|
+
* grid, and the two error fallbacks. A slot given here wins over the same
|
|
12686
|
+
* slot on the surrounding `MocanvasUiProvider`, so an app can configure the
|
|
12687
|
+
* whole editor through the provider and still override one canvas on one
|
|
12688
|
+
* screen.
|
|
12689
|
+
*/
|
|
12690
|
+
components?: Partial<CanvasComponents>;
|
|
12691
|
+
/**
|
|
12692
|
+
* The overlay util that paints shape indicators onto the canvas layer.
|
|
12693
|
+
*
|
|
12694
|
+
* A *class*, not an instance — one is constructed per editor. Pass
|
|
12695
|
+
* `ShapeIndicatorCompositor.configure({ lineWidth })` to restyle, or a
|
|
12696
|
+
* subclass to control which shapes get an outline.
|
|
12697
|
+
*/
|
|
12698
|
+
indicatorOverlayUtil?: typeof ShapeIndicatorCompositor;
|
|
12699
|
+
}
|
|
12700
|
+
interface CanvasComponents {
|
|
12701
|
+
Indicators: (props: {
|
|
12702
|
+
editor: Editor;
|
|
12703
|
+
}) => ReactNode;
|
|
12704
|
+
Brush: (props: {
|
|
12705
|
+
editor: Editor;
|
|
12706
|
+
}) => ReactNode;
|
|
12707
|
+
Background: (props: {
|
|
12708
|
+
editor: Editor;
|
|
12709
|
+
}) => ReactNode;
|
|
12710
|
+
/**
|
|
12711
|
+
* The grid, behind the scene. Rendered only in grid mode, and handed the
|
|
12712
|
+
* camera and the document's step rather than reading them — see
|
|
12713
|
+
* `TLComponents.Grid`. `null` draws none; omitted uses {@link DefaultGrid}.
|
|
12714
|
+
*/
|
|
12715
|
+
Grid: ((props: TLGridProps) => ReactNode) | null;
|
|
12716
|
+
/**
|
|
12717
|
+
* Rendered in place of the whole editor once it has thrown. `null` renders
|
|
12718
|
+
* nothing — the choice a host with its own error UI outside the canvas
|
|
12719
|
+
* wants, rather than two competing messages. Omitted uses
|
|
12720
|
+
* {@link DefaultErrorFallback}.
|
|
12721
|
+
*/
|
|
12722
|
+
ErrorFallback: ComponentType<TLErrorFallbackProps> | null;
|
|
12723
|
+
/**
|
|
12724
|
+
* Rendered in place of one shape whose body has thrown, at that shape's own
|
|
12725
|
+
* bounds. `null` leaves a hole; omitted uses
|
|
12726
|
+
* {@link DefaultShapeErrorFallback}.
|
|
12727
|
+
*/
|
|
12728
|
+
ShapeErrorFallback: ComponentType<TLErrorFallbackProps> | null;
|
|
12729
|
+
}
|
|
12730
|
+
/**
|
|
12731
|
+
* The canvas: a WebGL2 surface driven by the engine, a DOM overlay for shapes
|
|
12732
|
+
* that render through `ShapeUtil.component`, a 2D canvas overlay for shape
|
|
12733
|
+
* indicators, and an SVG layer for the selection handles, snap lines, the brush
|
|
12734
|
+
* — and for any util still on the deprecated `indicator()` hook.
|
|
12735
|
+
*/
|
|
12736
|
+
declare function Canvas(props: CanvasProps): react.JSX.Element;
|
|
12737
|
+
/**
|
|
12738
|
+
* The outline to draw over one shape: whatever its util's `indicator()`
|
|
12739
|
+
* returns, or a rectangle around the shape's geometry bounds when the util has
|
|
12740
|
+
* no indicator (or returns nothing). Both are expressed in *shape-local*
|
|
12741
|
+
* coordinates; the caller wraps them in the shape's page transform.
|
|
12742
|
+
*
|
|
12743
|
+
* Pure and exported so a custom `Indicators` component can reuse the same rule
|
|
12744
|
+
* instead of guessing at it.
|
|
12745
|
+
*
|
|
12746
|
+
* @deprecated The SVG indicator layer only draws utils still on the deprecated
|
|
12747
|
+
* `indicator()` hook. A util that implements `getIndicatorPath` is stroked on
|
|
12748
|
+
* the canvas overlay by `ShapeIndicatorCompositor` instead.
|
|
12749
|
+
*/
|
|
12750
|
+
declare function getShapeIndicatorNode<T extends UnknownShape>(util: {
|
|
12751
|
+
indicator?(shape: T): ReactNode;
|
|
12752
|
+
}, shape: T, bounds: {
|
|
12753
|
+
x: number;
|
|
12754
|
+
y: number;
|
|
12755
|
+
w: number;
|
|
12756
|
+
h: number;
|
|
12757
|
+
} | undefined): ReactNode;
|
|
12758
|
+
|
|
12759
|
+
declare const EditorContext: react.Context<Editor | null>;
|
|
12760
|
+
/** The editor of the nearest `<EditorProvider>` / `<Canvas>`. */
|
|
12761
|
+
declare function useEditor(): Editor;
|
|
12762
|
+
declare function useMaybeEditor(): Editor | null;
|
|
12763
|
+
/** Props of {@link EditorProvider}. */
|
|
12764
|
+
interface EditorProviderProps {
|
|
12765
|
+
/** The editor every `useEditor()` below this point resolves to. */
|
|
12766
|
+
editor: Editor;
|
|
12767
|
+
children?: ReactNode;
|
|
12768
|
+
}
|
|
12769
|
+
/**
|
|
12770
|
+
* Publishes an editor to the React tree.
|
|
12771
|
+
*
|
|
12772
|
+
* Takes the editor as `editor` rather than a context provider's `value`, so a
|
|
12773
|
+
* test — or an app rendering chrome outside `<Canvas>` — writes
|
|
12774
|
+
* `<EditorProvider editor={editor}>` and never has to know that a context is
|
|
12775
|
+
* what is underneath. {@link EditorContext} is still exported for the rare
|
|
12776
|
+
* caller that wants the raw provider (to publish `null`, say).
|
|
12777
|
+
*/
|
|
12778
|
+
declare function EditorProvider({ editor, children }: EditorProviderProps): react.JSX.Element;
|
|
12779
|
+
|
|
12780
|
+
interface HTMLContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
12781
|
+
children?: ReactNode;
|
|
12782
|
+
ref?: Ref<HTMLDivElement>;
|
|
12783
|
+
}
|
|
12784
|
+
/**
|
|
12785
|
+
* The DOM body of a shape. Fills the shape's bounds; anything else — size,
|
|
12786
|
+
* pointer-events, overflow, a class of your own — is set through `style` and
|
|
12787
|
+
* `className`, which are merged over the defaults rather than replacing them.
|
|
12788
|
+
*/
|
|
12789
|
+
declare function HTMLContainer({ children, className, style, ...rest }: HTMLContainerProps): react.JSX.Element;
|
|
12790
|
+
interface SVGContainerProps extends SVGAttributes<SVGSVGElement> {
|
|
12791
|
+
children?: ReactNode;
|
|
12792
|
+
ref?: Ref<SVGSVGElement>;
|
|
12793
|
+
}
|
|
12794
|
+
/**
|
|
12795
|
+
* The SVG body of a shape: an `<svg>` filling the shape's bounds, whose user
|
|
12796
|
+
* space is the shape's own local coordinate space, so a `<path>` drawn at
|
|
12797
|
+
* `(0, 0)` sits at the shape's origin at any pan, zoom or rotation.
|
|
12798
|
+
*/
|
|
12799
|
+
declare function SVGContainer({ children, className, style, ...rest }: SVGContainerProps): react.JSX.Element;
|
|
12800
|
+
/**
|
|
12801
|
+
* Stop an event travelling any further up the tree.
|
|
12802
|
+
*
|
|
12803
|
+
* The canvas listens for pointer events on its container, so a click on a
|
|
12804
|
+
* piece of chrome rendered over it — a toolbar button, a menu, a panel —
|
|
12805
|
+
* would also start a canvas interaction. Hanging this on the chrome's root
|
|
12806
|
+
* (`onPointerDown={stopEventPropagation}`) keeps the two apart.
|
|
12807
|
+
*
|
|
12808
|
+
* Typed structurally rather than against `React.SyntheticEvent` so it can be
|
|
12809
|
+
* handed to a native listener, a React handler, or a test double alike.
|
|
12810
|
+
*/
|
|
12811
|
+
declare function stopEventPropagation(event: {
|
|
12812
|
+
stopPropagation(): void;
|
|
12813
|
+
}): void;
|
|
12814
|
+
|
|
12815
|
+
/**
|
|
12816
|
+
* The bridge from the theme to CSS: the canvas container stamps the theme's
|
|
12817
|
+
* surface colours as custom properties, and everything drawn in CSS or SVG
|
|
12818
|
+
* reads them.
|
|
12819
|
+
*
|
|
12820
|
+
* Only the *surface* half of a ramp is published — the colours that belong to
|
|
12821
|
+
* the canvas rather than to any one shape. A shape's paint comes from its
|
|
12822
|
+
* style props through `getDisplayValues`, not from a variable, because a
|
|
12823
|
+
* shape is drawn on the GPU where a CSS variable means nothing.
|
|
12824
|
+
*/
|
|
12825
|
+
/**
|
|
12826
|
+
* Which theme colour each custom property carries.
|
|
12827
|
+
*
|
|
12828
|
+
* The names are the ones `ui.css` already declares and `Canvas` already reads,
|
|
12829
|
+
* so an app that themed mocanvas by overriding the variables by hand keeps
|
|
12830
|
+
* working: the theme now writes the same variables it used to have to be told.
|
|
12831
|
+
*/
|
|
12832
|
+
declare const CANVAS_THEME_VARS: {
|
|
12833
|
+
readonly "--mocanvas-selection": "selectStroke";
|
|
12834
|
+
readonly "--mocanvas-selection-fg": "background";
|
|
12835
|
+
readonly "--mocanvas-brush-fill": "selectFill";
|
|
12836
|
+
readonly "--mocanvas-brush-stroke": "selectStroke";
|
|
12837
|
+
readonly "--mocanvas-snap": "hint";
|
|
12838
|
+
readonly "--mocanvas-background": "background";
|
|
12839
|
+
readonly "--mocanvas-surface": "solid";
|
|
12840
|
+
readonly "--mocanvas-text": "text";
|
|
12841
|
+
readonly "--mocanvas-grid": "grid";
|
|
12842
|
+
};
|
|
12843
|
+
/**
|
|
12844
|
+
* The camera, as custom properties.
|
|
12845
|
+
*
|
|
12846
|
+
* Separate from the colours because these change on every zoom rather than on
|
|
12847
|
+
* a theme swap, and because they are the two variables an app most often needs
|
|
12848
|
+
* in CSS: anything drawn in the DOM over a zooming canvas has to divide by the
|
|
12849
|
+
* zoom to keep a constant on-screen size. `@mocanvas/compat` maps tldraw's
|
|
12850
|
+
* `--tl-zoom` and `--tl-scale` onto them; without them every `calc()` in a
|
|
12851
|
+
* migrated stylesheet resolved to nothing and took its whole declaration with
|
|
12852
|
+
* it.
|
|
12853
|
+
*/
|
|
12854
|
+
declare function getCameraCssVars(zoom: number): CSSProperties;
|
|
12855
|
+
/** {@link getCameraCssVars} for an editor, tracked reactively. */
|
|
12856
|
+
declare function useCameraCssVars(editor: Editor): CSSProperties;
|
|
12857
|
+
/**
|
|
12858
|
+
* The custom properties for one resolved ramp.
|
|
12859
|
+
*
|
|
12860
|
+
* SEMANTICS-ASSUMED: `--mocanvas-selection-fg` is the fill of a solid
|
|
12861
|
+
* selection handle, and is mapped to the theme's `background`. A handle is a
|
|
12862
|
+
* chip of the page punched out of the selection stroke, so it has to match the
|
|
12863
|
+
* page it sits on or it reads as a light dot on a dark canvas — which is
|
|
12864
|
+
* exactly what the hard-coded `#ffffff` did before the theme existed.
|
|
12865
|
+
*
|
|
12866
|
+
* A colour the ramp does not carry is skipped rather than written as
|
|
12867
|
+
* `undefined`, so the literal fallback in `var(--x, …)` still applies.
|
|
12868
|
+
*/
|
|
12869
|
+
declare function getThemeCssVars(colors: TLThemeColors | undefined): CSSProperties;
|
|
12870
|
+
/**
|
|
12871
|
+
* The theme's custom properties for an editor, tracked reactively — swapping a
|
|
12872
|
+
* theme or flipping to dark restamps the container without anything being
|
|
12873
|
+
* invalidated by hand.
|
|
12874
|
+
*
|
|
12875
|
+
* Takes the editor rather than reading it from context, because the element
|
|
12876
|
+
* that carries the variables is the canvas container itself: the hook runs
|
|
12877
|
+
* above the provider that would supply it. The theme manager is read
|
|
12878
|
+
* defensively for the same reason `useColorMode` does — a stand-in editor in a
|
|
12879
|
+
* chrome test has no theme at all.
|
|
12880
|
+
*/
|
|
12881
|
+
declare function useThemeCssVars(editor: Editor): CSSProperties;
|
|
12882
|
+
|
|
12883
|
+
/**
|
|
12884
|
+
* Where an app self-hosts the files the UI loads at runtime.
|
|
12885
|
+
*
|
|
12886
|
+
* mocanvas itself needs none of them — its icons are inline SVG and it ships
|
|
12887
|
+
* no translation bundles — so the map is carried, not consumed: it exists so a
|
|
12888
|
+
* component an app drops into a chrome slot can ask for the same base paths
|
|
12889
|
+
* the host configured, instead of every such component growing a prop for it.
|
|
12890
|
+
*
|
|
12891
|
+
* Kept as nested string maps rather than a fixed shape because the categories
|
|
12892
|
+
* are the app's, not ours; the four named below are only the ones a
|
|
12893
|
+
* self-hosting setup usually has.
|
|
12894
|
+
*/
|
|
12895
|
+
interface TLAssetUrls {
|
|
12896
|
+
fonts?: Readonly<Record<string, string>>;
|
|
12897
|
+
icons?: Readonly<Record<string, string>>;
|
|
12898
|
+
embedIcons?: Readonly<Record<string, string>>;
|
|
12899
|
+
translations?: Readonly<Record<string, string>>;
|
|
12900
|
+
[category: string]: Readonly<Record<string, string>> | undefined;
|
|
12901
|
+
}
|
|
12902
|
+
/**
|
|
12903
|
+
* The editor's half of the map: the fonts the canvas loads.
|
|
12904
|
+
*
|
|
12905
|
+
* A separate name from {@link TLAssetUrls} because the editor package can only
|
|
12906
|
+
* promise what it itself uses — the UI layer adds icons and translations on
|
|
12907
|
+
* top, as {@link TLUiAssetUrls}.
|
|
12908
|
+
*/
|
|
12909
|
+
interface TLEditorAssetUrls extends TLAssetUrls {
|
|
12910
|
+
fonts?: Readonly<Record<string, string>>;
|
|
12911
|
+
}
|
|
12912
|
+
/**
|
|
12913
|
+
* The UI layer's half: the icons and translation bundles a self-hosting app
|
|
12914
|
+
* serves itself.
|
|
12915
|
+
*/
|
|
12916
|
+
interface TLUiAssetUrls extends TLEditorAssetUrls {
|
|
12917
|
+
icons?: Readonly<Record<string, string>>;
|
|
12918
|
+
embedIcons?: Readonly<Record<string, string>>;
|
|
12919
|
+
translations?: Readonly<Record<string, string>>;
|
|
12920
|
+
}
|
|
12921
|
+
interface AssetUrlsProviderProps {
|
|
12922
|
+
assetUrls: TLAssetUrls;
|
|
12923
|
+
children?: ReactNode;
|
|
12924
|
+
}
|
|
12925
|
+
/** Publishes an {@link TLAssetUrls} map to everything below it. */
|
|
12926
|
+
declare function AssetUrlsProvider({ assetUrls, children }: AssetUrlsProviderProps): react.JSX.Element;
|
|
12927
|
+
/**
|
|
12928
|
+
* The asset urls the host configured. Empty outside a provider — a component
|
|
12929
|
+
* that needs a file should fall back to its own default rather than fail,
|
|
12930
|
+
* because most mounts configure nothing at all.
|
|
12931
|
+
*/
|
|
12932
|
+
declare function useAssetUrls(): TLAssetUrls;
|
|
12933
|
+
|
|
12934
|
+
/**
|
|
12935
|
+
* Resolving a UI string id through an app's `TLUiOverrides.translations`.
|
|
12936
|
+
*
|
|
12937
|
+
* Kept apart from the React context so the lookup rule can be tested — and
|
|
12938
|
+
* reused by an app's own chrome — without rendering anything.
|
|
12939
|
+
*/
|
|
12940
|
+
/**
|
|
12941
|
+
* The locales to try, most specific first: the locale itself, its base
|
|
12942
|
+
* language, then English.
|
|
12943
|
+
*
|
|
12820
12944
|
* SEMANTICS-ASSUMED: the base-language step is not pinned by any call site
|
|
12821
12945
|
* (the consumer registers a single `en` map). It is included because the
|
|
12822
12946
|
* alternative — `cs-CZ` silently missing every string a `cs` dictionary has —
|
|
@@ -12926,105 +13050,6 @@ declare function useIsEditing(shapeId?: ShapeId): boolean;
|
|
|
12926
13050
|
*/
|
|
12927
13051
|
declare function useGlobalMenuIsOpen(id: string, onChange?: (isOpen: boolean) => void): readonly [boolean, (next: boolean) => void];
|
|
12928
13052
|
|
|
12929
|
-
/**
|
|
12930
|
-
* Failure containment for the editor's React tree.
|
|
12931
|
-
*
|
|
12932
|
-
* One badly-behaved shape component should cost you that shape, not the
|
|
12933
|
-
* document: `<Canvas>` wraps each shape body in a boundary of its own, and the
|
|
12934
|
-
* editor as a whole is wrapped in another. Without this, a `TypeError` inside
|
|
12935
|
-
* one custom `ShapeUtil.component` unmounts the whole editor and the user
|
|
12936
|
-
* loses the canvas.
|
|
12937
|
-
*/
|
|
12938
|
-
interface TLErrorFallbackProps {
|
|
12939
|
-
/** What was thrown. Not necessarily an `Error`. */
|
|
12940
|
-
error: unknown;
|
|
12941
|
-
/** Re-mount the subtree. Undefined when the boundary was told not to retry. */
|
|
12942
|
-
resetError?(): void;
|
|
12943
|
-
}
|
|
12944
|
-
interface TLErrorBoundaryProps {
|
|
12945
|
-
children: ReactNode;
|
|
12946
|
-
/** Rendered in place of the subtree once it has thrown. */
|
|
12947
|
-
fallback: (props: TLErrorFallbackProps) => ReactNode;
|
|
12948
|
-
/** Reported to the host app: logging, error tracking. */
|
|
12949
|
-
onError?(error: unknown, info?: ErrorInfo): void;
|
|
12950
|
-
}
|
|
12951
|
-
/** The pre-`TL` spelling of {@link TLErrorBoundaryProps}. The same type. */
|
|
12952
|
-
type ErrorBoundaryProps = TLErrorBoundaryProps;
|
|
12953
|
-
/**
|
|
12954
|
-
* A replacement for the editor-wide error screen, or `null` to render nothing
|
|
12955
|
-
* at all.
|
|
12956
|
-
*
|
|
12957
|
-
* `null` is a real choice, not an oversight: a host that shows its own error UI
|
|
12958
|
-
* outside the canvas wants the editor to fail silently rather than to draw a
|
|
12959
|
-
* second, competing message.
|
|
12960
|
-
*/
|
|
12961
|
-
type TLErrorFallbackComponent = ComponentType<TLErrorFallbackProps> | null;
|
|
12962
|
-
/**
|
|
12963
|
-
* A replacement for the fallback drawn in place of a single broken shape, or
|
|
12964
|
-
* `null` to draw nothing.
|
|
12965
|
-
*
|
|
12966
|
-
* Separate from {@link TLErrorFallbackComponent} because the situations are not
|
|
12967
|
-
* comparable: one shape failing should cost that shape, and the fallback is
|
|
12968
|
-
* drawn *in the canvas*, at the shape's position, where a whole error screen
|
|
12969
|
-
* would be absurd.
|
|
12970
|
-
*/
|
|
12971
|
-
type TLShapeErrorFallbackComponent = ComponentType<{
|
|
12972
|
-
error: unknown;
|
|
12973
|
-
}> | null;
|
|
12974
|
-
interface ErrorBoundaryState {
|
|
12975
|
-
error: unknown;
|
|
12976
|
-
hasError: boolean;
|
|
12977
|
-
}
|
|
12978
|
-
/**
|
|
12979
|
-
* Catches a render-time throw in its subtree and renders `fallback` instead.
|
|
12980
|
-
*
|
|
12981
|
-
* Class component because that is the only form React gives an error boundary;
|
|
12982
|
-
* there is no hook equivalent.
|
|
12983
|
-
*/
|
|
12984
|
-
declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
12985
|
-
state: ErrorBoundaryState;
|
|
12986
|
-
static getDerivedStateFromError(error: unknown): ErrorBoundaryState;
|
|
12987
|
-
componentDidCatch(error: unknown, info: ErrorInfo): void;
|
|
12988
|
-
private readonly resetError;
|
|
12989
|
-
render(): ReactNode;
|
|
12990
|
-
}
|
|
12991
|
-
/**
|
|
12992
|
-
* What an unhandled error looks like when nothing better is configured: the
|
|
12993
|
-
* message, and a button that re-mounts the subtree.
|
|
12994
|
-
*
|
|
12995
|
-
* Deliberately plain and self-contained — it must render correctly when the
|
|
12996
|
-
* failure is in the very stylesheet or provider the rest of the chrome needs.
|
|
12997
|
-
*/
|
|
12998
|
-
declare function DefaultErrorFallback({ error, resetError }: TLErrorFallbackProps): react.JSX.Element;
|
|
12999
|
-
interface ErrorScreenProps {
|
|
13000
|
-
children?: ReactNode;
|
|
13001
|
-
}
|
|
13002
|
-
/**
|
|
13003
|
-
* A full-bleed error surface, for a failure that happened before there was an
|
|
13004
|
-
* editor to put a fallback inside of — a store that would not load, a schema
|
|
13005
|
-
* that would not migrate.
|
|
13006
|
-
*/
|
|
13007
|
-
declare function ErrorScreen({ children }: ErrorScreenProps): react.JSX.Element;
|
|
13008
|
-
/**
|
|
13009
|
-
* The indeterminate progress mark, sized to the text around it.
|
|
13010
|
-
*
|
|
13011
|
-
* Uses SMIL rather than a CSS keyframe so it also animates when the editor is
|
|
13012
|
-
* mounted without `ui.css` — the case a loading screen is most likely to hit,
|
|
13013
|
-
* since it is on screen before anything else has been set up.
|
|
13014
|
-
*/
|
|
13015
|
-
declare function DefaultSpinner(): react.JSX.Element;
|
|
13016
|
-
interface LoadingScreenProps {
|
|
13017
|
-
children?: ReactNode;
|
|
13018
|
-
}
|
|
13019
|
-
/**
|
|
13020
|
-
* What is on screen while the editor's store and engine are still coming up.
|
|
13021
|
-
*
|
|
13022
|
-
* Occupies the editor's whole box so the layout does not jump when the canvas
|
|
13023
|
-
* replaces it, and is labelled as a live region so a screen reader is told
|
|
13024
|
-
* that something is loading rather than that the page is empty.
|
|
13025
|
-
*/
|
|
13026
|
-
declare function LoadingScreen({ children }: LoadingScreenProps): react.JSX.Element;
|
|
13027
|
-
|
|
13028
13053
|
interface ContainerProviderProps {
|
|
13029
13054
|
container: HTMLElement;
|
|
13030
13055
|
children?: ReactNode;
|
|
@@ -13108,6 +13133,16 @@ declare function DefaultBackground(): react.JSX.Element;
|
|
|
13108
13133
|
* zooms away, because a grid finer than a few screen pixels is noise.
|
|
13109
13134
|
*/
|
|
13110
13135
|
declare function DefaultGrid({ x, y, z, size }: TLGridProps): react.JSX.Element;
|
|
13136
|
+
/**
|
|
13137
|
+
* Drawn in place of one shape whose body threw.
|
|
13138
|
+
*
|
|
13139
|
+
* At the shape's own position and size, because that is where the user is
|
|
13140
|
+
* looking — and quiet, because a page of thirty broken shapes should not be
|
|
13141
|
+
* thirty alarms. The point is that the other twenty-nine still work.
|
|
13142
|
+
*/
|
|
13143
|
+
declare function DefaultShapeErrorFallback({ error }: {
|
|
13144
|
+
error: unknown;
|
|
13145
|
+
}): react.JSX.Element;
|
|
13111
13146
|
/**
|
|
13112
13147
|
* The document-level `<defs>`: the one place a shape can put a gradient,
|
|
13113
13148
|
* filter or marker that every instance of it shares.
|
|
@@ -14069,4 +14104,4 @@ declare function setDefaultCdnBaseUrl(url: string): void;
|
|
|
14069
14104
|
/** Forget every asset id in `ids`. Exported for stores that batch their deletes. */
|
|
14070
14105
|
type AssetIdList = readonly AssetId[];
|
|
14071
14106
|
|
|
14072
|
-
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, 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 };
|
|
14107
|
+
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, 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, 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 };
|