@mocanvas/editor 4.0.2 → 4.1.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/ARCHITECTURE.md +8 -2
- package/MIGRATION.md +46 -22
- package/README.md +5 -0
- package/UI.md +24 -2
- package/dist/index.d.ts +256 -27
- package/dist/index.js +402 -147
- 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
|
|
@@ -4428,6 +4499,14 @@ interface UserPreferencesState {
|
|
|
4428
4499
|
isPasteAtCursorMode?: boolean;
|
|
4429
4500
|
/** Whether keyboard shortcuts are active. */
|
|
4430
4501
|
areKeyboardShortcutsEnabled?: boolean;
|
|
4502
|
+
/**
|
|
4503
|
+
* Announce more than the minimum to a screen reader.
|
|
4504
|
+
*
|
|
4505
|
+
* The plain announcement names the selection and nothing else ("rectangle
|
|
4506
|
+
* selected"); with this on it also carries position and size, which is what a
|
|
4507
|
+
* keyboard user otherwise has no way to read back.
|
|
4508
|
+
*/
|
|
4509
|
+
isEnhancedA11yMode?: boolean;
|
|
4431
4510
|
}
|
|
4432
4511
|
/** What every unset preference resolves to. */
|
|
4433
4512
|
declare const USER_PREFERENCES_DEFAULTS: {
|
|
@@ -4441,6 +4520,7 @@ declare const USER_PREFERENCES_DEFAULTS: {
|
|
|
4441
4520
|
readonly isDynamicSizeMode: false;
|
|
4442
4521
|
readonly isPasteAtCursorMode: false;
|
|
4443
4522
|
readonly areKeyboardShortcutsEnabled: true;
|
|
4523
|
+
readonly isEnhancedA11yMode: false;
|
|
4444
4524
|
};
|
|
4445
4525
|
/**
|
|
4446
4526
|
* Mint a brand new set of preferences: a fresh id and a presence colour, and
|
|
@@ -4499,6 +4579,15 @@ declare class UserPreferencesManager {
|
|
|
4499
4579
|
getColor(): string;
|
|
4500
4580
|
setColor(color: string): void;
|
|
4501
4581
|
getLocale(): string;
|
|
4582
|
+
/**
|
|
4583
|
+
* How fast the editor animates; `0` means "do not animate".
|
|
4584
|
+
*
|
|
4585
|
+
* A user who has expressed no preference inherits the operating system's,
|
|
4586
|
+
* the same way `colorScheme: "system"` does. Reduced motion is an
|
|
4587
|
+
* accessibility setting people set once, for every application, and an
|
|
4588
|
+
* editor that ignored it until it was told a second time would be reading
|
|
4589
|
+
* the setting and then disregarding it.
|
|
4590
|
+
*/
|
|
4502
4591
|
getAnimationSpeed(): number;
|
|
4503
4592
|
getEdgeScrollSpeed(): number;
|
|
4504
4593
|
getIsSnapMode(): boolean;
|
|
@@ -4511,6 +4600,7 @@ declare class UserPreferencesManager {
|
|
|
4511
4600
|
*/
|
|
4512
4601
|
getIsDynamicResizeMode(): boolean;
|
|
4513
4602
|
getIsPasteAtCursorMode(): boolean;
|
|
4603
|
+
getIsEnhancedA11yMode(): boolean;
|
|
4514
4604
|
getAreKeyboardShortcutsEnabled(): boolean;
|
|
4515
4605
|
/** The scheme actually in force: the user's, else the editor's, else `"system"`. */
|
|
4516
4606
|
getColorScheme(): ColorScheme;
|
|
@@ -4675,6 +4765,7 @@ declare const defaultUserPreferences: {
|
|
|
4675
4765
|
readonly isDynamicSizeMode: false;
|
|
4676
4766
|
readonly isPasteAtCursorMode: false;
|
|
4677
4767
|
readonly areKeyboardShortcutsEnabled: true;
|
|
4768
|
+
readonly isEnhancedA11yMode: false;
|
|
4678
4769
|
};
|
|
4679
4770
|
/**
|
|
4680
4771
|
* Validates a stored preferences object.
|
|
@@ -6717,6 +6808,17 @@ declare class ScribbleManager extends EditorManager {
|
|
|
6717
6808
|
* it has run out. Scribbles that have shed everything are removed.
|
|
6718
6809
|
*/
|
|
6719
6810
|
tick(elapsed: number): void;
|
|
6811
|
+
/**
|
|
6812
|
+
* Whether anything here still needs frames.
|
|
6813
|
+
*
|
|
6814
|
+
* A host's frame loop asks this to decide whether to schedule another one. It
|
|
6815
|
+
* is deliberately "is there a scribble at all" rather than "is there anything
|
|
6816
|
+
* visible to redraw": a point offered through {@link addPoint} is held in
|
|
6817
|
+
* `next` and writes nothing to the store, so a loop that parked itself
|
|
6818
|
+
* because the picture had settled would never wake up to commit it, and the
|
|
6819
|
+
* trail would stop dead under a moving pointer.
|
|
6820
|
+
*/
|
|
6821
|
+
hasPendingWork(): boolean;
|
|
6720
6822
|
/** Every live scribble, in the order they were started. */
|
|
6721
6823
|
getItems(): ScribbleItem[];
|
|
6722
6824
|
/** Mirror the current scribbles into the `instance` record. */
|
|
@@ -7419,6 +7521,16 @@ interface TLEventMap {
|
|
|
7419
7521
|
pageId: string;
|
|
7420
7522
|
count: number;
|
|
7421
7523
|
}];
|
|
7524
|
+
/**
|
|
7525
|
+
* Shapes were deleted, with every id that went — descendants included, since
|
|
7526
|
+
* deleting a frame or a group takes its children with it and a listener
|
|
7527
|
+
* cleaning up per-shape state needs all of them.
|
|
7528
|
+
*
|
|
7529
|
+
* Fires once per `deleteShapes` call, after the removal, and only when
|
|
7530
|
+
* something was actually removed: a call naming a locked or missing shape
|
|
7531
|
+
* deletes nothing and emits nothing.
|
|
7532
|
+
*/
|
|
7533
|
+
"deleted-shapes": [ids: ShapeId[]];
|
|
7422
7534
|
}
|
|
7423
7535
|
/** A handler for one entry of {@link TLEventMap}. */
|
|
7424
7536
|
type TLEventMapHandler<T extends keyof TLEventMap> = (...args: TLEventMap[T]) => void;
|
|
@@ -8093,6 +8205,18 @@ interface HitTestOptions {
|
|
|
8093
8205
|
hitInside?: boolean;
|
|
8094
8206
|
hitLocked?: boolean;
|
|
8095
8207
|
hitFrameInside?: boolean;
|
|
8208
|
+
/**
|
|
8209
|
+
* Only consider shapes the viewport is currently rendering.
|
|
8210
|
+
*
|
|
8211
|
+
* A large page culls most of its shapes, and for a pointer gesture "off
|
|
8212
|
+
* screen" and "not hit" are the same answer — so this makes the hit test
|
|
8213
|
+
* cost proportional to what is visible rather than to the document.
|
|
8214
|
+
*
|
|
8215
|
+
* Off by default: a programmatic query ("what is at this page point?") is
|
|
8216
|
+
* usually asked about the document, not about the viewport, and an answer
|
|
8217
|
+
* that changed with the scroll position would be surprising.
|
|
8218
|
+
*/
|
|
8219
|
+
renderingOnly?: boolean;
|
|
8096
8220
|
filter?: (shape: UnknownShape) => boolean;
|
|
8097
8221
|
}
|
|
8098
8222
|
/**
|
|
@@ -8104,6 +8228,15 @@ interface HitTestOptions {
|
|
|
8104
8228
|
* heartbeat existing to survive exactly this cut-off.
|
|
8105
8229
|
*/
|
|
8106
8230
|
declare const COLLABORATOR_INACTIVE_TIMEOUT = 60000;
|
|
8231
|
+
|
|
8232
|
+
/**
|
|
8233
|
+
* Say something, once, about a mistake the library can see but cannot fix.
|
|
8234
|
+
*
|
|
8235
|
+
* Development only: a shipped bundle should not pay for the string, and a
|
|
8236
|
+
* production log is not where this reaches anyone. `process` may not exist at
|
|
8237
|
+
* all in a raw-ESM browser page, hence the guard rather than a bare read.
|
|
8238
|
+
*/
|
|
8239
|
+
declare function warnOnce(key: string, message: string): void;
|
|
8107
8240
|
/**
|
|
8108
8241
|
* The editor: document access, selection, camera, tool dispatch, and the
|
|
8109
8242
|
* bridge that mirrors the current page into the WASM engine.
|
|
@@ -8202,6 +8335,20 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
8202
8335
|
private richTextEditor;
|
|
8203
8336
|
/** Tools added or removed after construction, by id. */
|
|
8204
8337
|
private readonly removedToolIds;
|
|
8338
|
+
/**
|
|
8339
|
+
* This editor's own presence identity. See {@link getInstancePresenceId}.
|
|
8340
|
+
*
|
|
8341
|
+
* Minted per editor rather than per user: presence is about an *instance*,
|
|
8342
|
+
* and one person may have several.
|
|
8343
|
+
*/
|
|
8344
|
+
private readonly _instancePresenceId;
|
|
8345
|
+
/**
|
|
8346
|
+
* A {@link zoomToBounds} that arrived before the container had been measured,
|
|
8347
|
+
* waiting for the first non-empty viewport. See {@link zoomToBounds}.
|
|
8348
|
+
*/
|
|
8349
|
+
private pendingViewportFit;
|
|
8350
|
+
/** Whether a host has ever measured the canvas. See {@link getHasMeasuredViewport}. */
|
|
8351
|
+
private hasMeasuredViewport;
|
|
8205
8352
|
constructor(opts: EditorOptions);
|
|
8206
8353
|
dispose(): void;
|
|
8207
8354
|
getIsDisposed(): boolean;
|
|
@@ -8427,6 +8574,13 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
8427
8574
|
* the canvas than a cursor and needs the larger target.
|
|
8428
8575
|
*/
|
|
8429
8576
|
getHitTestMargin(): number;
|
|
8577
|
+
/**
|
|
8578
|
+
* `opts.filter` with `renderingOnly` folded in.
|
|
8579
|
+
*
|
|
8580
|
+
* Returned as one predicate so each query applies both in the same place;
|
|
8581
|
+
* the culled set is read once per call rather than per candidate shape.
|
|
8582
|
+
*/
|
|
8583
|
+
private hitFilter;
|
|
8430
8584
|
private hitFilterBits;
|
|
8431
8585
|
/**
|
|
8432
8586
|
* The outline a shape is *drawn* with when the hand-drawn style is on, as path
|
|
@@ -8639,6 +8793,17 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
8639
8793
|
*/
|
|
8640
8794
|
getResizeScaleFactor(): number;
|
|
8641
8795
|
getViewportScreenBounds(): Box;
|
|
8796
|
+
/**
|
|
8797
|
+
* Whether a host has ever told us how big the canvas is
|
|
8798
|
+
* ({@link updateViewportScreenBounds}).
|
|
8799
|
+
*
|
|
8800
|
+
* Until it has, {@link getViewportScreenBounds} answers with the instance
|
|
8801
|
+
* record's default — a plausible-looking 1080x720 that is not this canvas —
|
|
8802
|
+
* or with zeros once a container that has not been laid out yet has been
|
|
8803
|
+
* measured. Both are wrong in the same way and neither announces itself,
|
|
8804
|
+
* which is why anything that needs the viewport asks this first.
|
|
8805
|
+
*/
|
|
8806
|
+
getHasMeasuredViewport(): boolean;
|
|
8642
8807
|
getViewportScreenCenter(): Vec;
|
|
8643
8808
|
getViewportPageBounds(): Box;
|
|
8644
8809
|
getViewportPageCenter(): Vec;
|
|
@@ -8803,7 +8968,30 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
8803
8968
|
* dynamic-size mode. Session-only, never persisted with the document.
|
|
8804
8969
|
*/
|
|
8805
8970
|
readonly user: UserPreferencesManager;
|
|
8806
|
-
/**
|
|
8971
|
+
/**
|
|
8972
|
+
* This editor instance's presence record id — who *this tab* is, as opposed
|
|
8973
|
+
* to `user.getId()`, which is who the person is.
|
|
8974
|
+
*
|
|
8975
|
+
* The two are not interchangeable and conflating them was a bug: a user id
|
|
8976
|
+
* is per browser (it is the same in every tab, and the same on a phone and a
|
|
8977
|
+
* laptop signed in as one person), while a presence record is per editor
|
|
8978
|
+
* instance. Two tabs of one browser are two presences of one user, and they
|
|
8979
|
+
* must see each other.
|
|
8980
|
+
*
|
|
8981
|
+
* `@mocanvas/sync` publishes this tab's presence record under this id, which
|
|
8982
|
+
* is what lets {@link getCollaborators} drop our own record — and only our
|
|
8983
|
+
* own record — should it ever come back to us.
|
|
8984
|
+
*/
|
|
8985
|
+
getInstancePresenceId(): InstancePresenceId;
|
|
8986
|
+
/**
|
|
8987
|
+
* Presence records of everyone else in the room, in arrival order.
|
|
8988
|
+
*
|
|
8989
|
+
* "Else" means *another instance*, not another person: the filter is on the
|
|
8990
|
+
* presence record id ({@link getInstancePresenceId}), so a second tab, a
|
|
8991
|
+
* second window, or the same person on a phone and a laptop all show up as
|
|
8992
|
+
* collaborators. Filtering by user id instead made two tabs of one browser
|
|
8993
|
+
* invisible to each other while every message arrived correctly.
|
|
8994
|
+
*/
|
|
8807
8995
|
getCollaborators(): InstancePresence[];
|
|
8808
8996
|
/** The subset of `getCollaborators()` looking at the page we are on. */
|
|
8809
8997
|
getCollaboratorsOnCurrentPage(): InstancePresence[];
|
|
@@ -10357,13 +10545,18 @@ interface UserSchemaInfo {
|
|
|
10357
10545
|
}
|
|
10358
10546
|
|
|
10359
10547
|
/**
|
|
10360
|
-
*
|
|
10361
|
-
*
|
|
10548
|
+
* The registry the package that owns the built-in shapes, bindings and assets
|
|
10549
|
+
* fills in at import time.
|
|
10362
10550
|
*
|
|
10363
|
-
*
|
|
10364
|
-
*
|
|
10365
|
-
*
|
|
10366
|
-
*
|
|
10551
|
+
* `@mocanvas/editor` ships no shape types of its own — the built-ins live in
|
|
10552
|
+
* the flagship, which is the whole point of the split — so it cannot name their
|
|
10553
|
+
* props. The flagship registers them here when it is imported, and
|
|
10554
|
+
* `createSchema()` reads the registry so a `geo` record is validated against
|
|
10555
|
+
* `geoShapeProps` even when the caller passed no util lists at all.
|
|
10556
|
+
*
|
|
10557
|
+
* The state lives in this module rather than in `../editor/schemaFactories`, so
|
|
10558
|
+
* that `createSchema` can read it without importing the module that imports
|
|
10559
|
+
* `createSchema`. `schemaFactories` re-exports the public names.
|
|
10367
10560
|
*/
|
|
10368
10561
|
|
|
10369
10562
|
/** The type-keyed maps the registries below hold. */
|
|
@@ -10371,11 +10564,9 @@ type SchemaPropsInfoMap = Record<string, SchemaPropsInfo>;
|
|
|
10371
10564
|
/**
|
|
10372
10565
|
* The props and migrations of the built-in *shape* types.
|
|
10373
10566
|
*
|
|
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.
|
|
10567
|
+
* Reading it before the package that owns them has been imported correctly
|
|
10568
|
+
* yields nothing: there are no built-in shapes in an editor built on
|
|
10569
|
+
* `@mocanvas/editor` alone.
|
|
10379
10570
|
*/
|
|
10380
10571
|
declare const defaultShapeSchemas: Readonly<SchemaPropsInfoMap>;
|
|
10381
10572
|
/** The props and migrations of the built-in *binding* types. See {@link defaultShapeSchemas}. */
|
|
@@ -10388,6 +10579,17 @@ declare function registerDefaultShapeSchema(type: string, info: SchemaPropsInfo)
|
|
|
10388
10579
|
declare function registerDefaultBindingSchema(type: string, info: SchemaPropsInfo): () => void;
|
|
10389
10580
|
/** Register a built-in asset type's schema. */
|
|
10390
10581
|
declare function registerDefaultAssetSchema(type: string, info: SchemaPropsInfo): () => void;
|
|
10582
|
+
|
|
10583
|
+
/**
|
|
10584
|
+
* Building a schema from the utils an app is going to use, and the registry of
|
|
10585
|
+
* the schemas this library's own record types contribute.
|
|
10586
|
+
*
|
|
10587
|
+
* A schema is not configuration — it is the list of record types a document may
|
|
10588
|
+
* contain and how each of them has changed over time. It has to be built from
|
|
10589
|
+
* the same utils the editor is given, or a document will load records the
|
|
10590
|
+
* editor cannot render, or fail to migrate props the utils now expect.
|
|
10591
|
+
*/
|
|
10592
|
+
|
|
10391
10593
|
/**
|
|
10392
10594
|
* Build a store schema from the utils an editor will be given.
|
|
10393
10595
|
*
|
|
@@ -10529,14 +10731,6 @@ interface TLGetShapeAtPointOptions extends HitTestOptions {
|
|
|
10529
10731
|
hitLocked?: boolean;
|
|
10530
10732
|
/** Extra tolerance in page units. Defaults to the hit-test margin for the current pointer. */
|
|
10531
10733
|
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
10734
|
/** Arbitrary further filtering, applied last. */
|
|
10541
10735
|
filter?: (shape: UnknownShape) => boolean;
|
|
10542
10736
|
}
|
|
@@ -11157,6 +11351,28 @@ declare const parentIdValidator: Validator<ParentId>;
|
|
|
11157
11351
|
* per prop.
|
|
11158
11352
|
*/
|
|
11159
11353
|
type PropsMap = UnknownRecordProps | Record<string, Validatable<unknown>>;
|
|
11354
|
+
/**
|
|
11355
|
+
* How strict the props half of a record validator is about props the map does
|
|
11356
|
+
* not declare.
|
|
11357
|
+
*
|
|
11358
|
+
* `"reject"` is the default and the right answer for a record an app is
|
|
11359
|
+
* *making*: an undeclared prop there is a typo or a prop whose migration was
|
|
11360
|
+
* forgotten, and saying so early is the point.
|
|
11361
|
+
*
|
|
11362
|
+
* `"keep"` is the right answer for a record the store is *holding*, and is what
|
|
11363
|
+
* the schema's shape and binding types use. A `.tldr` written by a newer
|
|
11364
|
+
* generation of the format legitimately carries props this build has never
|
|
11365
|
+
* heard of — `binding.props.snap` is in the fixture in this repo — and dropping
|
|
11366
|
+
* or rejecting them would lose the user's data on the next save. The declared
|
|
11367
|
+
* props are still checked; the rest ride along. See `normalizeLoadedRecords`,
|
|
11368
|
+
* which states the same policy for the load path.
|
|
11369
|
+
*/
|
|
11370
|
+
type UnknownPropsPolicy = "reject" | "keep";
|
|
11371
|
+
/** Options the record validator factories share. */
|
|
11372
|
+
interface RecordValidatorOptions {
|
|
11373
|
+
/** What to do with props the map does not declare. Defaults to `"reject"`. */
|
|
11374
|
+
readonly unknownProps?: UnknownPropsPolicy | undefined;
|
|
11375
|
+
}
|
|
11160
11376
|
/**
|
|
11161
11377
|
* The validator for a shape type, from its `static props`.
|
|
11162
11378
|
*
|
|
@@ -11168,7 +11384,20 @@ type PropsMap = UnknownRecordProps | Record<string, Validatable<unknown>>;
|
|
|
11168
11384
|
* })
|
|
11169
11385
|
* ```
|
|
11170
11386
|
*/
|
|
11171
|
-
declare function createShapeValidator<Type extends string, Props extends object>(type: Type, props: PropsMap, meta?: PropsMap): Validator<BaseShape<Type, Props>>;
|
|
11387
|
+
declare function createShapeValidator<Type extends string, Props extends object>(type: Type, props: PropsMap, meta?: PropsMap, options?: RecordValidatorOptions): Validator<BaseShape<Type, Props>>;
|
|
11388
|
+
/**
|
|
11389
|
+
* The fields every shape has, whatever its type — everything but `props`.
|
|
11390
|
+
*
|
|
11391
|
+
* Used for a shape whose type this build has no props map for. Forward
|
|
11392
|
+
* compatibility is about `props`: a newer generation of the format may carry
|
|
11393
|
+
* props this build cannot describe, and those must survive a round trip. It
|
|
11394
|
+
* says nothing about `x` being a number or `index` being an index key, which
|
|
11395
|
+
* are true of every shape record there has ever been. Passing an unknown type
|
|
11396
|
+
* through untouched let `{ x: "NOT A NUMBER" }` into the store.
|
|
11397
|
+
*/
|
|
11398
|
+
declare function createBaseShapeValidator(): Validator<BaseShape<string, object>>;
|
|
11399
|
+
/** The counterpart of {@link createBaseShapeValidator} for bindings. */
|
|
11400
|
+
declare function createBaseBindingValidator(): Validator<BaseBinding<string, object>>;
|
|
11172
11401
|
/**
|
|
11173
11402
|
* The validator for a binding type, from its `static props`.
|
|
11174
11403
|
*
|
|
@@ -11176,7 +11405,7 @@ declare function createShapeValidator<Type extends string, Props extends object>
|
|
|
11176
11405
|
* as shape ids rather than as strings because a binding pointing at a page is
|
|
11177
11406
|
* the kind of corruption that only shows up when something tries to render it.
|
|
11178
11407
|
*/
|
|
11179
|
-
declare function createBindingValidator<Type extends string, Props extends object>(type: Type, props: PropsMap, meta?: PropsMap): Validator<BaseBinding<Type, Props>>;
|
|
11408
|
+
declare function createBindingValidator<Type extends string, Props extends object>(type: Type, props: PropsMap, meta?: PropsMap, options?: RecordValidatorOptions): Validator<BaseBinding<Type, Props>>;
|
|
11180
11409
|
/**
|
|
11181
11410
|
* The validator for an asset type, from its props.
|
|
11182
11411
|
*
|
|
@@ -13735,4 +13964,4 @@ declare function setDefaultCdnBaseUrl(url: string): void;
|
|
|
13735
13964
|
/** Forget every asset id in `ids`. Exported for stores that batch their deletes. */
|
|
13736
13965
|
type AssetIdList = readonly AssetId[];
|
|
13737
13966
|
|
|
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 };
|
|
13967
|
+
export { ARROWHEAD_KINDS, ARROW_SHAPE_KINDS, ASSET_MIGRATION_SEQUENCE_PREFIX, Arc2d, ArrayOfValidator, ArrowShapeArrowheadEndStyle, type ArrowShapeArrowheadKind, ArrowShapeArrowheadStartStyle, type ArrowShapeKind, ArrowShapeKindStyle, type Asset, type AssetContext, type AssetCreate, type AssetId, type AssetIdList, type AssetPartial, type AssetPropsForType, AssetRecordType, type AssetStore, type AssetType, type AssetTypeName, type AssetUploadResult, AssetUrlsProvider, type AssetUrlsProviderProps, AssetUtil, AssetUtilRegistry, type B64VecPoint, BINDING_MIGRATION_SEQUENCE_PREFIX, BUILTIN_ASSET_MIGRATION_SEQUENCE_PREFIX, BUILTIN_BINDING_MIGRATION_SEQUENCE_PREFIX, BUILTIN_SHAPE_MIGRATION_SEQUENCE_PREFIX, type BaseAsset, type BaseBinding, BaseBoxShapeUtil, type BaseEventInfo, BaseFrameLikeShapeUtil, type BaseShape, type BatchMeasurementRequest, type Binding, type BindingCanBindOptions, type BindingCreate, type BindingId, type BindingOnChangeOptions, type BindingOnCreateOptions, type BindingOnDeleteOptions, type BindingOnShapeChangeOptions, type BindingOnShapeDeleteOptions, type BindingOnShapeIsolateOptions, type BindingPartial, type BindingPropsForType, BindingRecordType, type BindingTypeName, BindingUtil, type BindingUtilConstructor, type BookmarkAsset, type BookmarkAssetProps, type BoundsSnapGeometry, type BoundsSnapPoint, type BoundsSnapResizeOptions, type BoundsSnapTranslateOptions, BoundsSnaps, Box, type BoxHandle, type BoxLike, type BoxModel, CANVAS_THEME_VARS, COLLABORATOR_INACTIVE_TIMEOUT, CURRENT_SESSION_SCHEMA_VERSION, CURSOR_TYPES, CUSTOM_RECORD_MIGRATION_SEQUENCE_PREFIX, CUSTOM_RECORD_TYPE_NAME, type CachedUserResolve, type Camera, type CameraId, CameraRecordType, CameraStateTracker, type CancelEventInfo, Canvas, type CanvasComponents, type CanvasProps, Circle2d, type ClickEventInfo, type ClickEventName, ClickManager, CollaboratorsManager, type ColorScheme, type DefaultColorStyle$1 as ColorValue, CommentReactionRecordType, CommentRecordType, CommentThreadRecordType, type CompleteEventInfo, type ContainerDocument, ContainerProvider, type ContainerProviderProps, type ContainerWindow, type ContentElementHost, ContentElementManager, type ContentElementSource, type CreateCachedUserResolveOptions, type CreatePresenceStateDerivationOpts, type CreateStoreOptions, CubicBezier2d, type CubicSegmentLike, CubicSpline2d, type CurrentUser, type CustomRecordInfo, type CustomRecordPropsForType, DEFAULT_ASSET_CONTEXT, DEFAULT_CAMERA_OPTIONS, DEFAULT_COLORS, DEFAULT_DARK_COLORS, DEFAULT_DASHES, DEFAULT_EDITOR_CONFIG, DEFAULT_FILLS, DEFAULT_FILL_TOKENS, DEFAULT_FONTS, DEFAULT_FONT_FAMILIES, DEFAULT_H_ALIGNS, DEFAULT_LIGHT_COLORS, DEFAULT_LINE_HEIGHT, DEFAULT_MENU_CONTEXT, DEFAULT_PAGE_ID, DEFAULT_SHAPE_INDICATOR_OPTIONS, DEFAULT_SIZES, DEFAULT_TEXT_ALIGNS, DEFAULT_THEME, DEFAULT_TIME_CONTEXT, DEFAULT_V_ALIGNS, DIM_2D, DIM_3D, DOCUMENT_ID, type DefaultDashStyle$1 as DashValue, type DecodedDrawPoint, type DecomposedMat, DefaultBackground, DefaultCanvas, DefaultColorStyle, DefaultCursor, DefaultDashStyle, DefaultErrorFallback, DefaultFillStyle, DefaultFontFaces, DefaultFontFamilies, DefaultFontStyle, DefaultGrid, DefaultHorizontalAlignStyle, DefaultLabelColorStyle, DefaultShapeWrapper, DefaultSizeStyle, DefaultSpinner, DefaultSvgDefs, DefaultTextAlignStyle, DefaultVerticalAlignStyle, DictValidator, type Document$1 as Document, type DocumentId, DocumentRecordType, type DrawOptions, EASINGS, ELBOW_ARROW_SNAP_MODES, EVENT_NAME_MAP, Edge2d, EdgeScrollManager, Editor, EditorAtom, type EditorConfig, EditorContext, type EditorEngineProvider, type EditorEvents, type EditorExportImplementation, type EditorImageExportOptions, type EditorImageExportResult, type EditorInputs, EditorManager, type EditorOptions, EditorPortal, type EditorPortalProps, EditorProvider, type EditorProviderProps, type EditorRecord, type EditorStore, type EditorStoreProps, type EditorStoreSnapshot, type EditorSvgExportOptions, type EditorSvgExportResult, type EditorTextHtmlMeasurement, type EditorTextMeasure, type EditorTextMeasureHtmlOptions, type EditorTextMeasureOptions, type EditorTextMeasureProvider, type EditorTextMeasurement, ElbowArrowSnap, type ElbowArrowSnapMode, Ellipse2d, type EngineGeometry, EnumStyleProp, ErrorBoundary, type ErrorBoundaryProps, ErrorScreen, type ErrorScreenProps, EventEmitter, type EventHandlers, type EventInfo, type ExternalAssetContent, type ExternalAssetHandler, type ExternalAssetType, type ExternalContent, type ExternalContentHandler, type ExternalContentType, type ExtractShapeByProps, FIRST_PAGE_INDEX, FONT_SIZES, type DefaultFillStyle$1 as FillValue, FontManager, type DefaultFontStyle$1 as FontValue, type FrameLikeShape, GEO_SHAPE_KINDS, type GapsSnapIndicator, GeoShapeGeoStyle, type GeoShapeKind, Geometry2d, Geometry2dFilters, type Geometry2dOptions, type GetSvgAsImageOptions, Group2d, HALF_PI, HANDLE_HIT_RADIUS, type DefaultHorizontalAlignStyle$1 as HAlignValue, HTMLContainer, type HTMLContainerProps, type HandleSnapGeometry, type HandleSnapOptions, HandleSnaps, HandleTable, HistoryManager, type HitTestOptions, INSTANCE_ID, type ImageAsset, type ImageAssetProps, ImageShapeCrop, type IndicatorPathSource, type IndicatorShapeUtil, type IndicatorSource, InputsManager, type Instance, type InstanceId, type InstancePageState, type InstancePageStateId, InstancePageStateRecordType, type InstancePresence, type InstancePresenceId, InstancePresenceRecordType, InstanceRecordType, type InterruptEventInfo, type JsonObject, type JsonPrimitive, type JsonValue, type KeyboardEventInfo, type KeyboardEventName, LIGHT_THEME, LINE_SPLINE_KINDS, LOCAL_STATE_PREFIX, type LegacyDrawShapeSegment, type LineShapeSplineKind, LineShapeSplineStyle, LoadingScreen, type LoadingScreenProps, MAX_TEXTURE_RESOLUTION, MAX_TEXTURE_ZOOM, Mat, type MatLike, type MatModel, MenuClickCapture, MenuManager, type MigratableProps, type MocanvasUiContextValue, MocanvasUiProvider, type MocanvasUiProviderProps, type NormalizeOptions, type NormalizeResult, ObjectValidator, type ObjectValidatorType, type OptionalKeys, type OverlayEntry, type OverlayHost, type OverlayLike, OverlayManager, type OverlayOptionsWithDisplayValues, OverlayUtil, type OverlayUtilOptions, PI, PI2, PRESENCE_COLORS, type Page, type PageId, PageRecordType, type ParentId, type PerfectDashOptions, type PerfectDashProps, type PerfectDashTerminal, PerformanceApiAdapter, type PerformanceApiAdapterOptions, type PerformanceEventName, type PerformanceEvents, PerformanceManager, type PinchEventInfo, Point2d, type PointLike, type PointerEventInfo, type PointerEventName, PointerRecordType, type PointerSource, type PointerTarget, type PointsSnapIndicator, Polygon2d, Polyline2d, type PresenceStateDerivationOptions, type PresenceUser, type PropsMigration, type PropsMigrationSource, type PropsMigrationTarget, type PropsMigrations, type RGBA, ROTATE_CORNER_TO_SELECTION_CORNER, ROTATE_HANDLE_OFFSET, ReadonlySharedStyleMap, type RecordPropValidator, type RecordProps, type RecordPropsType, type RecordValidatorOptions, Rectangle2d, type RegisteredAssetType, type RegisteredBindingType, type RegisteredCustomRecordType, type RegisteredShapeType, type RenderBackend, type RequiredKeys, type ResizeBoxOptions, type ResizeInfo, type ResizeShapeOptions, type RichTextFontVisitor, type RichTextFontVisitorState, RootState, type RotateCorner, SHAPE_MIGRATION_SEQUENCE_PREFIX, SIDES, SIN, STROKE_SIZES, SVGContainer, type SVGContainerProps, type SafeId, type SchemaPropsInfo, type SchemaPropsInfoMap, type SchemaUtilSource, type Scribble, type ScribbleItem, ScribbleManager, type ScribbleSessionOptions, type SelectionCorner, type SelectionEdge, type SelectionHandle, type SelectionHandleHit, type SetValue, type Shape, type ShapeCreate, type ShapeHandle, type ShapeId, ShapeIndicatorCompositor, type ShapePartial, type ShapePropsForType, ShapeRecordType, type ShapeRef, type ShapeSvgContext, type ShapeSvgResult, type ShapeTypeName, ShapeUtil, type ShapeUtilClass, type ShapeUtilConstructor, type ShapeUtilOptions, type ShapeUtilOptionsPatch, type ShapeWithCrop, type SharedStyle, SharedStyleMap, type DefaultSizeStyle$1 as SizeValue, type SnapData, type SnapIndicator, type SnapLine, SnapManager, type SnapResult, Stadium2d, StateNode, type StateNodeClass, type StateNodeConstructor, type StateNodeType, type StrokeShapeIndicatorsOptions, StyleProp, type StylePropValue, SvgExportContextProvider, type SvgExportContextProviderProps, type SvgExportDef, T, TAB_ID, type TLActionShortcutsLocation, type TLAdjacentDirection, type TLAnimationOptions, type TLAnyAssetUtilConstructor, type TLAnyOverlayUtilConstructor, type TLArrowShapeArrowheadStyle, type TLArrowShapeKind, type TLAssetShape, type TLAssetUrls, type TLAssetUtilClass, type TLAssetUtilConstructor, type TLAssetUtilConstructorLike, type TLAssetUtilLike, type TLAssetUtilOptions, type TLBaseBoxShape, type TLBaseExternalContent, type TLBindingUpdate, type TLCLickEventName, type TLCameraConstraints, type TLCameraConstraintsZoom, type TLCameraEndPerfEvent, type TLCameraMoveOptions, type TLCameraOptions, type TLCameraStartPerfEvent, type TLCameraState, type TLCancelEvent, type TLCanvasComponentProps, type TLCanvasUiColor, type TLClickEvent, type TLClickEventInfo, type TLClickState, type TLClipboardPasteRawInfo, type TLClipboardWriteInfo, type TLColorMode, type TLColorScheme, type TLColorSchemeWindow, type TLComment, type TLCommentAnchor, type TLCommentId, type TLCommentReaction, type TLCommentReactionId, type TLCommentThread, type TLCommentThreadId, type TLCompleteEvent, type TLComponents, type TLComponentsResolved, type TLContent, type TLCreateShapePartial, type TLCropInfo, type TLCursor, type TLCursorProps, type TLCursorSlotProps, type TLCursorType, type TLCursorViewportSource, type TLCustomRecord, type TLCustomRecordId, type TLDeepLink, type TLDeepLinkOptions, type TLDefaultAsset, type TLDefaultBinding, type TLDefaultColor, type TLDefaultColorVariant, type TLDefaultDisplayValues, type TLDefaultRecord, type TLDefaultShape, type TLDefaultTextAlignStyle, type TLDisplayValuesSource, type TLDragShapesInInfo, type TLDragShapesInfo, type TLDragShapesOutInfo, type TLDragShapesOverInfo, type TLDrawShapeSegment, type TLDropShapesOverInfo, type TLEasingType, type TLEditStartInfo, type TLEditorAssetUrls, type TLEditorComponents, type TLEditorComponentsEditor, type TLEditorRunOptions, type TLEditorSnapshot, TLEditorsRegistry, type TLEmbedExternalContent, type TLEnterEventHandler, type TLEnvironment, type TLErrorBoundaryProps, type TLErrorExternalContentSource, type TLErrorFallbackComponent, type TLErrorFallbackProps, type TLErrorSlotProps, type TLEventMap, type TLEventMapHandler, type TLEventName, type TLExcalidrawExternalContent, type TLExcalidrawExternalContentSource, type TLExitEventHandler, type TLExportType, type TLExternalAsset, type TLExternalContentSource, type TLFileExternalAsset, type TLFileReplaceExternalContent, type TLFilesExternalContent, type TLFontFace, type TLFontFaceSet, type TLFontFaceSource, type TLFontLoadState, type TLFramePerfEvent, type TLGeometryOpts, type TLGetCustomDisplayValues, type TLGetCustomOverlayDisplayValues, type TLGetDefaultDisplayValues, type TLGetDefaultOverlayDisplayValues, type TLGetShapeAtPointOptions, type TLGetShapeVisibility, type TLGlobalAssetPropsMap, type TLGlobalBindingPropsMap, type TLGlobalRecordPropsMap, type TLGlobalShapePropsMap, type TLGridProps, type TLGridStep, type TLHandleDragInfo, type TLHandleType, type TLHistoryBatchOptions, type TLHistoryDiff, type TLHistoryEntry, type TLHistoryMark, type TLHistoryRecordingMode, type TLImageExportOptions, type TLIndexedAssets, type TLIndexedBindings, type TLIndexedRecords, type TLIndexedShapes, type TLIndicatorContext, type TLIndicatorHost, type TLIndicatorOverlay, type TLIndicatorPath, type TLIndicatorPathResult, type TLIndicatorTransform, type TLInstancePresenceID, type TLInteractionEndPerfEvent, type TLInteractionStartPerfEvent, type TLInterpolationProgress, type TLInterruptEvent, type TLKeyboardEvent, type TLLineShapeSplineStyle, type TLLoadSessionStateSnapshotOptions, type TLLoadSnapshotOptions, type TLMeasureTextOpts, type TLMeasureTextSpanOpts, type TLMeasuredTextSize, type TLMenus, type TLOpacityType, type TLOverlay, type TLOverlayDisplayValuesSource, type TLOverlayEntry, type TLOverlayUtilConstructor, TLPOINTER_ID, type TLPerfEventMap, type TLPerfFrameTimeStats, type TLPerfLongAnimationFrame, type TLPerfLongAnimationFrameScript, type TLPinchEvent, type TLPinchEventName, type TLPointInShapeOptions, type TLPointer, type TLPointerEvent, type TLPointerEventTarget, type TLPointerId, type TLPointerInfo, type TLPresenceStateInfo, type TLReactiveEnvironment, type TLRegisteredAsset, type TLRemovedDefaultThemeColors, type TLRenderingShape, type TLResettableEditor, type TLResizeHandle, type TLResizeMode, type TLRichTextFontSource, type TLRuntime, type TLSchema, type TLScribbleState, type TLSessionPageState, type TLSessionStateSnapshot, type TLShapeCrop, type TLShapeErrorFallbackComponent, type TLShapeIndicatorOptions, type TLShapeOperationPerfEvent, type TLShapeUtilCanBeLaidOutOpts, type TLShapeUtilCanBindOpts, type TLShapeUtilCanvasSvgDef, type TLShapeVisibility, type TLShapeWrapperProps, type TLShapeWrapperSlotProps, type TLSharedOpacity, type TLStoreBaseOptions, type TLStoreEventInfo, type TLStoreOptions, type TLStoreProps, type TLStoreSchemaOptions, type TLStoreWithStatus, type TLStyledShape, type TLStyledShapeProps, type TLSvgExportContext, type TLSvgTextExternalContent, type TLTemporaryAssetPreview, type TLTextExternalContent, type TLTextExternalContentSource, type TLTextOptions, type TLTextSpan, type TLTheme, type TLThemeColors, type TLThemeDefaultColors, type TLThemeFont, type TLThemeFonts, type TLThemeHost, type TLThemeId, type TLThemePatch, type TLThemeUiColorKeys, type TLThemes, type TLThemesInput, type TLTickEvent, type TLTime, type TLTimeContext, type TLTldrawExternalContent, type TLTldrawExternalContentSource, type TLUiActionItem, type TLUiActionsBuilder, type TLUiActionsContextType, type TLUiAssetUrls, type TLUiComponentSlot, type TLUiEventSource, type TLUiOverrideHelpers, type TLUiOverrides, type TLUiToolItem, type TLUiToolsBuilder, type TLUiToolsContextType, type TLUiTranslations, type TLUndoRedoPerfEvent, type TLUnknownAsset, type TLUpdatePointerOptions, type TLUrlExternalAsset, type TLUrlExternalContent, type TLWheelEvent, TL_CANVAS_UI_COLOR_TYPES, TL_CURSOR_TYPES, TL_HANDLE_TYPES, TL_SCRIBBLE_STATES, type DefaultTextAlignStyle$1 as TextAlignValue, TextManager, type TextureInfo, type TextureLoader, TextureManager, type TextureManagerOptions, type TextureOptions, type TextureSource, type TextureState, type ThemeColor, ThemeManager, type ThemeManagerOptions, type TickEventInfo, Timers, type TiptapEditor, type TiptapNode, type TldrawEditorBaseProps, type TldrawEditorProps, type TldrawEditorWithStoreProps, type TldrawEditorWithoutStoreProps, type TldrawOptions, TransformedGeometry2d, type TransformedGeometry2dOptions, type TranslateInfo, type TypeOf, UNKNOWN_EDIT_START_INFO, USER_PREFERENCES_DEFAULTS, type UiEvent, type UiEventType, UnionValidator, type UnionValidatorConfig, type UnknownBinding, type UnknownCustomRecord, type UnknownPropsPolicy, type UnknownRecordProps, type UnknownShape, type UseCurrentUserOptions, type User, type UserId, type UserPreferences, type UserPreferencesInit, UserPreferencesManager, type UserPreferencesState, type UserRecordId, UserRecordType, type UserSchemaInfo, type UserStore, type DefaultVerticalAlignStyle$1 as VAlignValue, type Validatable, ValidationError, type ValidationLibrary, type ValidationPathSegment, Validator, Vec, type VecLike, type VecModel, type VideoAsset, type VideoAssetProps, WebGL2Backend, type WheelEventInfo, angleDistance, animateShape, animateShapes, applyThemePatch, approximately, areAnglesCompatible, arrowBindingVersions, assetIdValidator, assetMigrations, assetPropsMigrationSequenceId, assetValidator, assetValidators, average, b64Vecs, bindingIdValidator, bindingPropsMigrationSequenceId, bookmarkAssetMigrations, bookmarkAssetProps, bookmarkAssetPropsValidator, bookmarkAssetValidator, boundsIndicatorPath, boxModelValidator, bucketTextureResolution, canBindShapes, canBuildIndicatorPaths, canCreateShape, canCreateShapes, canCropShape, canEditShape, canonicalizeRotation, canvasUiColorTypeValidator, centerOfCircleFromThreePoints, clamp, clampRadians, clockwiseAngleDist, commentAnchorValidator, commentReactionRecordConfig, commentReactionValidator, commentRecordConfig, commentSchemaRecords, commentThreadRecordConfig, commentThreadValidator, commentValidator, compressLegacySegments, coreShapes, counterClockwiseAngleDist, createAssetId, createAssetPropsMigrationIds, createAssetPropsMigrationSequence, createAssetValidator, createBackend, createBaseBindingValidator, createBaseShapeValidator, createBindingId, createBindingPropsMigrationIds, createBindingPropsMigrationSequence, createBindingValidator, createBuiltInAssetPropsMigrationIds, createBuiltInBindingPropsMigrationIds, createBuiltInShapePropsMigrationIds, createCachedUserResolve, createComment, createCommentId, createCommentReaction, createCommentReactionId, createCommentThread, createCommentThreadId, createCurrentUser, createCustomRecord, createCustomRecordId, createCustomRecordMigrationIds, createCustomRecordMigrationSequence, createCustomRecordMigrationSequences, createCustomRecordType, createCustomRecordTypeMap, createCustomRecordValidator, createDeepLinkString, createInMemoryAssetStore, createMemoryUserStore, createPresenceStateDerivation, createPropsMigrationSequences, createRootState, createSchema, createSessionStateSnapshotSignal, createShapeId, createShapePropsMigrationIds, createShapePropsMigrationSequence, createShapeValidator, createStore, createTLCurrentUser, createTLSchemaFromUtils, createTheme, createUserId, createUserPreferences, createUserRecordType, cursorTypeValidator, cursorValidator, customRecordMigrationSequenceId, dataUrlToFile, decodeDrawSegmentPath, defaultAssetMigrations, defaultAssetSchemas, defaultBindingSchemas, defaultShapeSchemas, defaultTldrawOptions, defaultUserPreferences, defaultUserStore, degreesToRadians, deselect, drawShapeSegmentValidator, dropShapesOnFrameLike, duplicatePage, easeInOutCubic, fileToBase64DataUrl, fileToDataUrl, findCommonAncestor, findShapeAncestor, fontKey, formatValidationPath, getArcMeasure, getAssetSrc, getBaseZoomForCameraOptions, getColorNamesFromThemes, getColorValue, getCulledShapes, getCurrentPageRenderingShapesSorted, getCurrentPageShapesInReadingOrder, getCursor, getCustomRecordIdType, getDefaultAssetContext, getDefaultCdnBaseUrl, getDefaultCrop, getDefaultDisplayValues, getDefaultUserPresence, getDefaultUserProperties, getDisplayValues, getDroppedShapesToNewParents, getEngineProvider, getExportImplementation, getFocusedGroup, getFocusedGroupId, getFontNamesFromThemes, getFontsFromRichText, getFrameLikeDropTarget, getFreshUserPreferences, getHandleHitRadius, getIncrementedName, getIndicatorSource, getInitialMetaForShape, getLocaleChain, getNearestAdjacentShape, getNotVisibleShapes, getOnlySelectedShapeId, getOverlayDisplayValues, getOwnerDocument, getOwnerWindow, getPageStates, getPaletteEntries, getPerfectDashProps, getPointInArcT, getPointOnCircle, getPointerInfo, getPointsOnArc, getPolygonVertices, getRenderingShapes, getSelectedShapeAtPoint, getSelectionHandlePositions, getSelectionRotatedPageBounds, getSelectionRotatedScreenBounds, getSelectionScreenBounds, getSessionStateSnapshot, getSessionStateSnapshotFromStore, getShapeAndDescendantIds, getShapeClipPath, getShapeHandles, getShapeIdsInsideBounds, getShapeIndicatorNode, getShapeIndicatorPath, getShapeMaskedPageBounds, getShapeStyleIfExists, getShapesPageBounds, getSharedOpacity, getSnapshot, getStylePropsOf, getSvgAsImage, getSvgPathFromPoints, getTextMeasureProvider, getThemeCssVars, getUncroppedSize, getUserPreferences, handleTypeValidator, hardReset, hardResetEditor, hasAncestor, hexToRgba, hitTestSelectionBounds, hitTestSelectionHandles, idValidator, imageAssetMigrations, imageAssetProps, imageAssetPropsValidator, imageAssetValidator, inlineBase64AssetStore, intersectCircleCircle, intersectCirclePolygon, intersectCirclePolyline, intersectLineSegmentCircle, intersectLineSegmentLineSegment, intersectLineSegmentPolygon, intersectLineSegmentPolyline, intersectPolygonBounds, intersectPolygonPolygon, isAncestorSelected, isAsset, isAssetId, isBinding, isBindingId, isCommentId, isCommentReactionId, isCommentThreadId, isCursorInViewport, isCustomRecord, isCustomRecordId, isDocument, isFullCrop, isInstancePresenceId, isOptionalValidator, isPage, isPageId, isPointInShape, isPropsMigrations, isSafeFloat, isShape, isShapeHidden, isShapeId, isShapeInPage, isUserId, isValidProps, kickoutOccludedShapes, lerp, linesIntersect, loadSessionStateSnapshotIntoStore, loadSnapshot, loopToHtmlElement, maybeSnapToGrid, mixHexColors, moveElementInto, moveShapesToPage, normalizeIndicatorPath, normalizeLoadedRecords, noteReactivePointerType, opacityValidator, openWindow, packShapes, pageIdValidator, parentIdValidator, parseDeepLinkString, perimeterOfEllipse, pointInPolygon, pointerValidator, polygonIntersectsPolyline, polygonsIntersect, popFocusedGroupId, precise, prefixError, preventDefault, radiansToDegrees, randomPresenceColor, rangeIntersection, refreshPage, refreshReactiveEnvironment, registerColorsFromThemes, registerCoreShape, registerDefaultAssetSchema, registerDefaultBindingSchema, registerDefaultShapeSchema, registerEngineProvider, registerExportImplementation, registerFontsFromThemes, registerTextMeasureImplementation, releasePointerCapture, resizeBox, resizeScaled, resizeToBounds, resolveAssetUrl, resolveLineHeightPx, resolveShape, resolveThemes, resolveUiMessage, richTextToPlainText, rootBindingMigrations, rootShapeMigrations, rotateSelectionHandle, runtime, sanitizeId, scribbleValidator, selectAdjacentShape, selectFirstChildShape, selectParentShape, setDefaultCdnBaseUrl, setFocusedGroup, setOpacityForNextShapes, setOpacityForSelectedShapes, setPointerCapture, setRuntimeOverrides, setUserPreferences, shapeIdValidator, shapePropsMigrationSequenceId, shortAngleDist, snapAngle, stopEventPropagation, strokeShapeIndicators, suffixSafeId, tleditors, tlenv, tlenvReactive, tlmenus, tltime, toCustomRecordMigrationSequence, toDomPrecision, toFixed, toMigrationSequence, toPrecision, trackPointer, uniq, updatePage, useActions, useAssetUrls, useColorMode, useContainer, useContainerIfExists, useCurrentTheme, useCurrentUser, useDelaySvgExport, useEditor, useEditorComponents, useEditorPortalHost, useGlobalMenuIsOpen, useIsCropping, useIsEditing, useIsToolSelected, useMaybeEditor, useMocanvasUi, usePassThroughWheelEvents, useSharedSafeId, useSvgExportContext, useTLSchemaFromUtils, useTLStore, useThemeColors, useThemeCssVars, useTools, useTransform, useUniqueSafeId, useViewportHeight, userIdValidator, userPreferencesValidator, userTypeValidator, userValidator, validateCustomRecordInfos, validateProps, vecModelValidator, videoAssetMigrations, videoAssetProps, videoAssetValidator, visitDescendants, warnOnce, withCoreShapes };
|