@mocanvas/editor 4.0.2 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +8 -2
- package/MIGRATION.md +48 -22
- package/README.md +5 -0
- package/UI.md +24 -2
- package/dist/index.d.ts +322 -41
- package/dist/index.js +449 -153
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1838,6 +1838,28 @@ interface Page {
|
|
|
1838
1838
|
}
|
|
1839
1839
|
type PageId = RecordId<Page>;
|
|
1840
1840
|
declare const PageRecordType: _mocanvas_store.RecordType<Page, "name" | "index">;
|
|
1841
|
+
/**
|
|
1842
|
+
* The id of an empty document's first page.
|
|
1843
|
+
*
|
|
1844
|
+
* A fixed id rather than a fresh one, so two replicas that each seeded their
|
|
1845
|
+
* own store still meet on the same page. Lives here beside {@link DOCUMENT_ID}
|
|
1846
|
+
* because `createStore` seeds both and must not import the editor to do it.
|
|
1847
|
+
*/
|
|
1848
|
+
declare const DEFAULT_PAGE_ID: PageId;
|
|
1849
|
+
/**
|
|
1850
|
+
* The index a blank document's first page gets.
|
|
1851
|
+
*
|
|
1852
|
+
* `a1`, not `ZERO_INDEX_KEY` — every `.tldr` written by tldraw puts its first
|
|
1853
|
+
* page at `a1`, including the reference fixture this project compares against,
|
|
1854
|
+
* and a page seeded at `a0` sorts before all of them. With a single page that
|
|
1855
|
+
* is invisible; it shows up the moment two documents are merged or synced.
|
|
1856
|
+
*
|
|
1857
|
+
* This is deliberately only about the SEEDED page. The index helpers still
|
|
1858
|
+
* start at `ZERO_INDEX_KEY` and are internally consistent with each other;
|
|
1859
|
+
* reconciling the generator itself with tldraw's first key is a change to how
|
|
1860
|
+
* every index is allocated and does not belong here.
|
|
1861
|
+
*/
|
|
1862
|
+
declare const FIRST_PAGE_INDEX: IndexKey;
|
|
1841
1863
|
/** Whether `record` is a page record. Narrows to {@link Page}. */
|
|
1842
1864
|
declare function isPage(record: {
|
|
1843
1865
|
typeName?: string;
|
|
@@ -2140,6 +2162,11 @@ interface EditorEvents {
|
|
|
2140
2162
|
}) => void;
|
|
2141
2163
|
"stop-camera-animation": () => void;
|
|
2142
2164
|
"stop-following": () => void;
|
|
2165
|
+
/**
|
|
2166
|
+
* Shapes were deleted. Carries every id removed, descendants included.
|
|
2167
|
+
* See {@link TLEventMap} for the full contract.
|
|
2168
|
+
*/
|
|
2169
|
+
"deleted-shapes": (ids: ShapeId[]) => void;
|
|
2143
2170
|
}
|
|
2144
2171
|
/** Minimal typed event emitter. */
|
|
2145
2172
|
declare class EventEmitter<Events extends {
|
|
@@ -2442,7 +2469,7 @@ type BindingPartial<B extends UnknownBinding = UnknownBinding> = {
|
|
|
2442
2469
|
interface BindingUtilConstructor<B extends UnknownBinding = UnknownBinding, U extends BindingUtil<B> = BindingUtil<B>> {
|
|
2443
2470
|
new (editor: Editor): U;
|
|
2444
2471
|
type: B["type"];
|
|
2445
|
-
props?:
|
|
2472
|
+
props?: UnknownRecordProps;
|
|
2446
2473
|
migrations?: unknown;
|
|
2447
2474
|
}
|
|
2448
2475
|
/**
|
|
@@ -2503,7 +2530,13 @@ interface BindingOnDeleteOptions<B extends UnknownBinding> {
|
|
|
2503
2530
|
declare abstract class BindingUtil<B extends UnknownBinding = UnknownBinding> {
|
|
2504
2531
|
readonly editor: Editor;
|
|
2505
2532
|
static type: string;
|
|
2506
|
-
|
|
2533
|
+
/**
|
|
2534
|
+
* One validator per prop of the binding this util describes — the contract
|
|
2535
|
+
* the store checks a record against before it is written, and what
|
|
2536
|
+
* `createSchema()` reads to build the document schema. A binding type that
|
|
2537
|
+
* declares none is not validated: see `createBindingRecordType`.
|
|
2538
|
+
*/
|
|
2539
|
+
static props?: UnknownRecordProps;
|
|
2507
2540
|
static migrations?: unknown;
|
|
2508
2541
|
constructor(editor: Editor);
|
|
2509
2542
|
get type(): B["type"];
|
|
@@ -4016,6 +4049,38 @@ interface UserPreferencesInit {
|
|
|
4016
4049
|
*/
|
|
4017
4050
|
declare function createUserPreferences(init?: UserPreferencesInit): UserPreferences;
|
|
4018
4051
|
|
|
4052
|
+
/**
|
|
4053
|
+
* Turning the `static props` maps of a set of utils into record types that
|
|
4054
|
+
* actually validate.
|
|
4055
|
+
*
|
|
4056
|
+
* Shapes and bindings all share one `typeName`, so the store's type map gets a
|
|
4057
|
+
* single entry for each and the entry has to dispatch on the record's own
|
|
4058
|
+
* `type`. That is the same arrangement `createCustomRecordTypeMap` uses for
|
|
4059
|
+
* custom records, and for the same reason: one shared validator could not tell
|
|
4060
|
+
* a `geo` from an `arrow`.
|
|
4061
|
+
*
|
|
4062
|
+
* **Props the map does not declare are kept, not rejected.** `createShapeValidator`
|
|
4063
|
+
* on its own refuses them, which is right for a record an app is making; but a
|
|
4064
|
+
* record the store is *holding* may have come out of a `.tldr` written by a
|
|
4065
|
+
* newer generation of the format, and dropping what this build does not
|
|
4066
|
+
* recognise would lose it on the next save. The declared props are still
|
|
4067
|
+
* checked. See `UnknownPropsPolicy`.
|
|
4068
|
+
*
|
|
4069
|
+
* **A type with no declared props is passed through.** Shapes of a type this
|
|
4070
|
+
* build has never heard of — one an app registered in a newer version, one
|
|
4071
|
+
* whose util was not passed to this editor — must survive a load/save round
|
|
4072
|
+
* trip rather than be deleted on the next save. That is the policy
|
|
4073
|
+
* `StoreSchema.validateRecord`, `T.union().validateUnknownVariants` and
|
|
4074
|
+
* `normalizeLoadedRecords` already state; declaring props is what opts a type
|
|
4075
|
+
* into being checked.
|
|
4076
|
+
*/
|
|
4077
|
+
|
|
4078
|
+
/** What this module needs to know about one util: its type and its props. */
|
|
4079
|
+
interface PropsSource {
|
|
4080
|
+
readonly type: string;
|
|
4081
|
+
readonly props?: UnknownRecordProps | undefined;
|
|
4082
|
+
}
|
|
4083
|
+
|
|
4019
4084
|
/**
|
|
4020
4085
|
* Custom record types: how an app puts data of its own in the document store.
|
|
4021
4086
|
*
|
|
@@ -4202,6 +4267,12 @@ declare function validateCustomRecordInfos(records: Readonly<Record<string, Cust
|
|
|
4202
4267
|
*/
|
|
4203
4268
|
declare function createCustomRecordTypeMap(records: Readonly<Record<string, CustomRecordInfo<string>>> | undefined): RecordType<UnknownCustomRecord, any>;
|
|
4204
4269
|
|
|
4270
|
+
/**
|
|
4271
|
+
* A util as the schema reads it: a type name, its `static props` (what the
|
|
4272
|
+
* records of that type are validated against) and its `static migrations`. A
|
|
4273
|
+
* `ShapeUtil` or `BindingUtil` subclass satisfies this through its statics.
|
|
4274
|
+
*/
|
|
4275
|
+
type SchemaUtilSource = PropsMigrationSource & PropsSource;
|
|
4205
4276
|
/** The schema an editor store is built on. */
|
|
4206
4277
|
type TLSchema = StoreSchema<EditorRecord, EditorStoreProps>;
|
|
4207
4278
|
/** The props an editor store carries. */
|
|
@@ -4231,9 +4302,9 @@ interface CreateStoreOptions {
|
|
|
4231
4302
|
* are collected into the schema, so a board persisted before a prop existed
|
|
4232
4303
|
* is backfilled on load. Pass the same list you give the editor.
|
|
4233
4304
|
*/
|
|
4234
|
-
shapeUtils?: readonly
|
|
4305
|
+
shapeUtils?: readonly SchemaUtilSource[];
|
|
4235
4306
|
/** Binding utils, for the same reason as `shapeUtils`. */
|
|
4236
|
-
bindingUtils?: readonly
|
|
4307
|
+
bindingUtils?: readonly SchemaUtilSource[];
|
|
4237
4308
|
/**
|
|
4238
4309
|
* Custom record types this document may contain, beyond shapes and bindings —
|
|
4239
4310
|
* an app's own top-level entities. Each contributes a record type and its
|
|
@@ -4252,6 +4323,20 @@ interface CreateStoreOptions {
|
|
|
4252
4323
|
* in-memory store.
|
|
4253
4324
|
*/
|
|
4254
4325
|
assets?: AssetStore;
|
|
4326
|
+
/**
|
|
4327
|
+
* Give a brand new store its document and first page. Defaults to `true`.
|
|
4328
|
+
*
|
|
4329
|
+
* The seeded page uses {@link DEFAULT_PAGE_ID} at {@link FIRST_PAGE_INDEX},
|
|
4330
|
+
* so two replicas that each built their own store meet on one page. Turn it
|
|
4331
|
+
* OFF when the caller owns the document structure and will put its own page
|
|
4332
|
+
* in afterwards — a headless pipeline, a fold that replays records, a test
|
|
4333
|
+
* that builds a fixture by hand. Leaving it on there gives the store *two*
|
|
4334
|
+
* pages at the same index, and equal indices have no defined order.
|
|
4335
|
+
*
|
|
4336
|
+
* Already off, without asking, whenever `initialData` or `snapshot` is
|
|
4337
|
+
* supplied: those bring their own pages.
|
|
4338
|
+
*/
|
|
4339
|
+
seed?: boolean;
|
|
4255
4340
|
}
|
|
4256
4341
|
/**
|
|
4257
4342
|
* Build the editor's schema.
|
|
@@ -4428,6 +4513,14 @@ interface UserPreferencesState {
|
|
|
4428
4513
|
isPasteAtCursorMode?: boolean;
|
|
4429
4514
|
/** Whether keyboard shortcuts are active. */
|
|
4430
4515
|
areKeyboardShortcutsEnabled?: boolean;
|
|
4516
|
+
/**
|
|
4517
|
+
* Announce more than the minimum to a screen reader.
|
|
4518
|
+
*
|
|
4519
|
+
* The plain announcement names the selection and nothing else ("rectangle
|
|
4520
|
+
* selected"); with this on it also carries position and size, which is what a
|
|
4521
|
+
* keyboard user otherwise has no way to read back.
|
|
4522
|
+
*/
|
|
4523
|
+
isEnhancedA11yMode?: boolean;
|
|
4431
4524
|
}
|
|
4432
4525
|
/** What every unset preference resolves to. */
|
|
4433
4526
|
declare const USER_PREFERENCES_DEFAULTS: {
|
|
@@ -4441,6 +4534,7 @@ declare const USER_PREFERENCES_DEFAULTS: {
|
|
|
4441
4534
|
readonly isDynamicSizeMode: false;
|
|
4442
4535
|
readonly isPasteAtCursorMode: false;
|
|
4443
4536
|
readonly areKeyboardShortcutsEnabled: true;
|
|
4537
|
+
readonly isEnhancedA11yMode: false;
|
|
4444
4538
|
};
|
|
4445
4539
|
/**
|
|
4446
4540
|
* Mint a brand new set of preferences: a fresh id and a presence colour, and
|
|
@@ -4499,6 +4593,15 @@ declare class UserPreferencesManager {
|
|
|
4499
4593
|
getColor(): string;
|
|
4500
4594
|
setColor(color: string): void;
|
|
4501
4595
|
getLocale(): string;
|
|
4596
|
+
/**
|
|
4597
|
+
* How fast the editor animates; `0` means "do not animate".
|
|
4598
|
+
*
|
|
4599
|
+
* A user who has expressed no preference inherits the operating system's,
|
|
4600
|
+
* the same way `colorScheme: "system"` does. Reduced motion is an
|
|
4601
|
+
* accessibility setting people set once, for every application, and an
|
|
4602
|
+
* editor that ignored it until it was told a second time would be reading
|
|
4603
|
+
* the setting and then disregarding it.
|
|
4604
|
+
*/
|
|
4502
4605
|
getAnimationSpeed(): number;
|
|
4503
4606
|
getEdgeScrollSpeed(): number;
|
|
4504
4607
|
getIsSnapMode(): boolean;
|
|
@@ -4511,6 +4614,7 @@ declare class UserPreferencesManager {
|
|
|
4511
4614
|
*/
|
|
4512
4615
|
getIsDynamicResizeMode(): boolean;
|
|
4513
4616
|
getIsPasteAtCursorMode(): boolean;
|
|
4617
|
+
getIsEnhancedA11yMode(): boolean;
|
|
4514
4618
|
getAreKeyboardShortcutsEnabled(): boolean;
|
|
4515
4619
|
/** The scheme actually in force: the user's, else the editor's, else `"system"`. */
|
|
4516
4620
|
getColorScheme(): ColorScheme;
|
|
@@ -4675,6 +4779,7 @@ declare const defaultUserPreferences: {
|
|
|
4675
4779
|
readonly isDynamicSizeMode: false;
|
|
4676
4780
|
readonly isPasteAtCursorMode: false;
|
|
4677
4781
|
readonly areKeyboardShortcutsEnabled: true;
|
|
4782
|
+
readonly isEnhancedA11yMode: false;
|
|
4678
4783
|
};
|
|
4679
4784
|
/**
|
|
4680
4785
|
* Validates a stored preferences object.
|
|
@@ -6717,6 +6822,17 @@ declare class ScribbleManager extends EditorManager {
|
|
|
6717
6822
|
* it has run out. Scribbles that have shed everything are removed.
|
|
6718
6823
|
*/
|
|
6719
6824
|
tick(elapsed: number): void;
|
|
6825
|
+
/**
|
|
6826
|
+
* Whether anything here still needs frames.
|
|
6827
|
+
*
|
|
6828
|
+
* A host's frame loop asks this to decide whether to schedule another one. It
|
|
6829
|
+
* is deliberately "is there a scribble at all" rather than "is there anything
|
|
6830
|
+
* visible to redraw": a point offered through {@link addPoint} is held in
|
|
6831
|
+
* `next` and writes nothing to the store, so a loop that parked itself
|
|
6832
|
+
* because the picture had settled would never wake up to commit it, and the
|
|
6833
|
+
* trail would stop dead under a moving pointer.
|
|
6834
|
+
*/
|
|
6835
|
+
hasPendingWork(): boolean;
|
|
6720
6836
|
/** Every live scribble, in the order they were started. */
|
|
6721
6837
|
getItems(): ScribbleItem[];
|
|
6722
6838
|
/** Mirror the current scribbles into the `instance` record. */
|
|
@@ -6955,8 +7071,30 @@ declare abstract class OverlayUtil<H extends OverlayHost = OverlayHost, O extend
|
|
|
6955
7071
|
get type(): string;
|
|
6956
7072
|
/** This util's options, read off the class it was constructed from. */
|
|
6957
7073
|
get options(): O;
|
|
6958
|
-
/**
|
|
6959
|
-
|
|
7074
|
+
/**
|
|
7075
|
+
* Paint this overlay. Implementations must leave `ctx` in the state they
|
|
7076
|
+
* found it.
|
|
7077
|
+
*
|
|
7078
|
+
* `overlays` is what {@link getOverlays} returned this frame, handed over so
|
|
7079
|
+
* a subclass can paint a subset and delegate the rest:
|
|
7080
|
+
*
|
|
7081
|
+
* ```ts
|
|
7082
|
+
* override render(ctx: CanvasRenderingContext2D, overlays = this.getOverlays()) {
|
|
7083
|
+
* const [mine, theirs] = partition(overlays, isMine)
|
|
7084
|
+
* this.paintMine(ctx, mine)
|
|
7085
|
+
* super.render(ctx, theirs)
|
|
7086
|
+
* }
|
|
7087
|
+
* ```
|
|
7088
|
+
*
|
|
7089
|
+
* Without it the only way to narrow what gets painted was to override
|
|
7090
|
+
* `getOverlays()` — which also narrows what hit-testing, the cursor lookup
|
|
7091
|
+
* and `onPointerDown` see, for every caller and not just the painter.
|
|
7092
|
+
*
|
|
7093
|
+
* A util that ignores the parameter is unaffected: a one-argument `render`
|
|
7094
|
+
* still satisfies this signature, and the manager passes what it already
|
|
7095
|
+
* computed either way.
|
|
7096
|
+
*/
|
|
7097
|
+
abstract render(ctx: CanvasRenderingContext2D, overlays?: OverlayLike[]): void;
|
|
6960
7098
|
/**
|
|
6961
7099
|
* Whether this util has anything to contribute this frame. A util that does
|
|
6962
7100
|
* not implement it is always active.
|
|
@@ -7419,6 +7557,16 @@ interface TLEventMap {
|
|
|
7419
7557
|
pageId: string;
|
|
7420
7558
|
count: number;
|
|
7421
7559
|
}];
|
|
7560
|
+
/**
|
|
7561
|
+
* Shapes were deleted, with every id that went — descendants included, since
|
|
7562
|
+
* deleting a frame or a group takes its children with it and a listener
|
|
7563
|
+
* cleaning up per-shape state needs all of them.
|
|
7564
|
+
*
|
|
7565
|
+
* Fires once per `deleteShapes` call, after the removal, and only when
|
|
7566
|
+
* something was actually removed: a call naming a locked or missing shape
|
|
7567
|
+
* deletes nothing and emits nothing.
|
|
7568
|
+
*/
|
|
7569
|
+
"deleted-shapes": [ids: ShapeId[]];
|
|
7422
7570
|
}
|
|
7423
7571
|
/** A handler for one entry of {@link TLEventMap}. */
|
|
7424
7572
|
type TLEventMapHandler<T extends keyof TLEventMap> = (...args: TLEventMap[T]) => void;
|
|
@@ -8093,6 +8241,18 @@ interface HitTestOptions {
|
|
|
8093
8241
|
hitInside?: boolean;
|
|
8094
8242
|
hitLocked?: boolean;
|
|
8095
8243
|
hitFrameInside?: boolean;
|
|
8244
|
+
/**
|
|
8245
|
+
* Only consider shapes the viewport is currently rendering.
|
|
8246
|
+
*
|
|
8247
|
+
* A large page culls most of its shapes, and for a pointer gesture "off
|
|
8248
|
+
* screen" and "not hit" are the same answer — so this makes the hit test
|
|
8249
|
+
* cost proportional to what is visible rather than to the document.
|
|
8250
|
+
*
|
|
8251
|
+
* Off by default: a programmatic query ("what is at this page point?") is
|
|
8252
|
+
* usually asked about the document, not about the viewport, and an answer
|
|
8253
|
+
* that changed with the scroll position would be surprising.
|
|
8254
|
+
*/
|
|
8255
|
+
renderingOnly?: boolean;
|
|
8096
8256
|
filter?: (shape: UnknownShape) => boolean;
|
|
8097
8257
|
}
|
|
8098
8258
|
/**
|
|
@@ -8104,6 +8264,15 @@ interface HitTestOptions {
|
|
|
8104
8264
|
* heartbeat existing to survive exactly this cut-off.
|
|
8105
8265
|
*/
|
|
8106
8266
|
declare const COLLABORATOR_INACTIVE_TIMEOUT = 60000;
|
|
8267
|
+
|
|
8268
|
+
/**
|
|
8269
|
+
* Say something, once, about a mistake the library can see but cannot fix.
|
|
8270
|
+
*
|
|
8271
|
+
* Development only: a shipped bundle should not pay for the string, and a
|
|
8272
|
+
* production log is not where this reaches anyone. `process` may not exist at
|
|
8273
|
+
* all in a raw-ESM browser page, hence the guard rather than a bare read.
|
|
8274
|
+
*/
|
|
8275
|
+
declare function warnOnce(key: string, message: string): void;
|
|
8107
8276
|
/**
|
|
8108
8277
|
* The editor: document access, selection, camera, tool dispatch, and the
|
|
8109
8278
|
* bridge that mirrors the current page into the WASM engine.
|
|
@@ -8202,6 +8371,20 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
8202
8371
|
private richTextEditor;
|
|
8203
8372
|
/** Tools added or removed after construction, by id. */
|
|
8204
8373
|
private readonly removedToolIds;
|
|
8374
|
+
/**
|
|
8375
|
+
* This editor's own presence identity. See {@link getInstancePresenceId}.
|
|
8376
|
+
*
|
|
8377
|
+
* Minted per editor rather than per user: presence is about an *instance*,
|
|
8378
|
+
* and one person may have several.
|
|
8379
|
+
*/
|
|
8380
|
+
private readonly _instancePresenceId;
|
|
8381
|
+
/**
|
|
8382
|
+
* A {@link zoomToBounds} that arrived before the container had been measured,
|
|
8383
|
+
* waiting for the first non-empty viewport. See {@link zoomToBounds}.
|
|
8384
|
+
*/
|
|
8385
|
+
private pendingViewportFit;
|
|
8386
|
+
/** Whether a host has ever measured the canvas. See {@link getHasMeasuredViewport}. */
|
|
8387
|
+
private hasMeasuredViewport;
|
|
8205
8388
|
constructor(opts: EditorOptions);
|
|
8206
8389
|
dispose(): void;
|
|
8207
8390
|
getIsDisposed(): boolean;
|
|
@@ -8427,6 +8610,13 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
8427
8610
|
* the canvas than a cursor and needs the larger target.
|
|
8428
8611
|
*/
|
|
8429
8612
|
getHitTestMargin(): number;
|
|
8613
|
+
/**
|
|
8614
|
+
* `opts.filter` with `renderingOnly` folded in.
|
|
8615
|
+
*
|
|
8616
|
+
* Returned as one predicate so each query applies both in the same place;
|
|
8617
|
+
* the culled set is read once per call rather than per candidate shape.
|
|
8618
|
+
*/
|
|
8619
|
+
private hitFilter;
|
|
8430
8620
|
private hitFilterBits;
|
|
8431
8621
|
/**
|
|
8432
8622
|
* The outline a shape is *drawn* with when the hand-drawn style is on, as path
|
|
@@ -8639,6 +8829,17 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
8639
8829
|
*/
|
|
8640
8830
|
getResizeScaleFactor(): number;
|
|
8641
8831
|
getViewportScreenBounds(): Box;
|
|
8832
|
+
/**
|
|
8833
|
+
* Whether a host has ever told us how big the canvas is
|
|
8834
|
+
* ({@link updateViewportScreenBounds}).
|
|
8835
|
+
*
|
|
8836
|
+
* Until it has, {@link getViewportScreenBounds} answers with the instance
|
|
8837
|
+
* record's default — a plausible-looking 1080x720 that is not this canvas —
|
|
8838
|
+
* or with zeros once a container that has not been laid out yet has been
|
|
8839
|
+
* measured. Both are wrong in the same way and neither announces itself,
|
|
8840
|
+
* which is why anything that needs the viewport asks this first.
|
|
8841
|
+
*/
|
|
8842
|
+
getHasMeasuredViewport(): boolean;
|
|
8642
8843
|
getViewportScreenCenter(): Vec;
|
|
8643
8844
|
getViewportPageBounds(): Box;
|
|
8644
8845
|
getViewportPageCenter(): Vec;
|
|
@@ -8803,7 +9004,30 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
8803
9004
|
* dynamic-size mode. Session-only, never persisted with the document.
|
|
8804
9005
|
*/
|
|
8805
9006
|
readonly user: UserPreferencesManager;
|
|
8806
|
-
/**
|
|
9007
|
+
/**
|
|
9008
|
+
* This editor instance's presence record id — who *this tab* is, as opposed
|
|
9009
|
+
* to `user.getId()`, which is who the person is.
|
|
9010
|
+
*
|
|
9011
|
+
* The two are not interchangeable and conflating them was a bug: a user id
|
|
9012
|
+
* is per browser (it is the same in every tab, and the same on a phone and a
|
|
9013
|
+
* laptop signed in as one person), while a presence record is per editor
|
|
9014
|
+
* instance. Two tabs of one browser are two presences of one user, and they
|
|
9015
|
+
* must see each other.
|
|
9016
|
+
*
|
|
9017
|
+
* `@mocanvas/sync` publishes this tab's presence record under this id, which
|
|
9018
|
+
* is what lets {@link getCollaborators} drop our own record — and only our
|
|
9019
|
+
* own record — should it ever come back to us.
|
|
9020
|
+
*/
|
|
9021
|
+
getInstancePresenceId(): InstancePresenceId;
|
|
9022
|
+
/**
|
|
9023
|
+
* Presence records of everyone else in the room, in arrival order.
|
|
9024
|
+
*
|
|
9025
|
+
* "Else" means *another instance*, not another person: the filter is on the
|
|
9026
|
+
* presence record id ({@link getInstancePresenceId}), so a second tab, a
|
|
9027
|
+
* second window, or the same person on a phone and a laptop all show up as
|
|
9028
|
+
* collaborators. Filtering by user id instead made two tabs of one browser
|
|
9029
|
+
* invisible to each other while every message arrived correctly.
|
|
9030
|
+
*/
|
|
8807
9031
|
getCollaborators(): InstancePresence[];
|
|
8808
9032
|
/** The subset of `getCollaborators()` looking at the page we are on. */
|
|
8809
9033
|
getCollaboratorsOnCurrentPage(): InstancePresence[];
|
|
@@ -10357,13 +10581,18 @@ interface UserSchemaInfo {
|
|
|
10357
10581
|
}
|
|
10358
10582
|
|
|
10359
10583
|
/**
|
|
10360
|
-
*
|
|
10361
|
-
*
|
|
10584
|
+
* The registry the package that owns the built-in shapes, bindings and assets
|
|
10585
|
+
* fills in at import time.
|
|
10362
10586
|
*
|
|
10363
|
-
*
|
|
10364
|
-
*
|
|
10365
|
-
*
|
|
10366
|
-
*
|
|
10587
|
+
* `@mocanvas/editor` ships no shape types of its own — the built-ins live in
|
|
10588
|
+
* the flagship, which is the whole point of the split — so it cannot name their
|
|
10589
|
+
* props. The flagship registers them here when it is imported, and
|
|
10590
|
+
* `createSchema()` reads the registry so a `geo` record is validated against
|
|
10591
|
+
* `geoShapeProps` even when the caller passed no util lists at all.
|
|
10592
|
+
*
|
|
10593
|
+
* The state lives in this module rather than in `../editor/schemaFactories`, so
|
|
10594
|
+
* that `createSchema` can read it without importing the module that imports
|
|
10595
|
+
* `createSchema`. `schemaFactories` re-exports the public names.
|
|
10367
10596
|
*/
|
|
10368
10597
|
|
|
10369
10598
|
/** The type-keyed maps the registries below hold. */
|
|
@@ -10371,11 +10600,9 @@ type SchemaPropsInfoMap = Record<string, SchemaPropsInfo>;
|
|
|
10371
10600
|
/**
|
|
10372
10601
|
* The props and migrations of the built-in *shape* types.
|
|
10373
10602
|
*
|
|
10374
|
-
*
|
|
10375
|
-
*
|
|
10376
|
-
*
|
|
10377
|
-
* before that package has been imported correctly yields nothing: there are no
|
|
10378
|
-
* built-in shapes in an editor built on this package alone.
|
|
10603
|
+
* Reading it before the package that owns them has been imported correctly
|
|
10604
|
+
* yields nothing: there are no built-in shapes in an editor built on
|
|
10605
|
+
* `@mocanvas/editor` alone.
|
|
10379
10606
|
*/
|
|
10380
10607
|
declare const defaultShapeSchemas: Readonly<SchemaPropsInfoMap>;
|
|
10381
10608
|
/** The props and migrations of the built-in *binding* types. See {@link defaultShapeSchemas}. */
|
|
@@ -10388,6 +10615,17 @@ declare function registerDefaultShapeSchema(type: string, info: SchemaPropsInfo)
|
|
|
10388
10615
|
declare function registerDefaultBindingSchema(type: string, info: SchemaPropsInfo): () => void;
|
|
10389
10616
|
/** Register a built-in asset type's schema. */
|
|
10390
10617
|
declare function registerDefaultAssetSchema(type: string, info: SchemaPropsInfo): () => void;
|
|
10618
|
+
|
|
10619
|
+
/**
|
|
10620
|
+
* Building a schema from the utils an app is going to use, and the registry of
|
|
10621
|
+
* the schemas this library's own record types contribute.
|
|
10622
|
+
*
|
|
10623
|
+
* A schema is not configuration — it is the list of record types a document may
|
|
10624
|
+
* contain and how each of them has changed over time. It has to be built from
|
|
10625
|
+
* the same utils the editor is given, or a document will load records the
|
|
10626
|
+
* editor cannot render, or fail to migrate props the utils now expect.
|
|
10627
|
+
*/
|
|
10628
|
+
|
|
10391
10629
|
/**
|
|
10392
10630
|
* Build a store schema from the utils an editor will be given.
|
|
10393
10631
|
*
|
|
@@ -10529,14 +10767,6 @@ interface TLGetShapeAtPointOptions extends HitTestOptions {
|
|
|
10529
10767
|
hitLocked?: boolean;
|
|
10530
10768
|
/** Extra tolerance in page units. Defaults to the hit-test margin for the current pointer. */
|
|
10531
10769
|
margin?: number;
|
|
10532
|
-
/**
|
|
10533
|
-
* Only consider shapes that are currently being rendered.
|
|
10534
|
-
*
|
|
10535
|
-
* A large page culls most of its shapes, and for a pointer gesture "not on
|
|
10536
|
-
* screen" and "not hit" are the same answer — this makes the hit test cost
|
|
10537
|
-
* proportional to what is visible rather than to the document.
|
|
10538
|
-
*/
|
|
10539
|
-
renderingOnly?: boolean;
|
|
10540
10770
|
/** Arbitrary further filtering, applied last. */
|
|
10541
10771
|
filter?: (shape: UnknownShape) => boolean;
|
|
10542
10772
|
}
|
|
@@ -11157,6 +11387,28 @@ declare const parentIdValidator: Validator<ParentId>;
|
|
|
11157
11387
|
* per prop.
|
|
11158
11388
|
*/
|
|
11159
11389
|
type PropsMap = UnknownRecordProps | Record<string, Validatable<unknown>>;
|
|
11390
|
+
/**
|
|
11391
|
+
* How strict the props half of a record validator is about props the map does
|
|
11392
|
+
* not declare.
|
|
11393
|
+
*
|
|
11394
|
+
* `"reject"` is the default and the right answer for a record an app is
|
|
11395
|
+
* *making*: an undeclared prop there is a typo or a prop whose migration was
|
|
11396
|
+
* forgotten, and saying so early is the point.
|
|
11397
|
+
*
|
|
11398
|
+
* `"keep"` is the right answer for a record the store is *holding*, and is what
|
|
11399
|
+
* the schema's shape and binding types use. A `.tldr` written by a newer
|
|
11400
|
+
* generation of the format legitimately carries props this build has never
|
|
11401
|
+
* heard of — `binding.props.snap` is in the fixture in this repo — and dropping
|
|
11402
|
+
* or rejecting them would lose the user's data on the next save. The declared
|
|
11403
|
+
* props are still checked; the rest ride along. See `normalizeLoadedRecords`,
|
|
11404
|
+
* which states the same policy for the load path.
|
|
11405
|
+
*/
|
|
11406
|
+
type UnknownPropsPolicy = "reject" | "keep";
|
|
11407
|
+
/** Options the record validator factories share. */
|
|
11408
|
+
interface RecordValidatorOptions {
|
|
11409
|
+
/** What to do with props the map does not declare. Defaults to `"reject"`. */
|
|
11410
|
+
readonly unknownProps?: UnknownPropsPolicy | undefined;
|
|
11411
|
+
}
|
|
11160
11412
|
/**
|
|
11161
11413
|
* The validator for a shape type, from its `static props`.
|
|
11162
11414
|
*
|
|
@@ -11168,7 +11420,36 @@ type PropsMap = UnknownRecordProps | Record<string, Validatable<unknown>>;
|
|
|
11168
11420
|
* })
|
|
11169
11421
|
* ```
|
|
11170
11422
|
*/
|
|
11171
|
-
declare function createShapeValidator<Type extends string, Props extends object>(type: Type, props: PropsMap, meta?: PropsMap): Validator<BaseShape<Type, Props>>;
|
|
11423
|
+
declare function createShapeValidator<Type extends string, Props extends object>(type: Type, props: PropsMap, meta?: PropsMap, options?: RecordValidatorOptions): Validator<BaseShape<Type, Props>>;
|
|
11424
|
+
/**
|
|
11425
|
+
* The fields every shape has, whatever its type — everything but `props`.
|
|
11426
|
+
*
|
|
11427
|
+
* Used for a shape whose type this build has no props map for. Forward
|
|
11428
|
+
* compatibility is about `props`: a newer generation of the format may carry
|
|
11429
|
+
* props this build cannot describe, and those must survive a round trip. It
|
|
11430
|
+
* says nothing about `x` being a number or `index` being an index key, which
|
|
11431
|
+
* are true of every shape record there has ever been. Passing an unknown type
|
|
11432
|
+
* through untouched let `{ x: "NOT A NUMBER" }` into the store.
|
|
11433
|
+
*/
|
|
11434
|
+
declare function createBaseShapeValidator(): Validator<BaseShape<string, object>>;
|
|
11435
|
+
/**
|
|
11436
|
+
* The validator for an asset type, from its prop map.
|
|
11437
|
+
*
|
|
11438
|
+
* Same policy as {@link createShapeValidator}: an `unknownProps: "keep"` asset
|
|
11439
|
+
* is one the store is holding, and a `.tldr` from a newer build may carry asset
|
|
11440
|
+
* props this one cannot describe.
|
|
11441
|
+
*/
|
|
11442
|
+
declare function createAssetPropsValidator<Type extends string, Props extends object>(type: Type, props: PropsMap, options?: RecordValidatorOptions): Validator<BaseAsset<Type, Props>>;
|
|
11443
|
+
/**
|
|
11444
|
+
* The fields every asset has whatever its type — everything but `props`.
|
|
11445
|
+
*
|
|
11446
|
+
* For an asset type this build has no prop map for. See
|
|
11447
|
+
* {@link createBaseShapeValidator}: forward compatibility is about `props`, and
|
|
11448
|
+
* an id that is not an `asset:` id is corruption in any generation.
|
|
11449
|
+
*/
|
|
11450
|
+
declare function createBaseAssetValidator(): Validator<BaseAsset<string, object>>;
|
|
11451
|
+
/** The counterpart of {@link createBaseShapeValidator} for bindings. */
|
|
11452
|
+
declare function createBaseBindingValidator(): Validator<BaseBinding<string, object>>;
|
|
11172
11453
|
/**
|
|
11173
11454
|
* The validator for a binding type, from its `static props`.
|
|
11174
11455
|
*
|
|
@@ -11176,7 +11457,7 @@ declare function createShapeValidator<Type extends string, Props extends object>
|
|
|
11176
11457
|
* as shape ids rather than as strings because a binding pointing at a page is
|
|
11177
11458
|
* the kind of corruption that only shows up when something tries to render it.
|
|
11178
11459
|
*/
|
|
11179
|
-
declare function createBindingValidator<Type extends string, Props extends object>(type: Type, props: PropsMap, meta?: PropsMap): Validator<BaseBinding<Type, Props>>;
|
|
11460
|
+
declare function createBindingValidator<Type extends string, Props extends object>(type: Type, props: PropsMap, meta?: PropsMap, options?: RecordValidatorOptions): Validator<BaseBinding<Type, Props>>;
|
|
11180
11461
|
/**
|
|
11181
11462
|
* The validator for an asset type, from its props.
|
|
11182
11463
|
*
|
|
@@ -13645,21 +13926,21 @@ declare const arrowBindingVersions: {
|
|
|
13645
13926
|
declare const assetIdValidator: Validator<AssetId>;
|
|
13646
13927
|
/** `w`, `h`, `src` and the file metadata an image or video asset carries. */
|
|
13647
13928
|
declare const imageAssetPropsValidator: ObjectValidator<ObjectValidatorType<{
|
|
13648
|
-
|
|
13649
|
-
|
|
13650
|
-
|
|
13651
|
-
|
|
13652
|
-
|
|
13653
|
-
|
|
13654
|
-
|
|
13929
|
+
w: Validator<number>;
|
|
13930
|
+
h: Validator<number>;
|
|
13931
|
+
name: Validator<string>;
|
|
13932
|
+
isAnimated: Validator<boolean>;
|
|
13933
|
+
mimeType: Validator<string | null>;
|
|
13934
|
+
src: Validator<string | null>;
|
|
13935
|
+
fileSize: Validator<number | undefined>;
|
|
13655
13936
|
}>>;
|
|
13656
13937
|
/** The unfurled metadata a bookmark asset caches for its card. */
|
|
13657
13938
|
declare const bookmarkAssetPropsValidator: ObjectValidator<ObjectValidatorType<{
|
|
13658
|
-
|
|
13659
|
-
|
|
13660
|
-
|
|
13661
|
-
|
|
13662
|
-
|
|
13939
|
+
title: Validator<string>;
|
|
13940
|
+
description: Validator<string>;
|
|
13941
|
+
image: Validator<string>;
|
|
13942
|
+
favicon: Validator<string>;
|
|
13943
|
+
src: Validator<string | null>;
|
|
13663
13944
|
}>>;
|
|
13664
13945
|
/** A bitmap asset: an image the canvas paints inside an `image` shape. */
|
|
13665
13946
|
declare const imageAssetValidator: Validator<ImageAsset>;
|
|
@@ -13735,4 +14016,4 @@ declare function setDefaultCdnBaseUrl(url: string): void;
|
|
|
13735
14016
|
/** Forget every asset id in `ids`. Exported for stores that batch their deletes. */
|
|
13736
14017
|
type AssetIdList = readonly AssetId[];
|
|
13737
14018
|
|
|
13738
|
-
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_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, 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, 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 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 UnknownRecordProps, type UnknownShape, type UseCurrentUserOptions, type User, type UserId, type UserPreferences, type UserPreferencesInit, UserPreferencesManager, type UserPreferencesState, type UserRecordId, UserRecordType, type UserSchemaInfo, type UserStore, type DefaultVerticalAlignStyle$1 as VAlignValue, type Validatable, ValidationError, type ValidationLibrary, type ValidationPathSegment, Validator, Vec, type VecLike, type VecModel, type VideoAsset, type VideoAssetProps, WebGL2Backend, type WheelEventInfo, angleDistance, animateShape, animateShapes, applyThemePatch, approximately, areAnglesCompatible, arrowBindingVersions, assetIdValidator, assetMigrations, assetPropsMigrationSequenceId, assetValidator, assetValidators, average, b64Vecs, bindingIdValidator, bindingPropsMigrationSequenceId, bookmarkAssetMigrations, bookmarkAssetProps, bookmarkAssetPropsValidator, bookmarkAssetValidator, boundsIndicatorPath, boxModelValidator, bucketTextureResolution, canBindShapes, canBuildIndicatorPaths, canCreateShape, canCreateShapes, canCropShape, canEditShape, canonicalizeRotation, canvasUiColorTypeValidator, centerOfCircleFromThreePoints, clamp, clampRadians, clockwiseAngleDist, commentAnchorValidator, commentReactionRecordConfig, commentReactionValidator, commentRecordConfig, commentSchemaRecords, commentThreadRecordConfig, commentThreadValidator, commentValidator, compressLegacySegments, coreShapes, counterClockwiseAngleDist, createAssetId, createAssetPropsMigrationIds, createAssetPropsMigrationSequence, createAssetValidator, createBackend, createBindingId, createBindingPropsMigrationIds, createBindingPropsMigrationSequence, createBindingValidator, createBuiltInAssetPropsMigrationIds, createBuiltInBindingPropsMigrationIds, createBuiltInShapePropsMigrationIds, createCachedUserResolve, createComment, createCommentId, createCommentReaction, createCommentReactionId, createCommentThread, createCommentThreadId, createCurrentUser, createCustomRecord, createCustomRecordId, createCustomRecordMigrationIds, createCustomRecordMigrationSequence, createCustomRecordMigrationSequences, createCustomRecordType, createCustomRecordTypeMap, createCustomRecordValidator, createDeepLinkString, createInMemoryAssetStore, createMemoryUserStore, createPresenceStateDerivation, createPropsMigrationSequences, createRootState, createSchema, createSessionStateSnapshotSignal, createShapeId, createShapePropsMigrationIds, createShapePropsMigrationSequence, createShapeValidator, createStore, createTLCurrentUser, createTLSchemaFromUtils, createTheme, createUserId, createUserPreferences, createUserRecordType, cursorTypeValidator, cursorValidator, customRecordMigrationSequenceId, dataUrlToFile, decodeDrawSegmentPath, defaultAssetMigrations, defaultAssetSchemas, defaultBindingSchemas, defaultShapeSchemas, defaultTldrawOptions, defaultUserPreferences, defaultUserStore, degreesToRadians, deselect, drawShapeSegmentValidator, dropShapesOnFrameLike, duplicatePage, easeInOutCubic, fileToBase64DataUrl, fileToDataUrl, findCommonAncestor, findShapeAncestor, fontKey, formatValidationPath, getArcMeasure, getAssetSrc, getBaseZoomForCameraOptions, getColorNamesFromThemes, getColorValue, getCulledShapes, getCurrentPageRenderingShapesSorted, getCurrentPageShapesInReadingOrder, getCursor, getCustomRecordIdType, getDefaultAssetContext, getDefaultCdnBaseUrl, getDefaultCrop, getDefaultDisplayValues, getDefaultUserPresence, getDefaultUserProperties, getDisplayValues, getDroppedShapesToNewParents, getEngineProvider, getExportImplementation, getFocusedGroup, getFocusedGroupId, getFontNamesFromThemes, getFontsFromRichText, getFrameLikeDropTarget, getFreshUserPreferences, getHandleHitRadius, getIncrementedName, getIndicatorSource, getInitialMetaForShape, getLocaleChain, getNearestAdjacentShape, getNotVisibleShapes, getOnlySelectedShapeId, getOverlayDisplayValues, getOwnerDocument, getOwnerWindow, getPageStates, getPaletteEntries, getPerfectDashProps, getPointInArcT, getPointOnCircle, getPointerInfo, getPointsOnArc, getPolygonVertices, getRenderingShapes, getSelectedShapeAtPoint, getSelectionHandlePositions, getSelectionRotatedPageBounds, getSelectionRotatedScreenBounds, getSelectionScreenBounds, getSessionStateSnapshot, getSessionStateSnapshotFromStore, getShapeAndDescendantIds, getShapeClipPath, getShapeHandles, getShapeIdsInsideBounds, getShapeIndicatorNode, getShapeIndicatorPath, getShapeMaskedPageBounds, getShapeStyleIfExists, getShapesPageBounds, getSharedOpacity, getSnapshot, getStylePropsOf, getSvgAsImage, getSvgPathFromPoints, getTextMeasureProvider, getThemeCssVars, getUncroppedSize, getUserPreferences, handleTypeValidator, hardReset, hardResetEditor, hasAncestor, hexToRgba, hitTestSelectionBounds, hitTestSelectionHandles, idValidator, imageAssetMigrations, imageAssetProps, imageAssetPropsValidator, imageAssetValidator, inlineBase64AssetStore, intersectCircleCircle, intersectCirclePolygon, intersectCirclePolyline, intersectLineSegmentCircle, intersectLineSegmentLineSegment, intersectLineSegmentPolygon, intersectLineSegmentPolyline, intersectPolygonBounds, intersectPolygonPolygon, isAncestorSelected, isAsset, isAssetId, isBinding, isBindingId, isCommentId, isCommentReactionId, isCommentThreadId, isCursorInViewport, isCustomRecord, isCustomRecordId, isDocument, isFullCrop, isInstancePresenceId, isOptionalValidator, isPage, isPageId, isPointInShape, isPropsMigrations, isSafeFloat, isShape, isShapeHidden, isShapeId, isShapeInPage, isUserId, isValidProps, kickoutOccludedShapes, lerp, linesIntersect, loadSessionStateSnapshotIntoStore, loadSnapshot, loopToHtmlElement, maybeSnapToGrid, mixHexColors, moveElementInto, moveShapesToPage, normalizeIndicatorPath, normalizeLoadedRecords, noteReactivePointerType, opacityValidator, openWindow, packShapes, pageIdValidator, parentIdValidator, parseDeepLinkString, perimeterOfEllipse, pointInPolygon, pointerValidator, polygonIntersectsPolyline, polygonsIntersect, popFocusedGroupId, precise, prefixError, preventDefault, radiansToDegrees, randomPresenceColor, rangeIntersection, refreshPage, refreshReactiveEnvironment, registerColorsFromThemes, registerCoreShape, registerDefaultAssetSchema, registerDefaultBindingSchema, registerDefaultShapeSchema, registerEngineProvider, registerExportImplementation, registerFontsFromThemes, registerTextMeasureImplementation, releasePointerCapture, resizeBox, resizeScaled, resizeToBounds, resolveAssetUrl, resolveLineHeightPx, resolveShape, resolveThemes, resolveUiMessage, richTextToPlainText, rootBindingMigrations, rootShapeMigrations, rotateSelectionHandle, runtime, sanitizeId, scribbleValidator, selectAdjacentShape, selectFirstChildShape, selectParentShape, setDefaultCdnBaseUrl, setFocusedGroup, setOpacityForNextShapes, setOpacityForSelectedShapes, setPointerCapture, setRuntimeOverrides, setUserPreferences, shapeIdValidator, shapePropsMigrationSequenceId, shortAngleDist, snapAngle, stopEventPropagation, strokeShapeIndicators, suffixSafeId, tleditors, tlenv, tlenvReactive, tlmenus, tltime, toCustomRecordMigrationSequence, toDomPrecision, toFixed, toMigrationSequence, toPrecision, trackPointer, uniq, updatePage, useActions, useAssetUrls, useColorMode, useContainer, useContainerIfExists, useCurrentTheme, useCurrentUser, useDelaySvgExport, useEditor, useEditorComponents, useEditorPortalHost, useGlobalMenuIsOpen, useIsCropping, useIsEditing, useIsToolSelected, useMaybeEditor, useMocanvasUi, usePassThroughWheelEvents, useSharedSafeId, useSvgExportContext, useTLSchemaFromUtils, useTLStore, useThemeColors, useThemeCssVars, useTools, useTransform, useUniqueSafeId, useViewportHeight, userIdValidator, userPreferencesValidator, userTypeValidator, userValidator, validateCustomRecordInfos, validateProps, vecModelValidator, videoAssetMigrations, videoAssetProps, videoAssetValidator, visitDescendants, withCoreShapes };
|
|
14019
|
+
export { ARROWHEAD_KINDS, ARROW_SHAPE_KINDS, ASSET_MIGRATION_SEQUENCE_PREFIX, Arc2d, ArrayOfValidator, ArrowShapeArrowheadEndStyle, type ArrowShapeArrowheadKind, ArrowShapeArrowheadStartStyle, type ArrowShapeKind, ArrowShapeKindStyle, type Asset, type AssetContext, type AssetCreate, type AssetId, type AssetIdList, type AssetPartial, type AssetPropsForType, AssetRecordType, type AssetStore, type AssetType, type AssetTypeName, type AssetUploadResult, AssetUrlsProvider, type AssetUrlsProviderProps, AssetUtil, AssetUtilRegistry, type B64VecPoint, BINDING_MIGRATION_SEQUENCE_PREFIX, BUILTIN_ASSET_MIGRATION_SEQUENCE_PREFIX, BUILTIN_BINDING_MIGRATION_SEQUENCE_PREFIX, BUILTIN_SHAPE_MIGRATION_SEQUENCE_PREFIX, type BaseAsset, type BaseBinding, BaseBoxShapeUtil, type BaseEventInfo, BaseFrameLikeShapeUtil, type BaseShape, type BatchMeasurementRequest, type Binding, type BindingCanBindOptions, type BindingCreate, type BindingId, type BindingOnChangeOptions, type BindingOnCreateOptions, type BindingOnDeleteOptions, type BindingOnShapeChangeOptions, type BindingOnShapeDeleteOptions, type BindingOnShapeIsolateOptions, type BindingPartial, type BindingPropsForType, BindingRecordType, type BindingTypeName, BindingUtil, type BindingUtilConstructor, type BookmarkAsset, type BookmarkAssetProps, type BoundsSnapGeometry, type BoundsSnapPoint, type BoundsSnapResizeOptions, type BoundsSnapTranslateOptions, BoundsSnaps, Box, type BoxHandle, type BoxLike, type BoxModel, CANVAS_THEME_VARS, COLLABORATOR_INACTIVE_TIMEOUT, CURRENT_SESSION_SCHEMA_VERSION, CURSOR_TYPES, CUSTOM_RECORD_MIGRATION_SEQUENCE_PREFIX, CUSTOM_RECORD_TYPE_NAME, type CachedUserResolve, type Camera, type CameraId, CameraRecordType, CameraStateTracker, type CancelEventInfo, Canvas, type CanvasComponents, type CanvasProps, Circle2d, type ClickEventInfo, type ClickEventName, ClickManager, CollaboratorsManager, type ColorScheme, type DefaultColorStyle$1 as ColorValue, CommentReactionRecordType, CommentRecordType, CommentThreadRecordType, type CompleteEventInfo, type ContainerDocument, ContainerProvider, type ContainerProviderProps, type ContainerWindow, type ContentElementHost, ContentElementManager, type ContentElementSource, type CreateCachedUserResolveOptions, type CreatePresenceStateDerivationOpts, type CreateStoreOptions, CubicBezier2d, type CubicSegmentLike, CubicSpline2d, type CurrentUser, type CustomRecordInfo, type CustomRecordPropsForType, DEFAULT_ASSET_CONTEXT, DEFAULT_CAMERA_OPTIONS, DEFAULT_COLORS, DEFAULT_DARK_COLORS, DEFAULT_DASHES, DEFAULT_EDITOR_CONFIG, DEFAULT_FILLS, DEFAULT_FILL_TOKENS, DEFAULT_FONTS, DEFAULT_FONT_FAMILIES, DEFAULT_H_ALIGNS, DEFAULT_LIGHT_COLORS, DEFAULT_LINE_HEIGHT, DEFAULT_MENU_CONTEXT, DEFAULT_PAGE_ID, DEFAULT_SHAPE_INDICATOR_OPTIONS, DEFAULT_SIZES, DEFAULT_TEXT_ALIGNS, DEFAULT_THEME, DEFAULT_TIME_CONTEXT, DEFAULT_V_ALIGNS, DIM_2D, DIM_3D, DOCUMENT_ID, type DefaultDashStyle$1 as DashValue, type DecodedDrawPoint, type DecomposedMat, DefaultBackground, DefaultCanvas, DefaultColorStyle, DefaultCursor, DefaultDashStyle, DefaultErrorFallback, DefaultFillStyle, DefaultFontFaces, DefaultFontFamilies, DefaultFontStyle, DefaultGrid, DefaultHorizontalAlignStyle, DefaultLabelColorStyle, DefaultShapeWrapper, DefaultSizeStyle, DefaultSpinner, DefaultSvgDefs, DefaultTextAlignStyle, DefaultVerticalAlignStyle, DictValidator, type Document$1 as Document, type DocumentId, DocumentRecordType, type DrawOptions, EASINGS, ELBOW_ARROW_SNAP_MODES, EVENT_NAME_MAP, Edge2d, EdgeScrollManager, Editor, EditorAtom, type EditorConfig, EditorContext, type EditorEngineProvider, type EditorEvents, type EditorExportImplementation, type EditorImageExportOptions, type EditorImageExportResult, type EditorInputs, EditorManager, type EditorOptions, EditorPortal, type EditorPortalProps, EditorProvider, type EditorProviderProps, type EditorRecord, type EditorStore, type EditorStoreProps, type EditorStoreSnapshot, type EditorSvgExportOptions, type EditorSvgExportResult, type EditorTextHtmlMeasurement, type EditorTextMeasure, type EditorTextMeasureHtmlOptions, type EditorTextMeasureOptions, type EditorTextMeasureProvider, type EditorTextMeasurement, ElbowArrowSnap, type ElbowArrowSnapMode, Ellipse2d, type EngineGeometry, EnumStyleProp, ErrorBoundary, type ErrorBoundaryProps, ErrorScreen, type ErrorScreenProps, EventEmitter, type EventHandlers, type EventInfo, type ExternalAssetContent, type ExternalAssetHandler, type ExternalAssetType, type ExternalContent, type ExternalContentHandler, type ExternalContentType, type ExtractShapeByProps, FIRST_PAGE_INDEX, FONT_SIZES, type DefaultFillStyle$1 as FillValue, FontManager, type DefaultFontStyle$1 as FontValue, type FrameLikeShape, GEO_SHAPE_KINDS, type GapsSnapIndicator, GeoShapeGeoStyle, type GeoShapeKind, Geometry2d, Geometry2dFilters, type Geometry2dOptions, type GetSvgAsImageOptions, Group2d, HALF_PI, HANDLE_HIT_RADIUS, type DefaultHorizontalAlignStyle$1 as HAlignValue, HTMLContainer, type HTMLContainerProps, type HandleSnapGeometry, type HandleSnapOptions, HandleSnaps, HandleTable, HistoryManager, type HitTestOptions, INSTANCE_ID, type ImageAsset, type ImageAssetProps, ImageShapeCrop, type IndicatorPathSource, type IndicatorShapeUtil, type IndicatorSource, InputsManager, type Instance, type InstanceId, type InstancePageState, type InstancePageStateId, InstancePageStateRecordType, type InstancePresence, type InstancePresenceId, InstancePresenceRecordType, InstanceRecordType, type InterruptEventInfo, type JsonObject, type JsonPrimitive, type JsonValue, type KeyboardEventInfo, type KeyboardEventName, LIGHT_THEME, LINE_SPLINE_KINDS, LOCAL_STATE_PREFIX, type LegacyDrawShapeSegment, type LineShapeSplineKind, LineShapeSplineStyle, LoadingScreen, type LoadingScreenProps, MAX_TEXTURE_RESOLUTION, MAX_TEXTURE_ZOOM, Mat, type MatLike, type MatModel, MenuClickCapture, MenuManager, type MigratableProps, type MocanvasUiContextValue, MocanvasUiProvider, type MocanvasUiProviderProps, type NormalizeOptions, type NormalizeResult, ObjectValidator, type ObjectValidatorType, type OptionalKeys, type OverlayEntry, type OverlayHost, type OverlayLike, OverlayManager, type OverlayOptionsWithDisplayValues, OverlayUtil, type OverlayUtilOptions, PI, PI2, PRESENCE_COLORS, type Page, type PageId, PageRecordType, type ParentId, type PerfectDashOptions, type PerfectDashProps, type PerfectDashTerminal, PerformanceApiAdapter, type PerformanceApiAdapterOptions, type PerformanceEventName, type PerformanceEvents, PerformanceManager, type PinchEventInfo, Point2d, type PointLike, type PointerEventInfo, type PointerEventName, PointerRecordType, type PointerSource, type PointerTarget, type PointsSnapIndicator, Polygon2d, Polyline2d, type PresenceStateDerivationOptions, type PresenceUser, type PropsMigration, type PropsMigrationSource, type PropsMigrationTarget, type PropsMigrations, type RGBA, ROTATE_CORNER_TO_SELECTION_CORNER, ROTATE_HANDLE_OFFSET, ReadonlySharedStyleMap, type RecordPropValidator, type RecordProps, type RecordPropsType, type RecordValidatorOptions, Rectangle2d, type RegisteredAssetType, type RegisteredBindingType, type RegisteredCustomRecordType, type RegisteredShapeType, type RenderBackend, type RequiredKeys, type ResizeBoxOptions, type ResizeInfo, type ResizeShapeOptions, type RichTextFontVisitor, type RichTextFontVisitorState, RootState, type RotateCorner, SHAPE_MIGRATION_SEQUENCE_PREFIX, SIDES, SIN, STROKE_SIZES, SVGContainer, type SVGContainerProps, type SafeId, type SchemaPropsInfo, type SchemaPropsInfoMap, type SchemaUtilSource, type Scribble, type ScribbleItem, ScribbleManager, type ScribbleSessionOptions, type SelectionCorner, type SelectionEdge, type SelectionHandle, type SelectionHandleHit, type SetValue, type Shape, type ShapeCreate, type ShapeHandle, type ShapeId, ShapeIndicatorCompositor, type ShapePartial, type ShapePropsForType, ShapeRecordType, type ShapeRef, type ShapeSvgContext, type ShapeSvgResult, type ShapeTypeName, ShapeUtil, type ShapeUtilClass, type ShapeUtilConstructor, type ShapeUtilOptions, type ShapeUtilOptionsPatch, type ShapeWithCrop, type SharedStyle, SharedStyleMap, type DefaultSizeStyle$1 as SizeValue, type SnapData, type SnapIndicator, type SnapLine, SnapManager, type SnapResult, Stadium2d, StateNode, type StateNodeClass, type StateNodeConstructor, type StateNodeType, type StrokeShapeIndicatorsOptions, StyleProp, type StylePropValue, SvgExportContextProvider, type SvgExportContextProviderProps, type SvgExportDef, T, TAB_ID, type TLActionShortcutsLocation, type TLAdjacentDirection, type TLAnimationOptions, type TLAnyAssetUtilConstructor, type TLAnyOverlayUtilConstructor, type TLArrowShapeArrowheadStyle, type TLArrowShapeKind, type TLAssetShape, type TLAssetUrls, type TLAssetUtilClass, type TLAssetUtilConstructor, type TLAssetUtilConstructorLike, type TLAssetUtilLike, type TLAssetUtilOptions, type TLBaseBoxShape, type TLBaseExternalContent, type TLBindingUpdate, type TLCLickEventName, type TLCameraConstraints, type TLCameraConstraintsZoom, type TLCameraEndPerfEvent, type TLCameraMoveOptions, type TLCameraOptions, type TLCameraStartPerfEvent, type TLCameraState, type TLCancelEvent, type TLCanvasComponentProps, type TLCanvasUiColor, type TLClickEvent, type TLClickEventInfo, type TLClickState, type TLClipboardPasteRawInfo, type TLClipboardWriteInfo, type TLColorMode, type TLColorScheme, type TLColorSchemeWindow, type TLComment, type TLCommentAnchor, type TLCommentId, type TLCommentReaction, type TLCommentReactionId, type TLCommentThread, type TLCommentThreadId, type TLCompleteEvent, type TLComponents, type TLComponentsResolved, type TLContent, type TLCreateShapePartial, type TLCropInfo, type TLCursor, type TLCursorProps, type TLCursorSlotProps, type TLCursorType, type TLCursorViewportSource, type TLCustomRecord, type TLCustomRecordId, type TLDeepLink, type TLDeepLinkOptions, type TLDefaultAsset, type TLDefaultBinding, type TLDefaultColor, type TLDefaultColorVariant, type TLDefaultDisplayValues, type TLDefaultRecord, type TLDefaultShape, type TLDefaultTextAlignStyle, type TLDisplayValuesSource, type TLDragShapesInInfo, type TLDragShapesInfo, type TLDragShapesOutInfo, type TLDragShapesOverInfo, type TLDrawShapeSegment, type TLDropShapesOverInfo, type TLEasingType, type TLEditStartInfo, type TLEditorAssetUrls, type TLEditorComponents, type TLEditorComponentsEditor, type TLEditorRunOptions, type TLEditorSnapshot, TLEditorsRegistry, type TLEmbedExternalContent, type TLEnterEventHandler, type TLEnvironment, type TLErrorBoundaryProps, type TLErrorExternalContentSource, type TLErrorFallbackComponent, type TLErrorFallbackProps, type TLErrorSlotProps, type TLEventMap, type TLEventMapHandler, type TLEventName, type TLExcalidrawExternalContent, type TLExcalidrawExternalContentSource, type TLExitEventHandler, type TLExportType, type TLExternalAsset, type TLExternalContentSource, type TLFileExternalAsset, type TLFileReplaceExternalContent, type TLFilesExternalContent, type TLFontFace, type TLFontFaceSet, type TLFontFaceSource, type TLFontLoadState, type TLFramePerfEvent, type TLGeometryOpts, type TLGetCustomDisplayValues, type TLGetCustomOverlayDisplayValues, type TLGetDefaultDisplayValues, type TLGetDefaultOverlayDisplayValues, type TLGetShapeAtPointOptions, type TLGetShapeVisibility, type TLGlobalAssetPropsMap, type TLGlobalBindingPropsMap, type TLGlobalRecordPropsMap, type TLGlobalShapePropsMap, type TLGridProps, type TLGridStep, type TLHandleDragInfo, type TLHandleType, type TLHistoryBatchOptions, type TLHistoryDiff, type TLHistoryEntry, type TLHistoryMark, type TLHistoryRecordingMode, type TLImageExportOptions, type TLIndexedAssets, type TLIndexedBindings, type TLIndexedRecords, type TLIndexedShapes, type TLIndicatorContext, type TLIndicatorHost, type TLIndicatorOverlay, type TLIndicatorPath, type TLIndicatorPathResult, type TLIndicatorTransform, type TLInstancePresenceID, type TLInteractionEndPerfEvent, type TLInteractionStartPerfEvent, type TLInterpolationProgress, type TLInterruptEvent, type TLKeyboardEvent, type TLLineShapeSplineStyle, type TLLoadSessionStateSnapshotOptions, type TLLoadSnapshotOptions, type TLMeasureTextOpts, type TLMeasureTextSpanOpts, type TLMeasuredTextSize, type TLMenus, type TLOpacityType, type TLOverlay, type TLOverlayDisplayValuesSource, type TLOverlayEntry, type TLOverlayUtilConstructor, TLPOINTER_ID, type TLPerfEventMap, type TLPerfFrameTimeStats, type TLPerfLongAnimationFrame, type TLPerfLongAnimationFrameScript, type TLPinchEvent, type TLPinchEventName, type TLPointInShapeOptions, type TLPointer, type TLPointerEvent, type TLPointerEventTarget, type TLPointerId, type TLPointerInfo, type TLPresenceStateInfo, type TLReactiveEnvironment, type TLRegisteredAsset, type TLRemovedDefaultThemeColors, type TLRenderingShape, type TLResettableEditor, type TLResizeHandle, type TLResizeMode, type TLRichTextFontSource, type TLRuntime, type TLSchema, type TLScribbleState, type TLSessionPageState, type TLSessionStateSnapshot, type TLShapeCrop, type TLShapeErrorFallbackComponent, type TLShapeIndicatorOptions, type TLShapeOperationPerfEvent, type TLShapeUtilCanBeLaidOutOpts, type TLShapeUtilCanBindOpts, type TLShapeUtilCanvasSvgDef, type TLShapeVisibility, type TLShapeWrapperProps, type TLShapeWrapperSlotProps, type TLSharedOpacity, type TLStoreBaseOptions, type TLStoreEventInfo, type TLStoreOptions, type TLStoreProps, type TLStoreSchemaOptions, type TLStoreWithStatus, type TLStyledShape, type TLStyledShapeProps, type TLSvgExportContext, type TLSvgTextExternalContent, type TLTemporaryAssetPreview, type TLTextExternalContent, type TLTextExternalContentSource, type TLTextOptions, type TLTextSpan, type TLTheme, type TLThemeColors, type TLThemeDefaultColors, type TLThemeFont, type TLThemeFonts, type TLThemeHost, type TLThemeId, type TLThemePatch, type TLThemeUiColorKeys, type TLThemes, type TLThemesInput, type TLTickEvent, type TLTime, type TLTimeContext, type TLTldrawExternalContent, type TLTldrawExternalContentSource, type TLUiActionItem, type TLUiActionsBuilder, type TLUiActionsContextType, type TLUiAssetUrls, type TLUiComponentSlot, type TLUiEventSource, type TLUiOverrideHelpers, type TLUiOverrides, type TLUiToolItem, type TLUiToolsBuilder, type TLUiToolsContextType, type TLUiTranslations, type TLUndoRedoPerfEvent, type TLUnknownAsset, type TLUpdatePointerOptions, type TLUrlExternalAsset, type TLUrlExternalContent, type TLWheelEvent, TL_CANVAS_UI_COLOR_TYPES, TL_CURSOR_TYPES, TL_HANDLE_TYPES, TL_SCRIBBLE_STATES, type DefaultTextAlignStyle$1 as TextAlignValue, TextManager, type TextureInfo, type TextureLoader, TextureManager, type TextureManagerOptions, type TextureOptions, type TextureSource, type TextureState, type ThemeColor, ThemeManager, type ThemeManagerOptions, type TickEventInfo, Timers, type TiptapEditor, type TiptapNode, type TldrawEditorBaseProps, type TldrawEditorProps, type TldrawEditorWithStoreProps, type TldrawEditorWithoutStoreProps, type TldrawOptions, TransformedGeometry2d, type TransformedGeometry2dOptions, type TranslateInfo, type TypeOf, UNKNOWN_EDIT_START_INFO, USER_PREFERENCES_DEFAULTS, type UiEvent, type UiEventType, UnionValidator, type UnionValidatorConfig, type UnknownBinding, type UnknownCustomRecord, type UnknownPropsPolicy, type UnknownRecordProps, type UnknownShape, type UseCurrentUserOptions, type User, type UserId, type UserPreferences, type UserPreferencesInit, UserPreferencesManager, type UserPreferencesState, type UserRecordId, UserRecordType, type UserSchemaInfo, type UserStore, type DefaultVerticalAlignStyle$1 as VAlignValue, type Validatable, ValidationError, type ValidationLibrary, type ValidationPathSegment, Validator, Vec, type VecLike, type VecModel, type VideoAsset, type VideoAssetProps, WebGL2Backend, type WheelEventInfo, angleDistance, animateShape, animateShapes, applyThemePatch, approximately, areAnglesCompatible, arrowBindingVersions, assetIdValidator, assetMigrations, assetPropsMigrationSequenceId, assetValidator, assetValidators, average, b64Vecs, bindingIdValidator, bindingPropsMigrationSequenceId, bookmarkAssetMigrations, bookmarkAssetProps, bookmarkAssetPropsValidator, bookmarkAssetValidator, boundsIndicatorPath, boxModelValidator, bucketTextureResolution, canBindShapes, canBuildIndicatorPaths, canCreateShape, canCreateShapes, canCropShape, canEditShape, canonicalizeRotation, canvasUiColorTypeValidator, centerOfCircleFromThreePoints, clamp, clampRadians, clockwiseAngleDist, commentAnchorValidator, commentReactionRecordConfig, commentReactionValidator, commentRecordConfig, commentSchemaRecords, commentThreadRecordConfig, commentThreadValidator, commentValidator, compressLegacySegments, coreShapes, counterClockwiseAngleDist, createAssetId, createAssetPropsMigrationIds, createAssetPropsMigrationSequence, createAssetPropsValidator, createAssetValidator, createBackend, createBaseAssetValidator, createBaseBindingValidator, createBaseShapeValidator, createBindingId, createBindingPropsMigrationIds, createBindingPropsMigrationSequence, createBindingValidator, createBuiltInAssetPropsMigrationIds, createBuiltInBindingPropsMigrationIds, createBuiltInShapePropsMigrationIds, createCachedUserResolve, createComment, createCommentId, createCommentReaction, createCommentReactionId, createCommentThread, createCommentThreadId, createCurrentUser, createCustomRecord, createCustomRecordId, createCustomRecordMigrationIds, createCustomRecordMigrationSequence, createCustomRecordMigrationSequences, createCustomRecordType, createCustomRecordTypeMap, createCustomRecordValidator, createDeepLinkString, createInMemoryAssetStore, createMemoryUserStore, createPresenceStateDerivation, createPropsMigrationSequences, createRootState, createSchema, createSessionStateSnapshotSignal, createShapeId, createShapePropsMigrationIds, createShapePropsMigrationSequence, createShapeValidator, createStore, createTLCurrentUser, createTLSchemaFromUtils, createTheme, createUserId, createUserPreferences, createUserRecordType, cursorTypeValidator, cursorValidator, customRecordMigrationSequenceId, dataUrlToFile, decodeDrawSegmentPath, defaultAssetMigrations, defaultAssetSchemas, defaultBindingSchemas, defaultShapeSchemas, defaultTldrawOptions, defaultUserPreferences, defaultUserStore, degreesToRadians, deselect, drawShapeSegmentValidator, dropShapesOnFrameLike, duplicatePage, easeInOutCubic, fileToBase64DataUrl, fileToDataUrl, findCommonAncestor, findShapeAncestor, fontKey, formatValidationPath, getArcMeasure, getAssetSrc, getBaseZoomForCameraOptions, getColorNamesFromThemes, getColorValue, getCulledShapes, getCurrentPageRenderingShapesSorted, getCurrentPageShapesInReadingOrder, getCursor, getCustomRecordIdType, getDefaultAssetContext, getDefaultCdnBaseUrl, getDefaultCrop, getDefaultDisplayValues, getDefaultUserPresence, getDefaultUserProperties, getDisplayValues, getDroppedShapesToNewParents, getEngineProvider, getExportImplementation, getFocusedGroup, getFocusedGroupId, getFontNamesFromThemes, getFontsFromRichText, getFrameLikeDropTarget, getFreshUserPreferences, getHandleHitRadius, getIncrementedName, getIndicatorSource, getInitialMetaForShape, getLocaleChain, getNearestAdjacentShape, getNotVisibleShapes, getOnlySelectedShapeId, getOverlayDisplayValues, getOwnerDocument, getOwnerWindow, getPageStates, getPaletteEntries, getPerfectDashProps, getPointInArcT, getPointOnCircle, getPointerInfo, getPointsOnArc, getPolygonVertices, getRenderingShapes, getSelectedShapeAtPoint, getSelectionHandlePositions, getSelectionRotatedPageBounds, getSelectionRotatedScreenBounds, getSelectionScreenBounds, getSessionStateSnapshot, getSessionStateSnapshotFromStore, getShapeAndDescendantIds, getShapeClipPath, getShapeHandles, getShapeIdsInsideBounds, getShapeIndicatorNode, getShapeIndicatorPath, getShapeMaskedPageBounds, getShapeStyleIfExists, getShapesPageBounds, getSharedOpacity, getSnapshot, getStylePropsOf, getSvgAsImage, getSvgPathFromPoints, getTextMeasureProvider, getThemeCssVars, getUncroppedSize, getUserPreferences, handleTypeValidator, hardReset, hardResetEditor, hasAncestor, hexToRgba, hitTestSelectionBounds, hitTestSelectionHandles, idValidator, imageAssetMigrations, imageAssetProps, imageAssetPropsValidator, imageAssetValidator, inlineBase64AssetStore, intersectCircleCircle, intersectCirclePolygon, intersectCirclePolyline, intersectLineSegmentCircle, intersectLineSegmentLineSegment, intersectLineSegmentPolygon, intersectLineSegmentPolyline, intersectPolygonBounds, intersectPolygonPolygon, isAncestorSelected, isAsset, isAssetId, isBinding, isBindingId, isCommentId, isCommentReactionId, isCommentThreadId, isCursorInViewport, isCustomRecord, isCustomRecordId, isDocument, isFullCrop, isInstancePresenceId, isOptionalValidator, isPage, isPageId, isPointInShape, isPropsMigrations, isSafeFloat, isShape, isShapeHidden, isShapeId, isShapeInPage, isUserId, isValidProps, kickoutOccludedShapes, lerp, linesIntersect, loadSessionStateSnapshotIntoStore, loadSnapshot, loopToHtmlElement, maybeSnapToGrid, mixHexColors, moveElementInto, moveShapesToPage, normalizeIndicatorPath, normalizeLoadedRecords, noteReactivePointerType, opacityValidator, openWindow, packShapes, pageIdValidator, parentIdValidator, parseDeepLinkString, perimeterOfEllipse, pointInPolygon, pointerValidator, polygonIntersectsPolyline, polygonsIntersect, popFocusedGroupId, precise, prefixError, preventDefault, radiansToDegrees, randomPresenceColor, rangeIntersection, refreshPage, refreshReactiveEnvironment, registerColorsFromThemes, registerCoreShape, registerDefaultAssetSchema, registerDefaultBindingSchema, registerDefaultShapeSchema, registerEngineProvider, registerExportImplementation, registerFontsFromThemes, registerTextMeasureImplementation, releasePointerCapture, resizeBox, resizeScaled, resizeToBounds, resolveAssetUrl, resolveLineHeightPx, resolveShape, resolveThemes, resolveUiMessage, richTextToPlainText, rootBindingMigrations, rootShapeMigrations, rotateSelectionHandle, runtime, sanitizeId, scribbleValidator, selectAdjacentShape, selectFirstChildShape, selectParentShape, setDefaultCdnBaseUrl, setFocusedGroup, setOpacityForNextShapes, setOpacityForSelectedShapes, setPointerCapture, setRuntimeOverrides, setUserPreferences, shapeIdValidator, shapePropsMigrationSequenceId, shortAngleDist, snapAngle, stopEventPropagation, strokeShapeIndicators, suffixSafeId, tleditors, tlenv, tlenvReactive, tlmenus, tltime, toCustomRecordMigrationSequence, toDomPrecision, toFixed, toMigrationSequence, toPrecision, trackPointer, uniq, updatePage, useActions, useAssetUrls, useColorMode, useContainer, useContainerIfExists, useCurrentTheme, useCurrentUser, useDelaySvgExport, useEditor, useEditorComponents, useEditorPortalHost, useGlobalMenuIsOpen, useIsCropping, useIsEditing, useIsToolSelected, useMaybeEditor, useMocanvasUi, usePassThroughWheelEvents, useSharedSafeId, useSvgExportContext, useTLSchemaFromUtils, useTLStore, useThemeColors, useThemeCssVars, useTools, useTransform, useUniqueSafeId, useViewportHeight, userIdValidator, userPreferencesValidator, userTypeValidator, userValidator, validateCustomRecordInfos, validateProps, vecModelValidator, videoAssetMigrations, videoAssetProps, videoAssetValidator, visitDescendants, warnOnce, withCoreShapes };
|