From 4f70a4f4e85b278e79a4afadec2eeb08f26879a8 Mon Sep 17 00:00:00 2001 From: David Sheldrick Date: Mon, 15 Apr 2024 13:53:42 +0100 Subject: [PATCH] New migrations again (#3220) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Describe what your pull request does. If appropriate, add GIFs or images showing the before and after. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `galaxy brain` — Architectural changes ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes #### BREAKING CHANGES - The `Migrations` type is now called `LegacyMigrations`. - The serialized schema format (e.g. returned by `StoreSchema.serialize()` and `Store.getSnapshot()`) has changed. You don't need to do anything about it unless you were reading data directly from the schema for some reason. In which case it'd be best to avoid that in the future! We have no plans to change the schema format again (this time was traumatic enough) but you never know. - `compareRecordVersions` and the `RecordVersion` type have both disappeared. There is no replacement. These were public by mistake anyway, so hopefully nobody had been using it. - `compareSchemas` is a bit less useful now. Our migrations system has become a little fuzzy to allow for simpler UX when adding/removing custom extensions and 3rd party dependencies, and as a result we can no longer compare serialized schemas in any rigorous manner. You can rely on this function to return `0` if the schemas are the same. Otherwise it will return `-1` if the schema on the right _seems_ to be newer than the schema on the left, but it cannot guarantee that in situations where migration sequences have been removed over time (e.g. if you remove one of the builtin tldraw shapes). Generally speaking, the best way to check schema compatibility now is to call `store.schema.getMigrationsSince(persistedSchema)`. This will throw an error if there is no upgrade path from the `persistedSchema` to the current version. - `defineMigrations` has been deprecated and will be removed in a future release. For upgrade instructions see https://tldraw.dev/docs/persistence#Updating-legacy-shape-migrations-defineMigrations - `migrate` has been removed. Nobody should have been using this but if you were you'll need to find an alternative. For migrating tldraw data, you should stick to using `schema.migrateStoreSnapshot` and, if you are building a nuanced sync engine that supports some amount of backwards compatibility, also feel free to use `schema.migratePersistedRecord`. - the `Migration` type has changed. If you need the old one for some reason it has been renamed to `LegacyMigration`. It will be removed in a future release. - the `Migrations` type has been renamed to `LegacyMigrations` and will be removed in a future release. - the `SerializedSchema` type has been augmented. If you need the old version specifically you can use `SerializedSchemaV1` --------- Co-authored-by: Steve Ruiz --- .gitignore | 2 + apps/docs/api/editor.api.json | 100313 ++++++++------- apps/docs/api/store.api.json | 11623 +- apps/docs/api/tldraw.api.json | 57991 +++++---- apps/docs/api/tlschema.api.json | 19661 +-- apps/docs/api/validate.api.json | 9966 +- apps/docs/content/docs/collaboration.mdx | 70 +- apps/docs/content/docs/editor.mdx | 16 +- apps/docs/content/docs/persistence.mdx | 245 +- apps/docs/content/docs/shapes.mdx | 4 +- .../ClientWebSocketAdapter.test.ts | 2 +- .../BoundsSnappingShape.tsx | 4 +- .../CardShape/card-shape-migrations.ts | 35 +- .../image-component/TldrawImageExample.tsx | 15 +- .../meta-migrations/MetaMigrations.tsx | 74 + .../src/examples/meta-migrations/README.md | 12 + .../src/examples/meta-migrations/snapshot.ts | 57 + .../examples/meta-migrations/ui-overrides.tsx | 41 + .../examples/only-editor/MicroSelectTool.ts | 2 +- .../ShapeWithMigrationsExample.tsx | 3 +- .../examples/snapshots/SnapshotExample.tsx | 6 +- config/jest/node/jest-preset.js | 2 +- package.json | 2 +- packages/editor/api-report.md | 504 +- packages/editor/api/api.json | 1193 +- packages/editor/src/lib/TldrawEditor.tsx | 3 +- .../src/lib/config/TLSessionStateSnapshot.ts | 44 +- .../src/lib/config/TLUserPreferences.ts | 109 +- .../editor/src/lib/config/createTLStore.ts | 5 +- packages/editor/src/lib/editor/Editor.ts | 18 - .../editor/src/lib/editor/shapes/ShapeUtil.ts | 15 +- .../lib/utils/sync/TLLocalSyncClient.test.ts | 2 +- .../src/lib/utils/sync/TLLocalSyncClient.ts | 19 +- packages/namespaced-tldraw/api/api.json | 2 +- packages/state/api/api.json | 2 +- packages/state/src/lib/core/warnings.ts | 12 - packages/store/api-report.md | 181 +- packages/store/api/api.json | 1632 +- packages/store/src/index.ts | 23 +- packages/store/src/lib/RecordType.ts | 7 - packages/store/src/lib/Store.ts | 16 +- packages/store/src/lib/StoreSchema.ts | 359 +- packages/store/src/lib/compareSchemas.ts | 55 - packages/store/src/lib/migrate.ts | 510 +- .../store/src/lib/test/compareSchemas.test.ts | 78 - .../src/lib/test/createMigrations.test.ts | 75 + .../src/lib/test/defineMigrations.test.ts | 31 +- packages/store/src/lib/test/dependsOn.test.ts | 166 + .../src/lib/test/getMigrationsSince.test.ts | 121 + packages/store/src/lib/test/migrate.test.ts | 269 +- .../lib/test/migratePersistedRecord.test.ts | 265 + .../store/src/lib/test/recordStore.test.ts | 124 +- .../src/lib/test/recordStoreFuzzing.test.ts | 17 +- .../src/lib/test/recordStoreQueries.test.ts | 17 +- .../store/src/lib/test/sortMigrations.test.ts | 51 + packages/store/src/lib/test/testSchema.v0.ts | 28 +- packages/store/src/lib/test/testSchema.v1.ts | 212 +- .../store/src/lib/test/upgradeSchema.test.ts | 79 + packages/store/src/lib/test/validate.test.ts | 17 +- .../src/lib/test/validateMigrations.test.ts | 165 + packages/tldraw/api-report.md | 742 +- packages/tldraw/api/api.json | 2683 +- packages/tldraw/package.json | 1 + packages/tldraw/src/lib/Tldraw.tsx | 2 + .../src/lib/utils/assets/preload-font.ts | 1 + packages/tldraw/src/lib/utils/tldr/file.ts | 34 +- .../tldraw/src/test/TldrawEditor.test.tsx | 4 - packages/tldraw/tsconfig.json | 3 + packages/tlschema/api-report.md | 628 +- packages/tlschema/api/api.json | 1042 +- .../src/__tests__/migrationTestUtils.ts | 57 + .../tlschema/src/assets/TLBookmarkAsset.ts | 36 +- packages/tlschema/src/assets/TLImageAsset.ts | 77 +- packages/tlschema/src/assets/TLVideoAsset.ts | 77 +- .../src/createPresenceStateDerivation.ts | 5 +- packages/tlschema/src/createTLSchema.ts | 59 +- packages/tlschema/src/index.ts | 2 + packages/tlschema/src/migrations.test.ts | 880 +- packages/tlschema/src/records/TLAsset.ts | 50 +- packages/tlschema/src/records/TLCamera.ts | 35 +- packages/tlschema/src/records/TLDocument.ts | 46 +- packages/tlschema/src/records/TLInstance.ts | 264 +- packages/tlschema/src/records/TLPage.ts | 37 +- packages/tlschema/src/records/TLPageState.ts | 190 +- packages/tlschema/src/records/TLPointer.ts | 37 +- packages/tlschema/src/records/TLPresence.ts | 103 +- packages/tlschema/src/records/TLShape.ts | 278 +- packages/tlschema/src/shapes/TLArrowShape.ts | 132 +- .../tlschema/src/shapes/TLBookmarkShape.ts | 54 +- packages/tlschema/src/shapes/TLDrawShape.ts | 54 +- packages/tlschema/src/shapes/TLEmbedShape.ts | 139 +- packages/tlschema/src/shapes/TLFrameShape.ts | 6 +- packages/tlschema/src/shapes/TLGeoShape.ts | 191 +- packages/tlschema/src/shapes/TLGroupShape.ts | 4 +- .../tlschema/src/shapes/TLHighlightShape.ts | 4 +- packages/tlschema/src/shapes/TLImageShape.ts | 62 +- packages/tlschema/src/shapes/TLLineShape.ts | 231 +- packages/tlschema/src/shapes/TLNoteShape.ts | 167 +- packages/tlschema/src/shapes/TLTextShape.ts | 41 +- packages/tlschema/src/shapes/TLVideoShape.ts | 46 +- packages/tlschema/src/store-migrations.ts | 94 +- packages/tlsync/src/lib/TLSyncRoom.ts | 101 +- packages/tlsync/src/test/TLSyncRoom.test.ts | 21 +- packages/tlsync/src/test/schema.test.ts | 9 - .../tlsync/src/test/upgradeDowngrade.test.ts | 336 +- packages/tlsync/src/test/validation.test.ts | 26 +- packages/utils/api-report.md | 10 +- packages/utils/api/api.json | 30 +- packages/validate/api-report.md | 2 +- packages/validate/api/api.json | 4 +- scripts/lib/sort-unions.ts | 10 + yarn.lock | 85 +- 112 files changed, 109320 insertions(+), 106484 deletions(-) create mode 100644 apps/examples/src/examples/meta-migrations/MetaMigrations.tsx create mode 100644 apps/examples/src/examples/meta-migrations/README.md create mode 100644 apps/examples/src/examples/meta-migrations/snapshot.ts create mode 100644 apps/examples/src/examples/meta-migrations/ui-overrides.tsx delete mode 100644 packages/store/src/lib/compareSchemas.ts delete mode 100644 packages/store/src/lib/test/compareSchemas.test.ts create mode 100644 packages/store/src/lib/test/createMigrations.test.ts create mode 100644 packages/store/src/lib/test/dependsOn.test.ts create mode 100644 packages/store/src/lib/test/getMigrationsSince.test.ts create mode 100644 packages/store/src/lib/test/migratePersistedRecord.test.ts create mode 100644 packages/store/src/lib/test/sortMigrations.test.ts create mode 100644 packages/store/src/lib/test/upgradeSchema.test.ts create mode 100644 packages/store/src/lib/test/validateMigrations.test.ts create mode 100644 packages/tlschema/src/__tests__/migrationTestUtils.ts delete mode 100644 packages/tlsync/src/test/schema.test.ts diff --git a/.gitignore b/.gitignore index 52ccf3e7d..e7979e574 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ yarn-error.log* pnpm-debug.log* lerna-debug.log* +.rooms + node_modules dist dist-cjs diff --git a/apps/docs/api/editor.api.json b/apps/docs/api/editor.api.json index b2f6fb831..0643fcf23 100644 --- a/apps/docs/api/editor.api.json +++ b/apps/docs/api/editor.api.json @@ -1,49570 +1,50747 @@ { - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.41.0", - "schemaVersion": 1011, - "oldestForwardsCompatibleVersion": 1001, - "tsdocConfig": { - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "noStandardTags": true, - "tagDefinitions": [ - { - "tagName": "@alpha", - "syntaxKind": "modifier" - }, - { - "tagName": "@beta", - "syntaxKind": "modifier" - }, - { - "tagName": "@defaultValue", - "syntaxKind": "block" - }, - { - "tagName": "@decorator", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@deprecated", - "syntaxKind": "block" - }, - { - "tagName": "@eventProperty", - "syntaxKind": "modifier" - }, - { - "tagName": "@example", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@experimental", - "syntaxKind": "modifier" - }, - { - "tagName": "@inheritDoc", - "syntaxKind": "inline" - }, - { - "tagName": "@internal", - "syntaxKind": "modifier" - }, - { - "tagName": "@label", - "syntaxKind": "inline" - }, - { - "tagName": "@link", - "syntaxKind": "inline", - "allowMultiple": true - }, - { - "tagName": "@override", - "syntaxKind": "modifier" - }, - { - "tagName": "@packageDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@param", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@privateRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@public", - "syntaxKind": "modifier" - }, - { - "tagName": "@readonly", - "syntaxKind": "modifier" - }, - { - "tagName": "@remarks", - "syntaxKind": "block" - }, - { - "tagName": "@returns", - "syntaxKind": "block" - }, - { - "tagName": "@sealed", - "syntaxKind": "modifier" - }, - { - "tagName": "@see", - "syntaxKind": "block" - }, - { - "tagName": "@throws", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@typeParam", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@virtual", - "syntaxKind": "modifier" - }, - { - "tagName": "@betaDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@internalRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@preapproved", - "syntaxKind": "modifier" - } - ], - "supportForTags": { - "@alpha": true, - "@beta": true, - "@defaultValue": true, - "@decorator": true, - "@deprecated": true, - "@eventProperty": true, - "@example": true, - "@experimental": true, - "@inheritDoc": true, - "@internal": true, - "@label": true, - "@link": true, - "@override": true, - "@packageDocumentation": true, - "@param": true, - "@privateRemarks": true, - "@public": true, - "@readonly": true, - "@remarks": true, - "@returns": true, - "@sealed": true, - "@see": true, - "@throws": true, - "@typeParam": true, - "@virtual": true, - "@betaDocumentation": true, - "@internalRemarks": true, - "@preapproved": true - }, - "reportUnsupportedHtmlElements": false - } - }, - "kind": "Package", - "canonicalReference": "@tldraw/editor!", - "docComment": "", - "name": "@tldraw/editor", - "preserveMemberOrder": false, - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "@tldraw/editor!", - "name": "", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!angleDistance:function(1)", - "docComment": "/**\n * Get the angle of a point on an arc.\n *\n * @param fromAngle - The angle from center to arc's start point (A) on the circle\n *\n * @param toAngle - The angle from center to arc's end point (B) on the circle\n *\n * @param direction - The direction of the arc (1 = counter-clockwise, -1 = clockwise)\n *\n * @returns The distance in radians between the two angles according to the direction\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function angleDistance(fromAngle: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", toAngle: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", direction: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "fromAngle", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "toAngle", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "direction", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "angleDistance" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!approximately:function(1)", - "docComment": "/**\n * Whether two numbers numbers a and b are approximately equal.\n *\n * @param a - The first point.\n *\n * @param b - The second point.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function approximately(a: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", precision?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "precision", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "name": "approximately" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Arc2d:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Arc2d extends " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Arc2d.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Arc2d", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Arc2d#_center:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "_center: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "_center", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Arc2d:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Arc2d` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed' | 'isFilled'> & {\n center: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n radius: number;\n start: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n end: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n sweepFlag: number;\n largeArcFlag: number;\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 11 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Arc2d#angleEnd:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "angleEnd: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "angleEnd", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Arc2d#angleStart:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "angleStart: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "angleStart", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Arc2d#end:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "end: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "end", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Arc2d#getVertices:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getVertices(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getVertices" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Arc2d#hitTestLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hitTestLineSegment(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", _zoom: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "_zoom", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "hitTestLineSegment" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Arc2d#length:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "length: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "length", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Arc2d#measure:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "measure: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "measure", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Arc2d#nearestPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "nearestPoint(point: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "nearestPoint" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Arc2d#radius:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "radius: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "radius", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Arc2d#start:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "start: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "start", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!areAnglesCompatible:function(1)", - "docComment": "/**\n * Checks whether two angles are approximately at right-angles or parallel to each other\n *\n * @param a - Angle a (radians)\n *\n * @param b - Angle b (radians)\n *\n * @returns True iff the angles are approximately at right-angles or parallel to each other\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function areAnglesCompatible(a: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "areAnglesCompatible" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!average:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function average(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "average" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!BaseBoxShapeTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare abstract class BaseBoxShapeTool extends " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool.ts", - "releaseTag": "Public", - "isAbstract": true, - "name": "BaseBoxShapeTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!BaseBoxShapeTool.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children: " - }, - { - "kind": "Content", - "text": "() => (typeof " - }, - { - "kind": "Reference", - "text": "Idle", - "canonicalReference": "@tldraw/editor!~Idle:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Pointing", - "canonicalReference": "@tldraw/editor!~Pointing:class" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!BaseBoxShapeTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!BaseBoxShapeTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!BaseBoxShapeTool#onCreate:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onCreate?: " - }, - { - "kind": "Content", - "text": "(_shape: null | " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ") => null | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onCreate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!BaseBoxShapeTool#shapeType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "abstract shapeType: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "shapeType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": true - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare abstract class BaseBoxShapeUtil extends " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/BaseBoxShapeUtil.tsx", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Shape", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": true, - "name": "BaseBoxShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil#getGeometry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getGeometry(shape: " - }, - { - "kind": "Content", - "text": "Shape" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getGeometry" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil#getHandleSnapGeometry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHandleSnapGeometry(shape: " - }, - { - "kind": "Content", - "text": "Shape" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "HandleSnapGeometry", - "canonicalReference": "@tldraw/editor!HandleSnapGeometry:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getHandleSnapGeometry" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil#onResize:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onResize: " - }, - { - "kind": "Reference", - "text": "TLOnResizeHandler", - "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onResize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!BoundsSnapGeometry:interface", - "docComment": "/**\n * When moving or resizing shapes, the bounds of the shape can snap to key geometry on other nearby shapes. Customize how a shape snaps to others with {@link ShapeUtil.getBoundsSnapGeometry}.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface BoundsSnapGeometry " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/BoundsSnaps.ts", - "releaseTag": "Public", - "name": "BoundsSnapGeometry", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!BoundsSnapGeometry#points:member", - "docComment": "/**\n * Points that this shape will snap to. By default, this will be the corners and center of the shapes bounding box. To disable snapping to a specific point, use an empty array.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "points?: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "points", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!BoundsSnapPoint:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface BoundsSnapPoint " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/BoundsSnaps.ts", - "releaseTag": "Public", - "name": "BoundsSnapPoint", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!BoundsSnapPoint#handle:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "handle?: " - }, - { - "kind": "Reference", - "text": "SelectionCorner", - "canonicalReference": "@tldraw/editor!SelectionCorner:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "handle", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!BoundsSnapPoint#id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!BoundsSnapPoint#x:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "x", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!BoundsSnapPoint#y:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "y", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Box:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Box " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Box", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Box:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Box` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(x?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", w?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", h?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - }, - { - "parameterName": "w", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - }, - { - "parameterName": "h", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": true - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#aspectRatio:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get aspectRatio(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "aspectRatio", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#center:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get center(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n\nset center(v: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ");" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "center", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#clone:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "clone(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "clone" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#collides:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "collides(B: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "collides" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box.Collides:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Collides: " - }, - { - "kind": "Content", - "text": "(A: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ") => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "Collides", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box.Common:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Common: " - }, - { - "kind": "Content", - "text": "(boxes: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": "[]) => " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "Common", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#contains:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "contains(B: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "contains" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box.Contains:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Contains: " - }, - { - "kind": "Content", - "text": "(A: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ") => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "Contains", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#containsPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "containsPoint(V: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", margin?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "V", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "margin", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "containsPoint" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box.ContainsPoint:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static ContainsPoint: " - }, - { - "kind": "Content", - "text": "(A: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", margin?: number) => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "ContainsPoint", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#corners:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get corners(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "corners", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#cornersAndCenter:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get cornersAndCenter(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "cornersAndCenter", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#equals:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "equals(other: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "other", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "equals" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box.Equals:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Equals(a: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 8 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Equals" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#expand:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "expand(A: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "expand" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box.Expand:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Expand(A: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Expand" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#expandBy:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "expandBy(n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "expandBy" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box.ExpandBy:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static ExpandBy(A: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ", n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "ExpandBy" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box.From:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static From(box: " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "box", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "From" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box.FromCenter:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static FromCenter(center: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", size: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "center", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "size", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "FromCenter" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box.FromPoints:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static FromPoints(points: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "points", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "FromPoints" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#getHandlePoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHandlePoint(handle: " - }, - { - "kind": "Reference", - "text": "SelectionCorner", - "canonicalReference": "@tldraw/editor!SelectionCorner:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "SelectionEdge", - "canonicalReference": "@tldraw/editor!SelectionEdge:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "handle", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getHandlePoint" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#h:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "h: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "h", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#height:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get height(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";\n\nset height(n: number);" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "height", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#includes:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "includes(B: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "includes" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box.Includes:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Includes: " - }, - { - "kind": "Content", - "text": "(A: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ") => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "Includes", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#maxX:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get maxX(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "maxX", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#maxY:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get maxY(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "maxY", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#midX:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get midX(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "midX", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#midY:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get midY(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "midY", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#minX:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get minX(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";\n\nset minX(n: number);" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "minX", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#minY:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get minY(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";\n\nset minY(n: number);" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "minY", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#point:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get point(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n\nset point(val: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ");" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "point", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#resize:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "resize(handle: " - }, - { - "kind": "Reference", - "text": "SelectionCorner", - "canonicalReference": "@tldraw/editor!SelectionCorner:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "SelectionEdge", - "canonicalReference": "@tldraw/editor!SelectionEdge:type" - }, - { - "kind": "Content", - "text": " | string" - }, - { - "kind": "Content", - "text": ", dx: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", dy: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "handle", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "dx", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - }, - { - "parameterName": "dy", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "resize" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box.Resize:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Resize(box: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ", handle: " - }, - { - "kind": "Reference", - "text": "SelectionCorner", - "canonicalReference": "@tldraw/editor!SelectionCorner:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "SelectionEdge", - "canonicalReference": "@tldraw/editor!SelectionEdge:type" - }, - { - "kind": "Content", - "text": " | string" - }, - { - "kind": "Content", - "text": ", dx: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", dy: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", isAspectRatioLocked?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n box: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";\n scaleX: number;\n scaleY: number;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 14, - "endIndex": 17 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "box", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "handle", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "isOptional": false - }, - { - "parameterName": "dx", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "isOptional": false - }, - { - "parameterName": "dy", - "parameterTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "isOptional": false - }, - { - "parameterName": "isAspectRatioLocked", - "parameterTypeTokenRange": { - "startIndex": 12, - "endIndex": 13 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Resize" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#scale:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "scale(n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "scale" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#set:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "set(x?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", w?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", h?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - }, - { - "parameterName": "w", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - }, - { - "parameterName": "h", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "set" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#setTo:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "setTo(B: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setTo" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#sides:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get sides(): " - }, - { - "kind": "Reference", - "text": "Array", - "canonicalReference": "!Array:interface" - }, - { - "kind": "Content", - "text": "<[" - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "]>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "sides", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 7 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box.Sides:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Sides: " - }, - { - "kind": "Content", - "text": "(A: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ", inset?: number) => " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[][]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "Sides", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#size:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get size(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "size", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#snapToGrid:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "snapToGrid(size: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "size", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "snapToGrid" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#toFixed:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toFixed(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "toFixed" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#toJson:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toJson(): " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "toJson" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#translate:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "translate(delta: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "delta", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "translate" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#union:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "union(box: " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "box", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "union" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#w:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "w: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "w", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#width:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get width(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";\n\nset width(n: number);" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "width", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#x:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "x", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Box#y:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "y", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box#zeroFix:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "zeroFix(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "zeroFix" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Box.ZeroFix:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static ZeroFix(other: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "other", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "ZeroFix" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!BoxLike:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type BoxLike = " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", - "releaseTag": "Public", - "name": "BoxLike", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!canonicalizeRotation:function(1)", - "docComment": "/**\n * @param a - Any angle in radians\n *\n * @returns A number between 0 and 2 * PI\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function canonicalizeRotation(a: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "canonicalizeRotation" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Circle2d:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Circle2d extends " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Circle2d.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Circle2d", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Circle2d#_center:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "_center: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "_center", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Circle2d:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Circle2d` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed'> & {\n x?: number;\n y?: number;\n radius: number;\n isFilled: boolean;\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Circle2d#config:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed'> & {\n x?: number;\n y?: number;\n radius: number;\n isFilled: boolean;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "config", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Circle2d#getBounds:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getBounds(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Circle2d#getVertices:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getVertices(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getVertices" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Circle2d#hitTestLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hitTestLineSegment(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", _zoom: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "_zoom", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "hitTestLineSegment" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Circle2d#nearestPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "nearestPoint(point: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "nearestPoint" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Circle2d#radius:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "radius: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "radius", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Circle2d#x:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "x", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Circle2d#y:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "y", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!clamp:function(1)", - "docComment": "/**\n * Clamp a value into a range.\n *\n * @param n - The number to clamp.\n *\n * @param min - The minimum value.\n *\n * @example\n * ```ts\n * const A = clamp(0, 1) // 1\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function clamp(n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", min: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "min", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "clamp" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!clamp:function(2)", - "docComment": "/**\n * Clamp a value into a range.\n *\n * @param n - The number to clamp.\n *\n * @param min - The minimum value.\n *\n * @param max - The maximum value.\n *\n * @example\n * ```ts\n * const A = clamp(0, 1, 10) // 1\n * const B = clamp(11, 1, 10) // 10\n * const C = clamp(5, 1, 10) // 5\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function clamp(n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", min: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", max: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "min", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "max", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "clamp" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!clampRadians:function(1)", - "docComment": "/**\n * Clamp radians within 0 and 2PI\n *\n * @param r - The radian value.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function clampRadians(r: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "clampRadians" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!clockwiseAngleDist:function(1)", - "docComment": "/**\n * Get the clockwise angle distance between two angles.\n *\n * @param a0 - The first angle.\n *\n * @param a1 - The second angle.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function clockwiseAngleDist(a0: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", a1: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a0", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "a1", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "clockwiseAngleDist" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!coreShapes:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "coreShapes: " - }, - { - "kind": "Content", - "text": "readonly [typeof " - }, - { - "kind": "Reference", - "text": "GroupShapeUtil", - "canonicalReference": "@tldraw/editor!GroupShapeUtil:class" - }, - { - "kind": "Content", - "text": "]" - } - ], - "fileUrlPath": "packages/editor/src/lib/config/defaultShapes.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "coreShapes", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!counterClockwiseAngleDist:function(1)", - "docComment": "/**\n * Get the counter-clockwise angle distance between two angles.\n *\n * @param a0 - The first angle.\n *\n * @param a1 - The second angle.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function counterClockwiseAngleDist(a0: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", a1: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a0", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "a1", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "counterClockwiseAngleDist" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!createSessionStateSnapshotSignal:function(1)", - "docComment": "/**\n * Creates a signal of the instance state for a given store.\n *\n * @param store - The store to create the instance state snapshot signal for\n *\n * @returns \n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function createSessionStateSnapshotSignal(store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Signal", - "canonicalReference": "@tldraw/state!Signal:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/config/TLSessionStateSnapshot.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "store", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "createSessionStateSnapshotSignal" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!createTLStore:function(1)", - "docComment": "/**\n * A helper for creating a TLStore. Custom shapes cannot override default shapes.\n *\n * @param opts - Options for creating the store.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function createTLStore({ initialData, defaultName, ...rest }: " - }, - { - "kind": "Reference", - "text": "TLStoreOptions", - "canonicalReference": "@tldraw/editor!TLStoreOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/config/createTLStore.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ initialData, defaultName, ...rest }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "createTLStore" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!createTLUser:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function createTLUser(opts?: " - }, - { - "kind": "Content", - "text": "{\n derivePresenceState?: ((store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Signal", - "canonicalReference": "@tldraw/state!Signal:interface" - }, - { - "kind": "Content", - "text": ") | undefined;\n userPreferences?: " - }, - { - "kind": "Reference", - "text": "Signal", - "canonicalReference": "@tldraw/state!Signal:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUserPreferences", - "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" - }, - { - "kind": "Content", - "text": ", unknown> | undefined;\n setUserPreferences?: ((userPreferences: " - }, - { - "kind": "Reference", - "text": "TLUserPreferences", - "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" - }, - { - "kind": "Content", - "text": ") => void) | undefined;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLUser", - "canonicalReference": "@tldraw/editor!~TLUser:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/config/createTLUser.ts", - "returnTypeTokenRange": { - "startIndex": 15, - "endIndex": 16 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 14 - }, - "isOptional": true - } - ], - "name": "createTLUser" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!CubicBezier2d:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class CubicBezier2d extends " - }, - { - "kind": "Reference", - "text": "Polyline2d", - "canonicalReference": "@tldraw/editor!Polyline2d:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/geometry/CubicBezier2d.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "CubicBezier2d", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!CubicBezier2d:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `CubicBezier2d` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed' | 'isFilled'> & {\n start: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n cp1: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n cp2: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n end: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 13 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!CubicBezier2d#a:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "a: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "a", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!CubicBezier2d#b:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "b: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "b", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!CubicBezier2d#c:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "c: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "c", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!CubicBezier2d#d:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "d: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "d", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!CubicBezier2d#getVertices:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getVertices(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getVertices" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!CubicBezier2d#midPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "midPoint(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "midPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!CubicBezier2d#nearestPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "nearestPoint(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "nearestPoint" - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!CubicSpline2d:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class CubicSpline2d extends " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/geometry/CubicSpline2d.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "CubicSpline2d", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!CubicSpline2d#_length:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "_length?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "_length", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!CubicSpline2d#_segments:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "_segments?: " - }, - { - "kind": "Reference", - "text": "CubicBezier2d", - "canonicalReference": "@tldraw/editor!CubicBezier2d:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "_segments", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!CubicSpline2d:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `CubicSpline2d` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed' | 'isFilled'> & {\n points: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[];\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 7 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!CubicSpline2d#getVertices:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getVertices(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getVertices" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!CubicSpline2d#hitTestLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hitTestLineSegment(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", zoom: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "zoom", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "hitTestLineSegment" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!CubicSpline2d#length:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get length(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "length", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!CubicSpline2d#nearestPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "nearestPoint(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "nearestPoint" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!CubicSpline2d#points:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "points: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "points", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!CubicSpline2d#segments:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get segments(): " - }, - { - "kind": "Reference", - "text": "CubicBezier2d", - "canonicalReference": "@tldraw/editor!CubicBezier2d:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "segments", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!dataUrlToFile:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function dataUrlToFile(url: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", filename: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", mimeType: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "File", - "canonicalReference": "!File:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/assets.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "url", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "filename", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "mimeType", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "dataUrlToFile" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultBackground:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultBackground(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultBackground.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DefaultBackground" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultBrush:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultBrush: ({ brush, color, opacity, className }: " - }, - { - "kind": "Reference", - "text": "TLBrushProps", - "canonicalReference": "@tldraw/editor!TLBrushProps:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultBrush.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ brush, color, opacity, className }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultBrush" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultCanvas:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultCanvas({ className }: " - }, - { - "kind": "Reference", - "text": "TLCanvasComponentProps", - "canonicalReference": "@tldraw/editor!~TLCanvasComponentProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultCanvas.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ className }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultCanvas" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultCollaboratorHint:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultCollaboratorHint({ className, zoom, point, color, viewport, opacity, }: " - }, - { - "kind": "Reference", - "text": "TLCollaboratorHintProps", - "canonicalReference": "@tldraw/editor!TLCollaboratorHintProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultCollaboratorHint.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ className, zoom, point, color, viewport, opacity, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultCollaboratorHint" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!DefaultCursor:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultCursor: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLCursorProps", - "canonicalReference": "@tldraw/editor!TLCursorProps:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultCursor.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultCursor", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!DefaultErrorFallback:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultErrorFallback: " - }, - { - "kind": "Reference", - "text": "TLErrorFallbackComponent", - "canonicalReference": "@tldraw/editor!~TLErrorFallbackComponent:type" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultErrorFallback.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultErrorFallback", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultGrid:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultGrid({ x, y, z, size }: " - }, - { - "kind": "Reference", - "text": "TLGridProps", - "canonicalReference": "@tldraw/editor!TLGridProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultGrid.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ x, y, z, size }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultGrid" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultHandle:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultHandle({ handle, isCoarse, className, zoom }: " - }, - { - "kind": "Reference", - "text": "TLHandleProps", - "canonicalReference": "@tldraw/editor!TLHandleProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultHandle.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ handle, isCoarse, className, zoom }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultHandle" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultHandles:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultHandles: ({ children }: " - }, - { - "kind": "Reference", - "text": "TLHandlesProps", - "canonicalReference": "@tldraw/editor!TLHandlesProps:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultHandles.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultHandles" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultHoveredShapeIndicator:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultHoveredShapeIndicator({ shapeId }: " - }, - { - "kind": "Reference", - "text": "TLHoveredShapeIndicatorProps", - "canonicalReference": "@tldraw/editor!TLHoveredShapeIndicatorProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultHoveredShapeIndicator.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ shapeId }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultHoveredShapeIndicator" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultScribble:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultScribble({ scribble, zoom, color, opacity, className }: " - }, - { - "kind": "Reference", - "text": "TLScribbleProps", - "canonicalReference": "@tldraw/editor!TLScribbleProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultScribble.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ scribble, zoom, color, opacity, className }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultScribble" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultSelectionBackground:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultSelectionBackground({ bounds, rotation }: " - }, - { - "kind": "Reference", - "text": "TLSelectionBackgroundProps", - "canonicalReference": "@tldraw/editor!TLSelectionBackgroundProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSelectionBackground.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ bounds, rotation }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultSelectionBackground" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultSelectionForeground:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultSelectionForeground({ bounds, rotation }: " - }, - { - "kind": "Reference", - "text": "TLSelectionForegroundProps", - "canonicalReference": "@tldraw/editor!TLSelectionForegroundProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSelectionForeground.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ bounds, rotation }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultSelectionForeground" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!DefaultShapeIndicator:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultShapeIndicator: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShapeIndicatorProps", - "canonicalReference": "@tldraw/editor!TLShapeIndicatorProps:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultShapeIndicator.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultShapeIndicator", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultSnapIndicator:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultSnapIndicator({ className, line, zoom }: " - }, - { - "kind": "Reference", - "text": "TLSnapIndicatorProps", - "canonicalReference": "@tldraw/editor!TLSnapIndicatorProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSnapIndictor.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ className, line, zoom }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultSnapIndicator" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultSpinner:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultSpinner(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSpinner.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DefaultSpinner" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!DefaultSvgDefs:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultSvgDefs: () => " - }, - { - "kind": "Content", - "text": "null" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSvgDefs.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DefaultSvgDefs" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!defaultUserPreferences:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "defaultUserPreferences: " - }, - { - "kind": "Reference", - "text": "Readonly", - "canonicalReference": "!Readonly:type" - }, - { - "kind": "Content", - "text": "<{\n name: \"New User\";\n locale: \"ar\" | \"ca\" | \"cs\" | \"da\" | \"de\" | \"en\" | \"es\" | \"fa\" | \"fi\" | \"fr\" | \"gl\" | \"he\" | \"hi-in\" | \"hr\" | \"hu\" | \"it\" | \"ja\" | \"ko-kr\" | \"ku\" | \"my\" | \"ne\" | \"no\" | \"pl\" | \"pt-br\" | \"pt-pt\" | \"ro\" | \"ru\" | \"sl\" | \"sv\" | \"te\" | \"th\" | \"tr\" | \"uk\" | \"vi\" | \"zh-cn\" | \"zh-tw\";\n color: \"#02B1CC\" | \"#11B3A3\" | \"#39B178\" | \"#55B467\" | \"#7B66DC\" | \"#9D5BD2\" | \"#BD54C6\" | \"#E34BA9\" | \"#EC5E41\" | \"#F04F88\" | \"#F2555A\" | \"#FF802B\";\n isDarkMode: false;\n edgeScrollSpeed: 1;\n animationSpeed: 0 | 1;\n isSnapMode: false;\n isWrapMode: false;\n}>" - } - ], - "fileUrlPath": "packages/editor/src/lib/config/TLUserPreferences.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "defaultUserPreferences", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!degreesToRadians:function(1)", - "docComment": "/**\n * Convert degrees to radians.\n *\n * @param d - The degree in degrees.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function degreesToRadians(d: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "d", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "degreesToRadians" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!EASINGS:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "EASINGS: " - }, - { - "kind": "Content", - "text": "{\n readonly linear: (t: number) => number;\n readonly easeInQuad: (t: number) => number;\n readonly easeOutQuad: (t: number) => number;\n readonly easeInOutQuad: (t: number) => number;\n readonly easeInCubic: (t: number) => number;\n readonly easeOutCubic: (t: number) => number;\n readonly easeInOutCubic: (t: number) => number;\n readonly easeInQuart: (t: number) => number;\n readonly easeOutQuart: (t: number) => number;\n readonly easeInOutQuart: (t: number) => number;\n readonly easeInQuint: (t: number) => number;\n readonly easeOutQuint: (t: number) => number;\n readonly easeInOutQuint: (t: number) => number;\n readonly easeInSine: (t: number) => number;\n readonly easeOutSine: (t: number) => number;\n readonly easeInOutSine: (t: number) => number;\n readonly easeInExpo: (t: number) => number;\n readonly easeOutExpo: (t: number) => number;\n readonly easeInOutExpo: (t: number) => number;\n}" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/easings.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "EASINGS", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Edge2d:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Edge2d extends " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Edge2d.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Edge2d", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Edge2d#_length:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "_length?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "_length", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Edge2d:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Edge2d` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Content", - "text": "{\n start: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n end: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Edge2d#d:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "d: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "d", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Edge2d#end:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "end: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "end", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Edge2d#getVertices:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getVertices(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getVertices" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Edge2d#hitTestLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hitTestLineSegment(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", _zoom: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "_zoom", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "hitTestLineSegment" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Edge2d#length:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get length(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "length", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Edge2d#midPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "midPoint(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "midPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Edge2d#nearestPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "nearestPoint(point: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "nearestPoint" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Edge2d#start:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "start: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "start", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Edge2d#u:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "u: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "u", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Edge2d#ul:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "ul: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "ul", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Editor:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Editor extends " - }, - { - "kind": "Reference", - "text": "EventEmitter", - "canonicalReference": "eventemitter3!EventEmitter.EventEmitter" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLEventMap", - "canonicalReference": "@tldraw/editor!TLEventMap:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/Editor.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Editor", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Editor:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Editor` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor({ store, user, shapeUtils, tools, getContainer, initialState, inferDarkMode, }: " - }, - { - "kind": "Reference", - "text": "TLEditorOptions", - "canonicalReference": "@tldraw/editor!TLEditorOptions:interface" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ store, user, shapeUtils, tools, getContainer, initialState, inferDarkMode, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#addOpenMenu:member(1)", - "docComment": "/**\n * Add an open menu.\n *\n * @example\n * ```ts\n * editor.addOpenMenu('menu-id')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "addOpenMenu(id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "addOpenMenu" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#alignShapes:member(1)", - "docComment": "/**\n * Align shape positions.\n *\n * @param shapes - The shapes (or shape ids) to align.\n *\n * @param operation - The align operation to apply.\n *\n * @example\n * ```ts\n * editor.alignShapes([box1, box2], 'left')\n * editor.alignShapes(editor.getSelectedShapeIds(), 'left')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "alignShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", operation: " - }, - { - "kind": "Content", - "text": "'bottom' | 'center-horizontal' | 'center-vertical' | 'left' | 'right' | 'top'" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "operation", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "alignShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#animateShape:member(1)", - "docComment": "/**\n * Animate a shape.\n *\n * @param partial - The shape partial to update.\n *\n * @param options - The animation's options.\n *\n * @example\n * ```ts\n * editor.animateShape({ id: 'box1', type: 'box', x: 100, y: 100 })\n * editor.animateShape({ id: 'box1', type: 'box', x: 100, y: 100 }, { duration: 100, ease: t => t*t })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "animateShape(partial: " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ", animationOptions?: " - }, - { - "kind": "Reference", - "text": "TLAnimationOptions", - "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "partial", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "animationOptions", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "animateShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#animateShapes:member(1)", - "docComment": "/**\n * Animate shapes.\n *\n * @param partials - The shape partials to update.\n *\n * @param options - The animation's options.\n *\n * @example\n * ```ts\n * editor.animateShapes([{ id: 'box1', type: 'box', x: 100, y: 100 }])\n * editor.animateShapes([{ id: 'box1', type: 'box', x: 100, y: 100 }], { duration: 100, ease: t => t*t })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "animateShapes(partials: " - }, - { - "kind": "Content", - "text": "(null | " - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": " | undefined)[]" - }, - { - "kind": "Content", - "text": ", animationOptions?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n duration: number;\n easing: (t: number) => number;\n }>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "partials", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "animationOptions", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "animateShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#animateToShape:member(1)", - "docComment": "/**\n * Animate the camera to a shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "animateToShape(shapeId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ", opts?: " - }, - { - "kind": "Reference", - "text": "TLAnimationOptions", - "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapeId", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "animateToShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#animateToUser:member(1)", - "docComment": "/**\n * Animate the camera to a user's cursor position. This also briefly show the user's cursor if it's not currently visible.\n *\n * @param userId - The id of the user to aniamte to.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "animateToUser(userId: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "userId", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "animateToUser" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#bail:member(1)", - "docComment": "/**\n * Clear all marks in the undo stack back to the next mark.\n *\n * @example\n * ```ts\n * editor.bail()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "bail(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "bail" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#bailToMark:member(1)", - "docComment": "/**\n * Clear all marks in the undo stack back to the mark with the provided mark id.\n *\n * @example\n * ```ts\n * editor.bailToMark('dragging')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "bailToMark(id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "bailToMark" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#batch:member(1)", - "docComment": "/**\n * Run a function in a batch, which will be undone/redone as a single action.\n *\n * @example\n * ```ts\n * editor.batch(() => {\n * \teditor.selectAll()\n * \teditor.deleteShapes(editor.getSelectedShapeIds())\n * \teditor.createShapes(myShapes)\n * \teditor.selectNone()\n * })\n *\n * editor.undo() // will undo all of the above\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "batch(fn: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "fn", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "batch" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#bringForward:member(1)", - "docComment": "/**\n * Bring shapes forward in the page's object list.\n *\n * @param shapes - The shapes (or shape ids) to move.\n *\n * @example\n * ```ts\n * editor.bringForward(['id1', 'id2'])\n * editor.bringForward(box1, box2)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "bringForward(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "bringForward" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#bringToFront:member(1)", - "docComment": "/**\n * Bring shapes to the front of the page's object list.\n *\n * @param shapes - The shapes (or shape ids) to move.\n *\n * @example\n * ```ts\n * editor.bringToFront(['id1', 'id2'])\n * editor.bringToFront([box1, box2])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "bringToFront(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "bringToFront" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#cancel:member(1)", - "docComment": "/**\n * Dispatch a cancel event.\n *\n * @example\n * ```ts\n * editor.cancel()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "cancel(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "cancel" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#cancelDoubleClick:member(1)", - "docComment": "/**\n * Prevent a double click event from firing the next time the user clicks\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "cancelDoubleClick(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "cancelDoubleClick" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#centerOnPoint:member(1)", - "docComment": "/**\n * Center the camera on a point (in the current page space).\n *\n * @param point - The point in the current page space to center on.\n *\n * @param animation - The options for an animation.\n *\n * @example\n * ```ts\n * editor.centerOnPoint({ x: 100, y: 100 })\n * editor.centerOnPoint({ x: 100, y: 100 }, { duration: 200 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "centerOnPoint(point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", animation?: " - }, - { - "kind": "Reference", - "text": "TLAnimationOptions", - "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "animation", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "centerOnPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#clearOpenMenus:member(1)", - "docComment": "/**\n * Clear all open menus.\n *\n * @example\n * ```ts\n * editor.clearOpenMenus()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "clearOpenMenus(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "clearOpenMenus" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#complete:member(1)", - "docComment": "/**\n * Dispatch a complete event.\n *\n * @example\n * ```ts\n * editor.complete()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "complete(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "complete" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#createAssets:member(1)", - "docComment": "/**\n * Create one or more assets.\n *\n * @param assets - The assets to create.\n *\n * @example\n * ```ts\n * editor.createAssets([...myAssets])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "createAssets(assets: " - }, - { - "kind": "Reference", - "text": "TLAsset", - "canonicalReference": "@tldraw/tlschema!TLAsset:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "assets", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "createAssets" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#createPage:member(1)", - "docComment": "/**\n * Create a page.\n *\n * @param page - The page (or page partial) to create.\n *\n * @example\n * ```ts\n * editor.createPage(myPage)\n * editor.createPage({ name: 'Page 2' })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "createPage(page: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "page", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "createPage" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#createShape:member(1)", - "docComment": "/**\n * Create a single shape.\n *\n * @param shape - The shape (or shape partial) to create.\n *\n * @example\n * ```ts\n * editor.createShape(myShape)\n * editor.createShape({ id: 'box1', type: 'text', props: { text: \"ok\" } })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "createShape(shape: " - }, - { - "kind": "Reference", - "text": "OptionalKeys", - "canonicalReference": "@tldraw/editor!~OptionalKeys:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": ", 'id'>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "createShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#createShapes:member(1)", - "docComment": "/**\n * Create shapes.\n *\n * @param shapes - The shapes (or shape partials) to create.\n *\n * @param select - Whether to select the created shapes. Defaults to false.\n *\n * @example\n * ```ts\n * editor.createShapes([myShape])\n * editor.createShapes([{ id: 'box1', type: 'text', props: { text: \"ok\" } }])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "createShapes(shapes: " - }, - { - "kind": "Reference", - "text": "OptionalKeys", - "canonicalReference": "@tldraw/editor!~OptionalKeys:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": ", 'id'>[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "createShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#deleteAssets:member(1)", - "docComment": "/**\n * Delete one or more assets.\n *\n * @param ids - The assets to delete.\n *\n * @example\n * ```ts\n * editor.deleteAssets(['asset1', 'asset2'])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "deleteAssets(assets: " - }, - { - "kind": "Reference", - "text": "TLAsset", - "canonicalReference": "@tldraw/tlschema!TLAsset:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLAssetId", - "canonicalReference": "@tldraw/tlschema!TLAssetId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "assets", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "deleteAssets" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#deleteOpenMenu:member(1)", - "docComment": "/**\n * Delete an open menu.\n *\n * @example\n * ```ts\n * editor.deleteOpenMenu('menu-id')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "deleteOpenMenu(id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "deleteOpenMenu" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#deletePage:member(1)", - "docComment": "/**\n * Delete a page.\n *\n * @param id - The id of the page to delete.\n *\n * @example\n * ```ts\n * editor.deletePage('page1')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "deletePage(page: " - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "page", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "deletePage" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#deleteShape:member(1)", - "docComment": "/**\n * Delete a shape.\n *\n * @param id - The id of the shape to delete.\n *\n * @example\n * ```ts\n * editor.deleteShapes(['box1', 'box2'])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "deleteShape(id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "deleteShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#deleteShape:member(2)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "deleteShape(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "deleteShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#deleteShapes:member(1)", - "docComment": "/**\n * Delete shapes.\n *\n * @param ids - The ids of the shapes to delete.\n *\n * @example\n * ```ts\n * editor.deleteShapes(['box1', 'box2'])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "deleteShapes(ids: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "ids", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "deleteShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#deleteShapes:member(2)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "deleteShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "deleteShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#deselect:member(1)", - "docComment": "/**\n * Remove a shape from the existing set of selected shapes.\n *\n * @example\n * ```ts\n * editor.deselect(shape.id)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "deselect(...shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "deselect" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#dispatch:member", - "docComment": "/**\n * Dispatch an event to the editor.\n *\n * @param info - The event info.\n *\n * @example\n * ```ts\n * editor.dispatch(myPointerEvent)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "dispatch: " - }, - { - "kind": "Content", - "text": "(info: " - }, - { - "kind": "Reference", - "text": "TLEventInfo", - "canonicalReference": "@tldraw/editor!TLEventInfo:type" - }, - { - "kind": "Content", - "text": ") => this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "dispatch", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#disposables:member", - "docComment": "/**\n * A set of functions to call when the app is disposed.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly disposables: " - }, - { - "kind": "Reference", - "text": "Set", - "canonicalReference": "!Set:interface" - }, - { - "kind": "Content", - "text": "<() => void>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "disposables", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#dispose:member(1)", - "docComment": "/**\n * Dispose the editor.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "dispose(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "dispose" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#distributeShapes:member(1)", - "docComment": "/**\n * Distribute shape positions.\n *\n * @param shapes - The shapes (or shape ids) to distribute.\n *\n * @param operation - Whether to distribute shapes horizontally or vertically.\n *\n * @example\n * ```ts\n * editor.distributeShapes([box1, box2], 'horizontal')\n * editor.distributeShapes(editor.getSelectedShapeIds(), 'horizontal')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "distributeShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", operation: " - }, - { - "kind": "Content", - "text": "'horizontal' | 'vertical'" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "operation", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "distributeShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#duplicatePage:member(1)", - "docComment": "/**\n * Duplicate a page.\n *\n * @param id - The id of the page to duplicate. Defaults to the current page.\n *\n * @param createId - The id of the new page. Defaults to a new id.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "duplicatePage(page: " - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ", createId?: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "page", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "createId", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "duplicatePage" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#duplicateShapes:member(1)", - "docComment": "/**\n * Duplicate shapes.\n *\n * @param shapes - The shapes (or shape ids) to duplicate.\n *\n * @param offset - The offset (in pixels) to apply to the duplicated shapes.\n *\n * @example\n * ```ts\n * editor.duplicateShapes(['box1', 'box2'], { x: 8, y: 8 })\n * editor.duplicateShapes(editor.getSelectedShapes(), { x: 8, y: 8 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "duplicateShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", offset?: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "offset", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "duplicateShapes" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#environment:member", - "docComment": "/**\n * A manager for the editor's environment.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly environment: " - }, - { - "kind": "Reference", - "text": "EnvironmentManager", - "canonicalReference": "@tldraw/editor!~EnvironmentManager:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "environment", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#findCommonAncestor:member(1)", - "docComment": "/**\n * Get the common ancestor of two or more shapes that matches a predicate.\n *\n * @param shapes - The shapes (or shape ids) to check.\n *\n * @param predicate - The predicate to match.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "findCommonAncestor(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", predicate?: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ") => boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 12 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "predicate", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 9 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "findCommonAncestor" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#findShapeAncestor:member(1)", - "docComment": "/**\n * Find the first ancestor matching the given predicate\n *\n * @param shape - The shape to check the ancestors for.\n *\n * @example\n * ```ts\n * const ancestor = editor.findShapeAncestor(myShape)\n * const ancestor = editor.findShapeAncestor(myShape.id)\n * const ancestor = editor.findShapeAncestor(myShape.id, (shape) => shape.type === 'frame')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "findShapeAncestor(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ", predicate: " - }, - { - "kind": "Content", - "text": "(parent: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ") => boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 11 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "predicate", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 8 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "findShapeAncestor" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#flipShapes:member(1)", - "docComment": "/**\n * Flip shape positions.\n *\n * @param shapes - The ids of the shapes to flip.\n *\n * @param operation - Whether to flip horizontally or vertically.\n *\n * @example\n * ```ts\n * editor.flipShapes([box1, box2], 'horizontal', 32)\n * editor.flipShapes(editor.getSelectedShapeIds(), 'horizontal', 32)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "flipShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", operation: " - }, - { - "kind": "Content", - "text": "'horizontal' | 'vertical'" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "operation", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "flipShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getAncestorPageId:member(1)", - "docComment": "/**\n * Get the id of the containing page for a given shape.\n *\n * @param shape - The shape to get the page id for.\n *\n * @returns The id of the page that contains the shape, or undefined if the shape is undefined.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getAncestorPageId(shape?: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getAncestorPageId" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getArrowInfo:member(1)", - "docComment": "/**\n * Get cached info about an arrow.\n *\n * @param shape - The shape (or shape id) of the arrow to get the info for.\n *\n * @example\n * ```ts\n * const arrowInfo = editor.getArrowInfo(myArrow)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getArrowInfo(shape: " - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLArrowInfo", - "canonicalReference": "@tldraw/editor!TLArrowInfo:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getArrowInfo" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getArrowsBoundTo:member(1)", - "docComment": "/**\n * Get all arrows bound to a shape.\n *\n * @param shapeId - The id of the shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getArrowsBoundTo(shapeId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n arrowId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n handleId: \"end\" | \"start\";\n }[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapeId", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getArrowsBoundTo" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getAsset:member(1)", - "docComment": "/**\n * Get an asset by its id.\n *\n * @param asset - The asset (or asset id) to get.\n *\n * @example\n * ```ts\n * editor.getAsset('asset1')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getAsset(asset: " - }, - { - "kind": "Reference", - "text": "TLAsset", - "canonicalReference": "@tldraw/tlschema!TLAsset:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLAssetId", - "canonicalReference": "@tldraw/tlschema!TLAssetId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLAsset", - "canonicalReference": "@tldraw/tlschema!TLAsset:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "asset", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getAsset" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getAssetForExternalContent:member(1)", - "docComment": "/**\n * Get an asset for an external asset content type.\n *\n * @param info - Info about the external content.\n *\n * @returns The asset.\n *\n * @example\n * ```ts\n * const asset = await editor.getAssetForExternalContent({ type: 'file', file: myFile })\n * const asset = await editor.getAssetForExternalContent({ type: 'url', url: myUrl })\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getAssetForExternalContent(info: " - }, - { - "kind": "Reference", - "text": "TLExternalAssetContent", - "canonicalReference": "@tldraw/editor!TLExternalAssetContent:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLAsset", - "canonicalReference": "@tldraw/tlschema!TLAsset:type" - }, - { - "kind": "Content", - "text": " | undefined>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "info", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getAssetForExternalContent" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getAssets:member(1)", - "docComment": "/**\n * Get all assets in the editor.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getAssets(): " - }, - { - "kind": "Content", - "text": "(import(\"@tldraw/tlschema\")." - }, - { - "kind": "Reference", - "text": "TLBookmarkAsset", - "canonicalReference": "@tldraw/tlschema!TLBookmarkAsset:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLImageAsset", - "canonicalReference": "@tldraw/tlschema!TLImageAsset:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLVideoAsset", - "canonicalReference": "@tldraw/tlschema!TLVideoAsset:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getAssets" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCamera:member(1)", - "docComment": "/**\n * The current camera.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCamera(): " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/tlschema\")." - }, - { - "kind": "Reference", - "text": "TLCamera", - "canonicalReference": "@tldraw/tlschema!TLCamera:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCamera" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCameraState:member(1)", - "docComment": "/**\n * Whether the camera is moving or idle.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCameraState(): " - }, - { - "kind": "Content", - "text": "\"idle\" | \"moving\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCameraState" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCanRedo:member(1)", - "docComment": "/**\n * Whether the app can redo.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCanRedo(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCanRedo" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCanUndo:member(1)", - "docComment": "/**\n * Whether the app can undo.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCanUndo(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCanUndo" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#getContainer:member", - "docComment": "/**\n * The current HTML element containing the editor.\n *\n * @example\n * ```ts\n * const container = editor.getContainer()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getContainer: " - }, - { - "kind": "Content", - "text": "() => " - }, - { - "kind": "Reference", - "text": "HTMLElement", - "canonicalReference": "!HTMLElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "getContainer", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getContentFromCurrentPage:member(1)", - "docComment": "/**\n * Get content that can be exported for the given shape ids.\n *\n * @param shapes - The shapes (or shape ids) to get content for.\n *\n * @returns The exported content.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getContentFromCurrentPage(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLContent", - "canonicalReference": "@tldraw/editor!TLContent:interface" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getContentFromCurrentPage" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCroppingShapeId:member(1)", - "docComment": "/**\n * The current cropping shape's id.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCroppingShapeId(): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCroppingShapeId" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCurrentPage:member(1)", - "docComment": "/**\n * The current page.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCurrentPage(): " - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCurrentPage" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCurrentPageBounds:member(1)", - "docComment": "/**\n * The bounds of the current page (the common bounds of all of the shapes on the page).\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCurrentPageBounds(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCurrentPageBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCurrentPageId:member(1)", - "docComment": "/**\n * The current page id.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCurrentPageId(): " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCurrentPageId" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCurrentPageRenderingShapesSorted:member(1)", - "docComment": "/**\n * An array containing all of the rendering shapes in the current page, sorted in z-index order (accounting for nested shapes): e.g. A, B, BA, BB, C.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCurrentPageRenderingShapesSorted(): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCurrentPageRenderingShapesSorted" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCurrentPageShapeIds:member(1)", - "docComment": "/**\n * An array of all of the shapes on the current page.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCurrentPageShapeIds(): " - }, - { - "kind": "Reference", - "text": "Set", - "canonicalReference": "!Set:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCurrentPageShapeIds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCurrentPageShapes:member(1)", - "docComment": "/**\n * An array containing all of the shapes in the current page.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCurrentPageShapes(): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCurrentPageShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCurrentPageShapesSorted:member(1)", - "docComment": "/**\n * An array containing all of the shapes in the current page, sorted in z-index order (accounting for nested shapes): e.g. A, B, BA, BB, C.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCurrentPageShapesSorted(): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCurrentPageShapesSorted" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCurrentPageState:member(1)", - "docComment": "/**\n * The current page state.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCurrentPageState(): " - }, - { - "kind": "Reference", - "text": "TLInstancePageState", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCurrentPageState" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCurrentTool:member(1)", - "docComment": "/**\n * The current selected tool.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCurrentTool(): " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCurrentTool" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCurrentToolId:member(1)", - "docComment": "/**\n * The id of the current selected tool.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCurrentToolId(): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCurrentToolId" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getDocumentSettings:member(1)", - "docComment": "/**\n * The global document settings that apply to all users.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDocumentSettings(): " - }, - { - "kind": "Reference", - "text": "TLDocument", - "canonicalReference": "@tldraw/tlschema!TLDocument:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDocumentSettings" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getDroppingOverShape:member(1)", - "docComment": "/**\n * Get the shape that some shapes should be dropped on at a given point.\n *\n * @param point - The point to find the parent for.\n *\n * @param droppingShapes - The shapes that are being dropped.\n *\n * @returns The shape to drop on.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDroppingOverShape(point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", droppingShapes?: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLUnknownShape", - "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "droppingShapes", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getDroppingOverShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getEditingShape:member(1)", - "docComment": "/**\n * The current editing shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getEditingShape(): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getEditingShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getEditingShapeId:member(1)", - "docComment": "/**\n * The current editing shape's id.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getEditingShapeId(): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getEditingShapeId" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getErasingShapeIds:member(1)", - "docComment": "/**\n * The editor's current erasing ids.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getErasingShapeIds(): " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getErasingShapeIds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getErasingShapes:member(1)", - "docComment": "/**\n * The editor's current erasing shapes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getErasingShapes(): " - }, - { - "kind": "Reference", - "text": "NonNullable", - "canonicalReference": "!NonNullable:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | undefined>[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getErasingShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getFocusedGroup:member(1)", - "docComment": "/**\n * The current focused group.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getFocusedGroup(): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getFocusedGroup" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getFocusedGroupId:member(1)", - "docComment": "/**\n * The current focused group id.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getFocusedGroupId(): " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getFocusedGroupId" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getHighestIndexForParent:member(1)", - "docComment": "/**\n * Get the index above the highest child of a given parent.\n *\n * @param parentId - The id of the parent.\n *\n * @returns The index.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHighestIndexForParent(parent: " - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "parent", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getHighestIndexForParent" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getHintingShape:member(1)", - "docComment": "/**\n * The editor's current hinting shapes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHintingShape(): " - }, - { - "kind": "Reference", - "text": "NonNullable", - "canonicalReference": "!NonNullable:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | undefined>[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getHintingShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getHintingShapeIds:member(1)", - "docComment": "/**\n * The editor's current hinting shape ids.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHintingShapeIds(): " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getHintingShapeIds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getHoveredShape:member(1)", - "docComment": "/**\n * The current hovered shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHoveredShape(): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getHoveredShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getHoveredShapeId:member(1)", - "docComment": "/**\n * The current hovered shape id.\n *\n * @readonly @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHoveredShapeId(): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getHoveredShapeId" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getInitialMetaForShape:member(1)", - "docComment": "/**\n * Get the initial meta value for a shape.\n *\n * @param shape - The shape to get the initial meta for.\n *\n * @example\n * ```ts\n * editor.getInitialMetaForShape = (shape) => {\n * if (shape.type === 'note') {\n * return { createdBy: myCurrentUser.id }\n * }\n * }\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getInitialMetaForShape(_shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "_shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getInitialMetaForShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getInstanceState:member(1)", - "docComment": "/**\n * The current instance's state.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getInstanceState(): " - }, - { - "kind": "Reference", - "text": "TLInstance", - "canonicalReference": "@tldraw/tlschema!TLInstance:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getInstanceState" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getIsMenuOpen:member(1)", - "docComment": "/**\n * Get whether any menus are open.\n *\n * @example\n * ```ts\n * editor.isMenuOpen()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getIsMenuOpen(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getIsMenuOpen" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getOnlySelectedShape:member(1)", - "docComment": "/**\n * The app's only selected shape.\n *\n * @returns Null if there is no shape or more than one selected shape, otherwise the selected shape.\n *\n * @public @readonly\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getOnlySelectedShape(): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getOnlySelectedShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getOpenMenus:member(1)", - "docComment": "/**\n * A set of strings representing any open menus. When menus are open, certain interactions will behave differently; for example, when a draw tool is selected and a menu is open, a pointer-down will not create a dot (because the user is probably trying to close the menu) however a pointer-down event followed by a drag will begin drawing a line (because the user is BOTH trying to close the menu AND start drawing a line).\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getOpenMenus(): " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getOpenMenus" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getOutermostSelectableShape:member(1)", - "docComment": "/**\n * Get the shape that should be selected when you click on a given shape, assuming there is nothing already selected. It will not return anything higher than or including the current focus layer.\n *\n * @param shape - The shape to get the outermost selectable shape for.\n *\n * @param filter - A function to filter the selectable shapes.\n *\n * @returns The outermost selectable shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getOutermostSelectableShape(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ", filter?: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ") => boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "filter", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 8 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getOutermostSelectableShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getPage:member(1)", - "docComment": "/**\n * Get a page.\n *\n * @param page - The page (or page id) to get.\n *\n * @example\n * ```ts\n * editor.getPage(myPage.id)\n * editor.getPage(myPage)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getPage(page: " - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "page", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getPage" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getPages:member(1)", - "docComment": "/**\n * Info about the project's current pages.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getPages(): " - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getPages" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getPageShapeIds:member(1)", - "docComment": "/**\n * Get the ids of shapes on a page.\n *\n * @param page - The page (or page id) to get.\n *\n * @example\n * ```ts\n * const idsOnPage1 = editor.getPageShapeIds('page1')\n * const idsOnPage2 = editor.getPageShapeIds(myPage2)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getPageShapeIds(page: " - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Set", - "canonicalReference": "!Set:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "page", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getPageShapeIds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getPageStates:member(1)", - "docComment": "/**\n * Page states.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getPageStates(): " - }, - { - "kind": "Reference", - "text": "TLInstancePageState", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getPageStates" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getPath:member(1)", - "docComment": "/**\n * The editor's current path of active states.\n *\n * @example\n * ```ts\n * editor.getPath() // \"select.idle\"\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getPath(): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getPath" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getPointInParentSpace:member(1)", - "docComment": "/**\n * Convert a delta in the current page space to a point in the local space of a shape's parent.\n *\n * @param shape - The shape to get the point in the local space of.\n *\n * @param point - The page point to get in the local space of the shape.\n *\n * @example\n * ```ts\n * editor.getPointInParentSpace(myShape.id, { x: 100, y: 100 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getPointInParentSpace(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ", point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getPointInParentSpace" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getPointInShapeSpace:member(1)", - "docComment": "/**\n * Convert a point in the current page space to a point in the local space of a shape. For example, if a shape's page point were `{ x: 100, y: 100 }`, a page point at `{ x: 110, y: 110 }` would be at `{ x: 10, y: 10 }` in the shape's local space.\n *\n * @param shape - The shape to get the point in the local space of.\n *\n * @param point - The page point to get in the local space of the shape.\n *\n * @example\n * ```ts\n * editor.getPointInShapeSpace(myShape, { x: 100, y: 100 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getPointInShapeSpace(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ", point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getPointInShapeSpace" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getRenderingBounds:member(1)", - "docComment": "/**\n * The current rendering bounds in the current page space, used for checking which shapes are \"on screen\".\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getRenderingBounds(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getRenderingBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getRenderingBoundsExpanded:member(1)", - "docComment": "/**\n * The current rendering bounds in the current page space, expanded slightly. Used for determining which shapes to render and which to \"cull\".\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getRenderingBoundsExpanded(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getRenderingBoundsExpanded" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getRenderingShapes:member(1)", - "docComment": "/**\n * Get the shapes that should be displayed in the current viewport.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getRenderingShapes(): " - }, - { - "kind": "Content", - "text": "{\n id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ";\n util: " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUnknownShape", - "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" - }, - { - "kind": "Content", - "text": ">;\n index: number;\n backgroundIndex: number;\n opacity: number;\n isCulled: boolean;\n maskedPageBounds: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | undefined;\n }[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 12 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getRenderingShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getSelectedShapeAtPoint:member(1)", - "docComment": "/**\n * Get the top-most selected shape at the given point, ignoring groups.\n *\n * @param point - The point to check.\n *\n * @returns The top-most selected shape at the given point, or undefined if there is no shape at the point.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSelectedShapeAtPoint(point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getSelectedShapeAtPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getSelectedShapeIds:member(1)", - "docComment": "/**\n * The current selected ids.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSelectedShapeIds(): " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getSelectedShapeIds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getSelectedShapes:member(1)", - "docComment": "/**\n * An array containing all of the currently selected shapes.\n *\n * @public @readonly\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSelectedShapes(): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getSelectedShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getSelectionPageBounds:member(1)", - "docComment": "/**\n * The current page bounds of all the selected shapes. If the selection is rotated, then these bounds are the axis-aligned box that the rotated bounds would fit inside of.\n *\n * @readonly @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSelectionPageBounds(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getSelectionPageBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getSelectionRotatedPageBounds:member(1)", - "docComment": "/**\n * The bounds of the selection bounding box in the current page space.\n *\n * @readonly @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSelectionRotatedPageBounds(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getSelectionRotatedPageBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getSelectionRotatedScreenBounds:member(1)", - "docComment": "/**\n * The bounds of the selection bounding box in the current page space.\n *\n * @readonly @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSelectionRotatedScreenBounds(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getSelectionRotatedScreenBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getSelectionRotation:member(1)", - "docComment": "/**\n * The rotation of the selection bounding box in the current page space.\n *\n * @readonly @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSelectionRotation(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getSelectionRotation" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShape:member(1)", - "docComment": "/**\n * Get a shape by its id.\n *\n * @param id - The id of the shape to get.\n *\n * @example\n * ```ts\n * editor.getShape('box1')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShape(shape: " - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 8 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeAncestors:member(1)", - "docComment": "/**\n * Get the ancestors of a shape.\n *\n * @param shape - The shape (or shape id) to get the ancestors for.\n *\n * @example\n * ```ts\n * const ancestors = editor.getShapeAncestors(myShape)\n * const ancestors = editor.getShapeAncestors(myShapeId)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeAncestors(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ", acc?: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "acc", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeAncestors" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeAndDescendantIds:member(1)", - "docComment": "/**\n * Get the shape ids of all descendants of the given shapes (including the shapes themselves).\n *\n * @param ids - The ids of the shapes to get descendants of.\n *\n * @returns The decscendant ids.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeAndDescendantIds(ids: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Set", - "canonicalReference": "!Set:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "ids", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeAndDescendantIds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeAtPoint:member(1)", - "docComment": "/**\n * Get the shape at the current point.\n *\n * @param point - The point to check.\n *\n * @param opts - Options for the check: `hitInside` to check if the point is inside the shape, `margin` to check if the point is within a margin of the shape, `hitFrameInside` to check if the point is inside the frame, and `filter` to filter the shapes to check.\n *\n * @returns The shape at the given point, or undefined if there is no shape at the point.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeAtPoint(point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", opts?: " - }, - { - "kind": "Content", - "text": "{\n renderingOnly?: boolean | undefined;\n margin?: number | undefined;\n hitInside?: boolean | undefined;\n hitLabels?: boolean | undefined;\n hitFrameInside?: boolean | undefined;\n filter?: ((shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ") => boolean) | undefined;\n }" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeAtPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeClipPath:member(1)", - "docComment": "/**\n * Get the clip path for a shape.\n *\n * @param shape - The shape (or shape id) to get the clip path for.\n *\n * @returns The clip path or undefined.\n *\n * @example\n * ```ts\n * const clipPath = editor.getShapeClipPath(shape)\n * const clipPath = editor.getShapeClipPath(shape.id)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeClipPath(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeClipPath" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeGeometry:member(1)", - "docComment": "/**\n * Get the geometry of a shape.\n *\n * @param shape - The shape (or shape id) to get the geometry for.\n *\n * @example\n * ```ts\n * editor.getShapeGeometry(myShape)\n * editor.getShapeGeometry(myShapeId)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeGeometry(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeGeometry" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeHandles:member(1)", - "docComment": "/**\n * Get the handles (if any) for a shape.\n *\n * @param shape - The shape (or shape id) to get the handles for.\n *\n * @example\n * ```ts\n * editor.getShapeHandles(myShape)\n * editor.getShapeHandles(myShapeId)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeHandles(shape: " - }, - { - "kind": "Content", - "text": "T | T['id']" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": "[] | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeHandles" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeLocalTransform:member(1)", - "docComment": "/**\n * Get the local transform for a shape as a matrix model. This transform reflects both its translation (x, y) from from either its parent's top left corner, if the shape's parent is another shape, or else from the 0,0 of the page, if the shape's parent is the page; and the shape's rotation.\n *\n * @param shape - The shape to get the local transform for.\n *\n * @example\n * ```ts\n * editor.getShapeLocalTransform(myShape)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeLocalTransform(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeLocalTransform" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeMask:member(1)", - "docComment": "/**\n * Get the mask (in the current page space) for a shape.\n *\n * @param id - The id of the shape to get the mask for.\n *\n * @returns The mask for the shape.\n *\n * @example\n * ```ts\n * const pageMask = editor.getShapeMask(shape.id)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeMask(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "undefined | " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeMask" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeMaskedPageBounds:member(1)", - "docComment": "/**\n * Get the bounds of a shape in the current page space, incorporating any masks. For example, if the shape were the child of a frame and was half way out of the frame, the bounds would be the half of the shape that was in the frame.\n *\n * @param shape - The shape to get the masked bounds for.\n *\n * @example\n * ```ts\n * editor.getShapeMaskedPageBounds(myShape)\n * editor.getShapeMaskedPageBounds(myShapeId)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeMaskedPageBounds(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeMaskedPageBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapePageBounds:member(1)", - "docComment": "/**\n * Get the bounds of a shape in the current page space.\n *\n * @param shape - The shape (or shape id) to get the bounds for.\n *\n * @example\n * ```ts\n * editor.getShapePageBounds(myShape)\n * editor.getShapePageBounds(myShapeId)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapePageBounds(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapePageBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapePageTransform:member(1)", - "docComment": "/**\n * Get the transform of a shape in the current page space.\n *\n * @param shape - The shape (or shape id) to get the page transform for.\n *\n * @example\n * ```ts\n * editor.getShapePageTransform(myShape)\n * editor.getShapePageTransform(myShapeId)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapePageTransform(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapePageTransform" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeParent:member(1)", - "docComment": "/**\n * Get the parent shape for a given shape. Returns undefined if the shape is the direct child of the page.\n *\n * @example\n * ```ts\n * editor.getShapeParent(myShape)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeParent(shape?: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeParent" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeParentTransform:member(1)", - "docComment": "/**\n * Get the local transform of a shape's parent as a matrix model.\n *\n * @param shape - The shape (or shape id) to get the parent transform for.\n *\n * @example\n * ```ts\n * editor.getShapeParentTransform(myShape)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeParentTransform(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeParentTransform" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapesAtPoint:member(1)", - "docComment": "/**\n * Get the shapes, if any, at a given page point.\n *\n * @param point - The page point to test.\n *\n * @example\n * ```ts\n * editor.getShapesAtPoint({ x: 100, y: 100 })\n * editor.getShapesAtPoint({ x: 100, y: 100 }, { hitInside: true, exact: true })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapesAtPoint(point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", opts?: " - }, - { - "kind": "Content", - "text": "{\n margin?: number | undefined;\n hitInside?: boolean | undefined;\n }" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapesAtPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeStyleIfExists:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeStyleIfExists(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ", style: " - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "style", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeStyleIfExists" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeUtil:member(1)", - "docComment": "/**\n * Get a shape util from a shape itself.\n *\n * @param shape - A shape, shape partial, or shape type.\n *\n * @example\n * ```ts\n * const util = editor.getShapeUtil(myArrowShape)\n * const util = editor.getShapeUtil('arrow')\n * const util = editor.getShapeUtil(myArrowShape)\n * const util = editor.getShapeUtil(TLArrowShape)('arrow')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeUtil(shape: " - }, - { - "kind": "Content", - "text": "S | " - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "S", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeUtil" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeUtil:member(2)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeUtil(type: " - }, - { - "kind": "Content", - "text": "S['type']" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "S", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeUtil" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getShapeUtil:member(3)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getShapeUtil(type: " - }, - { - "kind": "Content", - "text": "T extends " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": " ? R['type'] : string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 3, - "parameters": [ - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getShapeUtil" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getSharedOpacity:member(1)", - "docComment": "/**\n * Get the currently selected shared opacity. If any shapes are selected, this returns the shared opacity of the selected shapes. Otherwise, this returns the chosen opacity for the next shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSharedOpacity(): " - }, - { - "kind": "Reference", - "text": "SharedStyle", - "canonicalReference": "@tldraw/editor!SharedStyle:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getSharedOpacity" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getSharedStyles:member(1)", - "docComment": "/**\n * A map of all the current styles either in the current selection, or that are relevant to the current tool.\n *\n * @example\n * ```ts\n * const color = editor.getSharedStyles().get(DefaultColorStyle)\n * if (color && color.type === 'shared') {\n * print('All selected shapes have the same color:', color.value)\n * }\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSharedStyles(): " - }, - { - "kind": "Reference", - "text": "ReadonlySharedStyleMap", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getSharedStyles" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getSortedChildIdsForParent:member(1)", - "docComment": "/**\n * Get an array of all the children of a shape.\n *\n * @param parentId - The id of the parent shape.\n *\n * @example\n * ```ts\n * editor.getSortedChildIdsForParent('frame1')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSortedChildIdsForParent(parent: " - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "parent", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getSortedChildIdsForParent" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getStateDescendant:member(1)", - "docComment": "/**\n * Get a descendant by its path.\n *\n * @param path - The descendant's path of state ids, separated by periods.\n *\n * @example\n * ```ts\n * state.getStateDescendant('select')\n * state.getStateDescendant('select.brushing')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getStateDescendant(path: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "path", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getStateDescendant" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getStyleForNextShape:member(1)", - "docComment": "/**\n * Get the style for the next shape.\n *\n * @param style - The style to get.\n *\n * @example\n * ```ts\n * const color = editor.getStyleForNextShape(DefaultColorStyle)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getStyleForNextShape(style: " - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "style", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getStyleForNextShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getSvg:member(1)", - "docComment": "/**\n * Get an exported SVG of the given shapes.\n *\n * @param ids - The shapes (or shape ids) to export.\n *\n * @param opts - Options for the export.\n *\n * @returns The SVG element.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSvg(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", opts?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLSvgOptions", - "canonicalReference": "@tldraw/editor!TLSvgOptions:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "SVGSVGElement", - "canonicalReference": "!SVGSVGElement:interface" - }, - { - "kind": "Content", - "text": " | undefined>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 11, - "endIndex": 15 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 10 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getSvg" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getViewportPageBounds:member(1)", - "docComment": "/**\n * The current viewport in the current page space.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getViewportPageBounds(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getViewportPageBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getViewportPageCenter:member(1)", - "docComment": "/**\n * The center of the viewport in the current page space.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getViewportPageCenter(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getViewportPageCenter" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getViewportScreenBounds:member(1)", - "docComment": "/**\n * The bounds of the editor's viewport in screen space.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getViewportScreenBounds(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getViewportScreenBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getViewportScreenCenter:member(1)", - "docComment": "/**\n * The center of the editor's viewport in screen space.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getViewportScreenCenter(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getViewportScreenCenter" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getZoomLevel:member(1)", - "docComment": "/**\n * The current camera zoom level.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getZoomLevel(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getZoomLevel" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#groupShapes:member(1)", - "docComment": "/**\n * Create a group containing the provided shapes.\n *\n * @param shapes - The shapes (or shape ids) to group. Defaults to the selected shapes.\n *\n * @param groupId - The id of the group to create.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "groupShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", groupId?: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "groupId", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "groupShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#hasAncestor:member(1)", - "docComment": "/**\n * Returns true if the the given shape has the given ancestor.\n *\n * @param shape - The shape.\n *\n * @param ancestorId - The id of the ancestor.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "hasAncestor(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ", ancestorId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "ancestorId", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "hasAncestor" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#history:member", - "docComment": "/**\n * A manager for the app's history.\n *\n * @readonly\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly history: " - }, - { - "kind": "Reference", - "text": "HistoryManager", - "canonicalReference": "@tldraw/editor!~HistoryManager:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "history", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#inputs:member", - "docComment": "/**\n * The app's current input state.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "inputs: " - }, - { - "kind": "Content", - "text": "{\n originPagePoint: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n originScreenPoint: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n previousPagePoint: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n previousScreenPoint: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n currentPagePoint: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n currentScreenPoint: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n keys: " - }, - { - "kind": "Reference", - "text": "Set", - "canonicalReference": "!Set:interface" - }, - { - "kind": "Content", - "text": ";\n buttons: " - }, - { - "kind": "Reference", - "text": "Set", - "canonicalReference": "!Set:interface" - }, - { - "kind": "Content", - "text": ";\n isPen: boolean;\n shiftKey: boolean;\n ctrlKey: boolean;\n altKey: boolean;\n isDragging: boolean;\n isPointing: boolean;\n isPinching: boolean;\n isEditing: boolean;\n isPanning: boolean;\n pointerVelocity: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "inputs", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 20 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#interrupt:member(1)", - "docComment": "/**\n * Dispatch an interrupt event.\n *\n * @example\n * ```ts\n * editor.interrupt()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "interrupt(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "interrupt" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#isAncestorSelected:member(1)", - "docComment": "/**\n * Determine whether or not any of a shape's ancestors are selected.\n *\n * @param id - The id of the shape to check.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isAncestorSelected(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isAncestorSelected" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#isIn:member(1)", - "docComment": "/**\n * Get whether a certain tool (or other state node) is currently active.\n *\n * @param path - The path of active states, separated by periods.\n *\n * @example\n * ```ts\n * editor.isIn('select')\n * editor.isIn('select.brushing')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isIn(path: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "path", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isIn" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#isInAny:member(1)", - "docComment": "/**\n * Get whether the state node is in any of the given active paths.\n *\n * @example\n * ```ts\n * state.isInAny('select', 'erase')\n * state.isInAny('select.brushing', 'erase.idle')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isInAny(...paths: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "paths", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isInAny" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#isPointInShape:member(1)", - "docComment": "/**\n * Test whether a point (in the current page space) will will a shape. This method takes into account masks, such as when a shape is the child of a frame and is partially clipped by the frame.\n *\n * @param shape - The shape to test against.\n *\n * @param point - The page point to test (in the current page space).\n *\n * @param hitInside - Whether to count as a hit if the point is inside of a closed shape.\n *\n * @example\n * ```ts\n * editor.isPointInShape({ x: 100, y: 100 }, myShape)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isPointInShape(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ", point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", opts?: " - }, - { - "kind": "Content", - "text": "{\n margin?: number | undefined;\n hitInside?: boolean | undefined;\n }" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isPointInShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#isShapeInPage:member(1)", - "docComment": "/**\n * Get whether the given shape is the descendant of the given page.\n *\n * @param shape - The shape to check.\n *\n * @param pageId - The id of the page to check against. Defaults to the current page.\n *\n * @example\n * ```ts\n * editor.isShapeInPage(myShape)\n * editor.isShapeInPage(myShape, 'page1')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isShapeInPage(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ", pageId?: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "pageId", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isShapeInPage" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#isShapeOfType:member(1)", - "docComment": "/**\n * Get whether a shape matches the type of a TLShapeUtil.\n *\n * @param util - the TLShapeUtil constructor to test against\n *\n * @param shape - the shape to test\n *\n * @example\n * ```ts\n * const isArrowShape = isShapeOfType(someShape, 'arrow')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isShapeOfType(shape: " - }, - { - "kind": "Reference", - "text": "TLUnknownShape", - "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" - }, - { - "kind": "Content", - "text": ", type: " - }, - { - "kind": "Content", - "text": "T['type']" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "shape", - "canonicalReference": "@tldraw/editor!~shape" - }, - { - "kind": "Content", - "text": " is T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isShapeOfType" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#isShapeOfType:member(2)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isShapeOfType(shapeId: " - }, - { - "kind": "Reference", - "text": "TLUnknownShape", - "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" - }, - { - "kind": "Content", - "text": "['id']" - }, - { - "kind": "Content", - "text": ", type: " - }, - { - "kind": "Content", - "text": "T['type']" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "shapeId", - "canonicalReference": "@tldraw/editor!~shapeId" - }, - { - "kind": "Content", - "text": " is T['id']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "shapeId", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isShapeOfType" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#isShapeOrAncestorLocked:member(1)", - "docComment": "/**\n * Check whether a shape or its parent is locked.\n *\n * @param shape - The shape (or shape id) to check.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isShapeOrAncestorLocked(shape?: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isShapeOrAncestorLocked" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#isShapeOrAncestorLocked:member(2)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isShapeOrAncestorLocked(id?: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isShapeOrAncestorLocked" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#mark:member(1)", - "docComment": "/**\n * Create a new \"mark\", or stopping point, in the undo redo history. Creating a mark will clear any redos.\n *\n * @param markId - The mark's id, usually the reason for adding the mark.\n *\n * @param onUndo - Whether to stop at the mark when undoing.\n *\n * @param onRedo - Whether to stop at the mark when redoing.\n *\n * @example\n * ```ts\n * editor.mark()\n * editor.mark('flip shapes')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "mark(markId?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", onUndo?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ", onRedo?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "markId", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - }, - { - "parameterName": "onUndo", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - }, - { - "parameterName": "onRedo", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "mark" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#moveShapesToPage:member(1)", - "docComment": "/**\n * Move shapes to page.\n *\n * @param shapes - The shapes (or shape ids) of the shapes to move.\n *\n * @param pageId - The id of the page where the shapes will be moved.\n *\n * @example\n * ```ts\n * editor.moveShapesToPage(['box1', 'box2'], 'page1')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "moveShapesToPage(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", pageId: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "pageId", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "moveShapesToPage" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#nudgeShapes:member(1)", - "docComment": "/**\n * Move shapes by a delta.\n *\n * @param shapes - The shapes (or shape ids) to move.\n *\n * @param direction - The direction in which to move the shapes.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.nudgeShapes(['box1', 'box2'], { x: 8, y: 8 })\n * editor.nudgeShapes(editor.getSelectedShapes(), { x: 8, y: 8 }, { squashing: true })\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "nudgeShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", offset: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", historyOptions?: " - }, - { - "kind": "Reference", - "text": "TLCommandHistoryOptions", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "offset", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - }, - { - "parameterName": "historyOptions", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "nudgeShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#packShapes:member(1)", - "docComment": "/**\n * Pack shapes into a grid centered on their current position. Based on potpack (https://github.com/mapbox/potpack).\n *\n * @param shapes - The shapes (or shape ids) to pack.\n *\n * @param gap - The padding to apply to the packed shapes. Defaults to 16.\n *\n * @example\n * ```ts\n * editor.packShapes([box1, box2], 32)\n * editor.packShapes(editor.getSelectedShapeIds(), 32)\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "packShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", gap: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "gap", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "packShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#pageToScreen:member(1)", - "docComment": "/**\n * Convert a point in the current page space to a point in current screen space.\n *\n * @param point - The point in screen space.\n *\n * @example\n * ```ts\n * editor.pageToScreen({ x: 100, y: 100 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "pageToScreen(point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n x: number;\n y: number;\n z: number;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "pageToScreen" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#pan:member(1)", - "docComment": "/**\n * Pan the camera.\n *\n * @param offset - The offset in the current page space.\n *\n * @param animation - The animation options.\n *\n * @example\n * ```ts\n * editor.pan({ x: 100, y: 100 })\n * editor.pan({ x: 100, y: 100 }, { duration: 1000 })\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "pan(offset: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", animation?: " - }, - { - "kind": "Reference", - "text": "TLAnimationOptions", - "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "offset", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "animation", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "pan" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#panZoomIntoView:member(1)", - "docComment": "/**\n * Pan or pan/zoom the selected ids into view. This method tries to not change the zoom if possible.\n *\n * @param ids - The ids of the shapes to pan and zoom into view.\n *\n * @param animation - The options for an animation.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "panZoomIntoView(ids: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", animation?: " - }, - { - "kind": "Reference", - "text": "TLAnimationOptions", - "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "ids", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "animation", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "panZoomIntoView" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#popFocusedGroupId:member(1)", - "docComment": "/**\n * Exit the current focused group, moving up to the next parent group if there is one.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "popFocusedGroupId(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "popFocusedGroupId" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#putContentOntoCurrentPage:member(1)", - "docComment": "/**\n * Place content into the editor.\n *\n * @param content - The content.\n *\n * @param options - Options for placing the content.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "putContentOntoCurrentPage(content: " - }, - { - "kind": "Reference", - "text": "TLContent", - "canonicalReference": "@tldraw/editor!TLContent:interface" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Content", - "text": "{\n point?: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n select?: boolean;\n preservePosition?: boolean;\n preserveIds?: boolean;\n }" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "content", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "putContentOntoCurrentPage" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#putExternalContent:member(1)", - "docComment": "/**\n * Handle external content, such as files, urls, embeds, or plain text which has been put into the app, for example by pasting external text or dropping external images onto canvas.\n *\n * @param info - Info about the external content.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "putExternalContent(info: " - }, - { - "kind": "Reference", - "text": "TLExternalContent", - "canonicalReference": "@tldraw/editor!TLExternalContent:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "info", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "putExternalContent" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#redo:member(1)", - "docComment": "/**\n * Redo to the next mark.\n *\n * @example\n * ```ts\n * editor.redo()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "redo(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "redo" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#registerExternalAssetHandler:member(1)", - "docComment": "/**\n * Register an external content handler. This handler will be called when the editor receives external content of the provided type. For example, the 'image' type handler will be called when a user drops an image onto the canvas.\n *\n * @param type - The type of external content.\n *\n * @param handler - The handler to use for this content type.\n *\n * @example\n * ```ts\n * editor.registerExternalAssetHandler('text', myHandler)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "registerExternalAssetHandler(type: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "((info: " - }, - { - "kind": "Reference", - "text": "TLExternalAssetContent", - "canonicalReference": "@tldraw/editor!TLExternalAssetContent:type" - }, - { - "kind": "Content", - "text": " & {\n type: T;\n }) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLAsset", - "canonicalReference": "@tldraw/tlschema!TLAsset:type" - }, - { - "kind": "Content", - "text": ">) | null" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 14, - "endIndex": 15 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 13 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "registerExternalAssetHandler" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#registerExternalContentHandler:member(1)", - "docComment": "/**\n * Register an external content handler. This handler will be called when the editor receives external content of the provided type. For example, the 'image' type handler will be called when a user drops an image onto the canvas.\n *\n * @param type - The type of external content.\n *\n * @param handler - The handler to use for this content type.\n *\n * @example\n * ```ts\n * editor.registerExternalContentHandler('text', myHandler)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "registerExternalContentHandler(type: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "((info: T extends " - }, - { - "kind": "Reference", - "text": "TLExternalContent", - "canonicalReference": "@tldraw/editor!TLExternalContent:type" - }, - { - "kind": "Content", - "text": "['type'] ? " - }, - { - "kind": "Reference", - "text": "TLExternalContent", - "canonicalReference": "@tldraw/editor!TLExternalContent:type" - }, - { - "kind": "Content", - "text": " & {\n type: T;\n } : " - }, - { - "kind": "Reference", - "text": "TLExternalContent", - "canonicalReference": "@tldraw/editor!TLExternalContent:type" - }, - { - "kind": "Content", - "text": ") => void) | null" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 14, - "endIndex": 15 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 13 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "registerExternalContentHandler" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#renamePage:member(1)", - "docComment": "/**\n * Rename a page.\n *\n * @param id - The id of the page to rename.\n *\n * @param name - The new name.\n *\n * @example\n * ```ts\n * editor.renamePage('page1', 'My Page')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "renamePage(page: " - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ", name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", historyOptions?: " - }, - { - "kind": "Reference", - "text": "TLCommandHistoryOptions", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "page", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "historyOptions", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "renamePage" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#renderingBoundsMargin:member", - "docComment": "/**\n * The distance to expand the viewport when measuring culling. A larger distance will mean that shapes near to the viewport (but still outside of it) will not be culled.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "renderingBoundsMargin: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "renderingBoundsMargin", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#reparentShapes:member(1)", - "docComment": "/**\n * Reparent shapes to a new parent. This operation preserves the shape's current page positions / rotations.\n *\n * @param shapes - The shapes (or shape ids) of the shapes to reparent.\n *\n * @param parentId - The id of the new parent shape.\n *\n * @param insertIndex - The index to insert the children.\n *\n * @example\n * ```ts\n * editor.reparentShapes([box1, box2], 'frame1')\n * editor.reparentShapes([box1.id, box2.id], 'frame1')\n * editor.reparentShapes([box1.id, box2.id], 'frame1', 4)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "reparentShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", parentId: " - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ", insertIndex?: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "parentId", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - }, - { - "parameterName": "insertIndex", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "reparentShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#resetZoom:member(1)", - "docComment": "/**\n * Set the zoom back to 100%.\n *\n * @param point - The screen point to zoom out on. Defaults to the viewport screen center.\n *\n * @param animation - The options for an animation.\n *\n * @example\n * ```ts\n * editor.resetZoom()\n * editor.resetZoom(editor.getViewportScreenCenter(), { duration: 200 })\n * editor.resetZoom(editor.getViewportScreenCenter(), { duration: 200 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "resetZoom(point?: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", animation?: " - }, - { - "kind": "Reference", - "text": "TLAnimationOptions", - "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - }, - { - "parameterName": "animation", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "resetZoom" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#resizeShape:member(1)", - "docComment": "/**\n * Resize a shape.\n *\n * @param id - The id of the shape to resize.\n *\n * @param scale - The scale factor to apply to the shape.\n *\n * @param options - Additional options.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "resizeShape(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ", scale: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Reference", - "text": "TLResizeShapeOptions", - "canonicalReference": "@tldraw/editor!TLResizeShapeOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "scale", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "resizeShape" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#root:member", - "docComment": "/**\n * The root state of the statechart.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly root: " - }, - { - "kind": "Reference", - "text": "RootState", - "canonicalReference": "@tldraw/editor!~RootState:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "root", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#rotateShapesBy:member(1)", - "docComment": "/**\n * Rotate shapes by a delta in radians. Note: Currently, this assumes that the shapes are your currently selected shapes.\n *\n * @param shapes - The shapes (or shape ids) of the shapes to move.\n *\n * @param delta - The delta in radians to apply to the selection rotation.\n *\n * @example\n * ```ts\n * editor.rotateShapesBy(editor.getSelectedShapeIds(), Math.PI)\n * editor.rotateShapesBy(editor.getSelectedShapeIds(), Math.PI / 2)\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "rotateShapesBy(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", delta: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "delta", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "rotateShapesBy" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#screenToPage:member(1)", - "docComment": "/**\n * Convert a point in screen space to a point in the current page space.\n *\n * @param point - The point in screen space.\n *\n * @example\n * ```ts\n * editor.screenToPage({ x: 100, y: 100 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "screenToPage(point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n x: number;\n y: number;\n z: number;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "screenToPage" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#scribbles:member", - "docComment": "/**\n * A manager for the editor's scribbles.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly scribbles: " - }, - { - "kind": "Reference", - "text": "ScribbleManager", - "canonicalReference": "@tldraw/editor!~ScribbleManager:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "scribbles", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#select:member(1)", - "docComment": "/**\n * Select one or more shapes.\n *\n * @param ids - The ids to select.\n *\n * @example\n * ```ts\n * editor.select('id1')\n * editor.select('id1', 'id2')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "select(...shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "select" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#selectAll:member(1)", - "docComment": "/**\n * Select all direct children of the current page.\n *\n * @example\n * ```ts\n * editor.selectAll()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "selectAll(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "selectAll" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#selectNone:member(1)", - "docComment": "/**\n * Clear the selection.\n *\n * @example\n * ```ts\n * editor.selectNone()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "selectNone(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "selectNone" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#sendBackward:member(1)", - "docComment": "/**\n * Send shapes backward in the page's object list.\n *\n * @param shapes - The shapes (or shape ids) to move.\n *\n * @example\n * ```ts\n * editor.sendBackward(['id1', 'id2'])\n * editor.sendBackward([box1, box2])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "sendBackward(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "sendBackward" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#sendToBack:member(1)", - "docComment": "/**\n * Send shapes to the back of the page's object list.\n *\n * @param shapes - The shapes (or shape ids) to move.\n *\n * @example\n * ```ts\n * editor.sendToBack(['id1', 'id2'])\n * editor.sendToBack(box1, box2)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "sendToBack(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "sendToBack" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setCamera:member(1)", - "docComment": "/**\n * Set the current camera.\n *\n * @param point - The new camera position.\n *\n * @param animation - Options for an animation.\n *\n * @example\n * ```ts\n * editor.setCamera({ x: 0, y: 0})\n * editor.setCamera({ x: 0, y: 0, z: 1.5})\n * editor.setCamera({ x: 0, y: 0, z: 1.5}, { duration: 1000, easing: (t) => t * t })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setCamera(point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", animation?: " - }, - { - "kind": "Reference", - "text": "TLAnimationOptions", - "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "animation", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setCamera" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setCroppingShape:member(1)", - "docComment": "/**\n * Set the current cropping shape.\n *\n * @param shape - The shape (or shape id) to set as cropping.\n *\n * @example\n * ```ts\n * editor.setCroppingShape(myShape)\n * editor.setCroppingShape(myShape.id)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setCroppingShape(shape: " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setCroppingShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setCurrentPage:member(1)", - "docComment": "/**\n * Set the current page.\n *\n * @param page - The page (or page id) to set as the current page.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setCurrentPage('page1')\n * editor.setCurrentPage(myPage1)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setCurrentPage(page: " - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ", historyOptions?: " - }, - { - "kind": "Reference", - "text": "TLCommandHistoryOptions", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "page", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "historyOptions", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setCurrentPage" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setCurrentTool:member(1)", - "docComment": "/**\n * Set the selected tool.\n *\n * @param id - The id of the tool to select.\n *\n * @param info - Arbitrary data to pass along into the transition.\n *\n * @example\n * ```ts\n * editor.setCurrentTool('hand')\n * editor.setCurrentTool('hand', { date: Date.now() })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setCurrentTool(id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", info?: " - }, - { - "kind": "Content", - "text": "{}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "info", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setCurrentTool" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#setCursor:member", - "docComment": "/**\n * Set the cursor.\n *\n * @param type - The cursor type.\n *\n * @param rotation - The cursor rotation.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setCursor: " - }, - { - "kind": "Content", - "text": "(cursor: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLCursor", - "canonicalReference": "@tldraw/tlschema!TLCursor:interface" - }, - { - "kind": "Content", - "text": ">) => this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "setCursor", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setEditingShape:member(1)", - "docComment": "/**\n * Set the current editing shape.\n *\n * @param shape - The shape (or shape id) to set as editing.\n *\n * @example\n * ```ts\n * editor.setEditingShape(myShape)\n * editor.setEditingShape(myShape.id)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setEditingShape(shape: " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setEditingShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setErasingShapes:member(1)", - "docComment": "/**\n * Set the editor's current erasing shapes.\n *\n * @param shapes - The shapes (or shape ids) to set as hinting.\n *\n * @example\n * ```ts\n * editor.setErasingShapes([myShape])\n * editor.setErasingShapes([myShape.id])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setErasingShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setErasingShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setFocusedGroup:member(1)", - "docComment": "/**\n * Set the current focused group shape.\n *\n * @param shape - The group shape id (or group shape's id) to set as the focused group shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setFocusedGroup(shape: " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLGroupShape", - "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setFocusedGroup" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setHintingShapes:member(1)", - "docComment": "/**\n * Set the editor's current hinting shapes.\n *\n * @param shapes - The shapes (or shape ids) to set as hinting.\n *\n * @example\n * ```ts\n * editor.setHintingShapes([myShape])\n * editor.setHintingShapes([myShape.id])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setHintingShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setHintingShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setHoveredShape:member(1)", - "docComment": "/**\n * Set the editor's current hovered shape.\n *\n * @param shapes - The shape (or shape id) to set as hovered.\n *\n * @example\n * ```ts\n * editor.setHoveredShape(myShape)\n * editor.setHoveredShape(myShape.id)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setHoveredShape(shape: " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setHoveredShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setOpacityForNextShapes:member(1)", - "docComment": "/**\n * Set the opacity for the next shapes. This will effect subsequently created shapes.\n *\n * @param opacity - The opacity to set. Must be a number between 0 and 1 inclusive.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setOpacityForNextShapes(0.5)\n * editor.setOpacityForNextShapes(0.5, { squashing: true })\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setOpacityForNextShapes(opacity: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", historyOptions?: " - }, - { - "kind": "Reference", - "text": "TLCommandHistoryOptions", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "opacity", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "historyOptions", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setOpacityForNextShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setOpacityForSelectedShapes:member(1)", - "docComment": "/**\n * Set the current opacity. This will effect any selected shapes.\n *\n * @param opacity - The opacity to set. Must be a number between 0 and 1 inclusive.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setOpacityForSelectedShapes(0.5)\n * editor.setOpacityForSelectedShapes(0.5, { squashing: true })\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setOpacityForSelectedShapes(opacity: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", historyOptions?: " - }, - { - "kind": "Reference", - "text": "TLCommandHistoryOptions", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "opacity", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "historyOptions", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setOpacityForSelectedShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setSelectedShapes:member(1)", - "docComment": "/**\n * Select one or more shapes.\n *\n * @param ids - The ids to select.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setSelectedShapes(['id1'])\n * editor.setSelectedShapes(['id1', 'id2'])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setSelectedShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", historyOptions?: " - }, - { - "kind": "Reference", - "text": "TLCommandHistoryOptions", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "historyOptions", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setSelectedShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setStyleForNextShapes:member(1)", - "docComment": "/**\n * Set the value of a {@link @tldraw/tlschema#StyleProp} for the next shapes. This change will be applied to subsequently created shapes.\n *\n * @param style - The style to set.\n *\n * @param value - The value to set.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setStyleForNextShapes(DefaultColorStyle, 'red')\n * editor.setStyleForNextShapes(DefaultColorStyle, 'red', { ephemeral: true })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setStyleForNextShapes(style: " - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", value: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ", historyOptions?: " - }, - { - "kind": "Reference", - "text": "TLCommandHistoryOptions", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "style", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "historyOptions", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setStyleForNextShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#setStyleForSelectedShapes:member(1)", - "docComment": "/**\n * Set the value of a {@link @tldraw/tlschema#StyleProp}. This change will be applied to the currently selected shapes.\n *\n * @param style - The style to set.\n *\n * @param value - The value to set.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setStyleForSelectedShapes(DefaultColorStyle, 'red')\n * editor.setStyleForSelectedShapes(DefaultColorStyle, 'red', { ephemeral: true })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "setStyleForSelectedShapes" - }, - { - "kind": "Content", - "text": ">(style: " - }, - { - "kind": "Content", - "text": "S" - }, - { - "kind": "Content", - "text": ", value: " - }, - { - "kind": "Reference", - "text": "StylePropValue", - "canonicalReference": "@tldraw/tlschema!StylePropValue:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", historyOptions?: " - }, - { - "kind": "Reference", - "text": "TLCommandHistoryOptions", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "S", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 11, - "endIndex": 12 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "style", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 8 - }, - "isOptional": false - }, - { - "parameterName": "historyOptions", - "parameterTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setStyleForSelectedShapes" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#shapeUtils:member", - "docComment": "/**\n * A map of shape utility classes (TLShapeUtils) by shape type.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapeUtils: " - }, - { - "kind": "Content", - "text": "{\n readonly [K in string]?: " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUnknownShape", - "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" - }, - { - "kind": "Content", - "text": ">;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "shapeUtils", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#sideEffects:member", - "docComment": "/**\n * A manager for side effects and correct state enforcement.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly sideEffects: " - }, - { - "kind": "Reference", - "text": "SideEffectManager", - "canonicalReference": "@tldraw/editor!~SideEffectManager:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "sideEffects", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#slideCamera:member(1)", - "docComment": "/**\n * Slide the camera in a certain direction.\n *\n * @param opts - Options for the slide\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "slideCamera(opts?: " - }, - { - "kind": "Content", - "text": "{\n speed: number;\n direction: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n friction: number;\n speedThreshold?: number | undefined;\n }" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "slideCamera" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#snaps:member", - "docComment": "/**\n * A manager for the app's snapping feature.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly snaps: " - }, - { - "kind": "Reference", - "text": "SnapManager", - "canonicalReference": "@tldraw/editor!SnapManager:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "snaps", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#stackShapes:member(1)", - "docComment": "/**\n * Stack shape.\n *\n * @param shapes - The shapes (or shape ids) to stack.\n *\n * @param operation - Whether to stack horizontally or vertically.\n *\n * @param gap - The gap to leave between shapes.\n *\n * @example\n * ```ts\n * editor.stackShapes([box1, box2], 'horizontal', 32)\n * editor.stackShapes(editor.getSelectedShapeIds(), 'horizontal', 32)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "stackShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", operation: " - }, - { - "kind": "Content", - "text": "'horizontal' | 'vertical'" - }, - { - "kind": "Content", - "text": ", gap: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "operation", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - }, - { - "parameterName": "gap", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "stackShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#startFollowingUser:member(1)", - "docComment": "/**\n * Start viewport-following a user.\n *\n * @param userId - The id of the user to follow.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "startFollowingUser(userId: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "userId", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "startFollowingUser" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#stopCameraAnimation:member(1)", - "docComment": "/**\n * Stop the current camera animation, if any.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "stopCameraAnimation(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "stopCameraAnimation" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#stopFollowingUser:member(1)", - "docComment": "/**\n * Stop viewport-following a user.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "stopFollowingUser(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "stopFollowingUser" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#store:member", - "docComment": "/**\n * The editor's store\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "store", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#stretchShapes:member(1)", - "docComment": "/**\n * Stretch shape sizes and positions to fill their common bounding box.\n *\n * @param shapes - The shapes (or shape ids) to stretch.\n *\n * @param operation - Whether to stretch shapes horizontally or vertically.\n *\n * @example\n * ```ts\n * editor.stretchShapes([box1, box2], 'horizontal')\n * editor.stretchShapes(editor.getSelectedShapeIds(), 'horizontal')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "stretchShapes(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", operation: " - }, - { - "kind": "Content", - "text": "'horizontal' | 'vertical'" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "operation", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "stretchShapes" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#styleProps:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "styleProps: " - }, - { - "kind": "Content", - "text": "{\n [key: string]: " - }, - { - "kind": "Reference", - "text": "Map", - "canonicalReference": "!Map:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": ", string>;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "styleProps", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#textMeasure:member", - "docComment": "/**\n * A helper for measuring text.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly textMeasure: " - }, - { - "kind": "Reference", - "text": "TextManager", - "canonicalReference": "@tldraw/editor!~TextManager:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "textMeasure", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#toggleLock:member(1)", - "docComment": "/**\n * Toggle the lock state of one or more shapes. If there is a mix of locked and unlocked shapes, all shapes will be locked.\n *\n * @param shapes - The shapes (or shape ids) to toggle.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "toggleLock(shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toggleLock" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#undo:member(1)", - "docComment": "/**\n * Undo to the last mark.\n *\n * @example\n * ```ts\n * editor.undo()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "undo(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "undo" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#ungroupShapes:member(1)", - "docComment": "/**\n * Ungroup some shapes.\n *\n * @param ids - Ids of the shapes to ungroup. Defaults to the selected shapes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "ungroupShapes(ids: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "ids", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "ungroupShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#ungroupShapes:member(2)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "ungroupShapes(ids: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "ids", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "ungroupShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#updateAssets:member(1)", - "docComment": "/**\n * Update one or more assets.\n *\n * @param assets - The assets to update.\n *\n * @example\n * ```ts\n * editor.updateAssets([{ id: 'asset1', name: 'New name' }])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "updateAssets(assets: " - }, - { - "kind": "Reference", - "text": "TLAssetPartial", - "canonicalReference": "@tldraw/tlschema!TLAssetPartial:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "assets", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "updateAssets" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#updateCurrentPageState:member(1)", - "docComment": "/**\n * Update this instance's page state.\n *\n * @param partial - The partial of the page state object containing the changes.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.updateCurrentPageState({ id: 'page1', editingShapeId: 'shape:123' })\n * editor.updateCurrentPageState({ id: 'page1', editingShapeId: 'shape:123' }, { ephemeral: true })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "updateCurrentPageState(partial: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLInstancePageState", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState:interface" - }, - { - "kind": "Content", - "text": ", 'editingShapeId' | 'focusedGroupId' | 'pageId' | 'selectedShapeIds'>>" - }, - { - "kind": "Content", - "text": ", historyOptions?: " - }, - { - "kind": "Reference", - "text": "TLCommandHistoryOptions", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "partial", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 7 - }, - "isOptional": false - }, - { - "parameterName": "historyOptions", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "updateCurrentPageState" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#updateDocumentSettings:member(1)", - "docComment": "/**\n * Update the global document settings that apply to all users.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "updateDocumentSettings(settings: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLDocument", - "canonicalReference": "@tldraw/tlschema!TLDocument:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "settings", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "updateDocumentSettings" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#updateInstanceState:member(1)", - "docComment": "/**\n * Update the instance's state.\n *\n * @param partial - A partial object to update the instance state with.\n *\n * @param historyOptions - The history options for the change.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "updateInstanceState(partial: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLInstance", - "canonicalReference": "@tldraw/tlschema!TLInstance:interface" - }, - { - "kind": "Content", - "text": ", 'currentPageId'>>" - }, - { - "kind": "Content", - "text": ", historyOptions?: " - }, - { - "kind": "Reference", - "text": "TLCommandHistoryOptions", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "partial", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 7 - }, - "isOptional": false - }, - { - "parameterName": "historyOptions", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "updateInstanceState" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#updatePage:member(1)", - "docComment": "/**\n * Update a page.\n *\n * @param partial - The partial of the shape to update.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.updatePage({ id: 'page2', name: 'Page 2' })\n * editor.updatePage({ id: 'page2', name: 'Page 2' }, { squashing: true })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "updatePage(partial: " - }, - { - "kind": "Reference", - "text": "RequiredKeys", - "canonicalReference": "@tldraw/editor!RequiredKeys:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": ", 'id'>" - }, - { - "kind": "Content", - "text": ", historyOptions?: " - }, - { - "kind": "Reference", - "text": "TLCommandHistoryOptions", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "partial", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "historyOptions", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "updatePage" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#updateShape:member(1)", - "docComment": "/**\n * Update a shape using a partial of the shape.\n *\n * @param partial - The shape partial to update.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.updateShape({ id: 'box1', type: 'geo', props: { w: 100, h: 100 } })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "updateShape(partial: " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ", historyOptions?: " - }, - { - "kind": "Reference", - "text": "TLCommandHistoryOptions", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "partial", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "historyOptions", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "updateShape" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#updateShapes:member(1)", - "docComment": "/**\n * Update shapes using partials of each shape.\n *\n * @param partials - The shape partials to update.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.updateShapes([{ id: 'box1', type: 'geo', props: { w: 100, h: 100 } }])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "updateShapes(partials: " - }, - { - "kind": "Content", - "text": "(null | " - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": " | undefined)[]" - }, - { - "kind": "Content", - "text": ", historyOptions?: " - }, - { - "kind": "Reference", - "text": "TLCommandHistoryOptions", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "partials", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "historyOptions", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "updateShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#updateViewportScreenBounds:member(1)", - "docComment": "/**\n * Update the viewport. The viewport will measure the size and screen position of its container element. This should be done whenever the container's position on the screen changes.\n *\n * @param center - Whether to preserve the viewport page center as the viewport changes.\n *\n * @example\n * ```ts\n * editor.updateViewportScreenBounds()\n * editor.updateViewportScreenBounds(true)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "updateViewportScreenBounds(screenBounds: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ", center?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "screenBounds", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "center", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "updateViewportScreenBounds" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Editor#user:member", - "docComment": "/**\n * A manager for the user and their preferences.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly user: " - }, - { - "kind": "Reference", - "text": "UserPreferencesManager", - "canonicalReference": "@tldraw/editor!~UserPreferencesManager:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "user", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#visitDescendants:member(1)", - "docComment": "/**\n * Run a visitor function for all descendants of a shape.\n *\n * @param parentId - The id of the parent shape.\n *\n * @param visitor - The visitor function.\n *\n * @example\n * ```ts\n * editor.visitDescendants('frame1', myCallback)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "visitDescendants(parent: " - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ", visitor: " - }, - { - "kind": "Content", - "text": "(id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ") => false | void" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 11, - "endIndex": 12 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "parent", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "visitor", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 10 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "visitDescendants" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#zoomIn:member(1)", - "docComment": "/**\n * Zoom the camera in.\n *\n * @param animation - The options for an animation.\n *\n * @example\n * ```ts\n * editor.zoomIn()\n * editor.zoomIn(editor.getViewportScreenCenter(), { duration: 120 })\n * editor.zoomIn(editor.inputs.currentScreenPoint, { duration: 120 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "zoomIn(point?: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", animation?: " - }, - { - "kind": "Reference", - "text": "TLAnimationOptions", - "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - }, - { - "parameterName": "animation", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "zoomIn" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#zoomOut:member(1)", - "docComment": "/**\n * Zoom the camera out.\n *\n * @param animation - The options for an animation.\n *\n * @example\n * ```ts\n * editor.zoomOut()\n * editor.zoomOut(editor.getViewportScreenCenter(), { duration: 120 })\n * editor.zoomOut(editor.inputs.currentScreenPoint, { duration: 120 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "zoomOut(point?: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", animation?: " - }, - { - "kind": "Reference", - "text": "TLAnimationOptions", - "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - }, - { - "parameterName": "animation", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "zoomOut" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#zoomToBounds:member(1)", - "docComment": "/**\n * Zoom the camera to fit a bounding box (in the current page space).\n *\n * @param bounds - The bounding box.\n *\n * @param options - The options for an animation, target zoom, or custom inset amount.\n *\n * @example\n * ```ts\n * editor.zoomToBounds(myBounds)\n * editor.zoomToBounds(myBounds)\n * editor.zoomToBounds(myBounds, { duration: 100 })\n * editor.zoomToBounds(myBounds, { inset: 0, targetZoom: 1 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "zoomToBounds(bounds: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ", opts?: " - }, - { - "kind": "Content", - "text": "{\n targetZoom?: number;\n inset?: number;\n } & " - }, - { - "kind": "Reference", - "text": "TLAnimationOptions", - "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "bounds", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "zoomToBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#zoomToContent:member(1)", - "docComment": "/**\n * Move the camera to the nearest content.\n *\n * @param opts - The options for an animation.\n *\n * @example\n * ```ts\n * editor.zoomToContent()\n * editor.zoomToContent({ duration: 200 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "zoomToContent(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "zoomToContent" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#zoomToFit:member(1)", - "docComment": "/**\n * Zoom the camera to fit the current page's content in the viewport.\n *\n * @param animation - The options for an animation.\n *\n * @example\n * ```ts\n * editor.zoomToFit()\n * editor.zoomToFit({ duration: 200 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "zoomToFit(animation?: " - }, - { - "kind": "Reference", - "text": "TLAnimationOptions", - "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "animation", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "zoomToFit" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#zoomToSelection:member(1)", - "docComment": "/**\n * Zoom the camera to fit the current selection in the viewport.\n *\n * @param animation - The options for an animation.\n *\n * @example\n * ```ts\n * editor.zoomToSelection()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "zoomToSelection(animation?: " - }, - { - "kind": "Reference", - "text": "TLAnimationOptions", - "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "animation", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "zoomToSelection" - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Ellipse2d:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Ellipse2d extends " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Ellipse2d.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Ellipse2d", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Ellipse2d#_edges:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "_edges?: " - }, - { - "kind": "Reference", - "text": "Edge2d", - "canonicalReference": "@tldraw/editor!Edge2d:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "_edges", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Ellipse2d:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Ellipse2d` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed'> & {\n width: number;\n height: number;\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Ellipse2d#config:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed'> & {\n width: number;\n height: number;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "config", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Ellipse2d#edges:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get edges(): " - }, - { - "kind": "Reference", - "text": "Edge2d", - "canonicalReference": "@tldraw/editor!Edge2d:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "edges", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Ellipse2d#getBounds:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getBounds(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Ellipse2d#getVertices:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getVertices(): " - }, - { - "kind": "Content", - "text": "any[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getVertices" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Ellipse2d#h:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "h: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "h", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Ellipse2d#hitTestLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hitTestLineSegment(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", zoom: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "zoom", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "hitTestLineSegment" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Ellipse2d#nearestPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "nearestPoint(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "nearestPoint" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Ellipse2d#w:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "w: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "w", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!ErrorBoundary:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ErrorBoundary extends " - }, - { - "kind": "Reference", - "text": "React.Component", - "canonicalReference": "@types/react!React.Component:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "React.PropsWithRef", - "canonicalReference": "@types/react!React.PropsWithRef:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "React.PropsWithChildren", - "canonicalReference": "@types/react!React.PropsWithChildren:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLErrorBoundaryProps", - "canonicalReference": "@tldraw/editor!TLErrorBoundaryProps:interface" - }, - { - "kind": "Content", - "text": ">>, " - }, - { - "kind": "Reference", - "text": "TLErrorBoundaryState", - "canonicalReference": "@tldraw/editor!~TLErrorBoundaryState:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/components/ErrorBoundary.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "ErrorBoundary", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ErrorBoundary#componentDidCatch:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "componentDidCatch(error: " - }, - { - "kind": "Content", - "text": "unknown" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "error", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "componentDidCatch" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ErrorBoundary.getDerivedStateFromError:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static getDerivedStateFromError(error: " - }, - { - "kind": "Reference", - "text": "Error", - "canonicalReference": "!Error:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n error: " - }, - { - "kind": "Reference", - "text": "Error", - "canonicalReference": "!Error:interface" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "error", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getDerivedStateFromError" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ErrorBoundary#render:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "render(): " - }, - { - "kind": "Content", - "text": "boolean | import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "Iterable", - "canonicalReference": "!Iterable:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": "> | null | number | string | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "render" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ErrorBoundary#state:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "state: " - }, - { - "kind": "Reference", - "text": "TLErrorBoundaryState", - "canonicalReference": "@tldraw/editor!~TLErrorBoundaryState:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "state", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 11 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!ErrorScreen:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ErrorScreen({ children }: " - }, - { - "kind": "Content", - "text": "{\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "ErrorScreen" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!EVENT_NAME_MAP:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "EVENT_NAME_MAP: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLEventName", - "canonicalReference": "@tldraw/editor!TLEventName:type" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "TLPinchEventName", - "canonicalReference": "@tldraw/editor!TLPinchEventName:type" - }, - { - "kind": "Content", - "text": ">, keyof " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "EVENT_NAME_MAP", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 11 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!GapsSnapIndicator:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type GapsSnapIndicator = " - }, - { - "kind": "Content", - "text": "{\n id: string;\n type: 'gaps';\n direction: 'horizontal' | 'vertical';\n gaps: " - }, - { - "kind": "Reference", - "text": "Array", - "canonicalReference": "!Array:interface" - }, - { - "kind": "Content", - "text": "<{\n startEdge: [" - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "];\n endEdge: [" - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "];\n }>;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/SnapManager.ts", - "releaseTag": "Public", - "name": "GapsSnapIndicator", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 12 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Geometry2d:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare abstract class Geometry2d " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Geometry2d.ts", - "releaseTag": "Public", - "isAbstract": true, - "name": "Geometry2d", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Geometry2d:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Geometry2d` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(opts: " - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Geometry2d#area:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get area(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "area", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Geometry2d#bounds:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get bounds(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "bounds", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Geometry2d#center:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get center(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "center", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Geometry2d#debugColor:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "debugColor?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "debugColor", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Geometry2d#distanceToLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "distanceToLineSegment(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "distanceToLineSegment" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Geometry2d#distanceToPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "distanceToPoint(point: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", hitInside?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "hitInside", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "distanceToPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Geometry2d#getArea:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getArea(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getArea" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Geometry2d#getBounds:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getBounds(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Geometry2d#getVertices:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "abstract getVertices(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": true, - "name": "getVertices" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Geometry2d#hitTestLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hitTestLineSegment(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", distance?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "distance", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "hitTestLineSegment" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Geometry2d#hitTestPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hitTestPoint(point: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", margin?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", hitInside?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "margin", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - }, - { - "parameterName": "hitInside", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "hitTestPoint" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Geometry2d#ignore:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "ignore?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "ignore", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Geometry2d#isClosed:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isClosed: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isClosed", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Geometry2d#isFilled:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isFilled: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isFilled", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Geometry2d#isLabel:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isLabel: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isLabel", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Geometry2d#isPointInBounds:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isPointInBounds(point: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", margin?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "margin", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isPointInBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Geometry2d#nearestPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "abstract nearestPoint(point: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": true, - "name": "nearestPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Geometry2d#nearestPointOnLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "nearestPointOnLineSegment(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "nearestPointOnLineSegment" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Geometry2d#toSimpleSvgPath:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toSimpleSvgPath(): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "toSimpleSvgPath" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Geometry2d#vertices:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get vertices(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "vertices", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!getArcMeasure:function(1)", - "docComment": "/**\n * Get the measure of an arc.\n *\n * @param A - The angle from center to arc's start point (A) on the circle\n *\n * @param B - The angle from center to arc's end point (B) on the circle\n *\n * @param sweepFlag - 1 if the arc is clockwise, 0 if counter-clockwise\n *\n * @param largeArcFlag - 1 if the arc is greater than 180 degrees, 0 if less than 180 degrees\n *\n * @returns The measure of the arc, negative if counter-clockwise\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getArcMeasure(A: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", sweepFlag: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", largeArcFlag: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "sweepFlag", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "largeArcFlag", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - } - ], - "name": "getArcMeasure" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!getArrowTerminalsInArrowSpace:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getArrowTerminalsInArrowSpace(editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ", shape: " - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n start: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n end: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/shared/arrow/shared.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "editor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "getArrowTerminalsInArrowSpace" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!getCursor:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getCursor(cursor: " - }, - { - "kind": "Reference", - "text": "TLCursorType", - "canonicalReference": "@tldraw/tlschema!TLCursorType:type" - }, - { - "kind": "Content", - "text": ", rotation?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", color?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/hooks/useCursor.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "cursor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "rotation", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - }, - { - "parameterName": "color", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "name": "getCursor" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!getFreshUserPreferences:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getFreshUserPreferences(): " - }, - { - "kind": "Reference", - "text": "TLUserPreferences", - "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/config/TLUserPreferences.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "getFreshUserPreferences" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!getIncrementedName:function(1)", - "docComment": "/**\n * Get an incremented name (e.g. New page (2)) from a name (e.g. New page), based on an array of existing names.\n *\n * @param name - The name to increment.\n *\n * @param others - The array of existing names.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getIncrementedName(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", others: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/getIncrementedName.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "others", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "getIncrementedName" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!getPointerInfo:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getPointerInfo(e: " - }, - { - "kind": "Reference", - "text": "PointerEvent", - "canonicalReference": "!PointerEvent:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "React.PointerEvent", - "canonicalReference": "@types/react!React.PointerEvent:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n point: {\n x: number;\n y: number;\n z: number;\n };\n shiftKey: boolean;\n altKey: boolean;\n ctrlKey: boolean;\n pointerId: number;\n button: number;\n isPen: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/.tsbuild-api/lib/utils/getPointerInfo.d.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "e", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "getPointerInfo" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!getPointInArcT:function(1)", - "docComment": "/**\n * Returns the t value of the point on the arc.\n *\n * @param mAB - The measure of the arc from A to B, negative if counter-clockwise\n *\n * @param A - The angle from center to arc's start point (A) on the circle\n *\n * @param B - The angle from center to arc's end point (B) on the circle\n *\n * @param P - The angle on the circle (P) to find the t value for\n *\n * @returns The t value of the point on the arc, with 0 being the start and 1 being the end\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getPointInArcT(mAB: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", A: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", P: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "mAB", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "P", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - } - ], - "name": "getPointInArcT" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!getPointOnCircle:function(1)", - "docComment": "/**\n * Get a point on the perimeter of a circle.\n *\n * @param center - The center of the circle.\n *\n * @param r - The radius of the circle.\n *\n * @param a - The angle in radians.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getPointOnCircle(center: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", r: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", a: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "center", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "getPointOnCircle" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!getPolygonVertices:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getPolygonVertices(width: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", height: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", sides: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "width", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "height", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "sides", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "getPolygonVertices" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!getSvgPathFromPoints:function(1)", - "docComment": "/**\n * Turn an array of points into a path of quadradic curves.\n *\n * @param points - The points returned from perfect-freehand\n *\n * @param closed - Whether the stroke is closed\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getSvgPathFromPoints(points: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", closed?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/getSvgPathFromPoints.ts", - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "points", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "closed", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": true - } - ], - "name": "getSvgPathFromPoints" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!getUserPreferences:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getUserPreferences(): " - }, - { - "kind": "Reference", - "text": "TLUserPreferences", - "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/config/TLUserPreferences.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "getUserPreferences" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!GRID_STEPS:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "GRID_STEPS: " - }, - { - "kind": "Content", - "text": "{\n min: number;\n mid: number;\n step: number;\n}[]" - } - ], - "fileUrlPath": "packages/editor/src/lib/constants.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "GRID_STEPS", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Group2d:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Group2d extends " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Group2d.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Group2d", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Group2d:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Group2d` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed' | 'isFilled'> & {\n children: " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": "[];\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 7 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Group2d#children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "children: " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Group2d#distanceToPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "distanceToPoint(point: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", hitInside?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "hitInside", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "distanceToPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Group2d#getArea:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getArea(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getArea" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Group2d#getVertices:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getVertices(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getVertices" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Group2d#hitTestLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hitTestLineSegment(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", zoom: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "zoom", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "hitTestLineSegment" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Group2d#hitTestPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hitTestPoint(point: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", margin: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", hitInside: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "margin", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "hitInside", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "hitTestPoint" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Group2d#ignoredChildren:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "ignoredChildren: " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "ignoredChildren", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Group2d#nearestPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "nearestPoint(point: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "nearestPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Group2d#toSimpleSvgPath:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toSimpleSvgPath(): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "toSimpleSvgPath" - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!GroupShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class GroupShapeUtil extends " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLGroupShape", - "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/group/GroupShapeUtil.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "GroupShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!GroupShapeUtil#canBind:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canBind: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canBind", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!GroupShapeUtil#component:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component(shape: " - }, - { - "kind": "Reference", - "text": "TLGroupShape", - "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "component" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!GroupShapeUtil#getDefaultProps:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDefaultProps(): " - }, - { - "kind": "Reference", - "text": "TLGroupShape", - "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" - }, - { - "kind": "Content", - "text": "['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDefaultProps" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!GroupShapeUtil#getGeometry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getGeometry(shape: " - }, - { - "kind": "Reference", - "text": "TLGroupShape", - "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getGeometry" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!GroupShapeUtil#hideSelectionBoundsFg:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideSelectionBoundsFg: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideSelectionBoundsFg", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!GroupShapeUtil#indicator:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "indicator(shape: " - }, - { - "kind": "Reference", - "text": "TLGroupShape", - "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!GroupShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/store\")." - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!GroupShapeUtil#onChildrenChange:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onChildrenChange: " - }, - { - "kind": "Reference", - "text": "TLOnChildrenChangeHandler", - "canonicalReference": "@tldraw/editor!TLOnChildrenChangeHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLGroupShape", - "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onChildrenChange", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!GroupShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/tlschema\")." - }, - { - "kind": "Reference", - "text": "ShapeProps", - "canonicalReference": "@tldraw/tlschema!ShapeProps:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLGroupShape", - "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!GroupShapeUtil.type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "\"group\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!HALF_PI:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "HALF_PI: " - }, - { - "kind": "Content", - "text": "number" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "HALF_PI", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!HandleSnapGeometry:interface", - "docComment": "/**\n * When dragging a handle, users can snap the handle to key geometry on other nearby shapes. Customize how handles snap to a shape by returning this from {@link ShapeUtil.getHandleSnapGeometry}.\n *\n * Any co-ordinates here should be in the shape's local space.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface HandleSnapGeometry " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/HandleSnaps.ts", - "releaseTag": "Public", - "name": "HandleSnapGeometry", - "preserveMemberOrder": false, - "members": [ - { - "kind": "MethodSignature", - "canonicalReference": "@tldraw/editor!HandleSnapGeometry#getSelfSnapOutline:member(1)", - "docComment": "/**\n * By default, handles can't snap to their own shape because moving the handle might change the snapping location which can cause feedback loops. You can override this by returning a version of `outline` that won't be affected by the current handle's position to use for self-snapping.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSelfSnapOutline?(handle: " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "handle", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "getSelfSnapOutline" - }, - { - "kind": "MethodSignature", - "canonicalReference": "@tldraw/editor!HandleSnapGeometry#getSelfSnapPoints:member(1)", - "docComment": "/**\n * By default, handles can't snap to their own shape because moving the handle might change the snapping location which can cause feedback loops. You can override this by returning a version of `points` that won't be affected by the current handle's position to use for self-snapping.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSelfSnapPoints?(handle: " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "handle", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "getSelfSnapPoints" - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!HandleSnapGeometry#outline:member", - "docComment": "/**\n * A `Geometry2d` that describe the outline of the shape that the handle will snap to - fills are ignored. By default, this is the same geometry returned by {@link ShapeUtil.getGeometry}. Set this to `null` to disable handle snapping to this shape's outline.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "outline?: " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "outline", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!HandleSnapGeometry#points:member", - "docComment": "/**\n * Key points on the shape that the handle will snap to. For example, the corners of a rectangle, or the centroid of a triangle. By default, no points are used.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "points?: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "points", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!hardReset:function(1)", - "docComment": "/**\n * Clear the database of all data associated with tldraw.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function hardReset({ shouldReload }?: " - }, - { - "kind": "Content", - "text": "{\n shouldReload?: boolean | undefined;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/sync/hardReset.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ shouldReload }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "name": "hardReset" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!hardResetEditor:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function hardResetEditor(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/hardResetEditor.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "hardResetEditor" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!HIT_TEST_MARGIN:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "HIT_TEST_MARGIN = " - }, - { - "kind": "Content", - "text": "8" - } - ], - "fileUrlPath": "packages/editor/src/lib/constants.ts", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isReadonly": true, - "releaseTag": "Public", - "name": "HIT_TEST_MARGIN", - "variableTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!HTMLContainer:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function HTMLContainer({ children, className, ...rest }: " - }, - { - "kind": "Reference", - "text": "HTMLContainerProps", - "canonicalReference": "@tldraw/editor!HTMLContainerProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/HTMLContainer.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children, className, ...rest }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "HTMLContainer" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!HTMLContainerProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type HTMLContainerProps = " - }, - { - "kind": "Reference", - "text": "React.HTMLAttributes", - "canonicalReference": "@types/react!React.HTMLAttributes:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HTMLDivElement", - "canonicalReference": "!HTMLDivElement:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/HTMLContainer.tsx", - "releaseTag": "Public", - "name": "HTMLContainerProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!intersectCircleCircle:function(1)", - "docComment": "/**\n * Find the intersections between a circle and a circle.\n *\n * @param c1 - The first circle's center.\n *\n * @param r1 - The first circle's radius.\n *\n * @param c2 - The second circle's center.\n *\n * @param r2 - The second circle's radius.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function intersectCircleCircle(c1: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", r1: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", c2: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", r2: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "c1", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "r1", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "c2", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "r2", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - } - ], - "name": "intersectCircleCircle" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!intersectCirclePolygon:function(1)", - "docComment": "/**\n * Find the intersections between a circle and a bounding box.\n *\n * @param c - The circle's center.\n *\n * @param r - The circle's radius.\n *\n * @param points - The points in the polygon.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function intersectCirclePolygon(c: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", r: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", points: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "c", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "points", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": false - } - ], - "name": "intersectCirclePolygon" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!intersectCirclePolyline:function(1)", - "docComment": "/**\n * Find the intersections between a circle and a bounding box.\n *\n * @param c - The circle's center.\n *\n * @param r - The circle's radius.\n *\n * @param points - The points in the polyline.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function intersectCirclePolyline(c: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", r: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", points: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "c", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "points", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": false - } - ], - "name": "intersectCirclePolyline" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!intersectLineSegmentCircle:function(1)", - "docComment": "/**\n * Find the intersections between a line segment and a circle.\n *\n * @param a1 - The segment's first point.\n *\n * @param a2 - The segment's second point.\n *\n * @param c - The circle's center.\n *\n * @param r - The circle's radius.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function intersectLineSegmentCircle(a1: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", a2: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", c: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", r: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 12 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a1", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "a2", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "c", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - } - ], - "name": "intersectLineSegmentCircle" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!intersectLineSegmentLineSegment:function(1)", - "docComment": "/**\n * Find the intersection between a line segment and a line segment.\n *\n * @param a1 - The first segment's first point.\n *\n * @param a2 - The first segment's second point.\n *\n * @param b1 - The second segment's first point.\n *\n * @param b2 - The second segment's second point.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function intersectLineSegmentLineSegment(a1: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", a2: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", b1: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", b2: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a1", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "a2", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "b1", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "b2", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - } - ], - "name": "intersectLineSegmentLineSegment" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!intersectLineSegmentPolygon:function(1)", - "docComment": "/**\n * Find the intersections between a line segment and a closed polygon.\n *\n * @param a1 - The segment's first point.\n *\n * @param a2 - The segment's second point.\n *\n * @param points - The points in the polygon.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function intersectLineSegmentPolygon(a1: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", a2: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", points: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a1", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "a2", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "points", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": false - } - ], - "name": "intersectLineSegmentPolygon" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!intersectLineSegmentPolyline:function(1)", - "docComment": "/**\n * Find the intersections between a line segment and a polyline.\n *\n * @param a1 - The segment's first point.\n *\n * @param a2 - The segment's second point.\n *\n * @param points - The points in the polyline.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function intersectLineSegmentPolyline(a1: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", a2: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", points: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a1", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "a2", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "points", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": false - } - ], - "name": "intersectLineSegmentPolyline" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!intersectPolygonBounds:function(1)", - "docComment": "/**\n * Find the intersections between a polygon and a bounding box.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function intersectPolygonBounds(points: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", bounds: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "points", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "bounds", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - } - ], - "name": "intersectPolygonBounds" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!intersectPolygonPolygon:function(1)", - "docComment": "/**\n * Create a new convex polygon as the intersection of two convex polygons.\n *\n * @param polygonA - An array of points representing the first polygon.\n *\n * @param polygonB - An array of points representing the second polygon.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function intersectPolygonPolygon(polygonA: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", polygonB: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "polygonA", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "polygonB", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "intersectPolygonPolygon" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!isSafeFloat:function(1)", - "docComment": "/**\n * Check if a float is safe to use. ie: Not too big or small.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isSafeFloat: (n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Content", - "text": "boolean" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "isSafeFloat" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!linesIntersect:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function linesIntersect(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", C: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", D: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "C", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "D", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - } - ], - "name": "linesIntersect" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!LoadingScreen:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function LoadingScreen({ children }: " - }, - { - "kind": "Content", - "text": "{\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "LoadingScreen" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!loadSessionStateSnapshotIntoStore:function(1)", - "docComment": "/**\n * Loads a snapshot of the editor's instance state into the store of a new editor instance.\n *\n * @param store - The store to load the instance state into\n *\n * @param snapshot - The instance state snapshot to load\n *\n * @returns \n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function loadSessionStateSnapshotIntoStore(store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ", snapshot: " - }, - { - "kind": "Reference", - "text": "TLSessionStateSnapshot", - "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/config/TLSessionStateSnapshot.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "store", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "snapshot", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "loadSessionStateSnapshotIntoStore" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!loopToHtmlElement:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function loopToHtmlElement(elm: " - }, - { - "kind": "Reference", - "text": "Element", - "canonicalReference": "!Element:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "HTMLElement", - "canonicalReference": "!HTMLElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/dom.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "elm", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "loopToHtmlElement" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Mat:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Mat " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/Mat.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Mat", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Mat:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Mat` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(a: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", c: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", d: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", e: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", f: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "c", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "d", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - }, - { - "parameterName": "e", - "parameterTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "isOptional": false - }, - { - "parameterName": "f", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 12 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Mat#a:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "a: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "a", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.Absolute:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Absolute(m: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Absolute" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.applyToBounds:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static applyToBounds(m: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": ", box: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "box", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "applyToBounds" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#applyToPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "applyToPoint(point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "applyToPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.applyToPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static applyToPoint(m: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": ", point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "point", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "applyToPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#applyToPoints:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "applyToPoints(points: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "points", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "applyToPoints" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.applyToPoints:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static applyToPoints(m: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": ", points: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "points", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "applyToPoints" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.applyToXY:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static applyToXY(m: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": ", x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "applyToXY" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Mat#b:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "b: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "b", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Mat#c:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "c: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "c", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.Cast:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Cast(m: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Cast" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#clone:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "clone(): " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "clone" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.Compose:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Compose(...matrices: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "matrices", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Compose" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Mat#d:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "d: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "d", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#decompose:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "decompose(): " - }, - { - "kind": "Content", - "text": "{\n x: number;\n y: number;\n scaleX: number;\n scaleY: number;\n rotation: number;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "decompose" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.Decompose:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Decompose(m: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n x: number;\n y: number;\n scaleX: number;\n scaleY: number;\n rotation: number;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Decompose" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#decomposed:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "decomposed(): " - }, - { - "kind": "Content", - "text": "{\n x: number;\n y: number;\n scaleX: number;\n scaleY: number;\n rotation: number;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "decomposed" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Mat#e:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "e: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "e", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#equals:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "equals(m: " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "equals" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Mat#f:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "f: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "f", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.From:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static From(m: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "From" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#identity:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "identity(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "identity" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.Identity:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Identity(): " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "Identity" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.Inverse:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Inverse(m: " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Inverse" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#invert:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "invert(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "invert" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#multiply:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "multiply(m: " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "multiply" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.Multiply:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Multiply(m1: " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": ", m2: " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m1", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "m2", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Multiply" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#point:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "point(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "point" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.Point:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Point(m: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Point" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#rotate:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "rotate(r: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", cx?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", cy?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "cx", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - }, - { - "parameterName": "cy", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "rotate" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.Rotate:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Rotate(r: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", cx?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", cy?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "cx", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - }, - { - "parameterName": "cy", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Rotate" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#rotation:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "rotation(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "rotation" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.Rotation:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Rotation(m: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Rotation" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#scale:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "scale(x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "scale" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Mat.Scale:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Scale: " - }, - { - "kind": "Content", - "text": "{\n (x: number, y: number): " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": ";\n (x: number, y: number, cx: number, cy: number): " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "Scale", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#setTo:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "setTo(model: " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "model", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setTo" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.Smooth:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Smooth(m: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": ", precision?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "precision", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Smooth" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#toCssString:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toCssString(): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "toCssString" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.toCssString:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static toCssString(m: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "m", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toCssString" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat#translate:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "translate(x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "translate" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Mat.Translate:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Translate(x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Translate" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!MatLike:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type MatLike = " - }, - { - "kind": "Reference", - "text": "Mat", - "canonicalReference": "@tldraw/editor!Mat:class" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/Mat.ts", - "releaseTag": "Public", - "name": "MatLike", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!MatModel:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface MatModel " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/Mat.ts", - "releaseTag": "Public", - "name": "MatModel", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!MatModel#a:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "a: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "a", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!MatModel#b:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "b: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "b", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!MatModel#c:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "c: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "c", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!MatModel#d:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "d: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "d", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!MatModel#e:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "e: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "e", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!MatModel#f:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "f: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "f", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!moveCameraWhenCloseToEdge:function(1)", - "docComment": "/**\n * Moves the camera when the mouse is close to the edge of the screen.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function moveCameraWhenCloseToEdge(editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/edgeScrolling.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "editor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "moveCameraWhenCloseToEdge" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!openWindow:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function openWindow(url: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", target?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/window-open.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "url", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "target", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "name": "openWindow" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!perimeterOfEllipse:function(1)", - "docComment": "/**\n * Find the approximate perimeter of an ellipse.\n *\n * @param rx - The ellipse's x radius.\n *\n * @param ry - The ellipse's y radius.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function perimeterOfEllipse(rx: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", ry: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "rx", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ry", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "perimeterOfEllipse" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!PI:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "PI: " - }, - { - "kind": "Content", - "text": "number" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "PI", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!PI2:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "PI2: " - }, - { - "kind": "Content", - "text": "number" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "PI2", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Point2d:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Point2d extends " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Point2d.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Point2d", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Point2d:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Point2d` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed' | 'isFilled'> & {\n margin: number;\n point: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 7 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Point2d#getVertices:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getVertices(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getVertices" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Point2d#hitTestLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hitTestLineSegment(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", margin: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "margin", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "hitTestLineSegment" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Point2d#nearestPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "nearestPoint(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "nearestPoint" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Point2d#point:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "point: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "point", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!pointInPolygon:function(1)", - "docComment": "/**\n * Get whether a point is inside of a polygon.\n * ```ts\n * const result = pointInPolygon(myPoint, myPoints)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function pointInPolygon(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", points: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "points", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": false - } - ], - "name": "pointInPolygon" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!PointsSnapIndicator:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type PointsSnapIndicator = " - }, - { - "kind": "Content", - "text": "{\n id: string;\n type: 'points';\n points: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[];\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/SnapManager.ts", - "releaseTag": "Public", - "name": "PointsSnapIndicator", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Polygon2d:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Polygon2d extends " - }, - { - "kind": "Reference", - "text": "Polyline2d", - "canonicalReference": "@tldraw/editor!Polyline2d:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Polygon2d.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Polygon2d", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Polygon2d:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Polygon2d` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed'> & {\n points: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[];\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 7 - }, - "isOptional": false - } - ] - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!polygonsIntersect:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function polygonsIntersect(a: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "polygonsIntersect" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Polyline2d:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Polyline2d extends " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Polyline2d.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Polyline2d", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Polyline2d#_length:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "_length?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "_length", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Polyline2d#_segments:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "_segments?: " - }, - { - "kind": "Reference", - "text": "Edge2d", - "canonicalReference": "@tldraw/editor!Edge2d:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "_segments", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Polyline2d:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Polyline2d` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed' | 'isFilled'> & {\n points: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[];\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 7 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Polyline2d#getVertices:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getVertices(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getVertices" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Polyline2d#hitTestLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hitTestLineSegment(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", zoom: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "zoom", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "hitTestLineSegment" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Polyline2d#length:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get length(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "length", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Polyline2d#nearestPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "nearestPoint(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "nearestPoint" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Polyline2d#points:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "points: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "points", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Polyline2d#segments:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get segments(): " - }, - { - "kind": "Reference", - "text": "Edge2d", - "canonicalReference": "@tldraw/editor!Edge2d:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "segments", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!precise:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function precise(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "precise" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!preventDefault:function(1)", - "docComment": "/**\n * This function calls `event.preventDefault()` for you. Why is that useful?\n *\n * Beacuase if you enable `window.preventDefaultLogging = true` it'll log out a message when it happens. Because we use console.warn rather than (log) you'll get a stack trace in the inspector telling you exactly where it happened. This is important because `e.preventDefault()` is the source of many bugs, but unfortuantly it can't be avoided because it also stops a lot of default behaviour which doesn't make sense in our UI\n *\n * @param event - To prevent default on\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function preventDefault(event: " - }, - { - "kind": "Reference", - "text": "Event", - "canonicalReference": "!Event:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "React.BaseSyntheticEvent", - "canonicalReference": "@types/react!React.BaseSyntheticEvent:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/dom.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "event", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "preventDefault" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!radiansToDegrees:function(1)", - "docComment": "/**\n * Convert radians to degrees.\n *\n * @param r - The degree in radians.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function radiansToDegrees(r: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "radiansToDegrees" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!rangeIntersection:function(1)", - "docComment": "/**\n * Finds the intersection of two ranges.\n *\n * @param a0 - The start point in the A range\n *\n * @param a1 - The end point in the A range\n *\n * @param b0 - The start point in the B range\n *\n * @param b1 - The end point in the B range\n *\n * @returns The intersection of the ranges, or null if no intersection\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function rangeIntersection(a0: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", a1: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", b0: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", b1: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "[number, number] | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a0", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "a1", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "b0", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "b1", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - } - ], - "name": "rangeIntersection" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class", - "docComment": "/**\n * A map of {@link @tldraw/tlschema#StyleProp | StyleProps} to their {@link SharedStyle} values. See {@link Editor.getSharedStyles}.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ReadonlySharedStyleMap " - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/SharedStylesMap.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "ReadonlySharedStyleMap", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#[Symbol.iterator]:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "[" - }, - { - "kind": "Reference", - "text": "Symbol.iterator", - "canonicalReference": "!SymbolConstructor#iterator" - }, - { - "kind": "Content", - "text": "](): " - }, - { - "kind": "Reference", - "text": "IterableIterator", - "canonicalReference": "!IterableIterator:interface" - }, - { - "kind": "Content", - "text": "<[" - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "SharedStyle", - "canonicalReference": "@tldraw/editor!SharedStyle:type" - }, - { - "kind": "Content", - "text": "]>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "[Symbol.iterator]" - }, - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `ReadonlySharedStyleMap` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(entries?: " - }, - { - "kind": "Reference", - "text": "Iterable", - "canonicalReference": "!Iterable:interface" - }, - { - "kind": "Content", - "text": "<[" - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "SharedStyle", - "canonicalReference": "@tldraw/editor!SharedStyle:type" - }, - { - "kind": "Content", - "text": "]>" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "entries", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 7 - }, - "isOptional": true - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#entries:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "entries(): " - }, - { - "kind": "Reference", - "text": "IterableIterator", - "canonicalReference": "!IterableIterator:interface" - }, - { - "kind": "Content", - "text": "<[" - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "SharedStyle", - "canonicalReference": "@tldraw/editor!SharedStyle:type" - }, - { - "kind": "Content", - "text": "]>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "entries" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#equals:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "equals(other: " - }, - { - "kind": "Reference", - "text": "ReadonlySharedStyleMap", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "other", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "equals" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#get:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get(prop: " - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "SharedStyle", - "canonicalReference": "@tldraw/editor!SharedStyle:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "prop", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "get" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#getAsKnownValue:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getAsKnownValue(prop: " - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "prop", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getAsKnownValue" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#keys:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "keys(): " - }, - { - "kind": "Reference", - "text": "IterableIterator", - "canonicalReference": "!IterableIterator:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "keys" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#size:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get size(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "size", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#values:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "values(): " - }, - { - "kind": "Reference", - "text": "IterableIterator", - "canonicalReference": "!IterableIterator:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "SharedStyle", - "canonicalReference": "@tldraw/editor!SharedStyle:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "values" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Rectangle2d:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Rectangle2d extends " - }, - { - "kind": "Reference", - "text": "Polygon2d", - "canonicalReference": "@tldraw/editor!Polygon2d:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Rectangle2d.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Rectangle2d", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Rectangle2d:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Rectangle2d` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed'> & {\n x?: number;\n y?: number;\n width: number;\n height: number;\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Rectangle2d#getBounds:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getBounds(): " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getBounds" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Rectangle2d#h:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "h: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "h", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Rectangle2d#w:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "w: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "w", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Rectangle2d#x:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "x", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Rectangle2d#y:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "y", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!refreshPage:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function refreshPage(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/refreshPage.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "refreshPage" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!releasePointerCapture:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function releasePointerCapture(element: " - }, - { - "kind": "Reference", - "text": "Element", - "canonicalReference": "!Element:interface" - }, - { - "kind": "Content", - "text": ", event: " - }, - { - "kind": "Reference", - "text": "PointerEvent", - "canonicalReference": "!PointerEvent:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "React.PointerEvent", - "canonicalReference": "@types/react!React.PointerEvent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Element", - "canonicalReference": "!Element:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/dom.ts", - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "element", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "event", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 9 - }, - "isOptional": false - } - ], - "name": "releasePointerCapture" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!RequiredKeys:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type RequiredKeys = " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "> & " - }, - { - "kind": "Reference", - "text": "Pick", - "canonicalReference": "!Pick:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/misc-types.ts", - "releaseTag": "Public", - "name": "RequiredKeys", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "K", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 9 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!resizeBox:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function resizeBox(shape: " - }, - { - "kind": "Reference", - "text": "TLBaseBoxShape", - "canonicalReference": "@tldraw/editor!TLBaseBoxShape:type" - }, - { - "kind": "Content", - "text": ", info: " - }, - { - "kind": "Content", - "text": "{\n newPoint: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n handle: " - }, - { - "kind": "Reference", - "text": "TLResizeHandle", - "canonicalReference": "@tldraw/editor!TLResizeHandle:type" - }, - { - "kind": "Content", - "text": ";\n mode: " - }, - { - "kind": "Reference", - "text": "TLResizeMode", - "canonicalReference": "@tldraw/editor!TLResizeMode:type" - }, - { - "kind": "Content", - "text": ";\n scaleX: number;\n scaleY: number;\n initialBounds: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";\n initialShape: " - }, - { - "kind": "Reference", - "text": "TLBaseBoxShape", - "canonicalReference": "@tldraw/editor!TLBaseBoxShape:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ", opts?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n minWidth: number;\n maxWidth: number;\n minHeight: number;\n maxHeight: number;\n}>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n x: number;\n y: number;\n props: {\n w: number;\n h: number;\n };\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/shared/resizeBox.ts", - "returnTypeTokenRange": { - "startIndex": 18, - "endIndex": 19 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "info", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 14 - }, - "isOptional": false - }, - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 15, - "endIndex": 17 - }, - "isOptional": true - } - ], - "name": "resizeBox" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!ResizeBoxOptions:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type ResizeBoxOptions = " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n minWidth: number;\n maxWidth: number;\n minHeight: number;\n maxHeight: number;\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/shared/resizeBox.ts", - "releaseTag": "Public", - "name": "ResizeBoxOptions", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!ROTATE_CORNER_TO_SELECTION_CORNER:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "ROTATE_CORNER_TO_SELECTION_CORNER: " - }, - { - "kind": "Content", - "text": "{\n readonly top_left_rotate: \"top_left\";\n readonly top_right_rotate: \"top_right\";\n readonly bottom_right_rotate: \"bottom_right\";\n readonly bottom_left_rotate: \"bottom_left\";\n readonly mobile_rotate: \"top_left\";\n}" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "ROTATE_CORNER_TO_SELECTION_CORNER", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!RotateCorner:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type RotateCorner = " - }, - { - "kind": "Content", - "text": "'bottom_left_rotate' | 'bottom_right_rotate' | 'mobile_rotate' | 'top_left_rotate' | 'top_right_rotate'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", - "releaseTag": "Public", - "name": "RotateCorner", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!rotateSelectionHandle:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function rotateSelectionHandle(handle: " - }, - { - "kind": "Reference", - "text": "SelectionHandle", - "canonicalReference": "@tldraw/editor!SelectionHandle:type" - }, - { - "kind": "Content", - "text": ", rotation: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "SelectionHandle", - "canonicalReference": "@tldraw/editor!SelectionHandle:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "handle", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "rotation", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "rotateSelectionHandle" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!runtime:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "runtime: " - }, - { - "kind": "Content", - "text": "{\n openWindow: (url: string, target: string) => void;\n refreshPage: () => void;\n hardReset: () => void;\n}" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/runtime.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "runtime", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!SelectionCorner:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type SelectionCorner = " - }, - { - "kind": "Content", - "text": "'bottom_left' | 'bottom_right' | 'top_left' | 'top_right'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", - "releaseTag": "Public", - "name": "SelectionCorner", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!SelectionEdge:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type SelectionEdge = " - }, - { - "kind": "Content", - "text": "'bottom' | 'left' | 'right' | 'top'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", - "releaseTag": "Public", - "name": "SelectionEdge", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!SelectionHandle:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type SelectionHandle = " - }, - { - "kind": "Reference", - "text": "SelectionCorner", - "canonicalReference": "@tldraw/editor!SelectionCorner:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "SelectionEdge", - "canonicalReference": "@tldraw/editor!SelectionEdge:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", - "releaseTag": "Public", - "name": "SelectionHandle", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!setPointerCapture:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function setPointerCapture(element: " - }, - { - "kind": "Reference", - "text": "Element", - "canonicalReference": "!Element:interface" - }, - { - "kind": "Content", - "text": ", event: " - }, - { - "kind": "Reference", - "text": "PointerEvent", - "canonicalReference": "!PointerEvent:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "React.PointerEvent", - "canonicalReference": "@types/react!React.PointerEvent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Element", - "canonicalReference": "!Element:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/dom.ts", - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "element", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "event", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 9 - }, - "isOptional": false - } - ], - "name": "setPointerCapture" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!setRuntimeOverrides:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function setRuntimeOverrides(input: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/runtime.ts", - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "input", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "name": "setRuntimeOverrides" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!setUserPreferences:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function setUserPreferences(user: " - }, - { - "kind": "Reference", - "text": "TLUserPreferences", - "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/config/TLUserPreferences.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "user", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "setUserPreferences" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!ShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare abstract class ShapeUtil " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Shape", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "isAbstract": true, - "name": "ShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!ShapeUtil:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `ShapeUtil` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "editor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#canBind:member", - "docComment": "/**\n * Whether the shape can be bound to by an arrow.\n *\n * @param _otherShape - The other shape attempting to bind to this shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "canBind: " - }, - { - "kind": "Content", - "text": "(_shape: Shape, _otherShape?: K | undefined) => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canBind", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#canCrop:member", - "docComment": "/**\n * Whether the shape can be cropped.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "canCrop: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canCrop", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ShapeUtil#canDropShapes:member(1)", - "docComment": "/**\n * Get whether the shape can receive children of a given type.\n *\n * @param shape - The shape type.\n *\n * @param shapes - The shapes that are being dropped.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "canDropShapes(shape: " - }, - { - "kind": "Content", - "text": "Shape" - }, - { - "kind": "Content", - "text": ", shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "shapes", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "canDropShapes" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#canEdit:member", - "docComment": "/**\n * Whether the shape can be double clicked to edit.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "canEdit: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canEdit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#canEditInReadOnly:member", - "docComment": "/**\n * Whether the shape can be edited in read-only mode.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "canEditInReadOnly: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canEditInReadOnly", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ShapeUtil#canReceiveNewChildrenOfType:member(1)", - "docComment": "/**\n * Get whether the shape can receive children of a given type.\n *\n * @param type - The shape type.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "canReceiveNewChildrenOfType(shape: " - }, - { - "kind": "Content", - "text": "Shape" - }, - { - "kind": "Content", - "text": ", type: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "['type']" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "canReceiveNewChildrenOfType" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#canResize:member", - "docComment": "/**\n * Whether the shape can be resized.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "canResize: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canResize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#canScroll:member", - "docComment": "/**\n * Whether the shape can be scrolled while editing.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "canScroll: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canScroll", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#canSnap:member", - "docComment": "/**\n * Whether the shape can be snapped to by another shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "canSnap: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canSnap", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#canUnmount:member", - "docComment": "/**\n * Whether the shape should unmount when not visible in the editor. Consider keeping this to false if the shape's `component` has local state.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "canUnmount: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canUnmount", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ShapeUtil#component:member(1)", - "docComment": "/**\n * Get a JSX element for the shape (as an HTML element).\n *\n * @param shape - The shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "abstract component(shape: " - }, - { - "kind": "Content", - "text": "Shape" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "any" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": true, - "name": "component" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#editor:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "editor", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ShapeUtil#getBoundsSnapGeometry:member(1)", - "docComment": "/**\n * Get the geometry to use when snapping to this this shape in translate/resize operations. See {@link BoundsSnapGeometry} for details.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getBoundsSnapGeometry(shape: " - }, - { - "kind": "Content", - "text": "Shape" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "BoundsSnapGeometry", - "canonicalReference": "@tldraw/editor!BoundsSnapGeometry:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getBoundsSnapGeometry" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ShapeUtil#getCanvasSvgDefs:member(1)", - "docComment": "/**\n * Return elements to be added to the \\ section of the canvases SVG context. This can be used to define SVG content (e.g. patterns & masks) that can be referred to by ID from svg elements returned by `component`.\n *\n * Each def should have a unique `key`. If multiple defs from different shapes all have the same key, only one will be used.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCanvasSvgDefs(): " - }, - { - "kind": "Reference", - "text": "TLShapeUtilCanvasSvgDef", - "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCanvasSvgDefs" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ShapeUtil#getDefaultProps:member(1)", - "docComment": "/**\n * Get the default props for a shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "abstract getDefaultProps(): " - }, - { - "kind": "Content", - "text": "Shape['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": true, - "name": "getDefaultProps" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ShapeUtil#getGeometry:member(1)", - "docComment": "/**\n * Get the shape's geometry.\n *\n * @param shape - The shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "abstract getGeometry(shape: " - }, - { - "kind": "Content", - "text": "Shape" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": true, - "name": "getGeometry" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ShapeUtil#getHandles:member(1)", - "docComment": "/**\n * Get an array of handle models for the shape. This is an optional method.\n *\n * @param shape - The shape.\n *\n * @example\n * ```ts\n * util.getHandles?.(myShape)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHandles?(shape: " - }, - { - "kind": "Content", - "text": "Shape" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": true, - "isAbstract": false, - "name": "getHandles" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ShapeUtil#getHandleSnapGeometry:member(1)", - "docComment": "/**\n * Get the geometry to use when snapping handles to this shape. See {@link HandleSnapGeometry} for details.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHandleSnapGeometry(shape: " - }, - { - "kind": "Content", - "text": "Shape" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "HandleSnapGeometry", - "canonicalReference": "@tldraw/editor!HandleSnapGeometry:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getHandleSnapGeometry" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#hideResizeHandles:member", - "docComment": "/**\n * Whether the shape should hide its resize handles when selected.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideResizeHandles: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideResizeHandles", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#hideRotateHandle:member", - "docComment": "/**\n * Whether the shape should hide its rotation handles when selected.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideRotateHandle: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideRotateHandle", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#hideSelectionBoundsBg:member", - "docComment": "/**\n * Whether the shape should hide its selection bounds background when selected.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideSelectionBoundsBg: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideSelectionBoundsBg", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#hideSelectionBoundsFg:member", - "docComment": "/**\n * Whether the shape should hide its selection bounds foreground when selected.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideSelectionBoundsFg: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideSelectionBoundsFg", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ShapeUtil#indicator:member(1)", - "docComment": "/**\n * Get JSX describing the shape's indicator (as an SVG element).\n *\n * @param shape - The shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "abstract indicator(shape: " - }, - { - "kind": "Content", - "text": "Shape" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "any" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": true, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#isAspectRatioLocked:member", - "docComment": "/**\n * Whether the shape's aspect ratio is locked.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isAspectRatioLocked: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isAspectRatioLocked", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations?: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onBeforeCreate:member", - "docComment": "/**\n * A callback called just before a shape is created. This method provides a last chance to modify the created shape.\n *\n * @param next - The next shape.\n *\n * @returns The next shape or void.\n *\n * @example\n * ```ts\n * onBeforeCreate = (next) => {\n * \treturn { ...next, x: next.x + 1 }\n * }\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBeforeCreate?: " - }, - { - "kind": "Reference", - "text": "TLOnBeforeCreateHandler", - "canonicalReference": "@tldraw/editor!TLOnBeforeCreateHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onBeforeCreate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onBeforeUpdate:member", - "docComment": "/**\n * A callback called just before a shape is updated. This method provides a last chance to modify the updated shape.\n *\n * @param prev - The previous shape.\n *\n * @param next - The next shape.\n *\n * @returns The next shape or void.\n *\n * @example\n * ```ts\n * onBeforeUpdate = (prev, next) => {\n * \tif (prev.x === next.x) {\n * \t\treturn { ...next, x: next.x + 1 }\n * \t}\n * }\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBeforeUpdate?: " - }, - { - "kind": "Reference", - "text": "TLOnBeforeUpdateHandler", - "canonicalReference": "@tldraw/editor!TLOnBeforeUpdateHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onBeforeUpdate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onChildrenChange:member", - "docComment": "/**\n * A callback called when a shape's children change.\n *\n * @param shape - The shape.\n *\n * @returns An array of shape updates, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onChildrenChange?: " - }, - { - "kind": "Reference", - "text": "TLOnChildrenChangeHandler", - "canonicalReference": "@tldraw/editor!TLOnChildrenChangeHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onChildrenChange", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onClick:member", - "docComment": "/**\n * A callback called when a shape is clicked.\n *\n * @param shape - The shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onClick?: " - }, - { - "kind": "Reference", - "text": "TLOnClickHandler", - "canonicalReference": "@tldraw/editor!TLOnClickHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onDoubleClick:member", - "docComment": "/**\n * A callback called when a shape is double clicked.\n *\n * @param shape - The shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDoubleClick?: " - }, - { - "kind": "Reference", - "text": "TLOnDoubleClickHandler", - "canonicalReference": "@tldraw/editor!TLOnDoubleClickHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onDoubleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onDoubleClickEdge:member", - "docComment": "/**\n * A callback called when a shape's edge is double clicked.\n *\n * @param shape - The shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDoubleClickEdge?: " - }, - { - "kind": "Reference", - "text": "TLOnDoubleClickHandler", - "canonicalReference": "@tldraw/editor!TLOnDoubleClickHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onDoubleClickEdge", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onDoubleClickHandle:member", - "docComment": "/**\n * A callback called when a shape's handle is double clicked.\n *\n * @param shape - The shape.\n *\n * @param handle - The handle that is double-clicked.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDoubleClickHandle?: " - }, - { - "kind": "Reference", - "text": "TLOnDoubleClickHandleHandler", - "canonicalReference": "@tldraw/editor!TLOnDoubleClickHandleHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onDoubleClickHandle", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onDragShapesOut:member", - "docComment": "/**\n * A callback called when some other shapes are dragged out of this one.\n *\n * @param shape - The shape.\n *\n * @param shapes - The shapes that are being dragged out.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDragShapesOut?: " - }, - { - "kind": "Reference", - "text": "TLOnDragHandler", - "canonicalReference": "@tldraw/editor!TLOnDragHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onDragShapesOut", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onDragShapesOver:member", - "docComment": "/**\n * A callback called when some other shapes are dragged over this one.\n *\n * @param shape - The shape.\n *\n * @param shapes - The shapes that are being dragged over this one.\n *\n * @returns An object specifying whether the shape should hint that it can receive the dragged shapes.\n *\n * @example\n * ```ts\n * onDragShapesOver = (shape, shapes) => {\n * \treturn { shouldHint: true }\n * }\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDragShapesOver?: " - }, - { - "kind": "Reference", - "text": "TLOnDragHandler", - "canonicalReference": "@tldraw/editor!TLOnDragHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onDragShapesOver", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onDropShapesOver:member", - "docComment": "/**\n * A callback called when some other shapes are dropped over this one.\n *\n * @param shape - The shape.\n *\n * @param shapes - The shapes that are being dropped over this one.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDropShapesOver?: " - }, - { - "kind": "Reference", - "text": "TLOnDragHandler", - "canonicalReference": "@tldraw/editor!TLOnDragHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onDropShapesOver", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onEditEnd:member", - "docComment": "/**\n * A callback called when a shape finishes being editing.\n *\n * @param shape - The shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onEditEnd?: " - }, - { - "kind": "Reference", - "text": "TLOnEditEndHandler", - "canonicalReference": "@tldraw/editor!TLOnEditEndHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onEditEnd", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onHandleDrag:member", - "docComment": "/**\n * A callback called when a shape's handle changes.\n *\n * @param shape - The current shape.\n *\n * @param info - An object containing the handle and whether the handle is 'precise' or not.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onHandleDrag?: " - }, - { - "kind": "Reference", - "text": "TLOnHandleDragHandler", - "canonicalReference": "@tldraw/editor!TLOnHandleDragHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onHandleDrag", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onResize:member", - "docComment": "/**\n * A callback called when a shape changes from a resize.\n *\n * @param shape - The shape at the start of the resize.\n *\n * @param info - Info about the resize.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onResize?: " - }, - { - "kind": "Reference", - "text": "TLOnResizeHandler", - "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onResize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onResizeEnd:member", - "docComment": "/**\n * A callback called when a shape finishes resizing.\n *\n * @param initial - The shape at the start of the resize.\n *\n * @param current - The current shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onResizeEnd?: " - }, - { - "kind": "Reference", - "text": "TLOnResizeEndHandler", - "canonicalReference": "@tldraw/editor!TLOnResizeEndHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onResizeEnd", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onResizeStart:member", - "docComment": "/**\n * A callback called when a shape starts being resized.\n *\n * @param shape - The shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onResizeStart?: " - }, - { - "kind": "Reference", - "text": "TLOnResizeStartHandler", - "canonicalReference": "@tldraw/editor!TLOnResizeStartHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onResizeStart", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onRotate:member", - "docComment": "/**\n * A callback called when a shape changes from a rotation.\n *\n * @param initial - The shape at the start of the rotation.\n *\n * @param current - The current shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onRotate?: " - }, - { - "kind": "Reference", - "text": "TLOnRotateHandler", - "canonicalReference": "@tldraw/editor!TLOnRotateHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onRotate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onRotateEnd:member", - "docComment": "/**\n * A callback called when a shape finishes rotating.\n *\n * @param initial - The shape at the start of the rotation.\n *\n * @param current - The current shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onRotateEnd?: " - }, - { - "kind": "Reference", - "text": "TLOnRotateEndHandler", - "canonicalReference": "@tldraw/editor!TLOnRotateEndHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onRotateEnd", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onRotateStart:member", - "docComment": "/**\n * A callback called when a shape starts being rotated.\n *\n * @param shape - The shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onRotateStart?: " - }, - { - "kind": "Reference", - "text": "TLOnRotateStartHandler", - "canonicalReference": "@tldraw/editor!TLOnRotateStartHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onRotateStart", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onTranslate:member", - "docComment": "/**\n * A callback called when a shape changes from a translation.\n *\n * @param initial - The shape at the start of the translation.\n *\n * @param current - The current shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onTranslate?: " - }, - { - "kind": "Reference", - "text": "TLOnTranslateHandler", - "canonicalReference": "@tldraw/editor!TLOnTranslateHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onTranslate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onTranslateEnd:member", - "docComment": "/**\n * A callback called when a shape finishes translating.\n *\n * @param initial - The shape at the start of the translation.\n *\n * @param current - The current shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onTranslateEnd?: " - }, - { - "kind": "Reference", - "text": "TLOnTranslateEndHandler", - "canonicalReference": "@tldraw/editor!TLOnTranslateEndHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onTranslateEnd", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil#onTranslateStart:member", - "docComment": "/**\n * A callback called when a shape starts being translated.\n *\n * @param shape - The shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onTranslateStart?: " - }, - { - "kind": "Reference", - "text": "TLOnTranslateStartHandler", - "canonicalReference": "@tldraw/editor!TLOnTranslateStartHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onTranslateStart", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props?: " - }, - { - "kind": "Reference", - "text": "ShapeProps", - "canonicalReference": "@tldraw/tlschema!ShapeProps:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUnknownShape", - "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ShapeUtil#toBackgroundSvg:member(1)", - "docComment": "/**\n * Get the shape's background layer as an SVG object.\n *\n * @param shape - The shape.\n *\n * @param ctx - ctx - The export context for the SVG - used for adding e.g. \\s\n *\n * @returns An SVG element.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "toBackgroundSvg?(shape: " - }, - { - "kind": "Content", - "text": "Shape" - }, - { - "kind": "Content", - "text": ", ctx: " - }, - { - "kind": "Reference", - "text": "SvgExportContext", - "canonicalReference": "@tldraw/editor!SvgExportContext:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "SVGElement", - "canonicalReference": "!SVGElement:interface" - }, - { - "kind": "Content", - "text": "> | " - }, - { - "kind": "Reference", - "text": "SVGElement", - "canonicalReference": "!SVGElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 11 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ctx", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": true, - "isAbstract": false, - "name": "toBackgroundSvg" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!ShapeUtil#toSvg:member(1)", - "docComment": "/**\n * Get the shape as an SVG object.\n *\n * @param shape - The shape.\n *\n * @param ctx - The export context for the SVG - used for adding e.g. \\s\n *\n * @returns An SVG element.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "toSvg?(shape: " - }, - { - "kind": "Content", - "text": "Shape" - }, - { - "kind": "Content", - "text": ", ctx: " - }, - { - "kind": "Reference", - "text": "SvgExportContext", - "canonicalReference": "@tldraw/editor!SvgExportContext:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "SVGElement", - "canonicalReference": "!SVGElement:interface" - }, - { - "kind": "Content", - "text": "> | " - }, - { - "kind": "Reference", - "text": "SVGElement", - "canonicalReference": "!SVGElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ctx", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": true, - "isAbstract": false, - "name": "toSvg" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!ShapeUtil.type:member", - "docComment": "/**\n * The type of the shape util, which should match the shape's type.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!SharedStyle:type", - "docComment": "/**\n * The value of a particular {@link @tldraw/tlschema#StyleProp}.\n *\n * A `mixed` style means that in the current selection, there are lots of different values for the same style prop - e.g. a red and a blue shape are selected.\n *\n * A `shared` style means that all shapes in the selection share the same value for this style prop.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type SharedStyle = " - }, - { - "kind": "Content", - "text": "{\n readonly type: 'mixed';\n} | {\n readonly type: 'shared';\n readonly value: T;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/SharedStylesMap.ts", - "releaseTag": "Public", - "name": "SharedStyle", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!shortAngleDist:function(1)", - "docComment": "/**\n * Get the short angle distance between two angles.\n *\n * @param a0 - The first angle.\n *\n * @param a1 - The second angle.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function shortAngleDist(a0: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", a1: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a0", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "a1", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "shortAngleDist" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!SIN:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "SIN: (x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Content", - "text": "number" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "SIN" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!snapAngle:function(1)", - "docComment": "/**\n * Clamp rotation to even segments.\n *\n * @param r - The rotation in radians.\n *\n * @param segments - The number of segments.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function snapAngle(r: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", segments: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "segments", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "snapAngle" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!SnapIndicator:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type SnapIndicator = " - }, - { - "kind": "Reference", - "text": "GapsSnapIndicator", - "canonicalReference": "@tldraw/editor!GapsSnapIndicator:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "PointsSnapIndicator", - "canonicalReference": "@tldraw/editor!PointsSnapIndicator:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/SnapManager.ts", - "releaseTag": "Public", - "name": "SnapIndicator", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!SnapManager:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class SnapManager " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/SnapManager.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "SnapManager", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!SnapManager:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `SnapManager` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "editor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!SnapManager#clearIndicators:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "clearIndicators(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "clearIndicators" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!SnapManager#editor:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "editor", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!SnapManager#getCurrentCommonAncestor:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCurrentCommonAncestor(): " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCurrentCommonAncestor" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!SnapManager#getIndicators:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getIndicators(): " - }, - { - "kind": "Reference", - "text": "SnapIndicator", - "canonicalReference": "@tldraw/editor!SnapIndicator:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getIndicators" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!SnapManager#getSnappableShapes:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSnappableShapes(): " - }, - { - "kind": "Reference", - "text": "Set", - "canonicalReference": "!Set:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getSnappableShapes" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!SnapManager#getSnapThreshold:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSnapThreshold(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getSnapThreshold" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!SnapManager#handles:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly handles: " - }, - { - "kind": "Reference", - "text": "HandleSnaps", - "canonicalReference": "@tldraw/editor!~HandleSnaps:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "handles", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!SnapManager#setIndicators:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "setIndicators(indicators: " - }, - { - "kind": "Reference", - "text": "SnapIndicator", - "canonicalReference": "@tldraw/editor!SnapIndicator:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "indicators", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setIndicators" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!SnapManager#shapeBounds:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly shapeBounds: " - }, - { - "kind": "Reference", - "text": "BoundsSnaps", - "canonicalReference": "@tldraw/editor!~BoundsSnaps:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "shapeBounds", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Stadium2d:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Stadium2d extends " - }, - { - "kind": "Reference", - "text": "Ellipse2d", - "canonicalReference": "@tldraw/editor!Ellipse2d:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Stadium2d.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Stadium2d", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Stadium2d:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Stadium2d` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed'> & {\n width: number;\n height: number;\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Stadium2d#config:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "config: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Geometry2dOptions", - "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" - }, - { - "kind": "Content", - "text": ", 'isClosed'> & {\n width: number;\n height: number;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "config", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Stadium2d#getVertices:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getVertices(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getVertices" - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!StateNode:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare abstract class StateNode implements " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/tools/StateNode.ts", - "releaseTag": "Public", - "isAbstract": true, - "name": "StateNode", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#_currentToolIdMask:member", - "docComment": "/**\n * This is a hack / escape hatch that will tell the editor to report a different state as active (in `getCurrentToolId()`) when this state is active. This is usually used when a tool transitions to a child of a different state for a certain interaction and then returns to the original tool when that interaction completes; and where we would want to show the original tool as active in the UI.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "_currentToolIdMask: " - }, - { - "kind": "Reference", - "text": "Atom", - "canonicalReference": "@tldraw/state!Atom:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "_currentToolIdMask", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#_path:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "_path: " - }, - { - "kind": "Reference", - "text": "Computed", - "canonicalReference": "@tldraw/state!Computed:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "_path", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!StateNode:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `StateNode` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ", parent?: " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "editor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "parent", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "children?: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children?: " - }, - { - "kind": "Content", - "text": "() => " - }, - { - "kind": "Reference", - "text": "TLStateNodeConstructor", - "canonicalReference": "@tldraw/editor!TLStateNodeConstructor:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#editor:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "editor", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#enter:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "enter: " - }, - { - "kind": "Content", - "text": "(info: any, from: string) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "enter", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#exit:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "exit: " - }, - { - "kind": "Content", - "text": "(info: any, from: string) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "exit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!StateNode#getCurrent:member(1)", - "docComment": "/**\n * This node's current active child node, if any.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCurrent(): " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCurrent" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!StateNode#getCurrentToolIdMask:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCurrentToolIdMask(): " - }, - { - "kind": "Content", - "text": "string | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCurrentToolIdMask" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!StateNode#getIsActive:member(1)", - "docComment": "/**\n * Whether this node is active.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getIsActive(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getIsActive" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!StateNode#getPath:member(1)", - "docComment": "/**\n * This node's path of active state nodes\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getPath(): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getPath" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#handleEvent:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "handleEvent: " - }, - { - "kind": "Content", - "text": "(info: " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLEventInfo", - "canonicalReference": "@tldraw/editor!TLEventInfo:type" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "TLPinchEventInfo", - "canonicalReference": "@tldraw/editor!TLPinchEventInfo:type" - }, - { - "kind": "Content", - "text": ">) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "handleEvent", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "initial?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onCancel:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onCancel?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onCancel']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onCancel", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onComplete:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onComplete?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onComplete']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onComplete", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onDoubleClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDoubleClick?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onDoubleClick']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onDoubleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onEnter:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onEnter?: " - }, - { - "kind": "Reference", - "text": "TLEnterEventHandler", - "canonicalReference": "@tldraw/editor!TLEnterEventHandler:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onEnter", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onExit:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onExit?: " - }, - { - "kind": "Reference", - "text": "TLExitEventHandler", - "canonicalReference": "@tldraw/editor!TLExitEventHandler:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onExit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onInterrupt:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onInterrupt?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onInterrupt']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onInterrupt", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onKeyDown:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onKeyDown?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onKeyDown']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onKeyDown", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onKeyRepeat:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onKeyRepeat?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onKeyRepeat']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onKeyRepeat", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onKeyUp:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onKeyUp?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onKeyUp']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onKeyUp", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onMiddleClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onMiddleClick?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onMiddleClick']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onMiddleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onPointerDown:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onPointerDown?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onPointerDown']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onPointerDown", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onPointerMove:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onPointerMove?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onPointerMove']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onPointerMove", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onPointerUp:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onPointerUp?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onPointerUp']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onPointerUp", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onQuadrupleClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onQuadrupleClick?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onQuadrupleClick']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onQuadrupleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onRightClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onRightClick?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onRightClick']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onRightClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onTick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onTick?: " - }, - { - "kind": "Reference", - "text": "TLTickEventHandler", - "canonicalReference": "@tldraw/editor!TLTickEventHandler:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onTick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onTripleClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onTripleClick?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onTripleClick']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onTripleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#onWheel:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onWheel?: " - }, - { - "kind": "Reference", - "text": "TLEventHandlers", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" - }, - { - "kind": "Content", - "text": "['onWheel']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onWheel", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#parent:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "parent: " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "parent", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!StateNode#setCurrentToolIdMask:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "setCurrentToolIdMask(id: " - }, - { - "kind": "Content", - "text": "string | undefined" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setCurrentToolIdMask" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#shapeType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapeType?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "shapeType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#transition:member", - "docComment": "/**\n * Transition to a new active child state node.\n *\n * @param id - The id of the child state node to transition to.\n *\n * @param info - Any data to pass to the `onEnter` and `onExit` handlers.\n *\n * @example\n * ```ts\n * parentState.transition('childStateA')\n * parentState.transition('childStateB', { myData: 4 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "transition: " - }, - { - "kind": "Content", - "text": "(id: string, info?: any) => this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "transition", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!StateNode#type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Reference", - "text": "TLStateNodeType", - "canonicalReference": "@tldraw/editor!~TLStateNodeType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "implementsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 5 - } - ] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!stopEventPropagation:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "stopEventPropagation: (e: " - }, - { - "kind": "Content", - "text": "any" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Content", - "text": "any" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/dom.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "e", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "stopEventPropagation" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!SVGContainer:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function SVGContainer({ children, className, ...rest }: " - }, - { - "kind": "Reference", - "text": "SVGContainerProps", - "canonicalReference": "@tldraw/editor!SVGContainerProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/SVGContainer.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children, className, ...rest }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "SVGContainer" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!SVGContainerProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type SVGContainerProps = " - }, - { - "kind": "Reference", - "text": "React.HTMLAttributes", - "canonicalReference": "@types/react!React.HTMLAttributes:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "SVGElement", - "canonicalReference": "!SVGElement:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/SVGContainer.tsx", - "releaseTag": "Public", - "name": "SVGContainerProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!SvgExportContext:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface SvgExportContext " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/SvgExportContext.tsx", - "releaseTag": "Public", - "name": "SvgExportContext", - "preserveMemberOrder": false, - "members": [ - { - "kind": "MethodSignature", - "canonicalReference": "@tldraw/editor!SvgExportContext#addExportDef:member(1)", - "docComment": "/**\n * Add contents to the `` section of the export SVG. Each export def should have a unique key. If multiple defs come with the same key, only one will be added.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "addExportDef(def: " - }, - { - "kind": "Reference", - "text": "SvgExportDef", - "canonicalReference": "@tldraw/editor!SvgExportDef:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "def", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "addExportDef" - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!SvgExportContext#isDarkMode:member", - "docComment": "/**\n * Whether the export should be in dark mode.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly isDarkMode: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "isDarkMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!SvgExportDef:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface SvgExportDef " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/SvgExportContext.tsx", - "releaseTag": "Public", - "name": "SvgExportDef", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!SvgExportDef#getElement:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getElement: " - }, - { - "kind": "Content", - "text": "() => null | " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "SVGElement", - "canonicalReference": "!SVGElement:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "SVGElement", - "canonicalReference": "!SVGElement:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "getElement", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 12 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!SvgExportDef#key:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "key: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "key", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!TAB_ID:var", - "docComment": "/**\n * A string that is unique per browser tab\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TAB_ID: " - }, - { - "kind": "Content", - "text": "string" - } - ], - "fileUrlPath": "packages/editor/src/lib/config/TLSessionStateSnapshot.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "TAB_ID", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLAfterChangeHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLAfterChangeHandler = " - }, - { - "kind": "Content", - "text": "(prev: R, next: R, source: 'remote' | 'user') => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", - "releaseTag": "Public", - "name": "TLAfterChangeHandler", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLAfterCreateHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLAfterCreateHandler = " - }, - { - "kind": "Content", - "text": "(record: R, source: 'remote' | 'user') => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", - "releaseTag": "Public", - "name": "TLAfterCreateHandler", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLAfterDeleteHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLAfterDeleteHandler = " - }, - { - "kind": "Content", - "text": "(record: R, source: 'remote' | 'user') => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", - "releaseTag": "Public", - "name": "TLAfterDeleteHandler", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLAnimationOptions:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLAnimationOptions = " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n duration: number;\n easing: (t: number) => number;\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/Editor.ts", - "releaseTag": "Public", - "name": "TLAnimationOptions", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLAnyShapeUtilConstructor = " - }, - { - "kind": "Reference", - "text": "TLShapeUtilConstructor", - "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/config/defaultShapes.ts", - "releaseTag": "Public", - "name": "TLAnyShapeUtilConstructor", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!TLArcInfo:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLArcInfo " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/shared/arrow/arrow-types.ts", - "releaseTag": "Public", - "name": "TLArcInfo", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLArcInfo#center:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "center: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "center", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLArcInfo#largeArcFlag:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "largeArcFlag: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "largeArcFlag", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLArcInfo#length:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "length: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "length", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLArcInfo#radius:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "radius: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "radius", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLArcInfo#size:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "size: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "size", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLArcInfo#sweepFlag:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "sweepFlag: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "sweepFlag", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLArrowInfo:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLArrowInfo = " - }, - { - "kind": "Content", - "text": "{\n isStraight: false;\n start: " - }, - { - "kind": "Reference", - "text": "TLArrowPoint", - "canonicalReference": "@tldraw/editor!TLArrowPoint:type" - }, - { - "kind": "Content", - "text": ";\n end: " - }, - { - "kind": "Reference", - "text": "TLArrowPoint", - "canonicalReference": "@tldraw/editor!TLArrowPoint:type" - }, - { - "kind": "Content", - "text": ";\n middle: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n handleArc: " - }, - { - "kind": "Reference", - "text": "TLArcInfo", - "canonicalReference": "@tldraw/editor!TLArcInfo:interface" - }, - { - "kind": "Content", - "text": ";\n bodyArc: " - }, - { - "kind": "Reference", - "text": "TLArcInfo", - "canonicalReference": "@tldraw/editor!TLArcInfo:interface" - }, - { - "kind": "Content", - "text": ";\n isValid: boolean;\n} | {\n isStraight: true;\n start: " - }, - { - "kind": "Reference", - "text": "TLArrowPoint", - "canonicalReference": "@tldraw/editor!TLArrowPoint:type" - }, - { - "kind": "Content", - "text": ";\n end: " - }, - { - "kind": "Reference", - "text": "TLArrowPoint", - "canonicalReference": "@tldraw/editor!TLArrowPoint:type" - }, - { - "kind": "Content", - "text": ";\n middle: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n isValid: boolean;\n length: number;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/shared/arrow/arrow-types.ts", - "releaseTag": "Public", - "name": "TLArrowInfo", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 18 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLArrowPoint:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLArrowPoint = " - }, - { - "kind": "Content", - "text": "{\n handle: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n arrowhead: " - }, - { - "kind": "Reference", - "text": "TLArrowShapeArrowheadStyle", - "canonicalReference": "@tldraw/tlschema!TLArrowShapeArrowheadStyle:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/shared/arrow/arrow-types.ts", - "releaseTag": "Public", - "name": "TLArrowPoint", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLBaseBoxShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLBaseBoxShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/BaseBoxShapeUtil.tsx", - "releaseTag": "Public", - "name": "TLBaseBoxShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!TLBaseEventInfo:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLBaseEventInfo " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLBaseEventInfo", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLBaseEventInfo#altKey:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "altKey: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "altKey", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLBaseEventInfo#ctrlKey:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "ctrlKey: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "ctrlKey", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLBaseEventInfo#shiftKey:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "shiftKey: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "shiftKey", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLBaseEventInfo#type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Reference", - "text": "UiEventType", - "canonicalReference": "@tldraw/editor!UiEventType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLBatchCompleteHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLBatchCompleteHandler = " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", - "releaseTag": "Public", - "name": "TLBatchCompleteHandler", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLBeforeChangeHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLBeforeChangeHandler = " - }, - { - "kind": "Content", - "text": "(prev: R, next: R, source: 'remote' | 'user') => R" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", - "releaseTag": "Public", - "name": "TLBeforeChangeHandler", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLBeforeCreateHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLBeforeCreateHandler = " - }, - { - "kind": "Content", - "text": "(record: R, source: 'remote' | 'user') => R" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", - "releaseTag": "Public", - "name": "TLBeforeCreateHandler", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLBeforeDeleteHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLBeforeDeleteHandler = " - }, - { - "kind": "Content", - "text": "(record: R, source: 'remote' | 'user') => false | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", - "releaseTag": "Public", - "name": "TLBeforeDeleteHandler", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLBrushProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLBrushProps = " - }, - { - "kind": "Content", - "text": "{\n brush: " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": ";\n color?: string;\n opacity?: number;\n className?: string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultBrush.tsx", - "releaseTag": "Public", - "name": "TLBrushProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLCancelEvent:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLCancelEvent = " - }, - { - "kind": "Content", - "text": "(info: " - }, - { - "kind": "Reference", - "text": "TLCancelEventInfo", - "canonicalReference": "@tldraw/editor!TLCancelEventInfo:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLCancelEvent", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLCancelEventInfo:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLCancelEventInfo = " - }, - { - "kind": "Content", - "text": "{\n type: 'misc';\n name: 'cancel';\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLCancelEventInfo", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLClickEvent:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLClickEvent = " - }, - { - "kind": "Content", - "text": "(info: " - }, - { - "kind": "Reference", - "text": "TLClickEventInfo", - "canonicalReference": "@tldraw/editor!TLClickEventInfo:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLClickEvent", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLClickEventInfo:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLClickEventInfo = " - }, - { - "kind": "Reference", - "text": "TLBaseEventInfo", - "canonicalReference": "@tldraw/editor!TLBaseEventInfo:interface" - }, - { - "kind": "Content", - "text": " & {\n type: 'click';\n name: " - }, - { - "kind": "Reference", - "text": "TLCLickEventName", - "canonicalReference": "@tldraw/editor!TLCLickEventName:type" - }, - { - "kind": "Content", - "text": ";\n point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n pointerId: number;\n button: number;\n phase: 'down' | 'settle' | 'up';\n} & " - }, - { - "kind": "Reference", - "text": "TLPointerEventTarget", - "canonicalReference": "@tldraw/editor!TLPointerEventTarget:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLClickEventInfo", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLCLickEventName:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLCLickEventName = " - }, - { - "kind": "Content", - "text": "'double_click' | 'quadruple_click' | 'triple_click'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLCLickEventName", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLCollaboratorHintProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLCollaboratorHintProps = " - }, - { - "kind": "Content", - "text": "{\n className?: string;\n point: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n viewport: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";\n zoom: number;\n opacity?: number;\n color: string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultCollaboratorHint.tsx", - "releaseTag": "Public", - "name": "TLCollaboratorHintProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLCommand:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLCommand = " - }, - { - "kind": "Content", - "text": "{\n type: 'command';\n id: string;\n data: Data;\n name: Name;\n preservesRedoStack?: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/history-types.ts", - "releaseTag": "Public", - "name": "TLCommand", - "typeParameters": [ - { - "typeParameterName": "Name", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "typeParameterName": "Data", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - } - } - ], - "typeTokenRange": { - "startIndex": 7, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLCommandHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLCommandHandler = " - }, - { - "kind": "Content", - "text": "{\n do: (data: Data) => void;\n undo: (data: Data) => void;\n redo?: (data: Data) => void;\n squash?: (prevData: Data, nextData: Data) => Data;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/history-types.ts", - "releaseTag": "Public", - "name": "TLCommandHandler", - "typeParameters": [ - { - "typeParameterName": "Data", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLCommandHistoryOptions = " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n squashing: boolean;\n ephemeral: boolean;\n preservesRedoStack: boolean;\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/history-types.ts", - "releaseTag": "Public", - "name": "TLCommandHistoryOptions", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLCompleteEvent:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLCompleteEvent = " - }, - { - "kind": "Content", - "text": "(info: " - }, - { - "kind": "Reference", - "text": "TLCompleteEventInfo", - "canonicalReference": "@tldraw/editor!TLCompleteEventInfo:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLCompleteEvent", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLCompleteEventInfo:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLCompleteEventInfo = " - }, - { - "kind": "Content", - "text": "{\n type: 'misc';\n name: 'complete';\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLCompleteEventInfo", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!TLContent:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLContent " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/clipboard-types.ts", - "releaseTag": "Public", - "name": "TLContent", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLContent#assets:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "assets: " - }, - { - "kind": "Reference", - "text": "TLAsset", - "canonicalReference": "@tldraw/tlschema!TLAsset:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "assets", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLContent#rootShapeIds:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "rootShapeIds: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "rootShapeIds", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLContent#schema:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "schema: " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "schema", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLContent#shapes:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "shapes", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLCursorProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLCursorProps = " - }, - { - "kind": "Content", - "text": "{\n className?: string;\n point: null | " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n zoom: number;\n color?: string;\n name: null | string;\n chatMessage: string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultCursor.tsx", - "releaseTag": "Public", - "name": "TLCursorProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/editor!TldrawEditor:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TldrawEditor: " - }, - { - "kind": "Reference", - "text": "React.NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TldrawEditorProps", - "canonicalReference": "@tldraw/editor!TldrawEditorProps:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "TldrawEditor", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps:interface", - "docComment": "/**\n * Base props for the {@link tldraw#Tldraw} and {@link TldrawEditor} components.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TldrawEditorBaseProps " - } - ], - "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", - "releaseTag": "Public", - "name": "TldrawEditorBaseProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#autoFocus:member", - "docComment": "/**\n * Whether to automatically focus the editor when it mounts.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "autoFocus?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "autoFocus", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#children:member", - "docComment": "/**\n * The component's children.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#className:member", - "docComment": "/**\n * A classname to pass to the editor's container.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "className?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "className", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#components:member", - "docComment": "/**\n * Overrides for the editor's components, such as handles, collaborator cursors, etc.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "components?: " - }, - { - "kind": "Reference", - "text": "TLEditorComponents", - "canonicalReference": "@tldraw/editor!TLEditorComponents:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "components", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#inferDarkMode:member", - "docComment": "/**\n * Whether to infer dark mode from the user's OS. Defaults to false.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "inferDarkMode?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "inferDarkMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#initialState:member", - "docComment": "/**\n * The editor's initial state (usually the id of the first active tool).\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "initialState?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "initialState", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#onMount:member", - "docComment": "/**\n * Called when the editor has mounted.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onMount?: " - }, - { - "kind": "Reference", - "text": "TLOnMountHandler", - "canonicalReference": "@tldraw/editor!TLOnMountHandler:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onMount", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#shapeUtils:member", - "docComment": "/**\n * An array of shape utils to use in the editor.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapeUtils?: " - }, - { - "kind": "Content", - "text": "readonly " - }, - { - "kind": "Reference", - "text": "TLAnyShapeUtilConstructor", - "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "shapeUtils", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#tools:member", - "docComment": "/**\n * An array of tools to add to the editor's state chart.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "tools?: " - }, - { - "kind": "Content", - "text": "readonly " - }, - { - "kind": "Reference", - "text": "TLStateNodeConstructor", - "canonicalReference": "@tldraw/editor!TLStateNodeConstructor:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "tools", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#user:member", - "docComment": "/**\n * The user interacting with the editor.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "user?: " - }, - { - "kind": "Reference", - "text": "TLUser", - "canonicalReference": "@tldraw/editor!~TLUser:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "user", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TldrawEditorProps:type", - "docComment": "/**\n * Props for the {@link tldraw#Tldraw} and {@link TldrawEditor} components.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TldrawEditorProps = " - }, - { - "kind": "Reference", - "text": "Expand", - "canonicalReference": "@tldraw/utils!Expand:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TldrawEditorBaseProps", - "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps:interface" - }, - { - "kind": "Content", - "text": " & ({\n store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLStoreWithStatus", - "canonicalReference": "@tldraw/editor!TLStoreWithStatus:type" - }, - { - "kind": "Content", - "text": ";\n} | {\n store?: undefined;\n snapshot?: " - }, - { - "kind": "Reference", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">;\n initialData?: " - }, - { - "kind": "Reference", - "text": "SerializedStore", - "canonicalReference": "@tldraw/store!SerializedStore:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">;\n persistenceKey?: string;\n sessionId?: string;\n defaultName?: string;\n})>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", - "releaseTag": "Public", - "name": "TldrawEditorProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 17 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLEditorComponents:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLEditorComponents = " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n [K in keyof " - }, - { - "kind": "Reference", - "text": "BaseEditorComponents", - "canonicalReference": "@tldraw/editor!~BaseEditorComponents:interface" - }, - { - "kind": "Content", - "text": "]: " - }, - { - "kind": "Reference", - "text": "BaseEditorComponents", - "canonicalReference": "@tldraw/editor!~BaseEditorComponents:interface" - }, - { - "kind": "Content", - "text": "[K] | null;\n} & " - }, - { - "kind": "Reference", - "text": "ErrorComponents", - "canonicalReference": "@tldraw/editor!~ErrorComponents:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/hooks/useEditorComponents.tsx", - "releaseTag": "Public", - "name": "TLEditorComponents", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 9 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!TLEditorOptions:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLEditorOptions " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/Editor.ts", - "releaseTag": "Public", - "name": "TLEditorOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEditorOptions#getContainer:member", - "docComment": "/**\n * Should return a containing html element which has all the styles applied to the editor. If not given, the body element will be used.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getContainer: " - }, - { - "kind": "Content", - "text": "() => " - }, - { - "kind": "Reference", - "text": "HTMLElement", - "canonicalReference": "!HTMLElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "getContainer", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEditorOptions#inferDarkMode:member", - "docComment": "/**\n * Whether to infer dark mode from the user's system preferences. Defaults to false.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "inferDarkMode?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "inferDarkMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEditorOptions#initialState:member", - "docComment": "/**\n * The editor's initial active tool (or other state node id).\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "initialState?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "initialState", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEditorOptions#shapeUtils:member", - "docComment": "/**\n * An array of shapes to use in the editor. These will be used to create and manage shapes in the editor.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapeUtils: " - }, - { - "kind": "Content", - "text": "readonly " - }, - { - "kind": "Reference", - "text": "TLShapeUtilConstructor", - "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUnknownShape", - "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" - }, - { - "kind": "Content", - "text": ">[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "shapeUtils", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEditorOptions#store:member", - "docComment": "/**\n * The Store instance to use for keeping the app's data. This may be prepopulated, e.g. by loading from a server or database.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "store", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEditorOptions#tools:member", - "docComment": "/**\n * An array of tools to use in the editor. These will be used to handle events and manage user interactions in the editor.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "tools: " - }, - { - "kind": "Content", - "text": "readonly " - }, - { - "kind": "Reference", - "text": "TLStateNodeConstructor", - "canonicalReference": "@tldraw/editor!TLStateNodeConstructor:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "tools", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEditorOptions#user:member", - "docComment": "/**\n * A user defined externally to replace the default user.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "user?: " - }, - { - "kind": "Reference", - "text": "TLUser", - "canonicalReference": "@tldraw/editor!~TLUser:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "user", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLEnterEventHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLEnterEventHandler = " - }, - { - "kind": "Content", - "text": "(info: any, from: string) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLEnterEventHandler", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!TLErrorBoundaryProps:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLErrorBoundaryProps " - } - ], - "fileUrlPath": "packages/editor/src/lib/components/ErrorBoundary.tsx", - "releaseTag": "Public", - "name": "TLErrorBoundaryProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLErrorBoundaryProps#children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLErrorBoundaryProps#fallback:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "fallback: " - }, - { - "kind": "Reference", - "text": "TLErrorFallbackComponent", - "canonicalReference": "@tldraw/editor!~TLErrorFallbackComponent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "fallback", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLErrorBoundaryProps#onError:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onError?: " - }, - { - "kind": "Content", - "text": "((error: unknown) => void) | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onError", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!TLEventHandlers:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLEventHandlers " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLEventHandlers", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onCancel:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onCancel: " - }, - { - "kind": "Reference", - "text": "TLCancelEvent", - "canonicalReference": "@tldraw/editor!TLCancelEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onCancel", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onComplete:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onComplete: " - }, - { - "kind": "Reference", - "text": "TLCompleteEvent", - "canonicalReference": "@tldraw/editor!TLCompleteEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onComplete", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onDoubleClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDoubleClick: " - }, - { - "kind": "Reference", - "text": "TLClickEvent", - "canonicalReference": "@tldraw/editor!TLClickEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onDoubleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onInterrupt:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onInterrupt: " - }, - { - "kind": "Reference", - "text": "TLInterruptEvent", - "canonicalReference": "@tldraw/editor!TLInterruptEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onInterrupt", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onKeyDown:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onKeyDown: " - }, - { - "kind": "Reference", - "text": "TLKeyboardEvent", - "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onKeyDown", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onKeyRepeat:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onKeyRepeat: " - }, - { - "kind": "Reference", - "text": "TLKeyboardEvent", - "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onKeyRepeat", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onKeyUp:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onKeyUp: " - }, - { - "kind": "Reference", - "text": "TLKeyboardEvent", - "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onKeyUp", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onMiddleClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onMiddleClick: " - }, - { - "kind": "Reference", - "text": "TLPointerEvent", - "canonicalReference": "@tldraw/editor!TLPointerEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onMiddleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onPointerDown:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onPointerDown: " - }, - { - "kind": "Reference", - "text": "TLPointerEvent", - "canonicalReference": "@tldraw/editor!TLPointerEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onPointerDown", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onPointerMove:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onPointerMove: " - }, - { - "kind": "Reference", - "text": "TLPointerEvent", - "canonicalReference": "@tldraw/editor!TLPointerEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onPointerMove", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onPointerUp:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onPointerUp: " - }, - { - "kind": "Reference", - "text": "TLPointerEvent", - "canonicalReference": "@tldraw/editor!TLPointerEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onPointerUp", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onQuadrupleClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onQuadrupleClick: " - }, - { - "kind": "Reference", - "text": "TLClickEvent", - "canonicalReference": "@tldraw/editor!TLClickEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onQuadrupleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onRightClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onRightClick: " - }, - { - "kind": "Reference", - "text": "TLPointerEvent", - "canonicalReference": "@tldraw/editor!TLPointerEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onRightClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onTripleClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onTripleClick: " - }, - { - "kind": "Reference", - "text": "TLClickEvent", - "canonicalReference": "@tldraw/editor!TLClickEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onTripleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventHandlers#onWheel:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onWheel: " - }, - { - "kind": "Reference", - "text": "TLWheelEvent", - "canonicalReference": "@tldraw/editor!TLWheelEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onWheel", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLEventInfo:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLEventInfo = " - }, - { - "kind": "Reference", - "text": "TLCancelEventInfo", - "canonicalReference": "@tldraw/editor!TLCancelEventInfo:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLClickEventInfo", - "canonicalReference": "@tldraw/editor!TLClickEventInfo:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLCompleteEventInfo", - "canonicalReference": "@tldraw/editor!TLCompleteEventInfo:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLInterruptEventInfo", - "canonicalReference": "@tldraw/editor!TLInterruptEventInfo:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLKeyboardEventInfo", - "canonicalReference": "@tldraw/editor!TLKeyboardEventInfo:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPinchEventInfo", - "canonicalReference": "@tldraw/editor!TLPinchEventInfo:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPointerEventInfo", - "canonicalReference": "@tldraw/editor!TLPointerEventInfo:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLWheelEventInfo", - "canonicalReference": "@tldraw/editor!TLWheelEventInfo:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLEventInfo", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 16 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!TLEventMap:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLEventMap " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/emit-types.ts", - "releaseTag": "Public", - "name": "TLEventMap", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#\"change-history\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'change-history': " - }, - { - "kind": "Content", - "text": "[{\n reason: 'bail';\n markId?: string;\n } | {\n reason: 'push' | 'redo' | 'undo';\n }]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"change-history\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#\"mark-history\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'mark-history': " - }, - { - "kind": "Content", - "text": "[{\n id: string;\n }]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"mark-history\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#\"max-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'max-shapes': " - }, - { - "kind": "Content", - "text": "[{\n name: string;\n pageId: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";\n count: number;\n }]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"max-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#\"stop-camera-animation\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'stop-camera-animation': " - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"stop-camera-animation\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#\"stop-following\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'stop-following': " - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"stop-following\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#change:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "change: " - }, - { - "kind": "Content", - "text": "[" - }, - { - "kind": "Reference", - "text": "HistoryEntry", - "canonicalReference": "@tldraw/store!HistoryEntry:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "change", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#crash:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "crash: " - }, - { - "kind": "Content", - "text": "[{\n error: unknown;\n }]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "crash", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#event:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "event: " - }, - { - "kind": "Content", - "text": "[" - }, - { - "kind": "Reference", - "text": "TLEventInfo", - "canonicalReference": "@tldraw/editor!TLEventInfo:type" - }, - { - "kind": "Content", - "text": "]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "event", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#frame:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "frame: " - }, - { - "kind": "Content", - "text": "[number]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "frame", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#mount:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "mount: " - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "mount", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#tick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "tick: " - }, - { - "kind": "Content", - "text": "[number]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "tick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#update:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "update: " - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "update", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLEventMapHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLEventMapHandler = " - }, - { - "kind": "Content", - "text": "(...args: " - }, - { - "kind": "Reference", - "text": "TLEventMap", - "canonicalReference": "@tldraw/editor!TLEventMap:interface" - }, - { - "kind": "Content", - "text": "[T]) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/emit-types.ts", - "releaseTag": "Public", - "name": "TLEventMapHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 4, - "endIndex": 7 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLEventName:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLEventName = " - }, - { - "kind": "Content", - "text": "'cancel' | 'complete' | 'interrupt' | 'wheel' | " - }, - { - "kind": "Reference", - "text": "TLCLickEventName", - "canonicalReference": "@tldraw/editor!TLCLickEventName:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLKeyboardEventName", - "canonicalReference": "@tldraw/editor!TLKeyboardEventName:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPinchEventName", - "canonicalReference": "@tldraw/editor!TLPinchEventName:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPointerEventName", - "canonicalReference": "@tldraw/editor!TLPointerEventName:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLEventName", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 9 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLExitEventHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLExitEventHandler = " - }, - { - "kind": "Content", - "text": "(info: any, to: string) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLExitEventHandler", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLExternalAssetContent:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLExternalAssetContent = " - }, - { - "kind": "Content", - "text": "{\n type: 'file';\n file: " - }, - { - "kind": "Reference", - "text": "File", - "canonicalReference": "!File:interface" - }, - { - "kind": "Content", - "text": ";\n} | {\n type: 'url';\n url: string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/external-content.ts", - "releaseTag": "Public", - "name": "TLExternalAssetContent", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLExternalContent:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLExternalContent = " - }, - { - "kind": "Content", - "text": "{\n sources?: " - }, - { - "kind": "Reference", - "text": "TLExternalContentSource", - "canonicalReference": "@tldraw/editor!TLExternalContentSource:type" - }, - { - "kind": "Content", - "text": "[];\n point?: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n} & ({\n type: 'embed';\n url: string;\n embed: " - }, - { - "kind": "Reference", - "text": "EmbedDefinition", - "canonicalReference": "@tldraw/tlschema!EmbedDefinition:type" - }, - { - "kind": "Content", - "text": ";\n} | {\n type: 'files';\n files: " - }, - { - "kind": "Reference", - "text": "File", - "canonicalReference": "!File:interface" - }, - { - "kind": "Content", - "text": "[];\n ignoreParent: boolean;\n} | {\n type: 'svg-text';\n text: string;\n} | {\n type: 'text';\n text: string;\n} | {\n type: 'url';\n url: string;\n})" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/external-content.ts", - "releaseTag": "Public", - "name": "TLExternalContent", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLExternalContentSource:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLExternalContentSource = " - }, - { - "kind": "Content", - "text": "{\n type: 'error';\n data: null | string;\n reason: string;\n} | {\n type: 'excalidraw';\n data: any;\n} | {\n type: 'text';\n data: string;\n subtype: 'html' | 'json' | 'text' | 'url';\n} | {\n type: 'tldraw';\n data: " - }, - { - "kind": "Reference", - "text": "TLContent", - "canonicalReference": "@tldraw/editor!TLContent:interface" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/external-content.ts", - "releaseTag": "Public", - "name": "TLExternalContentSource", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLGridProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLGridProps = " - }, - { - "kind": "Content", - "text": "{\n x: number;\n y: number;\n z: number;\n size: number;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultGrid.tsx", - "releaseTag": "Public", - "name": "TLGridProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLHandleProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLHandleProps = " - }, - { - "kind": "Content", - "text": "{\n shapeId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n handle: " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": ";\n zoom: number;\n isCoarse: boolean;\n className?: string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultHandle.tsx", - "releaseTag": "Public", - "name": "TLHandleProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLHandlesProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLHandlesProps = " - }, - { - "kind": "Content", - "text": "{\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultHandles.tsx", - "releaseTag": "Public", - "name": "TLHandlesProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLHistoryEntry:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLHistoryEntry = " - }, - { - "kind": "Reference", - "text": "TLCommand", - "canonicalReference": "@tldraw/editor!TLCommand:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLHistoryMark", - "canonicalReference": "@tldraw/editor!TLHistoryMark:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/history-types.ts", - "releaseTag": "Public", - "name": "TLHistoryEntry", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLHistoryMark:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLHistoryMark = " - }, - { - "kind": "Content", - "text": "{\n type: 'STOP';\n id: string;\n onUndo: boolean;\n onRedo: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/history-types.ts", - "releaseTag": "Public", - "name": "TLHistoryMark", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLHoveredShapeIndicatorProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLHoveredShapeIndicatorProps = " - }, - { - "kind": "Content", - "text": "{\n shapeId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultHoveredShapeIndicator.tsx", - "releaseTag": "Public", - "name": "TLHoveredShapeIndicatorProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLInterruptEvent:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLInterruptEvent = " - }, - { - "kind": "Content", - "text": "(info: " - }, - { - "kind": "Reference", - "text": "TLInterruptEventInfo", - "canonicalReference": "@tldraw/editor!TLInterruptEventInfo:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLInterruptEvent", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLInterruptEventInfo:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLInterruptEventInfo = " - }, - { - "kind": "Content", - "text": "{\n type: 'misc';\n name: 'interrupt';\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLInterruptEventInfo", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLKeyboardEvent = " - }, - { - "kind": "Content", - "text": "(info: " - }, - { - "kind": "Reference", - "text": "TLKeyboardEventInfo", - "canonicalReference": "@tldraw/editor!TLKeyboardEventInfo:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLKeyboardEvent", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLKeyboardEventInfo:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLKeyboardEventInfo = " - }, - { - "kind": "Reference", - "text": "TLBaseEventInfo", - "canonicalReference": "@tldraw/editor!TLBaseEventInfo:interface" - }, - { - "kind": "Content", - "text": " & {\n type: 'keyboard';\n name: " - }, - { - "kind": "Reference", - "text": "TLKeyboardEventName", - "canonicalReference": "@tldraw/editor!TLKeyboardEventName:type" - }, - { - "kind": "Content", - "text": ";\n key: string;\n code: string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLKeyboardEventInfo", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLKeyboardEventName:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLKeyboardEventName = " - }, - { - "kind": "Content", - "text": "'key_down' | 'key_repeat' | 'key_up'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLKeyboardEventName", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnBeforeCreateHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnBeforeCreateHandler = " - }, - { - "kind": "Content", - "text": "(next: T) => T | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnBeforeCreateHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnBeforeUpdateHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnBeforeUpdateHandler = " - }, - { - "kind": "Content", - "text": "(prev: T, next: T) => T | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnBeforeUpdateHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnChildrenChangeHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnChildrenChangeHandler = " - }, - { - "kind": "Content", - "text": "(shape: T) => " - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": "[] | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnChildrenChangeHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 6 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnClickHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnClickHandler = " - }, - { - "kind": "Content", - "text": "(shape: T) => " - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": " | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnClickHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 6 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnDoubleClickHandleHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnDoubleClickHandleHandler = " - }, - { - "kind": "Content", - "text": "(shape: T, handle: " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": " | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnDoubleClickHandleHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnDoubleClickHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnDoubleClickHandler = " - }, - { - "kind": "Content", - "text": "(shape: T) => " - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": " | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnDoubleClickHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 6 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnDragHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnDragHandler = " - }, - { - "kind": "Content", - "text": "(shape: T, shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]) => R" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnDragHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "typeTokenRange": { - "startIndex": 5, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnEditEndHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnEditEndHandler = " - }, - { - "kind": "Content", - "text": "(shape: T) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnEditEndHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnHandleDragHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnHandleDragHandler = " - }, - { - "kind": "Content", - "text": "(shape: T, info: {\n handle: " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": ";\n isPrecise: boolean;\n initial?: T | undefined;\n}) => " - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": " | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnHandleDragHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnMountHandler:type", - "docComment": "/**\n * Called when the editor has mounted.\n *\n * @param editor - The editor instance.\n *\n * @example\n * ```ts\n * editor.selectAll()} />\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnMountHandler = " - }, - { - "kind": "Content", - "text": "(editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ") => (() => undefined | void) | undefined | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", - "releaseTag": "Public", - "name": "TLOnMountHandler", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnResizeEndHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnResizeEndHandler = " - }, - { - "kind": "Reference", - "text": "TLEventChangeHandler", - "canonicalReference": "@tldraw/editor!~TLEventChangeHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnResizeEndHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnResizeHandler = " - }, - { - "kind": "Content", - "text": "(shape: T, info: " - }, - { - "kind": "Reference", - "text": "TLResizeInfo", - "canonicalReference": "@tldraw/editor!TLResizeInfo:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": ", 'id' | 'type'> | undefined | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnResizeHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 10 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnResizeStartHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnResizeStartHandler = " - }, - { - "kind": "Reference", - "text": "TLEventStartHandler", - "canonicalReference": "@tldraw/editor!~TLEventStartHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnResizeStartHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnRotateEndHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnRotateEndHandler = " - }, - { - "kind": "Reference", - "text": "TLEventChangeHandler", - "canonicalReference": "@tldraw/editor!~TLEventChangeHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnRotateEndHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnRotateHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnRotateHandler = " - }, - { - "kind": "Reference", - "text": "TLEventChangeHandler", - "canonicalReference": "@tldraw/editor!~TLEventChangeHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnRotateHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnRotateStartHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnRotateStartHandler = " - }, - { - "kind": "Reference", - "text": "TLEventStartHandler", - "canonicalReference": "@tldraw/editor!~TLEventStartHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnRotateStartHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnTranslateEndHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnTranslateEndHandler = " - }, - { - "kind": "Reference", - "text": "TLEventChangeHandler", - "canonicalReference": "@tldraw/editor!~TLEventChangeHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnTranslateEndHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnTranslateHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnTranslateHandler = " - }, - { - "kind": "Reference", - "text": "TLEventChangeHandler", - "canonicalReference": "@tldraw/editor!~TLEventChangeHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnTranslateHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLOnTranslateStartHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOnTranslateStartHandler = " - }, - { - "kind": "Reference", - "text": "TLEventStartHandler", - "canonicalReference": "@tldraw/editor!~TLEventStartHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLOnTranslateStartHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLPinchEvent:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLPinchEvent = " - }, - { - "kind": "Content", - "text": "(info: " - }, - { - "kind": "Reference", - "text": "TLPinchEventInfo", - "canonicalReference": "@tldraw/editor!TLPinchEventInfo:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLPinchEvent", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLPinchEventInfo:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLPinchEventInfo = " - }, - { - "kind": "Reference", - "text": "TLBaseEventInfo", - "canonicalReference": "@tldraw/editor!TLBaseEventInfo:interface" - }, - { - "kind": "Content", - "text": " & {\n type: 'pinch';\n name: " - }, - { - "kind": "Reference", - "text": "TLPinchEventName", - "canonicalReference": "@tldraw/editor!TLPinchEventName:type" - }, - { - "kind": "Content", - "text": ";\n point: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n delta: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLPinchEventInfo", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 9 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLPinchEventName:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLPinchEventName = " - }, - { - "kind": "Content", - "text": "'pinch_end' | 'pinch_start' | 'pinch'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLPinchEventName", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLPointerEvent:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLPointerEvent = " - }, - { - "kind": "Content", - "text": "(info: " - }, - { - "kind": "Reference", - "text": "TLPointerEventInfo", - "canonicalReference": "@tldraw/editor!TLPointerEventInfo:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLPointerEvent", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLPointerEventInfo:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLPointerEventInfo = " - }, - { - "kind": "Reference", - "text": "TLBaseEventInfo", - "canonicalReference": "@tldraw/editor!TLBaseEventInfo:interface" - }, - { - "kind": "Content", - "text": " & {\n type: 'pointer';\n name: " - }, - { - "kind": "Reference", - "text": "TLPointerEventName", - "canonicalReference": "@tldraw/editor!TLPointerEventName:type" - }, - { - "kind": "Content", - "text": ";\n point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n pointerId: number;\n button: number;\n isPen: boolean;\n} & " - }, - { - "kind": "Reference", - "text": "TLPointerEventTarget", - "canonicalReference": "@tldraw/editor!TLPointerEventTarget:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLPointerEventInfo", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLPointerEventName:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLPointerEventName = " - }, - { - "kind": "Content", - "text": "'middle_click' | 'pointer_down' | 'pointer_move' | 'pointer_up' | 'right_click'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLPointerEventName", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLPointerEventTarget:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLPointerEventTarget = " - }, - { - "kind": "Content", - "text": "{\n target: 'canvas';\n shape?: undefined;\n} | {\n target: 'handle';\n shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ";\n handle: " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": ";\n} | {\n target: 'selection';\n handle?: " - }, - { - "kind": "Reference", - "text": "TLSelectionHandle", - "canonicalReference": "@tldraw/editor!TLSelectionHandle:type" - }, - { - "kind": "Content", - "text": ";\n shape?: undefined;\n} | {\n target: 'shape';\n shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLPointerEventTarget", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLResizeHandle:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLResizeHandle = " - }, - { - "kind": "Reference", - "text": "SelectionCorner", - "canonicalReference": "@tldraw/editor!SelectionCorner:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "SelectionEdge", - "canonicalReference": "@tldraw/editor!SelectionEdge:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/selection-types.ts", - "releaseTag": "Public", - "name": "TLResizeHandle", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLResizeInfo:type", - "docComment": "/**\n * Info about a resize.\n *\n * @param newPoint - The new local position of the shape.\n *\n * @param handle - The handle being dragged.\n *\n * @param mode - The type of resize.\n *\n * @param scaleX - The scale in the x-axis.\n *\n * @param scaleY - The scale in the y-axis.\n *\n * @param initialBounds - The bounds of the shape at the start of the resize.\n *\n * @param initialShape - The shape at the start of the resize.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLResizeInfo = " - }, - { - "kind": "Content", - "text": "{\n newPoint: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n handle: " - }, - { - "kind": "Reference", - "text": "TLResizeHandle", - "canonicalReference": "@tldraw/editor!TLResizeHandle:type" - }, - { - "kind": "Content", - "text": ";\n mode: " - }, - { - "kind": "Reference", - "text": "TLResizeMode", - "canonicalReference": "@tldraw/editor!TLResizeMode:type" - }, - { - "kind": "Content", - "text": ";\n scaleX: number;\n scaleY: number;\n initialBounds: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";\n initialShape: T;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLResizeInfo", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 12 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLResizeMode:type", - "docComment": "/**\n * The type of resize.\n *\n * 'scale_shape' - The shape is being scaled, usually as part of a larger selection.\n *\n * 'resize_bounds' - The user is directly manipulating an individual shape's bounds using a resize handle. It is up to shape util implementers to decide how they want to handle the two situations.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLResizeMode = " - }, - { - "kind": "Content", - "text": "'resize_bounds' | 'scale_shape'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLResizeMode", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLResizeShapeOptions:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLResizeShapeOptions = " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n initialBounds: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";\n scaleOrigin: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n scaleAxisRotation: number;\n initialShape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ";\n initialPageTransform: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": ";\n dragHandle: " - }, - { - "kind": "Reference", - "text": "TLResizeHandle", - "canonicalReference": "@tldraw/editor!TLResizeHandle:type" - }, - { - "kind": "Content", - "text": ";\n mode: " - }, - { - "kind": "Reference", - "text": "TLResizeMode", - "canonicalReference": "@tldraw/editor!TLResizeMode:type" - }, - { - "kind": "Content", - "text": ";\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/Editor.ts", - "releaseTag": "Public", - "name": "TLResizeShapeOptions", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 15 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLRotationSnapshot:type", - "docComment": "/**\n * Info about a rotation that can be applied to the editor's selected shapes.\n *\n * @param selectionPageCenter - The center of the selection in page coordinates\n *\n * @param initialCursorAngle - The angle of the cursor relative to the selection center when the rotation started\n *\n * @param initialSelectionRotation - The rotation of the selection when the rotation started\n *\n * @param shapeSnapshots - Info about each shape that is being rotated\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLRotationSnapshot = " - }, - { - "kind": "Content", - "text": "{\n selectionPageCenter: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n initialCursorAngle: number;\n initialSelectionRotation: number;\n shapeSnapshots: {\n shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ";\n initialPagePoint: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n }[];\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/rotation.ts", - "releaseTag": "Public", - "name": "TLRotationSnapshot", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLScribbleProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLScribbleProps = " - }, - { - "kind": "Content", - "text": "{\n scribble: " - }, - { - "kind": "Reference", - "text": "TLScribble", - "canonicalReference": "@tldraw/tlschema!TLScribble:type" - }, - { - "kind": "Content", - "text": ";\n zoom: number;\n color?: string;\n opacity?: number;\n className?: string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultScribble.tsx", - "releaseTag": "Public", - "name": "TLScribbleProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLSelectionBackgroundProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLSelectionBackgroundProps = " - }, - { - "kind": "Content", - "text": "{\n bounds: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";\n rotation: number;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSelectionBackground.tsx", - "releaseTag": "Public", - "name": "TLSelectionBackgroundProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLSelectionForegroundProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLSelectionForegroundProps = " - }, - { - "kind": "Content", - "text": "{\n bounds: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";\n rotation: number;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSelectionForeground.tsx", - "releaseTag": "Public", - "name": "TLSelectionForegroundProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLSelectionHandle:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLSelectionHandle = " - }, - { - "kind": "Reference", - "text": "RotateCorner", - "canonicalReference": "@tldraw/editor!RotateCorner:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "SelectionCorner", - "canonicalReference": "@tldraw/editor!SelectionCorner:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "SelectionEdge", - "canonicalReference": "@tldraw/editor!SelectionEdge:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/selection-types.ts", - "releaseTag": "Public", - "name": "TLSelectionHandle", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot:interface", - "docComment": "/**\n * The state of the editor instance, not including any document state.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLSessionStateSnapshot " - } - ], - "fileUrlPath": "packages/editor/src/lib/config/TLSessionStateSnapshot.ts", - "releaseTag": "Public", - "name": "TLSessionStateSnapshot", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#currentPageId:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "currentPageId: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "currentPageId", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#exportBackground:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "exportBackground: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "exportBackground", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#isDebugMode:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isDebugMode: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isDebugMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#isFocusMode:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isFocusMode: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isFocusMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#isGridMode:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isGridMode: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isGridMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#isToolLocked:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isToolLocked: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isToolLocked", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#pageStates:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "pageStates: " - }, - { - "kind": "Reference", - "text": "Array", - "canonicalReference": "!Array:interface" - }, - { - "kind": "Content", - "text": "<{\n pageId: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";\n camera: {\n x: number;\n y: number;\n z: number;\n };\n selectedShapeIds: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[];\n focusedGroupId: null | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n }>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "pageStates", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 9 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#version:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "version: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "version", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLShapeIndicatorProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLShapeIndicatorProps = " - }, - { - "kind": "Content", - "text": "{\n shapeId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n color?: string | undefined;\n opacity?: number;\n className?: string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultShapeIndicator.tsx", - "releaseTag": "Public", - "name": "TLShapeIndicatorProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLShapeUtilCanvasSvgDef " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLShapeUtilCanvasSvgDef", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef#component:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component: " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "component", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef#key:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "key: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "key", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLShapeUtilConstructor" - }, - { - "kind": "Content", - "text": " = " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "> " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "U", - "constraintTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "defaultTypeTokenRange": { - "startIndex": 6, - "endIndex": 8 - } - } - ], - "name": "TLShapeUtilConstructor", - "preserveMemberOrder": false, - "members": [ - { - "kind": "ConstructSignature", - "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor:new(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "new (editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "U" - }, - { - "kind": "Content", - "text": ";" - } - ], - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "editor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ] - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor#migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "migrations?: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor#props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "props?: " - }, - { - "kind": "Reference", - "text": "ShapeProps", - "canonicalReference": "@tldraw/tlschema!ShapeProps:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor#type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Content", - "text": "T['type']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLShapeUtilFlag = " - }, - { - "kind": "Content", - "text": "(shape: T) => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", - "releaseTag": "Public", - "name": "TLShapeUtilFlag", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLSnapIndicatorProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLSnapIndicatorProps = " - }, - { - "kind": "Content", - "text": "{\n className?: string;\n line: " - }, - { - "kind": "Reference", - "text": "SnapIndicator", - "canonicalReference": "@tldraw/editor!SnapIndicator:type" - }, - { - "kind": "Content", - "text": ";\n zoom: number;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSnapIndictor.tsx", - "releaseTag": "Public", - "name": "TLSnapIndicatorProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!TLStateNodeConstructor:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLStateNodeConstructor " - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/tools/StateNode.ts", - "releaseTag": "Public", - "name": "TLStateNodeConstructor", - "preserveMemberOrder": false, - "members": [ - { - "kind": "ConstructSignature", - "canonicalReference": "@tldraw/editor!TLStateNodeConstructor:new(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "new (editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ", parent?: " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "editor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "parent", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ] - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLStateNodeConstructor#children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "children?: " - }, - { - "kind": "Content", - "text": "() => " - }, - { - "kind": "Reference", - "text": "TLStateNodeConstructor", - "canonicalReference": "@tldraw/editor!TLStateNodeConstructor:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLStateNodeConstructor#id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLStateNodeConstructor#initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "initial?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLStoreEventInfo:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLStoreEventInfo = " - }, - { - "kind": "Reference", - "text": "HistoryEntry", - "canonicalReference": "@tldraw/store!HistoryEntry:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/config/createTLStore.ts", - "releaseTag": "Public", - "name": "TLStoreEventInfo", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLStoreOptions:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLStoreOptions = " - }, - { - "kind": "Content", - "text": "{\n initialData?: " - }, - { - "kind": "Reference", - "text": "SerializedStore", - "canonicalReference": "@tldraw/store!SerializedStore:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">;\n defaultName?: string;\n} & ({\n schema?: " - }, - { - "kind": "Reference", - "text": "StoreSchema", - "canonicalReference": "@tldraw/store!StoreSchema:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "TLStoreProps", - "canonicalReference": "@tldraw/tlschema!TLStoreProps:type" - }, - { - "kind": "Content", - "text": ">;\n} | {\n shapeUtils?: readonly " - }, - { - "kind": "Reference", - "text": "TLAnyShapeUtilConstructor", - "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" - }, - { - "kind": "Content", - "text": "[];\n})" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/config/createTLStore.ts", - "releaseTag": "Public", - "name": "TLStoreOptions", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 14 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLStoreWithStatus:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLStoreWithStatus = " - }, - { - "kind": "Content", - "text": "{\n readonly status: 'error';\n readonly store?: undefined;\n readonly error: " - }, - { - "kind": "Reference", - "text": "Error", - "canonicalReference": "!Error:interface" - }, - { - "kind": "Content", - "text": ";\n} | {\n readonly status: 'loading';\n readonly store?: undefined;\n readonly error?: undefined;\n} | {\n readonly status: 'not-synced';\n readonly store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";\n readonly error?: undefined;\n} | {\n readonly status: 'synced-local';\n readonly store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";\n readonly error?: undefined;\n} | {\n readonly status: 'synced-remote';\n readonly connectionStatus: 'offline' | 'online';\n readonly store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";\n readonly error?: undefined;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/sync/StoreWithStatus.ts", - "releaseTag": "Public", - "name": "TLStoreWithStatus", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLSvgOptions:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLSvgOptions = " - }, - { - "kind": "Content", - "text": "{\n bounds: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";\n scale: number;\n background: boolean;\n padding: number;\n darkMode?: boolean;\n preserveAspectRatio: " - }, - { - "kind": "Reference", - "text": "React.SVGAttributes", - "canonicalReference": "@types/react!React.SVGAttributes:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "SVGSVGElement", - "canonicalReference": "!SVGSVGElement:interface" - }, - { - "kind": "Content", - "text": ">['preserveAspectRatio'];\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/misc-types.ts", - "releaseTag": "Public", - "name": "TLSvgOptions", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLTickEvent:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLTickEvent = " - }, - { - "kind": "Content", - "text": "(elapsed: number) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLTickEvent", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLTickEventHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLTickEventHandler = " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLTickEventHandler", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/editor!TLUserPreferences:interface", - "docComment": "/**\n * A user of tldraw\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUserPreferences " - } - ], - "fileUrlPath": "packages/editor/src/lib/config/TLUserPreferences.ts", - "releaseTag": "Public", - "name": "TLUserPreferences", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLUserPreferences#animationSpeed:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "animationSpeed?: " - }, - { - "kind": "Content", - "text": "null | number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "animationSpeed", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLUserPreferences#color:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "color?: " - }, - { - "kind": "Content", - "text": "null | string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "color", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLUserPreferences#edgeScrollSpeed:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "edgeScrollSpeed?: " - }, - { - "kind": "Content", - "text": "null | number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "edgeScrollSpeed", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLUserPreferences#id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLUserPreferences#isDarkMode:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isDarkMode?: " - }, - { - "kind": "Content", - "text": "boolean | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "isDarkMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLUserPreferences#isSnapMode:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isSnapMode?: " - }, - { - "kind": "Content", - "text": "boolean | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "isSnapMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLUserPreferences#isWrapMode:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isWrapMode?: " - }, - { - "kind": "Content", - "text": "boolean | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "isWrapMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLUserPreferences#locale:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "locale?: " - }, - { - "kind": "Content", - "text": "null | string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "locale", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLUserPreferences#name:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "name?: " - }, - { - "kind": "Content", - "text": "null | string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "name", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLWheelEvent:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLWheelEvent = " - }, - { - "kind": "Content", - "text": "(info: " - }, - { - "kind": "Reference", - "text": "TLWheelEventInfo", - "canonicalReference": "@tldraw/editor!TLWheelEventInfo:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLWheelEvent", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!TLWheelEventInfo:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLWheelEventInfo = " - }, - { - "kind": "Reference", - "text": "TLBaseEventInfo", - "canonicalReference": "@tldraw/editor!TLBaseEventInfo:interface" - }, - { - "kind": "Content", - "text": " & {\n type: 'wheel';\n name: 'wheel';\n delta: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n point: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "TLWheelEventInfo", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!toDomPrecision:function(1)", - "docComment": "/**\n * The DOM likes values to be fixed to 3 decimal places\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function toDomPrecision(v: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "v", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "toDomPrecision" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!toFixed:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function toFixed(v: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "v", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "toFixed" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!toPrecision:function(1)", - "docComment": "/**\n * Get a number to a precision.\n *\n * @param n - The number.\n *\n * @param precision - The precision.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function toPrecision(n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", precision?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "precision", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "name": "toPrecision" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!UiEvent:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type UiEvent = " - }, - { - "kind": "Reference", - "text": "TLCancelEvent", - "canonicalReference": "@tldraw/editor!TLCancelEvent:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLClickEvent", - "canonicalReference": "@tldraw/editor!TLClickEvent:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLCompleteEvent", - "canonicalReference": "@tldraw/editor!TLCompleteEvent:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLKeyboardEvent", - "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPinchEvent", - "canonicalReference": "@tldraw/editor!TLPinchEvent:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPointerEvent", - "canonicalReference": "@tldraw/editor!TLPointerEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "UiEvent", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 12 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!UiEventType:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type UiEventType = " - }, - { - "kind": "Content", - "text": "'click' | 'keyboard' | 'pinch' | 'pointer' | 'wheel' | 'zoom'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", - "releaseTag": "Public", - "name": "UiEventType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!uniq:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function uniq(array: " - }, - { - "kind": "Content", - "text": "{\n readonly length: number;\n readonly [n: number]: T;\n} | null | undefined" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/uniq.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "array", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "uniq" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!uniqueId:function(1)", - "docComment": "/**\n * Generate a unique id.\n *\n * @example\n * ```ts\n * const id = uniqueId()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function uniqueId(): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/uniqueId.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "uniqueId" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!useContainer:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useContainer(): " - }, - { - "kind": "Reference", - "text": "HTMLDivElement", - "canonicalReference": "!HTMLDivElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/hooks/useContainer.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useContainer" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!useEditor:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useEditor(): " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/hooks/useEditor.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useEditor" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!useEditorComponents:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useEditorComponents(): " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n Background: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n SvgDefs: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n Brush: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLBrushProps", - "canonicalReference": "@tldraw/editor!TLBrushProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n ZoomBrush: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLBrushProps", - "canonicalReference": "@tldraw/editor!TLBrushProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n ShapeIndicator: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShapeIndicatorProps", - "canonicalReference": "@tldraw/editor!TLShapeIndicatorProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n Cursor: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLCursorProps", - "canonicalReference": "@tldraw/editor!TLCursorProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n Canvas: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLCanvasComponentProps", - "canonicalReference": "@tldraw/editor!~TLCanvasComponentProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n CollaboratorBrush: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLBrushProps", - "canonicalReference": "@tldraw/editor!TLBrushProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n CollaboratorCursor: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLCursorProps", - "canonicalReference": "@tldraw/editor!TLCursorProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n CollaboratorHint: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLCollaboratorHintProps", - "canonicalReference": "@tldraw/editor!TLCollaboratorHintProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n CollaboratorShapeIndicator: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShapeIndicatorProps", - "canonicalReference": "@tldraw/editor!TLShapeIndicatorProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n Grid: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLGridProps", - "canonicalReference": "@tldraw/editor!TLGridProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n Scribble: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLScribbleProps", - "canonicalReference": "@tldraw/editor!TLScribbleProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n CollaboratorScribble: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLScribbleProps", - "canonicalReference": "@tldraw/editor!TLScribbleProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n SnapIndicator: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLSnapIndicatorProps", - "canonicalReference": "@tldraw/editor!TLSnapIndicatorProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n Handles: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLHandlesProps", - "canonicalReference": "@tldraw/editor!TLHandlesProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n Handle: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLHandleProps", - "canonicalReference": "@tldraw/editor!TLHandleProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n Spinner: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n SelectionForeground: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLSelectionForegroundProps", - "canonicalReference": "@tldraw/editor!TLSelectionForegroundProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n SelectionBackground: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLSelectionBackgroundProps", - "canonicalReference": "@tldraw/editor!TLSelectionBackgroundProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n HoveredShapeIndicator: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLHoveredShapeIndicatorProps", - "canonicalReference": "@tldraw/editor!TLHoveredShapeIndicatorProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n OnTheCanvas: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n InFrontOfTheCanvas: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n LoadingScreen: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n} & " - }, - { - "kind": "Reference", - "text": "ErrorComponents", - "canonicalReference": "@tldraw/editor!~ErrorComponents:type" - }, - { - "kind": "Content", - "text": "> & " - }, - { - "kind": "Reference", - "text": "ErrorComponents", - "canonicalReference": "@tldraw/editor!~ErrorComponents:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/hooks/useEditorComponents.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 90 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useEditorComponents" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!useIsCropping:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useIsCropping(shapeId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/hooks/useIsCropping.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapeId", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "useIsCropping" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!useIsDarkMode:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useIsDarkMode(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/hooks/useIsDarkMode.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useIsDarkMode" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!useIsEditing:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useIsEditing(shapeId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/hooks/useIsEditing.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapeId", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "useIsEditing" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!useSelectionEvents:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useSelectionEvents(handle: " - }, - { - "kind": "Reference", - "text": "TLSelectionHandle", - "canonicalReference": "@tldraw/editor!TLSelectionHandle:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n onPointerDown: import(\"react\")." - }, - { - "kind": "Reference", - "text": "PointerEventHandler", - "canonicalReference": "@types/react!React.PointerEventHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Element", - "canonicalReference": "!Element:interface" - }, - { - "kind": "Content", - "text": ">;\n onPointerMove: (e: " - }, - { - "kind": "Reference", - "text": "React.PointerEvent", - "canonicalReference": "@types/react!React.PointerEvent:interface" - }, - { - "kind": "Content", - "text": ") => void;\n onPointerUp: import(\"react\")." - }, - { - "kind": "Reference", - "text": "PointerEventHandler", - "canonicalReference": "@types/react!React.PointerEventHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Element", - "canonicalReference": "!Element:interface" - }, - { - "kind": "Content", - "text": ">;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/hooks/useSelectionEvents.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 14 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "handle", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "useSelectionEvents" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!useTLStore:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useTLStore(opts: " - }, - { - "kind": "Reference", - "text": "TLStoreOptions", - "canonicalReference": "@tldraw/editor!TLStoreOptions:type" - }, - { - "kind": "Content", - "text": " & {\n snapshot?: " - }, - { - "kind": "Reference", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/tlschema\")." - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/hooks/useTLStore.ts", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 7 - }, - "isOptional": false - } - ], - "name": "useTLStore" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/editor!useTransform:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useTransform(ref: " - }, - { - "kind": "Reference", - "text": "React.RefObject", - "canonicalReference": "@types/react!React.RefObject:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HTMLElement", - "canonicalReference": "!HTMLElement:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "SVGElement", - "canonicalReference": "!SVGElement:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ", x?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", scale?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", rotate?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", additionalOffset?: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/hooks/useTransform.ts", - "returnTypeTokenRange": { - "startIndex": 18, - "endIndex": 19 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "ref", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 7 - }, - "isOptional": false - }, - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "isOptional": true - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "isOptional": true - }, - { - "parameterName": "scale", - "parameterTypeTokenRange": { - "startIndex": 12, - "endIndex": 13 - }, - "isOptional": true - }, - { - "parameterName": "rotate", - "parameterTypeTokenRange": { - "startIndex": 14, - "endIndex": 15 - }, - "isOptional": true - }, - { - "parameterName": "additionalOffset", - "parameterTypeTokenRange": { - "startIndex": 16, - "endIndex": 17 - }, - "isOptional": true - } - ], - "name": "useTransform" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!Vec:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Vec " - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/Vec.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Vec", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/editor!Vec:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Vec` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(x?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", z?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - }, - { - "parameterName": "z", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#abs:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "abs(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "abs" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Abs:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Abs(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Abs" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#add:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "add(V: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "V", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "add" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Add:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Add(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Add" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#addScalar:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "addScalar(n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "addScalar" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.AddScalar:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static AddScalar(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "AddScalar" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#addXY:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "addXY(x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "addXY" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.AddXY:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static AddXY(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "AddXY" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#angle:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "angle(B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "angle" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Angle:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Angle(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Angle" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Average:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Average(arr: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "arr", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Average" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Cast:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Cast(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Cast" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#clamp:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "clamp(min: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", max?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "min", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "max", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "clamp" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Clamp:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Clamp(A: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ", min: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", max?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "min", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "max", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Clamp" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Clockwise:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Clockwise(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", C: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "C", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Clockwise" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#clone:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "clone(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "clone" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#cpr:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "cpr(V: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "V", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "cpr" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Cpr:member(1)", - "docComment": "/**\n * Cross product of two vectors which is used to calculate the area of a parallelogram.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Cpr(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Cpr" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#cross:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "cross(V: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "V", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "cross" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Cross:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Cross(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", V: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "V", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Cross" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#dist:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "dist(V: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "V", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "dist" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Dist:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Dist(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Dist" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Dist2:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Dist2(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Dist2" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#distanceToLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "distanceToLineSegment(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "distanceToLineSegment" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.DistanceToLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static DistanceToLineSegment(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", P: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", clamp?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "P", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "clamp", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "DistanceToLineSegment" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.DistanceToLineThroughPoint:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static DistanceToLineThroughPoint(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", u: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", P: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "u", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "P", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "DistanceToLineThroughPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#div:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "div(t: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "t", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "div" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Div:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Div(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", t: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "t", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Div" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#divV:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "divV(V: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "V", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "divV" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.DivV:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static DivV(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "DivV" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#dpr:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "dpr(V: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "V", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "dpr" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Dpr:member(1)", - "docComment": "/**\n * Dot product of two vectors which is used to calculate the angle between them.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Dpr(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Dpr" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#equals:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "equals(B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "equals" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Equals:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Equals(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Equals" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#equalsXY:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "equalsXY(x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "equalsXY" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.EqualsXY:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static EqualsXY(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "EqualsXY" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.From:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static From({ x, y, z }: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ x, y, z }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "From" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.FromAngle:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static FromAngle(r: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", length?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "length", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "FromAngle" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.FromArray:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static FromArray(v: " - }, - { - "kind": "Content", - "text": "number[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "v", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "FromArray" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.IsNaN:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static IsNaN(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "IsNaN" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#len:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "len(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "len" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Len:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Len(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Len" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#len2:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "len2(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "len2" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Len2:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Len2(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Len2" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#lrp:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "lrp(B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", t: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "t", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "lrp" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Lrp:member(1)", - "docComment": "/**\n * Linearly interpolate between two points.\n *\n * @param A - The first point.\n *\n * @param B - The second point.\n *\n * @param t - The interpolation value between 0 and 1.\n *\n * @returns The interpolated point.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Lrp(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", t: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "t", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Lrp" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Max:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Max(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Max" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Med:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Med(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Med" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Min:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Min(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Min" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#mul:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "mul(t: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "t", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "mul" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Mul:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Mul(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", t: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "t", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Mul" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#mulV:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "mulV(V: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "V", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "mulV" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.MulV:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static MulV(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "MulV" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.NearestPointOnLineSegment:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static NearestPointOnLineSegment(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", P: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", clamp?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "P", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "clamp", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "NearestPointOnLineSegment" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.NearestPointOnLineThroughPoint:member(1)", - "docComment": "/**\n * Get the nearest point on a line with a known unit vector that passes through point A\n * ```ts\n * Vec.nearestPointOnLineThroughPoint(A, u, Point)\n * ```\n *\n * @param A - Any point on the line\n *\n * @param u - The unit vector for the line.\n *\n * @param P - A point not on the line to test.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static NearestPointOnLineThroughPoint(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", u: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", P: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "u", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "P", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "NearestPointOnLineThroughPoint" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#neg:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "neg(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "neg" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Neg:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Neg(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Neg" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#norm:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "norm(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "norm" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#nudge:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "nudge(B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", distance: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "distance", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "nudge" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Nudge:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Nudge(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", distance: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "distance", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Nudge" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#per:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "per(): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "per" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Per:member(1)", - "docComment": "/**\n * Get the perpendicular vector to A.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Per(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Per" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.PointsBetween:member(1)", - "docComment": "/**\n * Get an array of points (with simulated pressure) between two points.\n *\n * @param A - The first point.\n *\n * @param B - The second point.\n *\n * @param steps - The number of points to return.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static PointsBetween(A: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ", steps?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "steps", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "PointsBetween" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Vec#pressure:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get pressure(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "pressure", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#pry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "pry(V: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "V", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "pry" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Pry:member(1)", - "docComment": "/**\n * Get the projection of A onto B.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Pry(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Pry" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Rescale:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Rescale(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Rescale" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#rot:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "rot(r: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "rot" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Rot:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Rot(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", r?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Rot" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#rotWith:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "rotWith(C: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", r: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "C", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "rotWith" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.RotWith:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static RotWith(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", C: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", r: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "C", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "r", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "RotWith" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.ScaleWithOrigin:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static ScaleWithOrigin(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", scale: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", origin: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "scale", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "origin", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "ScaleWithOrigin" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#set:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "set(x?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", z?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - }, - { - "parameterName": "z", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "set" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#setTo:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "setTo({ x, y, z }: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ x, y, z }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setTo" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#slope:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "slope(B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "slope" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Slope:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Slope(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Slope" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Snap:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Snap(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", step?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "step", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Snap" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#snapToGrid:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "snapToGrid(gridSize: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "gridSize", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "snapToGrid" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.SnapToGrid:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static SnapToGrid(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", gridSize?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "gridSize", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "SnapToGrid" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#sub:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "sub(V: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "V", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "sub" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Sub:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Sub(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Sub" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#subScalar:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "subScalar(n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "subScalar" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.SubScalar:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static SubScalar(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "SubScalar" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#subXY:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "subXY(x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "subXY" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.SubXY:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static SubXY(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "x", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "y", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "SubXY" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#tan:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "tan(V: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "V", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "tan" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Tan:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Tan(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", B: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Tan" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#toAngle:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toAngle(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "toAngle" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.ToAngle:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static ToAngle(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "ToAngle" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#toArray:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toArray(): " - }, - { - "kind": "Content", - "text": "number[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "toArray" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.ToArray:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static ToArray(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "ToArray" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#toFixed:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toFixed(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "toFixed" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.ToFixed:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static ToFixed(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ", n?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "ToFixed" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#toJson:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toJson(): " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "toJson" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.ToJson:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static ToJson(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n x: number;\n y: number;\n z: number | undefined;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "ToJson" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#toString:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toString(): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "toString" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.ToString:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static ToString(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "ToString" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec#uni:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "uni(): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "uni" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Vec.Uni:member(1)", - "docComment": "/**\n * Get the unit vector of A.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static Uni(A: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "A", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "Uni" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Vec#x:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "x", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Vec#y:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "y", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!Vec#z:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "z: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "z", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/editor!VecLike:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type VecLike = " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/primitives/Vec.ts", - "releaseTag": "Public", - "name": "VecLike", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/editor!WeakMapCache:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class WeakMapCache " - } - ], - "fileUrlPath": "packages/editor/src/lib/utils/WeakMapCache.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "K", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "WeakMapCache", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!WeakMapCache#access:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "access(item: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "K | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "item", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "access" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!WeakMapCache#bust:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "bust(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "bust" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!WeakMapCache#get:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get

(item: " - }, - { - "kind": "Content", - "text": "P" - }, - { - "kind": "Content", - "text": ", cb: " - }, - { - "kind": "Content", - "text": "(item: P) => K" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "NonNullable", - "canonicalReference": "!NonNullable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "P", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "item", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "cb", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "get" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!WeakMapCache#has:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "has(item: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "item", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "has" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!WeakMapCache#invalidate:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "invalidate(item: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "item", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "invalidate" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/editor!WeakMapCache#items:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "items: " - }, - { - "kind": "Reference", - "text": "WeakMap", - "canonicalReference": "!WeakMap:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "items", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!WeakMapCache#set:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "set(item: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ", value: " - }, - { - "kind": "Content", - "text": "K" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "item", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "set" - } - ], - "implementsTokenRanges": [] - } - ] - } - ] + "metadata": { + "toolPackage": "@microsoft/api-extractor", + "toolVersion": "7.41.0", + "schemaVersion": 1011, + "oldestForwardsCompatibleVersion": 1001, + "tsdocConfig": { + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "noStandardTags": true, + "tagDefinitions": [ + { + "tagName": "@alpha", + "syntaxKind": "modifier" + }, + { + "tagName": "@beta", + "syntaxKind": "modifier" + }, + { + "tagName": "@defaultValue", + "syntaxKind": "block" + }, + { + "tagName": "@decorator", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@deprecated", + "syntaxKind": "block" + }, + { + "tagName": "@eventProperty", + "syntaxKind": "modifier" + }, + { + "tagName": "@example", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@experimental", + "syntaxKind": "modifier" + }, + { + "tagName": "@inheritDoc", + "syntaxKind": "inline" + }, + { + "tagName": "@internal", + "syntaxKind": "modifier" + }, + { + "tagName": "@label", + "syntaxKind": "inline" + }, + { + "tagName": "@link", + "syntaxKind": "inline", + "allowMultiple": true + }, + { + "tagName": "@override", + "syntaxKind": "modifier" + }, + { + "tagName": "@packageDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@param", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@privateRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@public", + "syntaxKind": "modifier" + }, + { + "tagName": "@readonly", + "syntaxKind": "modifier" + }, + { + "tagName": "@remarks", + "syntaxKind": "block" + }, + { + "tagName": "@returns", + "syntaxKind": "block" + }, + { + "tagName": "@sealed", + "syntaxKind": "modifier" + }, + { + "tagName": "@see", + "syntaxKind": "block" + }, + { + "tagName": "@throws", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@typeParam", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@virtual", + "syntaxKind": "modifier" + }, + { + "tagName": "@betaDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@internalRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@preapproved", + "syntaxKind": "modifier" + } + ], + "supportForTags": { + "@alpha": true, + "@beta": true, + "@defaultValue": true, + "@decorator": true, + "@deprecated": true, + "@eventProperty": true, + "@example": true, + "@experimental": true, + "@inheritDoc": true, + "@internal": true, + "@label": true, + "@link": true, + "@override": true, + "@packageDocumentation": true, + "@param": true, + "@privateRemarks": true, + "@public": true, + "@readonly": true, + "@remarks": true, + "@returns": true, + "@sealed": true, + "@see": true, + "@throws": true, + "@typeParam": true, + "@virtual": true, + "@betaDocumentation": true, + "@internalRemarks": true, + "@preapproved": true + }, + "reportUnsupportedHtmlElements": false + } + }, + "kind": "Package", + "canonicalReference": "@tldraw/editor!", + "docComment": "", + "name": "@tldraw/editor", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EntryPoint", + "canonicalReference": "@tldraw/editor!", + "name": "", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!angleDistance:function(1)", + "docComment": "/**\n * Get the angle of a point on an arc.\n *\n * @param fromAngle - The angle from center to arc's start point (A) on the circle\n *\n * @param toAngle - The angle from center to arc's end point (B) on the circle\n *\n * @param direction - The direction of the arc (1 = counter-clockwise, -1 = clockwise)\n *\n * @returns The distance in radians between the two angles according to the direction\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function angleDistance(fromAngle: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", toAngle: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", direction: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "fromAngle", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "toAngle", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "direction", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "name": "angleDistance" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!approximately:function(1)", + "docComment": "/**\n * Whether two numbers numbers a and b are approximately equal.\n *\n * @param a - The first point.\n *\n * @param b - The second point.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function approximately(a: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", b: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", precision?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "b", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "precision", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "name": "approximately" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Arc2d:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Arc2d extends " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Arc2d.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Arc2d", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Arc2d#_center:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "_center: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "_center", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Arc2d:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Arc2d` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed' | 'isFilled'> & {\n center: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n radius: number;\n start: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n end: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n sweepFlag: number;\n largeArcFlag: number;\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 11 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Arc2d#angleEnd:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "angleEnd: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "angleEnd", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Arc2d#angleStart:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "angleStart: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "angleStart", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Arc2d#end:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "end: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "end", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Arc2d#getVertices:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getVertices(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getVertices" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Arc2d#hitTestLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hitTestLineSegment(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", _zoom: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "_zoom", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hitTestLineSegment" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Arc2d#length:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "length: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "length", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Arc2d#measure:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "measure: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "measure", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Arc2d#nearestPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "nearestPoint(point: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "nearestPoint" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Arc2d#radius:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "radius: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "radius", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Arc2d#start:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "start: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "start", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!areAnglesCompatible:function(1)", + "docComment": "/**\n * Checks whether two angles are approximately at right-angles or parallel to each other\n *\n * @param a - Angle a (radians)\n *\n * @param b - Angle b (radians)\n *\n * @returns True iff the angles are approximately at right-angles or parallel to each other\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function areAnglesCompatible(a: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", b: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "b", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "areAnglesCompatible" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!average:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function average(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "average" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!BaseBoxShapeTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare abstract class BaseBoxShapeTool extends " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool.ts", + "releaseTag": "Public", + "isAbstract": true, + "name": "BaseBoxShapeTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!BaseBoxShapeTool.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children: " + }, + { + "kind": "Content", + "text": "() => (typeof " + }, + { + "kind": "Reference", + "text": "Idle", + "canonicalReference": "@tldraw/editor!~Idle:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Pointing", + "canonicalReference": "@tldraw/editor!~Pointing:class" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!BaseBoxShapeTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!BaseBoxShapeTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!BaseBoxShapeTool#onCreate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onCreate?: " + }, + { + "kind": "Content", + "text": "(_shape: null | " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ") => null | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onCreate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!BaseBoxShapeTool#shapeType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "abstract shapeType: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "shapeType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": true + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare abstract class BaseBoxShapeUtil extends " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/BaseBoxShapeUtil.tsx", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "Shape", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": true, + "name": "BaseBoxShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil#getGeometry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getGeometry(shape: " + }, + { + "kind": "Content", + "text": "Shape" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getGeometry" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil#getHandleSnapGeometry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHandleSnapGeometry(shape: " + }, + { + "kind": "Content", + "text": "Shape" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "HandleSnapGeometry", + "canonicalReference": "@tldraw/editor!HandleSnapGeometry:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getHandleSnapGeometry" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil#onResize:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onResize: " + }, + { + "kind": "Reference", + "text": "TLOnResizeHandler", + "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onResize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!BoundsSnapGeometry:interface", + "docComment": "/**\n * When moving or resizing shapes, the bounds of the shape can snap to key geometry on other nearby shapes. Customize how a shape snaps to others with {@link ShapeUtil.getBoundsSnapGeometry}.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BoundsSnapGeometry " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/BoundsSnaps.ts", + "releaseTag": "Public", + "name": "BoundsSnapGeometry", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!BoundsSnapGeometry#points:member", + "docComment": "/**\n * Points that this shape will snap to. By default, this will be the corners and center of the shapes bounding box. To disable snapping to a specific point, use an empty array.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "points?: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "points", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!BoundsSnapPoint:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BoundsSnapPoint " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/BoundsSnaps.ts", + "releaseTag": "Public", + "name": "BoundsSnapPoint", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!BoundsSnapPoint#handle:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "handle?: " + }, + { + "kind": "Reference", + "text": "SelectionCorner", + "canonicalReference": "@tldraw/editor!SelectionCorner:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "handle", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!BoundsSnapPoint#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!BoundsSnapPoint#x:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "x", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!BoundsSnapPoint#y:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "y", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Box:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Box " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Box", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Box:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Box` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(x?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", w?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", h?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "w", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + }, + { + "parameterName": "h", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#aspectRatio:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get aspectRatio(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "aspectRatio", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#center:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get center(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n\nset center(v: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ");" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "center", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#clone:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "clone(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "clone" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#collides:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "collides(B: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "collides" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box.Collides:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Collides: " + }, + { + "kind": "Content", + "text": "(A: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ") => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "Collides", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box.Common:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Common: " + }, + { + "kind": "Content", + "text": "(boxes: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": "[]) => " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "Common", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#contains:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "contains(B: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "contains" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box.Contains:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Contains: " + }, + { + "kind": "Content", + "text": "(A: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ") => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "Contains", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#containsPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "containsPoint(V: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", margin?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "V", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "margin", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "containsPoint" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box.ContainsPoint:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static ContainsPoint: " + }, + { + "kind": "Content", + "text": "(A: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", margin?: number) => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "ContainsPoint", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#corners:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get corners(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "corners", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#cornersAndCenter:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get cornersAndCenter(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "cornersAndCenter", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#equals:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "equals(other: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "other", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "equals" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box.Equals:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Equals(a: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": ", b: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "b", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Equals" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#expand:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "expand(A: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "expand" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box.Expand:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Expand(A: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Expand" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#expandBy:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "expandBy(n: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "expandBy" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box.ExpandBy:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static ExpandBy(A: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ", n: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "ExpandBy" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box.From:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static From(box: " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "box", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "From" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box.FromCenter:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static FromCenter(center: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", size: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "center", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "size", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "FromCenter" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box.FromPoints:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static FromPoints(points: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "points", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "FromPoints" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#getHandlePoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHandlePoint(handle: " + }, + { + "kind": "Reference", + "text": "SelectionCorner", + "canonicalReference": "@tldraw/editor!SelectionCorner:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "SelectionEdge", + "canonicalReference": "@tldraw/editor!SelectionEdge:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handle", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getHandlePoint" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#h:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "h: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "h", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#height:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get height(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";\n\nset height(n: number);" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "height", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#includes:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "includes(B: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "includes" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box.Includes:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Includes: " + }, + { + "kind": "Content", + "text": "(A: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ") => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "Includes", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#maxX:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get maxX(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "maxX", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#maxY:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get maxY(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "maxY", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#midX:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get midX(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "midX", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#midY:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get midY(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "midY", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#minX:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get minX(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";\n\nset minX(n: number);" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "minX", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#minY:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get minY(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";\n\nset minY(n: number);" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "minY", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#point:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get point(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n\nset point(val: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ");" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "point", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#resize:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "resize(handle: " + }, + { + "kind": "Reference", + "text": "SelectionCorner", + "canonicalReference": "@tldraw/editor!SelectionCorner:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "SelectionEdge", + "canonicalReference": "@tldraw/editor!SelectionEdge:type" + }, + { + "kind": "Content", + "text": " | string" + }, + { + "kind": "Content", + "text": ", dx: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", dy: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handle", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "dx", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "dy", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "resize" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box.Resize:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Resize(box: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ", handle: " + }, + { + "kind": "Reference", + "text": "SelectionCorner", + "canonicalReference": "@tldraw/editor!SelectionCorner:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "SelectionEdge", + "canonicalReference": "@tldraw/editor!SelectionEdge:type" + }, + { + "kind": "Content", + "text": " | string" + }, + { + "kind": "Content", + "text": ", dx: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", dy: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", isAspectRatioLocked?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n box: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";\n scaleX: number;\n scaleY: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 14, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "box", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handle", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "dx", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": false + }, + { + "parameterName": "dy", + "parameterTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "isOptional": false + }, + { + "parameterName": "isAspectRatioLocked", + "parameterTypeTokenRange": { + "startIndex": 12, + "endIndex": 13 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Resize" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#scale:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "scale(n: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "scale" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#set:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "set(x?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", w?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", h?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "w", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + }, + { + "parameterName": "h", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "set" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#setTo:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "setTo(B: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setTo" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#sides:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get sides(): " + }, + { + "kind": "Reference", + "text": "Array", + "canonicalReference": "!Array:interface" + }, + { + "kind": "Content", + "text": "<[" + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "sides", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box.Sides:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Sides: " + }, + { + "kind": "Content", + "text": "(A: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ", inset?: number) => " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[][]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "Sides", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#size:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get size(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "size", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#snapToGrid:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "snapToGrid(size: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "size", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "snapToGrid" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#toFixed:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toFixed(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "toFixed" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#toJson:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toJson(): " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "toJson" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#translate:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "translate(delta: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "delta", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "translate" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#union:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "union(box: " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "box", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "union" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#w:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "w: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "w", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#width:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get width(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";\n\nset width(n: number);" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "width", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#x:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "x", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Box#y:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "y", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box#zeroFix:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "zeroFix(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "zeroFix" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Box.ZeroFix:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static ZeroFix(other: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "other", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "ZeroFix" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!BoxLike:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type BoxLike = " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", + "releaseTag": "Public", + "name": "BoxLike", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!canonicalizeRotation:function(1)", + "docComment": "/**\n * @param a - Any angle in radians\n *\n * @returns A number between 0 and 2 * PI\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function canonicalizeRotation(a: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "canonicalizeRotation" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Circle2d:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Circle2d extends " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Circle2d.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Circle2d", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Circle2d#_center:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "_center: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "_center", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Circle2d:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Circle2d` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed'> & {\n x?: number;\n y?: number;\n radius: number;\n isFilled: boolean;\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Circle2d#config:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed'> & {\n x?: number;\n y?: number;\n radius: number;\n isFilled: boolean;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "config", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Circle2d#getBounds:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getBounds(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Circle2d#getVertices:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getVertices(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getVertices" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Circle2d#hitTestLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hitTestLineSegment(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", _zoom: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "_zoom", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hitTestLineSegment" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Circle2d#nearestPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "nearestPoint(point: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "nearestPoint" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Circle2d#radius:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "radius: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "radius", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Circle2d#x:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "x", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Circle2d#y:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "y", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!clamp:function(1)", + "docComment": "/**\n * Clamp a value into a range.\n *\n * @param n - The number to clamp.\n *\n * @param min - The minimum value.\n *\n * @example\n * ```ts\n * const A = clamp(0, 1) // 1\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function clamp(n: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", min: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "min", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "clamp" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!clamp:function(2)", + "docComment": "/**\n * Clamp a value into a range.\n *\n * @param n - The number to clamp.\n *\n * @param min - The minimum value.\n *\n * @param max - The maximum value.\n *\n * @example\n * ```ts\n * const A = clamp(0, 1, 10) // 1\n * const B = clamp(11, 1, 10) // 10\n * const C = clamp(5, 1, 10) // 5\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function clamp(n: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", min: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", max: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "overloadIndex": 2, + "parameters": [ + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "min", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "max", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "name": "clamp" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!clampRadians:function(1)", + "docComment": "/**\n * Clamp radians within 0 and 2PI\n *\n * @param r - The radian value.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function clampRadians(r: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "clampRadians" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!clockwiseAngleDist:function(1)", + "docComment": "/**\n * Get the clockwise angle distance between two angles.\n *\n * @param a0 - The first angle.\n *\n * @param a1 - The second angle.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function clockwiseAngleDist(a0: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", a1: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a0", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "a1", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "clockwiseAngleDist" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!coreShapes:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "coreShapes: " + }, + { + "kind": "Content", + "text": "readonly [typeof " + }, + { + "kind": "Reference", + "text": "GroupShapeUtil", + "canonicalReference": "@tldraw/editor!GroupShapeUtil:class" + }, + { + "kind": "Content", + "text": "]" + } + ], + "fileUrlPath": "packages/editor/src/lib/config/defaultShapes.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "coreShapes", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!counterClockwiseAngleDist:function(1)", + "docComment": "/**\n * Get the counter-clockwise angle distance between two angles.\n *\n * @param a0 - The first angle.\n *\n * @param a1 - The second angle.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function counterClockwiseAngleDist(a0: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", a1: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a0", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "a1", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "counterClockwiseAngleDist" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!createSessionStateSnapshotSignal:function(1)", + "docComment": "/**\n * Creates a signal of the instance state for a given store.\n *\n * @param store - The store to create the instance state snapshot signal for\n *\n * @returns \n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createSessionStateSnapshotSignal(store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Signal", + "canonicalReference": "@tldraw/state!Signal:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/config/TLSessionStateSnapshot.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "store", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "createSessionStateSnapshotSignal" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!createTLStore:function(1)", + "docComment": "/**\n * A helper for creating a TLStore. Custom shapes cannot override default shapes.\n *\n * @param opts - Options for creating the store.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createTLStore({ initialData, defaultName, ...rest }: " + }, + { + "kind": "Reference", + "text": "TLStoreOptions", + "canonicalReference": "@tldraw/editor!TLStoreOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/config/createTLStore.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ initialData, defaultName, ...rest }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "createTLStore" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!createTLUser:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createTLUser(opts?: " + }, + { + "kind": "Content", + "text": "{\n derivePresenceState?: ((store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Signal", + "canonicalReference": "@tldraw/state!Signal:interface" + }, + { + "kind": "Content", + "text": ") | undefined;\n userPreferences?: " + }, + { + "kind": "Reference", + "text": "Signal", + "canonicalReference": "@tldraw/state!Signal:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUserPreferences", + "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" + }, + { + "kind": "Content", + "text": ", unknown> | undefined;\n setUserPreferences?: ((userPreferences: " + }, + { + "kind": "Reference", + "text": "TLUserPreferences", + "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" + }, + { + "kind": "Content", + "text": ") => void) | undefined;\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLUser", + "canonicalReference": "@tldraw/editor!~TLUser:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/config/createTLUser.ts", + "returnTypeTokenRange": { + "startIndex": 15, + "endIndex": 16 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 14 + }, + "isOptional": true + } + ], + "name": "createTLUser" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!CubicBezier2d:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class CubicBezier2d extends " + }, + { + "kind": "Reference", + "text": "Polyline2d", + "canonicalReference": "@tldraw/editor!Polyline2d:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/geometry/CubicBezier2d.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "CubicBezier2d", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!CubicBezier2d:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `CubicBezier2d` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed' | 'isFilled'> & {\n start: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n cp1: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n cp2: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n end: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 13 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!CubicBezier2d#a:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "a: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "a", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!CubicBezier2d#b:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "b: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "b", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!CubicBezier2d#c:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "c: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "c", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!CubicBezier2d#d:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "d: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "d", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!CubicBezier2d#getVertices:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getVertices(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getVertices" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!CubicBezier2d#midPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "midPoint(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "midPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!CubicBezier2d#nearestPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "nearestPoint(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "nearestPoint" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!CubicSpline2d:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class CubicSpline2d extends " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/geometry/CubicSpline2d.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "CubicSpline2d", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!CubicSpline2d#_length:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "_length?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "_length", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!CubicSpline2d#_segments:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "_segments?: " + }, + { + "kind": "Reference", + "text": "CubicBezier2d", + "canonicalReference": "@tldraw/editor!CubicBezier2d:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "_segments", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!CubicSpline2d:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `CubicSpline2d` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed' | 'isFilled'> & {\n points: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[];\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!CubicSpline2d#getVertices:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getVertices(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getVertices" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!CubicSpline2d#hitTestLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hitTestLineSegment(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", zoom: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "zoom", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hitTestLineSegment" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!CubicSpline2d#length:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get length(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "length", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!CubicSpline2d#nearestPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "nearestPoint(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "nearestPoint" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!CubicSpline2d#points:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "points: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "points", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!CubicSpline2d#segments:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get segments(): " + }, + { + "kind": "Reference", + "text": "CubicBezier2d", + "canonicalReference": "@tldraw/editor!CubicBezier2d:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "segments", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!dataUrlToFile:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function dataUrlToFile(url: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", filename: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", mimeType: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "File", + "canonicalReference": "!File:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/assets.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "url", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "filename", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "mimeType", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "name": "dataUrlToFile" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultBackground:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultBackground(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultBackground.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultBackground" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultBrush:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultBrush: ({ brush, color, opacity, className }: " + }, + { + "kind": "Reference", + "text": "TLBrushProps", + "canonicalReference": "@tldraw/editor!TLBrushProps:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultBrush.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ brush, color, opacity, className }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultBrush" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultCanvas:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultCanvas({ className }: " + }, + { + "kind": "Reference", + "text": "TLCanvasComponentProps", + "canonicalReference": "@tldraw/editor!~TLCanvasComponentProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultCanvas.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ className }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultCanvas" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultCollaboratorHint:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultCollaboratorHint({ className, zoom, point, color, viewport, opacity, }: " + }, + { + "kind": "Reference", + "text": "TLCollaboratorHintProps", + "canonicalReference": "@tldraw/editor!TLCollaboratorHintProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultCollaboratorHint.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ className, zoom, point, color, viewport, opacity, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultCollaboratorHint" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!DefaultCursor:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultCursor: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLCursorProps", + "canonicalReference": "@tldraw/editor!TLCursorProps:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultCursor.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultCursor", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!DefaultErrorFallback:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultErrorFallback: " + }, + { + "kind": "Reference", + "text": "TLErrorFallbackComponent", + "canonicalReference": "@tldraw/editor!~TLErrorFallbackComponent:type" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultErrorFallback.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultErrorFallback", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultGrid:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultGrid({ x, y, z, size }: " + }, + { + "kind": "Reference", + "text": "TLGridProps", + "canonicalReference": "@tldraw/editor!TLGridProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultGrid.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ x, y, z, size }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultGrid" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultHandle:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultHandle({ handle, isCoarse, className, zoom }: " + }, + { + "kind": "Reference", + "text": "TLHandleProps", + "canonicalReference": "@tldraw/editor!TLHandleProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultHandle.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ handle, isCoarse, className, zoom }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultHandle" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultHandles:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultHandles: ({ children }: " + }, + { + "kind": "Reference", + "text": "TLHandlesProps", + "canonicalReference": "@tldraw/editor!TLHandlesProps:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultHandles.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultHandles" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultHoveredShapeIndicator:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultHoveredShapeIndicator({ shapeId }: " + }, + { + "kind": "Reference", + "text": "TLHoveredShapeIndicatorProps", + "canonicalReference": "@tldraw/editor!TLHoveredShapeIndicatorProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultHoveredShapeIndicator.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ shapeId }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultHoveredShapeIndicator" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultScribble:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultScribble({ scribble, zoom, color, opacity, className }: " + }, + { + "kind": "Reference", + "text": "TLScribbleProps", + "canonicalReference": "@tldraw/editor!TLScribbleProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultScribble.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ scribble, zoom, color, opacity, className }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultScribble" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultSelectionBackground:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultSelectionBackground({ bounds, rotation }: " + }, + { + "kind": "Reference", + "text": "TLSelectionBackgroundProps", + "canonicalReference": "@tldraw/editor!TLSelectionBackgroundProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSelectionBackground.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ bounds, rotation }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultSelectionBackground" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultSelectionForeground:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultSelectionForeground({ bounds, rotation }: " + }, + { + "kind": "Reference", + "text": "TLSelectionForegroundProps", + "canonicalReference": "@tldraw/editor!TLSelectionForegroundProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSelectionForeground.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ bounds, rotation }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultSelectionForeground" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!DefaultShapeIndicator:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultShapeIndicator: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShapeIndicatorProps", + "canonicalReference": "@tldraw/editor!TLShapeIndicatorProps:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultShapeIndicator.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultShapeIndicator", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultSnapIndicator:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultSnapIndicator({ className, line, zoom }: " + }, + { + "kind": "Reference", + "text": "TLSnapIndicatorProps", + "canonicalReference": "@tldraw/editor!TLSnapIndicatorProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSnapIndictor.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ className, line, zoom }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultSnapIndicator" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultSpinner:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultSpinner(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSpinner.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultSpinner" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!DefaultSvgDefs:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultSvgDefs: () => " + }, + { + "kind": "Content", + "text": "null" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSvgDefs.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultSvgDefs" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!defaultUserPreferences:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultUserPreferences: " + }, + { + "kind": "Reference", + "text": "Readonly", + "canonicalReference": "!Readonly:type" + }, + { + "kind": "Content", + "text": "<{\n name: \"New User\";\n locale: \"ar\" | \"ca\" | \"cs\" | \"da\" | \"de\" | \"en\" | \"es\" | \"fa\" | \"fi\" | \"fr\" | \"gl\" | \"he\" | \"hi-in\" | \"hr\" | \"hu\" | \"it\" | \"ja\" | \"ko-kr\" | \"ku\" | \"my\" | \"ne\" | \"no\" | \"pl\" | \"pt-br\" | \"pt-pt\" | \"ro\" | \"ru\" | \"sl\" | \"sv\" | \"te\" | \"th\" | \"tr\" | \"uk\" | \"vi\" | \"zh-cn\" | \"zh-tw\";\n color: \"#02B1CC\" | \"#11B3A3\" | \"#39B178\" | \"#55B467\" | \"#7B66DC\" | \"#9D5BD2\" | \"#BD54C6\" | \"#E34BA9\" | \"#EC5E41\" | \"#F04F88\" | \"#F2555A\" | \"#FF802B\";\n isDarkMode: false;\n edgeScrollSpeed: 1;\n animationSpeed: 0 | 1;\n isSnapMode: false;\n isWrapMode: false;\n}>" + } + ], + "fileUrlPath": "packages/editor/src/lib/config/TLUserPreferences.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "defaultUserPreferences", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!degreesToRadians:function(1)", + "docComment": "/**\n * Convert degrees to radians.\n *\n * @param d - The degree in degrees.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function degreesToRadians(d: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "d", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "degreesToRadians" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!EASINGS:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "EASINGS: " + }, + { + "kind": "Content", + "text": "{\n readonly linear: (t: number) => number;\n readonly easeInQuad: (t: number) => number;\n readonly easeOutQuad: (t: number) => number;\n readonly easeInOutQuad: (t: number) => number;\n readonly easeInCubic: (t: number) => number;\n readonly easeOutCubic: (t: number) => number;\n readonly easeInOutCubic: (t: number) => number;\n readonly easeInQuart: (t: number) => number;\n readonly easeOutQuart: (t: number) => number;\n readonly easeInOutQuart: (t: number) => number;\n readonly easeInQuint: (t: number) => number;\n readonly easeOutQuint: (t: number) => number;\n readonly easeInOutQuint: (t: number) => number;\n readonly easeInSine: (t: number) => number;\n readonly easeOutSine: (t: number) => number;\n readonly easeInOutSine: (t: number) => number;\n readonly easeInExpo: (t: number) => number;\n readonly easeOutExpo: (t: number) => number;\n readonly easeInOutExpo: (t: number) => number;\n}" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/easings.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "EASINGS", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Edge2d:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Edge2d extends " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Edge2d.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Edge2d", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Edge2d#_length:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "_length?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "_length", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Edge2d:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Edge2d` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Content", + "text": "{\n start: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n end: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Edge2d#d:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "d: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "d", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Edge2d#end:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "end: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "end", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Edge2d#getVertices:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getVertices(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getVertices" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Edge2d#hitTestLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hitTestLineSegment(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", _zoom: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "_zoom", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hitTestLineSegment" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Edge2d#length:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get length(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "length", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Edge2d#midPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "midPoint(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "midPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Edge2d#nearestPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "nearestPoint(point: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "nearestPoint" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Edge2d#start:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "start: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "start", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Edge2d#u:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "u: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "u", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Edge2d#ul:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "ul: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "ul", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Editor:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Editor extends " + }, + { + "kind": "Reference", + "text": "EventEmitter", + "canonicalReference": "eventemitter3!EventEmitter.EventEmitter" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLEventMap", + "canonicalReference": "@tldraw/editor!TLEventMap:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/Editor.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Editor", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Editor:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Editor` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor({ store, user, shapeUtils, tools, getContainer, initialState, inferDarkMode, }: " + }, + { + "kind": "Reference", + "text": "TLEditorOptions", + "canonicalReference": "@tldraw/editor!TLEditorOptions:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ store, user, shapeUtils, tools, getContainer, initialState, inferDarkMode, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#addOpenMenu:member(1)", + "docComment": "/**\n * Add an open menu.\n *\n * @example\n * ```ts\n * editor.addOpenMenu('menu-id')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "addOpenMenu(id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "addOpenMenu" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#alignShapes:member(1)", + "docComment": "/**\n * Align shape positions.\n *\n * @param shapes - The shapes (or shape ids) to align.\n *\n * @param operation - The align operation to apply.\n *\n * @example\n * ```ts\n * editor.alignShapes([box1, box2], 'left')\n * editor.alignShapes(editor.getSelectedShapeIds(), 'left')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "alignShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", operation: " + }, + { + "kind": "Content", + "text": "'bottom' | 'center-horizontal' | 'center-vertical' | 'left' | 'right' | 'top'" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "operation", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "alignShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#animateShape:member(1)", + "docComment": "/**\n * Animate a shape.\n *\n * @param partial - The shape partial to update.\n *\n * @param options - The animation's options.\n *\n * @example\n * ```ts\n * editor.animateShape({ id: 'box1', type: 'box', x: 100, y: 100 })\n * editor.animateShape({ id: 'box1', type: 'box', x: 100, y: 100 }, { duration: 100, ease: t => t*t })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "animateShape(partial: " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ", animationOptions?: " + }, + { + "kind": "Reference", + "text": "TLAnimationOptions", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "partial", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "animationOptions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "animateShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#animateShapes:member(1)", + "docComment": "/**\n * Animate shapes.\n *\n * @param partials - The shape partials to update.\n *\n * @param options - The animation's options.\n *\n * @example\n * ```ts\n * editor.animateShapes([{ id: 'box1', type: 'box', x: 100, y: 100 }])\n * editor.animateShapes([{ id: 'box1', type: 'box', x: 100, y: 100 }], { duration: 100, ease: t => t*t })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "animateShapes(partials: " + }, + { + "kind": "Content", + "text": "(null | " + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": " | undefined)[]" + }, + { + "kind": "Content", + "text": ", animationOptions?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n duration: number;\n easing: (t: number) => number;\n }>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "partials", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "animationOptions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "animateShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#animateToShape:member(1)", + "docComment": "/**\n * Animate the camera to a shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "animateToShape(shapeId: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Reference", + "text": "TLAnimationOptions", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapeId", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "animateToShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#animateToUser:member(1)", + "docComment": "/**\n * Animate the camera to a user's cursor position. This also briefly show the user's cursor if it's not currently visible.\n *\n * @param userId - The id of the user to aniamte to.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "animateToUser(userId: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "userId", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "animateToUser" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#bail:member(1)", + "docComment": "/**\n * Clear all marks in the undo stack back to the next mark.\n *\n * @example\n * ```ts\n * editor.bail()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "bail(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "bail" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#bailToMark:member(1)", + "docComment": "/**\n * Clear all marks in the undo stack back to the mark with the provided mark id.\n *\n * @example\n * ```ts\n * editor.bailToMark('dragging')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "bailToMark(id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "bailToMark" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#batch:member(1)", + "docComment": "/**\n * Run a function in a batch, which will be undone/redone as a single action.\n *\n * @example\n * ```ts\n * editor.batch(() => {\n * \teditor.selectAll()\n * \teditor.deleteShapes(editor.getSelectedShapeIds())\n * \teditor.createShapes(myShapes)\n * \teditor.selectNone()\n * })\n *\n * editor.undo() // will undo all of the above\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "batch(fn: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "fn", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "batch" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#bringForward:member(1)", + "docComment": "/**\n * Bring shapes forward in the page's object list.\n *\n * @param shapes - The shapes (or shape ids) to move.\n *\n * @example\n * ```ts\n * editor.bringForward(['id1', 'id2'])\n * editor.bringForward(box1, box2)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "bringForward(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "bringForward" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#bringToFront:member(1)", + "docComment": "/**\n * Bring shapes to the front of the page's object list.\n *\n * @param shapes - The shapes (or shape ids) to move.\n *\n * @example\n * ```ts\n * editor.bringToFront(['id1', 'id2'])\n * editor.bringToFront([box1, box2])\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "bringToFront(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "bringToFront" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#cancel:member(1)", + "docComment": "/**\n * Dispatch a cancel event.\n *\n * @example\n * ```ts\n * editor.cancel()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "cancel(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "cancel" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#cancelDoubleClick:member(1)", + "docComment": "/**\n * Prevent a double click event from firing the next time the user clicks\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "cancelDoubleClick(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "cancelDoubleClick" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#centerOnPoint:member(1)", + "docComment": "/**\n * Center the camera on a point (in the current page space).\n *\n * @param point - The point in the current page space to center on.\n *\n * @param animation - The options for an animation.\n *\n * @example\n * ```ts\n * editor.centerOnPoint({ x: 100, y: 100 })\n * editor.centerOnPoint({ x: 100, y: 100 }, { duration: 200 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "centerOnPoint(point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", animation?: " + }, + { + "kind": "Reference", + "text": "TLAnimationOptions", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "animation", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "centerOnPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#clearOpenMenus:member(1)", + "docComment": "/**\n * Clear all open menus.\n *\n * @example\n * ```ts\n * editor.clearOpenMenus()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "clearOpenMenus(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "clearOpenMenus" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#complete:member(1)", + "docComment": "/**\n * Dispatch a complete event.\n *\n * @example\n * ```ts\n * editor.complete()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "complete(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "complete" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#createAssets:member(1)", + "docComment": "/**\n * Create one or more assets.\n *\n * @param assets - The assets to create.\n *\n * @example\n * ```ts\n * editor.createAssets([...myAssets])\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createAssets(assets: " + }, + { + "kind": "Reference", + "text": "TLAsset", + "canonicalReference": "@tldraw/tlschema!TLAsset:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "assets", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createAssets" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#createPage:member(1)", + "docComment": "/**\n * Create a page.\n *\n * @param page - The page (or page partial) to create.\n *\n * @example\n * ```ts\n * editor.createPage(myPage)\n * editor.createPage({ name: 'Page 2' })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createPage(page: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "page", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createPage" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#createShape:member(1)", + "docComment": "/**\n * Create a single shape.\n *\n * @param shape - The shape (or shape partial) to create.\n *\n * @example\n * ```ts\n * editor.createShape(myShape)\n * editor.createShape({ id: 'box1', type: 'text', props: { text: \"ok\" } })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createShape(shape: " + }, + { + "kind": "Reference", + "text": "OptionalKeys", + "canonicalReference": "@tldraw/editor!~OptionalKeys:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": ", 'id'>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#createShapes:member(1)", + "docComment": "/**\n * Create shapes.\n *\n * @param shapes - The shapes (or shape partials) to create.\n *\n * @param select - Whether to select the created shapes. Defaults to false.\n *\n * @example\n * ```ts\n * editor.createShapes([myShape])\n * editor.createShapes([{ id: 'box1', type: 'text', props: { text: \"ok\" } }])\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createShapes(shapes: " + }, + { + "kind": "Reference", + "text": "OptionalKeys", + "canonicalReference": "@tldraw/editor!~OptionalKeys:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": ", 'id'>[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#deleteAssets:member(1)", + "docComment": "/**\n * Delete one or more assets.\n *\n * @param ids - The assets to delete.\n *\n * @example\n * ```ts\n * editor.deleteAssets(['asset1', 'asset2'])\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "deleteAssets(assets: " + }, + { + "kind": "Reference", + "text": "TLAsset", + "canonicalReference": "@tldraw/tlschema!TLAsset:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLAssetId", + "canonicalReference": "@tldraw/tlschema!TLAssetId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "assets", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "deleteAssets" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#deleteOpenMenu:member(1)", + "docComment": "/**\n * Delete an open menu.\n *\n * @example\n * ```ts\n * editor.deleteOpenMenu('menu-id')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "deleteOpenMenu(id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "deleteOpenMenu" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#deletePage:member(1)", + "docComment": "/**\n * Delete a page.\n *\n * @param id - The id of the page to delete.\n *\n * @example\n * ```ts\n * editor.deletePage('page1')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "deletePage(page: " + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "page", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "deletePage" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#deleteShape:member(1)", + "docComment": "/**\n * Delete a shape.\n *\n * @param id - The id of the shape to delete.\n *\n * @example\n * ```ts\n * editor.deleteShapes(['box1', 'box2'])\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "deleteShape(id: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "deleteShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#deleteShape:member(2)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "deleteShape(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 2, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "deleteShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#deleteShapes:member(1)", + "docComment": "/**\n * Delete shapes.\n *\n * @param ids - The ids of the shapes to delete.\n *\n * @example\n * ```ts\n * editor.deleteShapes(['box1', 'box2'])\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "deleteShapes(ids: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "ids", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "deleteShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#deleteShapes:member(2)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "deleteShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 2, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "deleteShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#deselect:member(1)", + "docComment": "/**\n * Remove a shape from the existing set of selected shapes.\n *\n * @example\n * ```ts\n * editor.deselect(shape.id)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "deselect(...shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "deselect" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#dispatch:member", + "docComment": "/**\n * Dispatch an event to the editor.\n *\n * @param info - The event info.\n *\n * @example\n * ```ts\n * editor.dispatch(myPointerEvent)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "dispatch: " + }, + { + "kind": "Content", + "text": "(info: " + }, + { + "kind": "Reference", + "text": "TLEventInfo", + "canonicalReference": "@tldraw/editor!TLEventInfo:type" + }, + { + "kind": "Content", + "text": ") => this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "dispatch", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#disposables:member", + "docComment": "/**\n * A set of functions to call when the app is disposed.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly disposables: " + }, + { + "kind": "Reference", + "text": "Set", + "canonicalReference": "!Set:interface" + }, + { + "kind": "Content", + "text": "<() => void>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "disposables", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#dispose:member(1)", + "docComment": "/**\n * Dispose the editor.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "dispose(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "dispose" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#distributeShapes:member(1)", + "docComment": "/**\n * Distribute shape positions.\n *\n * @param shapes - The shapes (or shape ids) to distribute.\n *\n * @param operation - Whether to distribute shapes horizontally or vertically.\n *\n * @example\n * ```ts\n * editor.distributeShapes([box1, box2], 'horizontal')\n * editor.distributeShapes(editor.getSelectedShapeIds(), 'horizontal')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "distributeShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", operation: " + }, + { + "kind": "Content", + "text": "'horizontal' | 'vertical'" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "operation", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "distributeShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#duplicatePage:member(1)", + "docComment": "/**\n * Duplicate a page.\n *\n * @param id - The id of the page to duplicate. Defaults to the current page.\n *\n * @param createId - The id of the new page. Defaults to a new id.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "duplicatePage(page: " + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ", createId?: " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "page", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "createId", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "duplicatePage" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#duplicateShapes:member(1)", + "docComment": "/**\n * Duplicate shapes.\n *\n * @param shapes - The shapes (or shape ids) to duplicate.\n *\n * @param offset - The offset (in pixels) to apply to the duplicated shapes.\n *\n * @example\n * ```ts\n * editor.duplicateShapes(['box1', 'box2'], { x: 8, y: 8 })\n * editor.duplicateShapes(editor.getSelectedShapes(), { x: 8, y: 8 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "duplicateShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", offset?: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "offset", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "duplicateShapes" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#environment:member", + "docComment": "/**\n * A manager for the editor's environment.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly environment: " + }, + { + "kind": "Reference", + "text": "EnvironmentManager", + "canonicalReference": "@tldraw/editor!~EnvironmentManager:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "environment", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#findCommonAncestor:member(1)", + "docComment": "/**\n * Get the common ancestor of two or more shapes that matches a predicate.\n *\n * @param shapes - The shapes (or shape ids) to check.\n *\n * @param predicate - The predicate to match.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "findCommonAncestor(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", predicate?: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ") => boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "predicate", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 9 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "findCommonAncestor" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#findShapeAncestor:member(1)", + "docComment": "/**\n * Find the first ancestor matching the given predicate\n *\n * @param shape - The shape to check the ancestors for.\n *\n * @example\n * ```ts\n * const ancestor = editor.findShapeAncestor(myShape)\n * const ancestor = editor.findShapeAncestor(myShape.id)\n * const ancestor = editor.findShapeAncestor(myShape.id, (shape) => shape.type === 'frame')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "findShapeAncestor(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ", predicate: " + }, + { + "kind": "Content", + "text": "(parent: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ") => boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "predicate", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "findShapeAncestor" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#flipShapes:member(1)", + "docComment": "/**\n * Flip shape positions.\n *\n * @param shapes - The ids of the shapes to flip.\n *\n * @param operation - Whether to flip horizontally or vertically.\n *\n * @example\n * ```ts\n * editor.flipShapes([box1, box2], 'horizontal', 32)\n * editor.flipShapes(editor.getSelectedShapeIds(), 'horizontal', 32)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "flipShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", operation: " + }, + { + "kind": "Content", + "text": "'horizontal' | 'vertical'" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "operation", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "flipShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getAncestorPageId:member(1)", + "docComment": "/**\n * Get the id of the containing page for a given shape.\n *\n * @param shape - The shape to get the page id for.\n *\n * @returns The id of the page that contains the shape, or undefined if the shape is undefined.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getAncestorPageId(shape?: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getAncestorPageId" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getArrowInfo:member(1)", + "docComment": "/**\n * Get cached info about an arrow.\n *\n * @param shape - The shape (or shape id) of the arrow to get the info for.\n *\n * @example\n * ```ts\n * const arrowInfo = editor.getArrowInfo(myArrow)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getArrowInfo(shape: " + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLArrowInfo", + "canonicalReference": "@tldraw/editor!TLArrowInfo:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getArrowInfo" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getArrowsBoundTo:member(1)", + "docComment": "/**\n * Get all arrows bound to a shape.\n *\n * @param shapeId - The id of the shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getArrowsBoundTo(shapeId: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n arrowId: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n handleId: \"end\" | \"start\";\n }[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapeId", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getArrowsBoundTo" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getAsset:member(1)", + "docComment": "/**\n * Get an asset by its id.\n *\n * @param asset - The asset (or asset id) to get.\n *\n * @example\n * ```ts\n * editor.getAsset('asset1')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getAsset(asset: " + }, + { + "kind": "Reference", + "text": "TLAsset", + "canonicalReference": "@tldraw/tlschema!TLAsset:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLAssetId", + "canonicalReference": "@tldraw/tlschema!TLAssetId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLAsset", + "canonicalReference": "@tldraw/tlschema!TLAsset:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "asset", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getAsset" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getAssetForExternalContent:member(1)", + "docComment": "/**\n * Get an asset for an external asset content type.\n *\n * @param info - Info about the external content.\n *\n * @returns The asset.\n *\n * @example\n * ```ts\n * const asset = await editor.getAssetForExternalContent({ type: 'file', file: myFile })\n * const asset = await editor.getAssetForExternalContent({ type: 'url', url: myUrl })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getAssetForExternalContent(info: " + }, + { + "kind": "Reference", + "text": "TLExternalAssetContent", + "canonicalReference": "@tldraw/editor!TLExternalAssetContent:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLAsset", + "canonicalReference": "@tldraw/tlschema!TLAsset:type" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "info", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getAssetForExternalContent" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getAssets:member(1)", + "docComment": "/**\n * Get all assets in the editor.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getAssets(): " + }, + { + "kind": "Content", + "text": "(import(\"@tldraw/tlschema\")." + }, + { + "kind": "Reference", + "text": "TLBookmarkAsset", + "canonicalReference": "@tldraw/tlschema!TLBookmarkAsset:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLImageAsset", + "canonicalReference": "@tldraw/tlschema!TLImageAsset:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLVideoAsset", + "canonicalReference": "@tldraw/tlschema!TLVideoAsset:type" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getAssets" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCamera:member(1)", + "docComment": "/**\n * The current camera.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCamera(): " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/tlschema\")." + }, + { + "kind": "Reference", + "text": "TLCamera", + "canonicalReference": "@tldraw/tlschema!TLCamera:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCamera" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCameraState:member(1)", + "docComment": "/**\n * Whether the camera is moving or idle.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCameraState(): " + }, + { + "kind": "Content", + "text": "\"idle\" | \"moving\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCameraState" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCanRedo:member(1)", + "docComment": "/**\n * Whether the app can redo.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCanRedo(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCanRedo" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCanUndo:member(1)", + "docComment": "/**\n * Whether the app can undo.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCanUndo(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCanUndo" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#getContainer:member", + "docComment": "/**\n * The current HTML element containing the editor.\n *\n * @example\n * ```ts\n * const container = editor.getContainer()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getContainer: " + }, + { + "kind": "Content", + "text": "() => " + }, + { + "kind": "Reference", + "text": "HTMLElement", + "canonicalReference": "!HTMLElement:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "getContainer", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getContentFromCurrentPage:member(1)", + "docComment": "/**\n * Get content that can be exported for the given shape ids.\n *\n * @param shapes - The shapes (or shape ids) to get content for.\n *\n * @returns The exported content.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getContentFromCurrentPage(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLContent", + "canonicalReference": "@tldraw/editor!TLContent:interface" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getContentFromCurrentPage" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCroppingShapeId:member(1)", + "docComment": "/**\n * The current cropping shape's id.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCroppingShapeId(): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCroppingShapeId" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCurrentPage:member(1)", + "docComment": "/**\n * The current page.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCurrentPage(): " + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCurrentPage" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCurrentPageBounds:member(1)", + "docComment": "/**\n * The bounds of the current page (the common bounds of all of the shapes on the page).\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCurrentPageBounds(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCurrentPageBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCurrentPageId:member(1)", + "docComment": "/**\n * The current page id.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCurrentPageId(): " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCurrentPageId" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCurrentPageRenderingShapesSorted:member(1)", + "docComment": "/**\n * An array containing all of the rendering shapes in the current page, sorted in z-index order (accounting for nested shapes): e.g. A, B, BA, BB, C.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCurrentPageRenderingShapesSorted(): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCurrentPageRenderingShapesSorted" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCurrentPageShapeIds:member(1)", + "docComment": "/**\n * An array of all of the shapes on the current page.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCurrentPageShapeIds(): " + }, + { + "kind": "Reference", + "text": "Set", + "canonicalReference": "!Set:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCurrentPageShapeIds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCurrentPageShapes:member(1)", + "docComment": "/**\n * An array containing all of the shapes in the current page.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCurrentPageShapes(): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCurrentPageShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCurrentPageShapesSorted:member(1)", + "docComment": "/**\n * An array containing all of the shapes in the current page, sorted in z-index order (accounting for nested shapes): e.g. A, B, BA, BB, C.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCurrentPageShapesSorted(): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCurrentPageShapesSorted" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCurrentPageState:member(1)", + "docComment": "/**\n * The current page state.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCurrentPageState(): " + }, + { + "kind": "Reference", + "text": "TLInstancePageState", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCurrentPageState" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCurrentTool:member(1)", + "docComment": "/**\n * The current selected tool.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCurrentTool(): " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCurrentTool" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getCurrentToolId:member(1)", + "docComment": "/**\n * The id of the current selected tool.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCurrentToolId(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCurrentToolId" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getDocumentSettings:member(1)", + "docComment": "/**\n * The global document settings that apply to all users.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDocumentSettings(): " + }, + { + "kind": "Reference", + "text": "TLDocument", + "canonicalReference": "@tldraw/tlschema!TLDocument:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDocumentSettings" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getDroppingOverShape:member(1)", + "docComment": "/**\n * Get the shape that some shapes should be dropped on at a given point.\n *\n * @param point - The point to find the parent for.\n *\n * @param droppingShapes - The shapes that are being dropped.\n *\n * @returns The shape to drop on.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDroppingOverShape(point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", droppingShapes?: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLUnknownShape", + "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "droppingShapes", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getDroppingOverShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getEditingShape:member(1)", + "docComment": "/**\n * The current editing shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getEditingShape(): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getEditingShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getEditingShapeId:member(1)", + "docComment": "/**\n * The current editing shape's id.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getEditingShapeId(): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getEditingShapeId" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getErasingShapeIds:member(1)", + "docComment": "/**\n * The editor's current erasing ids.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getErasingShapeIds(): " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getErasingShapeIds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getErasingShapes:member(1)", + "docComment": "/**\n * The editor's current erasing shapes.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getErasingShapes(): " + }, + { + "kind": "Reference", + "text": "NonNullable", + "canonicalReference": "!NonNullable:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | undefined>[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getErasingShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getFocusedGroup:member(1)", + "docComment": "/**\n * The current focused group.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getFocusedGroup(): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getFocusedGroup" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getFocusedGroupId:member(1)", + "docComment": "/**\n * The current focused group id.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getFocusedGroupId(): " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getFocusedGroupId" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getHighestIndexForParent:member(1)", + "docComment": "/**\n * Get the index above the highest child of a given parent.\n *\n * @param parentId - The id of the parent.\n *\n * @returns The index.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHighestIndexForParent(parent: " + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "parent", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getHighestIndexForParent" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getHintingShape:member(1)", + "docComment": "/**\n * The editor's current hinting shapes.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHintingShape(): " + }, + { + "kind": "Reference", + "text": "NonNullable", + "canonicalReference": "!NonNullable:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | undefined>[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getHintingShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getHintingShapeIds:member(1)", + "docComment": "/**\n * The editor's current hinting shape ids.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHintingShapeIds(): " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getHintingShapeIds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getHoveredShape:member(1)", + "docComment": "/**\n * The current hovered shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHoveredShape(): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getHoveredShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getHoveredShapeId:member(1)", + "docComment": "/**\n * The current hovered shape id.\n *\n * @readonly @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHoveredShapeId(): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getHoveredShapeId" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getInitialMetaForShape:member(1)", + "docComment": "/**\n * Get the initial meta value for a shape.\n *\n * @param shape - The shape to get the initial meta for.\n *\n * @example\n * ```ts\n * editor.getInitialMetaForShape = (shape) => {\n * if (shape.type === 'note') {\n * return { createdBy: myCurrentUser.id }\n * }\n * }\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getInitialMetaForShape(_shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "_shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getInitialMetaForShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getInstanceState:member(1)", + "docComment": "/**\n * The current instance's state.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getInstanceState(): " + }, + { + "kind": "Reference", + "text": "TLInstance", + "canonicalReference": "@tldraw/tlschema!TLInstance:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getInstanceState" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getIsMenuOpen:member(1)", + "docComment": "/**\n * Get whether any menus are open.\n *\n * @example\n * ```ts\n * editor.isMenuOpen()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getIsMenuOpen(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getIsMenuOpen" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getOnlySelectedShape:member(1)", + "docComment": "/**\n * The app's only selected shape.\n *\n * @returns Null if there is no shape or more than one selected shape, otherwise the selected shape.\n *\n * @public @readonly\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getOnlySelectedShape(): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getOnlySelectedShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getOpenMenus:member(1)", + "docComment": "/**\n * A set of strings representing any open menus. When menus are open, certain interactions will behave differently; for example, when a draw tool is selected and a menu is open, a pointer-down will not create a dot (because the user is probably trying to close the menu) however a pointer-down event followed by a drag will begin drawing a line (because the user is BOTH trying to close the menu AND start drawing a line).\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getOpenMenus(): " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getOpenMenus" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getOutermostSelectableShape:member(1)", + "docComment": "/**\n * Get the shape that should be selected when you click on a given shape, assuming there is nothing already selected. It will not return anything higher than or including the current focus layer.\n *\n * @param shape - The shape to get the outermost selectable shape for.\n *\n * @param filter - A function to filter the selectable shapes.\n *\n * @returns The outermost selectable shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getOutermostSelectableShape(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ", filter?: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ") => boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "filter", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 8 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getOutermostSelectableShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getPage:member(1)", + "docComment": "/**\n * Get a page.\n *\n * @param page - The page (or page id) to get.\n *\n * @example\n * ```ts\n * editor.getPage(myPage.id)\n * editor.getPage(myPage)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getPage(page: " + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "page", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getPage" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getPages:member(1)", + "docComment": "/**\n * Info about the project's current pages.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getPages(): " + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getPages" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getPageShapeIds:member(1)", + "docComment": "/**\n * Get the ids of shapes on a page.\n *\n * @param page - The page (or page id) to get.\n *\n * @example\n * ```ts\n * const idsOnPage1 = editor.getPageShapeIds('page1')\n * const idsOnPage2 = editor.getPageShapeIds(myPage2)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getPageShapeIds(page: " + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Set", + "canonicalReference": "!Set:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "page", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getPageShapeIds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getPageStates:member(1)", + "docComment": "/**\n * Page states.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getPageStates(): " + }, + { + "kind": "Reference", + "text": "TLInstancePageState", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getPageStates" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getPath:member(1)", + "docComment": "/**\n * The editor's current path of active states.\n *\n * @example\n * ```ts\n * editor.getPath() // \"select.idle\"\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getPath(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getPath" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getPointInParentSpace:member(1)", + "docComment": "/**\n * Convert a delta in the current page space to a point in the local space of a shape's parent.\n *\n * @param shape - The shape to get the point in the local space of.\n *\n * @param point - The page point to get in the local space of the shape.\n *\n * @example\n * ```ts\n * editor.getPointInParentSpace(myShape.id, { x: 100, y: 100 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getPointInParentSpace(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ", point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getPointInParentSpace" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getPointInShapeSpace:member(1)", + "docComment": "/**\n * Convert a point in the current page space to a point in the local space of a shape. For example, if a shape's page point were `{ x: 100, y: 100 }`, a page point at `{ x: 110, y: 110 }` would be at `{ x: 10, y: 10 }` in the shape's local space.\n *\n * @param shape - The shape to get the point in the local space of.\n *\n * @param point - The page point to get in the local space of the shape.\n *\n * @example\n * ```ts\n * editor.getPointInShapeSpace(myShape, { x: 100, y: 100 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getPointInShapeSpace(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ", point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getPointInShapeSpace" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getRenderingBounds:member(1)", + "docComment": "/**\n * The current rendering bounds in the current page space, used for checking which shapes are \"on screen\".\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getRenderingBounds(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getRenderingBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getRenderingBoundsExpanded:member(1)", + "docComment": "/**\n * The current rendering bounds in the current page space, expanded slightly. Used for determining which shapes to render and which to \"cull\".\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getRenderingBoundsExpanded(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getRenderingBoundsExpanded" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getRenderingShapes:member(1)", + "docComment": "/**\n * Get the shapes that should be displayed in the current viewport.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getRenderingShapes(): " + }, + { + "kind": "Content", + "text": "{\n id: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ";\n util: " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUnknownShape", + "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" + }, + { + "kind": "Content", + "text": ">;\n index: number;\n backgroundIndex: number;\n opacity: number;\n }[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getRenderingShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getSelectedShapeAtPoint:member(1)", + "docComment": "/**\n * Get the top-most selected shape at the given point, ignoring groups.\n *\n * @param point - The point to check.\n *\n * @returns The top-most selected shape at the given point, or undefined if there is no shape at the point.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSelectedShapeAtPoint(point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getSelectedShapeAtPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getSelectedShapeIds:member(1)", + "docComment": "/**\n * The current selected ids.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSelectedShapeIds(): " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getSelectedShapeIds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getSelectedShapes:member(1)", + "docComment": "/**\n * An array containing all of the currently selected shapes.\n *\n * @public @readonly\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSelectedShapes(): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getSelectedShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getSelectionPageBounds:member(1)", + "docComment": "/**\n * The current page bounds of all the selected shapes. If the selection is rotated, then these bounds are the axis-aligned box that the rotated bounds would fit inside of.\n *\n * @readonly @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSelectionPageBounds(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getSelectionPageBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getSelectionRotatedPageBounds:member(1)", + "docComment": "/**\n * The bounds of the selection bounding box in the current page space.\n *\n * @readonly @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSelectionRotatedPageBounds(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getSelectionRotatedPageBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getSelectionRotatedScreenBounds:member(1)", + "docComment": "/**\n * The bounds of the selection bounding box in the current page space.\n *\n * @readonly @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSelectionRotatedScreenBounds(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getSelectionRotatedScreenBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getSelectionRotation:member(1)", + "docComment": "/**\n * The rotation of the selection bounding box in the current page space.\n *\n * @readonly @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSelectionRotation(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getSelectionRotation" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShape:member(1)", + "docComment": "/**\n * Get a shape by its id.\n *\n * @param id - The id of the shape to get.\n *\n * @example\n * ```ts\n * editor.getShape('box1')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShape(shape: " + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeAncestors:member(1)", + "docComment": "/**\n * Get the ancestors of a shape.\n *\n * @param shape - The shape (or shape id) to get the ancestors for.\n *\n * @example\n * ```ts\n * const ancestors = editor.getShapeAncestors(myShape)\n * const ancestors = editor.getShapeAncestors(myShapeId)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeAncestors(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ", acc?: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "acc", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeAncestors" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeAndDescendantIds:member(1)", + "docComment": "/**\n * Get the shape ids of all descendants of the given shapes (including the shapes themselves).\n *\n * @param ids - The ids of the shapes to get descendants of.\n *\n * @returns The decscendant ids.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeAndDescendantIds(ids: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Set", + "canonicalReference": "!Set:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "ids", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeAndDescendantIds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeAtPoint:member(1)", + "docComment": "/**\n * Get the shape at the current point.\n *\n * @param point - The point to check.\n *\n * @param opts - Options for the check: `hitInside` to check if the point is inside the shape, `margin` to check if the point is within a margin of the shape, `hitFrameInside` to check if the point is inside the frame, and `filter` to filter the shapes to check.\n *\n * @returns The shape at the given point, or undefined if there is no shape at the point.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeAtPoint(point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Content", + "text": "{\n renderingOnly?: boolean | undefined;\n margin?: number | undefined;\n hitInside?: boolean | undefined;\n hitLabels?: boolean | undefined;\n hitFrameInside?: boolean | undefined;\n filter?: ((shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ") => boolean) | undefined;\n }" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeAtPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeClipPath:member(1)", + "docComment": "/**\n * Get the clip path for a shape.\n *\n * @param shape - The shape (or shape id) to get the clip path for.\n *\n * @returns The clip path or undefined.\n *\n * @example\n * ```ts\n * const clipPath = editor.getShapeClipPath(shape)\n * const clipPath = editor.getShapeClipPath(shape.id)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeClipPath(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeClipPath" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeGeometry:member(1)", + "docComment": "/**\n * Get the geometry of a shape.\n *\n * @param shape - The shape (or shape id) to get the geometry for.\n *\n * @example\n * ```ts\n * editor.getShapeGeometry(myShape)\n * editor.getShapeGeometry(myShapeId)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeGeometry(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeGeometry" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeHandles:member(1)", + "docComment": "/**\n * Get the handles (if any) for a shape.\n *\n * @param shape - The shape (or shape id) to get the handles for.\n *\n * @example\n * ```ts\n * editor.getShapeHandles(myShape)\n * editor.getShapeHandles(myShapeId)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeHandles(shape: " + }, + { + "kind": "Content", + "text": "T | T['id']" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLHandle", + "canonicalReference": "@tldraw/tlschema!TLHandle:interface" + }, + { + "kind": "Content", + "text": "[] | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeHandles" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeLocalTransform:member(1)", + "docComment": "/**\n * Get the local transform for a shape as a matrix model. This transform reflects both its translation (x, y) from from either its parent's top left corner, if the shape's parent is another shape, or else from the 0,0 of the page, if the shape's parent is the page; and the shape's rotation.\n *\n * @param shape - The shape to get the local transform for.\n *\n * @example\n * ```ts\n * editor.getShapeLocalTransform(myShape)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeLocalTransform(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeLocalTransform" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeMask:member(1)", + "docComment": "/**\n * Get the mask (in the current page space) for a shape.\n *\n * @param id - The id of the shape to get the mask for.\n *\n * @returns The mask for the shape.\n *\n * @example\n * ```ts\n * const pageMask = editor.getShapeMask(shape.id)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeMask(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "undefined | " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeMask" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeMaskedPageBounds:member(1)", + "docComment": "/**\n * Get the bounds of a shape in the current page space, incorporating any masks. For example, if the shape were the child of a frame and was half way out of the frame, the bounds would be the half of the shape that was in the frame.\n *\n * @param shape - The shape to get the masked bounds for.\n *\n * @example\n * ```ts\n * editor.getShapeMaskedPageBounds(myShape)\n * editor.getShapeMaskedPageBounds(myShapeId)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeMaskedPageBounds(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeMaskedPageBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapePageBounds:member(1)", + "docComment": "/**\n * Get the bounds of a shape in the current page space.\n *\n * @param shape - The shape (or shape id) to get the bounds for.\n *\n * @example\n * ```ts\n * editor.getShapePageBounds(myShape)\n * editor.getShapePageBounds(myShapeId)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapePageBounds(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapePageBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapePageTransform:member(1)", + "docComment": "/**\n * Get the transform of a shape in the current page space.\n *\n * @param shape - The shape (or shape id) to get the page transform for.\n *\n * @example\n * ```ts\n * editor.getShapePageTransform(myShape)\n * editor.getShapePageTransform(myShapeId)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapePageTransform(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapePageTransform" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeParent:member(1)", + "docComment": "/**\n * Get the parent shape for a given shape. Returns undefined if the shape is the direct child of the page.\n *\n * @example\n * ```ts\n * editor.getShapeParent(myShape)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeParent(shape?: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeParent" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeParentTransform:member(1)", + "docComment": "/**\n * Get the local transform of a shape's parent as a matrix model.\n *\n * @param shape - The shape (or shape id) to get the parent transform for.\n *\n * @example\n * ```ts\n * editor.getShapeParentTransform(myShape)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeParentTransform(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeParentTransform" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapesAtPoint:member(1)", + "docComment": "/**\n * Get the shapes, if any, at a given page point.\n *\n * @param point - The page point to test.\n *\n * @example\n * ```ts\n * editor.getShapesAtPoint({ x: 100, y: 100 })\n * editor.getShapesAtPoint({ x: 100, y: 100 }, { hitInside: true, exact: true })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapesAtPoint(point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Content", + "text": "{\n margin?: number | undefined;\n hitInside?: boolean | undefined;\n }" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapesAtPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeStyleIfExists:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeStyleIfExists(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ", style: " + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "style", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeStyleIfExists" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeUtil:member(1)", + "docComment": "/**\n * Get a shape util from a shape itself.\n *\n * @param shape - A shape, shape partial, or shape type.\n *\n * @example\n * ```ts\n * const util = editor.getShapeUtil(myArrowShape)\n * const util = editor.getShapeUtil('arrow')\n * const util = editor.getShapeUtil(myArrowShape)\n * const util = editor.getShapeUtil(TLArrowShape)('arrow')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeUtil(shape: " + }, + { + "kind": "Content", + "text": "S | " + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "S", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeUtil" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeUtil:member(2)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeUtil(type: " + }, + { + "kind": "Content", + "text": "S['type']" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "S", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 2, + "parameters": [ + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeUtil" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getShapeUtil:member(3)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getShapeUtil(type: " + }, + { + "kind": "Content", + "text": "T extends " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": " ? R['type'] : string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 3, + "parameters": [ + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getShapeUtil" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getSharedOpacity:member(1)", + "docComment": "/**\n * Get the currently selected shared opacity. If any shapes are selected, this returns the shared opacity of the selected shapes. Otherwise, this returns the chosen opacity for the next shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSharedOpacity(): " + }, + { + "kind": "Reference", + "text": "SharedStyle", + "canonicalReference": "@tldraw/editor!SharedStyle:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getSharedOpacity" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getSharedStyles:member(1)", + "docComment": "/**\n * A map of all the current styles either in the current selection, or that are relevant to the current tool.\n *\n * @example\n * ```ts\n * const color = editor.getSharedStyles().get(DefaultColorStyle)\n * if (color && color.type === 'shared') {\n * print('All selected shapes have the same color:', color.value)\n * }\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSharedStyles(): " + }, + { + "kind": "Reference", + "text": "ReadonlySharedStyleMap", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getSharedStyles" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getSortedChildIdsForParent:member(1)", + "docComment": "/**\n * Get an array of all the children of a shape.\n *\n * @param parentId - The id of the parent shape.\n *\n * @example\n * ```ts\n * editor.getSortedChildIdsForParent('frame1')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSortedChildIdsForParent(parent: " + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "parent", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getSortedChildIdsForParent" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getStateDescendant:member(1)", + "docComment": "/**\n * Get a descendant by its path.\n *\n * @param path - The descendant's path of state ids, separated by periods.\n *\n * @example\n * ```ts\n * state.getStateDescendant('select')\n * state.getStateDescendant('select.brushing')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getStateDescendant(path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getStateDescendant" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getStyleForNextShape:member(1)", + "docComment": "/**\n * Get the style for the next shape.\n *\n * @param style - The style to get.\n *\n * @example\n * ```ts\n * const color = editor.getStyleForNextShape(DefaultColorStyle)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getStyleForNextShape(style: " + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "style", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getStyleForNextShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getSvg:member(1)", + "docComment": "/**\n * @deprecated\n *\n * Use {@link Editor.getSvgString} instead\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSvg(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLSvgOptions", + "canonicalReference": "@tldraw/editor!TLSvgOptions:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "SVGSVGElement", + "canonicalReference": "!SVGSVGElement:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 15 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 10 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getSvg" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getSvgString:member(1)", + "docComment": "/**\n * Get an exported SVG string of the given shapes.\n *\n * @param ids - The shapes (or shape ids) to export.\n *\n * @param opts - Options for the export.\n *\n * @returns The SVG element.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSvgString(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLSvgOptions", + "canonicalReference": "@tldraw/editor!TLSvgOptions:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<{\n svg: string;\n width: number;\n height: number;\n } | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 13 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 10 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getSvgString" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getViewportPageBounds:member(1)", + "docComment": "/**\n * The current viewport in the current page space.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getViewportPageBounds(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getViewportPageBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getViewportPageCenter:member(1)", + "docComment": "/**\n * The center of the viewport in the current page space.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getViewportPageCenter(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getViewportPageCenter" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getViewportScreenBounds:member(1)", + "docComment": "/**\n * The bounds of the editor's viewport in screen space.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getViewportScreenBounds(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getViewportScreenBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getViewportScreenCenter:member(1)", + "docComment": "/**\n * The center of the editor's viewport in screen space.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getViewportScreenCenter(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getViewportScreenCenter" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#getZoomLevel:member(1)", + "docComment": "/**\n * The current camera zoom level.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getZoomLevel(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getZoomLevel" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#groupShapes:member(1)", + "docComment": "/**\n * Create a group containing the provided shapes.\n *\n * @param shapes - The shapes (or shape ids) to group. Defaults to the selected shapes.\n *\n * @param groupId - The id of the group to create.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "groupShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", groupId?: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "groupId", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "groupShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#hasAncestor:member(1)", + "docComment": "/**\n * Returns true if the the given shape has the given ancestor.\n *\n * @param shape - The shape.\n *\n * @param ancestorId - The id of the ancestor.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hasAncestor(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ", ancestorId: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "ancestorId", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hasAncestor" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#history:member", + "docComment": "/**\n * A manager for the app's history.\n *\n * @readonly\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly history: " + }, + { + "kind": "Reference", + "text": "HistoryManager", + "canonicalReference": "@tldraw/editor!~HistoryManager:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "history", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#inputs:member", + "docComment": "/**\n * The app's current input state.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "inputs: " + }, + { + "kind": "Content", + "text": "{\n originPagePoint: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n originScreenPoint: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n previousPagePoint: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n previousScreenPoint: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n currentPagePoint: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n currentScreenPoint: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n keys: " + }, + { + "kind": "Reference", + "text": "Set", + "canonicalReference": "!Set:interface" + }, + { + "kind": "Content", + "text": ";\n buttons: " + }, + { + "kind": "Reference", + "text": "Set", + "canonicalReference": "!Set:interface" + }, + { + "kind": "Content", + "text": ";\n isPen: boolean;\n shiftKey: boolean;\n ctrlKey: boolean;\n altKey: boolean;\n isDragging: boolean;\n isPointing: boolean;\n isPinching: boolean;\n isEditing: boolean;\n isPanning: boolean;\n pointerVelocity: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "inputs", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 20 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#interrupt:member(1)", + "docComment": "/**\n * Dispatch an interrupt event.\n *\n * @example\n * ```ts\n * editor.interrupt()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "interrupt(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "interrupt" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#isAncestorSelected:member(1)", + "docComment": "/**\n * Determine whether or not any of a shape's ancestors are selected.\n *\n * @param id - The id of the shape to check.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isAncestorSelected(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isAncestorSelected" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#isIn:member(1)", + "docComment": "/**\n * Get whether a certain tool (or other state node) is currently active.\n *\n * @param path - The path of active states, separated by periods.\n *\n * @example\n * ```ts\n * editor.isIn('select')\n * editor.isIn('select.brushing')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isIn(path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isIn" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#isInAny:member(1)", + "docComment": "/**\n * Get whether the state node is in any of the given active paths.\n *\n * @example\n * ```ts\n * state.isInAny('select', 'erase')\n * state.isInAny('select.brushing', 'erase.idle')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isInAny(...paths: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "paths", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isInAny" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#isPointInShape:member(1)", + "docComment": "/**\n * Test whether a point (in the current page space) will will a shape. This method takes into account masks, such as when a shape is the child of a frame and is partially clipped by the frame.\n *\n * @param shape - The shape to test against.\n *\n * @param point - The page point to test (in the current page space).\n *\n * @param hitInside - Whether to count as a hit if the point is inside of a closed shape.\n *\n * @example\n * ```ts\n * editor.isPointInShape({ x: 100, y: 100 }, myShape)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isPointInShape(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ", point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Content", + "text": "{\n margin?: number | undefined;\n hitInside?: boolean | undefined;\n }" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isPointInShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#isShapeCulled:member(1)", + "docComment": "/**\n * Get whether the shape is culled or not.\n *\n * @param shape - The shape (or shape id) to get the culled info for.\n *\n * @example\n * ```ts\n * editor.isShapeCulled(myShape)\n * editor.isShapeCulled(myShapeId)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isShapeCulled(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isShapeCulled" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#isShapeInPage:member(1)", + "docComment": "/**\n * Get whether the given shape is the descendant of the given page.\n *\n * @param shape - The shape to check.\n *\n * @param pageId - The id of the page to check against. Defaults to the current page.\n *\n * @example\n * ```ts\n * editor.isShapeInPage(myShape)\n * editor.isShapeInPage(myShape, 'page1')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isShapeInPage(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ", pageId?: " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "pageId", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isShapeInPage" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#isShapeOfType:member(1)", + "docComment": "/**\n * Get whether a shape matches the type of a TLShapeUtil.\n *\n * @param util - the TLShapeUtil constructor to test against\n *\n * @param shape - the shape to test\n *\n * @example\n * ```ts\n * const isArrowShape = isShapeOfType(someShape, 'arrow')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isShapeOfType(shape: " + }, + { + "kind": "Reference", + "text": "TLUnknownShape", + "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" + }, + { + "kind": "Content", + "text": ", type: " + }, + { + "kind": "Content", + "text": "T['type']" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "shape", + "canonicalReference": "@tldraw/editor!~shape" + }, + { + "kind": "Content", + "text": " is T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isShapeOfType" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#isShapeOfType:member(2)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isShapeOfType(shapeId: " + }, + { + "kind": "Reference", + "text": "TLUnknownShape", + "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" + }, + { + "kind": "Content", + "text": "['id']" + }, + { + "kind": "Content", + "text": ", type: " + }, + { + "kind": "Content", + "text": "T['type']" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "shapeId", + "canonicalReference": "@tldraw/editor!~shapeId" + }, + { + "kind": "Content", + "text": " is T['id']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 2, + "parameters": [ + { + "parameterName": "shapeId", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isShapeOfType" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#isShapeOrAncestorLocked:member(1)", + "docComment": "/**\n * Check whether a shape or its parent is locked.\n *\n * @param shape - The shape (or shape id) to check.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isShapeOrAncestorLocked(shape?: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isShapeOrAncestorLocked" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#isShapeOrAncestorLocked:member(2)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isShapeOrAncestorLocked(id?: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 2, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isShapeOrAncestorLocked" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#mark:member(1)", + "docComment": "/**\n * Create a new \"mark\", or stopping point, in the undo redo history. Creating a mark will clear any redos.\n *\n * @param markId - The mark's id, usually the reason for adding the mark.\n *\n * @param onUndo - Whether to stop at the mark when undoing.\n *\n * @param onRedo - Whether to stop at the mark when redoing.\n *\n * @example\n * ```ts\n * editor.mark()\n * editor.mark('flip shapes')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "mark(markId?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", onUndo?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ", onRedo?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "markId", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + }, + { + "parameterName": "onUndo", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "onRedo", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "mark" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#moveShapesToPage:member(1)", + "docComment": "/**\n * Move shapes to page.\n *\n * @param shapes - The shapes (or shape ids) of the shapes to move.\n *\n * @param pageId - The id of the page where the shapes will be moved.\n *\n * @example\n * ```ts\n * editor.moveShapesToPage(['box1', 'box2'], 'page1')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "moveShapesToPage(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", pageId: " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "pageId", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "moveShapesToPage" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#nudgeShapes:member(1)", + "docComment": "/**\n * Move shapes by a delta.\n *\n * @param shapes - The shapes (or shape ids) to move.\n *\n * @param direction - The direction in which to move the shapes.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.nudgeShapes(['box1', 'box2'], { x: 8, y: 8 })\n * editor.nudgeShapes(editor.getSelectedShapes(), { x: 8, y: 8 }, { squashing: true })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "nudgeShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", offset: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", historyOptions?: " + }, + { + "kind": "Reference", + "text": "TLCommandHistoryOptions", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "offset", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "historyOptions", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "nudgeShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#packShapes:member(1)", + "docComment": "/**\n * Pack shapes into a grid centered on their current position. Based on potpack (https://github.com/mapbox/potpack).\n *\n * @param shapes - The shapes (or shape ids) to pack.\n *\n * @param gap - The padding to apply to the packed shapes. Defaults to 16.\n *\n * @example\n * ```ts\n * editor.packShapes([box1, box2], 32)\n * editor.packShapes(editor.getSelectedShapeIds(), 32)\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "packShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", gap: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "gap", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "packShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#pageToScreen:member(1)", + "docComment": "/**\n * Convert a point in the current page space to a point in current screen space.\n *\n * @param point - The point in page space.\n *\n * @example\n * ```ts\n * editor.pageToScreen({ x: 100, y: 100 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "pageToScreen(point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n x: number;\n y: number;\n z: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "pageToScreen" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#pageToViewport:member(1)", + "docComment": "/**\n * Convert a point in the current page space to a point in current viewport space.\n *\n * @param point - The point in page space.\n *\n * @example\n * ```ts\n * editor.pageToViewport({ x: 100, y: 100 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "pageToViewport(point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n x: number;\n y: number;\n z: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "pageToViewport" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#pan:member(1)", + "docComment": "/**\n * Pan the camera.\n *\n * @param offset - The offset in the current page space.\n *\n * @param animation - The animation options.\n *\n * @example\n * ```ts\n * editor.pan({ x: 100, y: 100 })\n * editor.pan({ x: 100, y: 100 }, { duration: 1000 })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "pan(offset: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", animation?: " + }, + { + "kind": "Reference", + "text": "TLAnimationOptions", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "offset", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "animation", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "pan" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#panZoomIntoView:member(1)", + "docComment": "/**\n * Pan or pan/zoom the selected ids into view. This method tries to not change the zoom if possible.\n *\n * @param ids - The ids of the shapes to pan and zoom into view.\n *\n * @param animation - The options for an animation.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "panZoomIntoView(ids: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", animation?: " + }, + { + "kind": "Reference", + "text": "TLAnimationOptions", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "ids", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "animation", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "panZoomIntoView" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#popFocusedGroupId:member(1)", + "docComment": "/**\n * Exit the current focused group, moving up to the next parent group if there is one.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "popFocusedGroupId(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "popFocusedGroupId" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#putContentOntoCurrentPage:member(1)", + "docComment": "/**\n * Place content into the editor.\n *\n * @param content - The content.\n *\n * @param options - Options for placing the content.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "putContentOntoCurrentPage(content: " + }, + { + "kind": "Reference", + "text": "TLContent", + "canonicalReference": "@tldraw/editor!TLContent:interface" + }, + { + "kind": "Content", + "text": ", options?: " + }, + { + "kind": "Content", + "text": "{\n point?: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ";\n select?: boolean;\n preservePosition?: boolean;\n preserveIds?: boolean;\n }" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "content", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "putContentOntoCurrentPage" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#putExternalContent:member(1)", + "docComment": "/**\n * Handle external content, such as files, urls, embeds, or plain text which has been put into the app, for example by pasting external text or dropping external images onto canvas.\n *\n * @param info - Info about the external content.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "putExternalContent(info: " + }, + { + "kind": "Reference", + "text": "TLExternalContent", + "canonicalReference": "@tldraw/editor!TLExternalContent:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "info", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "putExternalContent" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#redo:member(1)", + "docComment": "/**\n * Redo to the next mark.\n *\n * @example\n * ```ts\n * editor.redo()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "redo(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "redo" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#registerExternalAssetHandler:member(1)", + "docComment": "/**\n * Register an external content handler. This handler will be called when the editor receives external content of the provided type. For example, the 'image' type handler will be called when a user drops an image onto the canvas.\n *\n * @param type - The type of external content.\n *\n * @param handler - The handler to use for this content type.\n *\n * @example\n * ```ts\n * editor.registerExternalAssetHandler('text', myHandler)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "registerExternalAssetHandler(type: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "((info: " + }, + { + "kind": "Reference", + "text": "TLExternalAssetContent", + "canonicalReference": "@tldraw/editor!TLExternalAssetContent:type" + }, + { + "kind": "Content", + "text": " & {\n type: T;\n }) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLAsset", + "canonicalReference": "@tldraw/tlschema!TLAsset:type" + }, + { + "kind": "Content", + "text": ">) | null" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 14, + "endIndex": 15 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 13 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "registerExternalAssetHandler" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#registerExternalContentHandler:member(1)", + "docComment": "/**\n * Register an external content handler. This handler will be called when the editor receives external content of the provided type. For example, the 'image' type handler will be called when a user drops an image onto the canvas.\n *\n * @param type - The type of external content.\n *\n * @param handler - The handler to use for this content type.\n *\n * @example\n * ```ts\n * editor.registerExternalContentHandler('text', myHandler)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "registerExternalContentHandler(type: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "((info: T extends " + }, + { + "kind": "Reference", + "text": "TLExternalContent", + "canonicalReference": "@tldraw/editor!TLExternalContent:type" + }, + { + "kind": "Content", + "text": "['type'] ? " + }, + { + "kind": "Reference", + "text": "TLExternalContent", + "canonicalReference": "@tldraw/editor!TLExternalContent:type" + }, + { + "kind": "Content", + "text": " & {\n type: T;\n } : " + }, + { + "kind": "Reference", + "text": "TLExternalContent", + "canonicalReference": "@tldraw/editor!TLExternalContent:type" + }, + { + "kind": "Content", + "text": ") => void) | null" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 14, + "endIndex": 15 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 13 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "registerExternalContentHandler" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#renamePage:member(1)", + "docComment": "/**\n * Rename a page.\n *\n * @param id - The id of the page to rename.\n *\n * @param name - The new name.\n *\n * @example\n * ```ts\n * editor.renamePage('page1', 'My Page')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renamePage(page: " + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ", name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", historyOptions?: " + }, + { + "kind": "Reference", + "text": "TLCommandHistoryOptions", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "page", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "historyOptions", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renamePage" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#renderingBoundsMargin:member", + "docComment": "/**\n * The distance to expand the viewport when measuring culling. A larger distance will mean that shapes near to the viewport (but still outside of it) will not be culled.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderingBoundsMargin: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "renderingBoundsMargin", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#reparentShapes:member(1)", + "docComment": "/**\n * Reparent shapes to a new parent. This operation preserves the shape's current page positions / rotations.\n *\n * @param shapes - The shapes (or shape ids) of the shapes to reparent.\n *\n * @param parentId - The id of the new parent shape.\n *\n * @param insertIndex - The index to insert the children.\n *\n * @example\n * ```ts\n * editor.reparentShapes([box1, box2], 'frame1')\n * editor.reparentShapes([box1.id, box2.id], 'frame1')\n * editor.reparentShapes([box1.id, box2.id], 'frame1', 4)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "reparentShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", parentId: " + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ", insertIndex?: " + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "parentId", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "insertIndex", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "reparentShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#resetZoom:member(1)", + "docComment": "/**\n * Set the zoom back to 100%.\n *\n * @param point - The screen point to zoom out on. Defaults to the viewport screen center.\n *\n * @param animation - The options for an animation.\n *\n * @example\n * ```ts\n * editor.resetZoom()\n * editor.resetZoom(editor.getViewportScreenCenter(), { duration: 200 })\n * editor.resetZoom(editor.getViewportScreenCenter(), { duration: 200 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "resetZoom(point?: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", animation?: " + }, + { + "kind": "Reference", + "text": "TLAnimationOptions", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + }, + { + "parameterName": "animation", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "resetZoom" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#resizeShape:member(1)", + "docComment": "/**\n * Resize a shape.\n *\n * @param id - The id of the shape to resize.\n *\n * @param scale - The scale factor to apply to the shape.\n *\n * @param options - Additional options.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "resizeShape(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ", scale: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", options?: " + }, + { + "kind": "Reference", + "text": "TLResizeShapeOptions", + "canonicalReference": "@tldraw/editor!TLResizeShapeOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "scale", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "resizeShape" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#root:member", + "docComment": "/**\n * The root state of the statechart.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly root: " + }, + { + "kind": "Reference", + "text": "RootState", + "canonicalReference": "@tldraw/editor!~RootState:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "root", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#rotateShapesBy:member(1)", + "docComment": "/**\n * Rotate shapes by a delta in radians. Note: Currently, this assumes that the shapes are your currently selected shapes.\n *\n * @param shapes - The shapes (or shape ids) of the shapes to move.\n *\n * @param delta - The delta in radians to apply to the selection rotation.\n *\n * @example\n * ```ts\n * editor.rotateShapesBy(editor.getSelectedShapeIds(), Math.PI)\n * editor.rotateShapesBy(editor.getSelectedShapeIds(), Math.PI / 2)\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "rotateShapesBy(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", delta: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "delta", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "rotateShapesBy" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#screenToPage:member(1)", + "docComment": "/**\n * Convert a point in screen space to a point in the current page space.\n *\n * @param point - The point in screen space.\n *\n * @example\n * ```ts\n * editor.screenToPage({ x: 100, y: 100 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "screenToPage(point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n x: number;\n y: number;\n z: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "screenToPage" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#scribbles:member", + "docComment": "/**\n * A manager for the editor's scribbles.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly scribbles: " + }, + { + "kind": "Reference", + "text": "ScribbleManager", + "canonicalReference": "@tldraw/editor!~ScribbleManager:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "scribbles", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#select:member(1)", + "docComment": "/**\n * Select one or more shapes.\n *\n * @param ids - The ids to select.\n *\n * @example\n * ```ts\n * editor.select('id1')\n * editor.select('id1', 'id2')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "select(...shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "select" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#selectAll:member(1)", + "docComment": "/**\n * Select all direct children of the current page.\n *\n * @example\n * ```ts\n * editor.selectAll()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "selectAll(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "selectAll" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#selectNone:member(1)", + "docComment": "/**\n * Clear the selection.\n *\n * @example\n * ```ts\n * editor.selectNone()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "selectNone(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "selectNone" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#sendBackward:member(1)", + "docComment": "/**\n * Send shapes backward in the page's object list.\n *\n * @param shapes - The shapes (or shape ids) to move.\n *\n * @example\n * ```ts\n * editor.sendBackward(['id1', 'id2'])\n * editor.sendBackward([box1, box2])\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "sendBackward(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "sendBackward" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#sendToBack:member(1)", + "docComment": "/**\n * Send shapes to the back of the page's object list.\n *\n * @param shapes - The shapes (or shape ids) to move.\n *\n * @example\n * ```ts\n * editor.sendToBack(['id1', 'id2'])\n * editor.sendToBack(box1, box2)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "sendToBack(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "sendToBack" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setCamera:member(1)", + "docComment": "/**\n * Set the current camera.\n *\n * @param point - The new camera position.\n *\n * @param animation - Options for an animation.\n *\n * @example\n * ```ts\n * editor.setCamera({ x: 0, y: 0})\n * editor.setCamera({ x: 0, y: 0, z: 1.5})\n * editor.setCamera({ x: 0, y: 0, z: 1.5}, { duration: 1000, easing: (t) => t * t })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setCamera(point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", animation?: " + }, + { + "kind": "Reference", + "text": "TLAnimationOptions", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "animation", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setCamera" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setCroppingShape:member(1)", + "docComment": "/**\n * Set the current cropping shape.\n *\n * @param shape - The shape (or shape id) to set as cropping.\n *\n * @example\n * ```ts\n * editor.setCroppingShape(myShape)\n * editor.setCroppingShape(myShape.id)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setCroppingShape(shape: " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setCroppingShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setCurrentPage:member(1)", + "docComment": "/**\n * Set the current page.\n *\n * @param page - The page (or page id) to set as the current page.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setCurrentPage('page1')\n * editor.setCurrentPage(myPage1)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setCurrentPage(page: " + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ", historyOptions?: " + }, + { + "kind": "Reference", + "text": "TLCommandHistoryOptions", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "page", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "historyOptions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setCurrentPage" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setCurrentTool:member(1)", + "docComment": "/**\n * Set the selected tool.\n *\n * @param id - The id of the tool to select.\n *\n * @param info - Arbitrary data to pass along into the transition.\n *\n * @example\n * ```ts\n * editor.setCurrentTool('hand')\n * editor.setCurrentTool('hand', { date: Date.now() })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setCurrentTool(id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", info?: " + }, + { + "kind": "Content", + "text": "{}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "info", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setCurrentTool" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#setCursor:member", + "docComment": "/**\n * Set the cursor.\n *\n * @param type - The cursor type.\n *\n * @param rotation - The cursor rotation.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setCursor: " + }, + { + "kind": "Content", + "text": "(cursor: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLCursor", + "canonicalReference": "@tldraw/tlschema!TLCursor:interface" + }, + { + "kind": "Content", + "text": ">) => this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "setCursor", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setEditingShape:member(1)", + "docComment": "/**\n * Set the current editing shape.\n *\n * @param shape - The shape (or shape id) to set as editing.\n *\n * @example\n * ```ts\n * editor.setEditingShape(myShape)\n * editor.setEditingShape(myShape.id)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setEditingShape(shape: " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setEditingShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setErasingShapes:member(1)", + "docComment": "/**\n * Set the editor's current erasing shapes.\n *\n * @param shapes - The shapes (or shape ids) to set as hinting.\n *\n * @example\n * ```ts\n * editor.setErasingShapes([myShape])\n * editor.setErasingShapes([myShape.id])\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setErasingShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setErasingShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setFocusedGroup:member(1)", + "docComment": "/**\n * Set the current focused group shape.\n *\n * @param shape - The group shape id (or group shape's id) to set as the focused group shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setFocusedGroup(shape: " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLGroupShape", + "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setFocusedGroup" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setHintingShapes:member(1)", + "docComment": "/**\n * Set the editor's current hinting shapes.\n *\n * @param shapes - The shapes (or shape ids) to set as hinting.\n *\n * @example\n * ```ts\n * editor.setHintingShapes([myShape])\n * editor.setHintingShapes([myShape.id])\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setHintingShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setHintingShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setHoveredShape:member(1)", + "docComment": "/**\n * Set the editor's current hovered shape.\n *\n * @param shapes - The shape (or shape id) to set as hovered.\n *\n * @example\n * ```ts\n * editor.setHoveredShape(myShape)\n * editor.setHoveredShape(myShape.id)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setHoveredShape(shape: " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setHoveredShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setOpacityForNextShapes:member(1)", + "docComment": "/**\n * Set the opacity for the next shapes. This will effect subsequently created shapes.\n *\n * @param opacity - The opacity to set. Must be a number between 0 and 1 inclusive.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setOpacityForNextShapes(0.5)\n * editor.setOpacityForNextShapes(0.5, { squashing: true })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setOpacityForNextShapes(opacity: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", historyOptions?: " + }, + { + "kind": "Reference", + "text": "TLCommandHistoryOptions", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "opacity", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "historyOptions", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setOpacityForNextShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setOpacityForSelectedShapes:member(1)", + "docComment": "/**\n * Set the current opacity. This will effect any selected shapes.\n *\n * @param opacity - The opacity to set. Must be a number between 0 and 1 inclusive.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setOpacityForSelectedShapes(0.5)\n * editor.setOpacityForSelectedShapes(0.5, { squashing: true })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setOpacityForSelectedShapes(opacity: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", historyOptions?: " + }, + { + "kind": "Reference", + "text": "TLCommandHistoryOptions", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "opacity", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "historyOptions", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setOpacityForSelectedShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setSelectedShapes:member(1)", + "docComment": "/**\n * Select one or more shapes.\n *\n * @param ids - The ids to select.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setSelectedShapes(['id1'])\n * editor.setSelectedShapes(['id1', 'id2'])\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setSelectedShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", historyOptions?: " + }, + { + "kind": "Reference", + "text": "TLCommandHistoryOptions", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "historyOptions", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setSelectedShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setStyleForNextShapes:member(1)", + "docComment": "/**\n * Set the value of a {@link @tldraw/tlschema#StyleProp} for the next shapes. This change will be applied to subsequently created shapes.\n *\n * @param style - The style to set.\n *\n * @param value - The value to set.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setStyleForNextShapes(DefaultColorStyle, 'red')\n * editor.setStyleForNextShapes(DefaultColorStyle, 'red', { ephemeral: true })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setStyleForNextShapes(style: " + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", value: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", historyOptions?: " + }, + { + "kind": "Reference", + "text": "TLCommandHistoryOptions", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "style", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "historyOptions", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setStyleForNextShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#setStyleForSelectedShapes:member(1)", + "docComment": "/**\n * Set the value of a {@link @tldraw/tlschema#StyleProp}. This change will be applied to the currently selected shapes.\n *\n * @param style - The style to set.\n *\n * @param value - The value to set.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setStyleForSelectedShapes(DefaultColorStyle, 'red')\n * editor.setStyleForSelectedShapes(DefaultColorStyle, 'red', { ephemeral: true })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setStyleForSelectedShapes" + }, + { + "kind": "Content", + "text": ">(style: " + }, + { + "kind": "Content", + "text": "S" + }, + { + "kind": "Content", + "text": ", value: " + }, + { + "kind": "Reference", + "text": "StylePropValue", + "canonicalReference": "@tldraw/tlschema!StylePropValue:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", historyOptions?: " + }, + { + "kind": "Reference", + "text": "TLCommandHistoryOptions", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "S", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "style", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "historyOptions", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setStyleForSelectedShapes" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#shapeUtils:member", + "docComment": "/**\n * A map of shape utility classes (TLShapeUtils) by shape type.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapeUtils: " + }, + { + "kind": "Content", + "text": "{\n readonly [K in string]?: " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUnknownShape", + "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" + }, + { + "kind": "Content", + "text": ">;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "shapeUtils", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#sideEffects:member", + "docComment": "/**\n * A manager for side effects and correct state enforcement. See {@link SideEffectManager} for details.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly sideEffects: " + }, + { + "kind": "Reference", + "text": "SideEffectManager", + "canonicalReference": "@tldraw/editor!SideEffectManager:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "sideEffects", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#slideCamera:member(1)", + "docComment": "/**\n * Slide the camera in a certain direction.\n *\n * @param opts - Options for the slide\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "slideCamera(opts?: " + }, + { + "kind": "Content", + "text": "{\n speed: number;\n direction: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ";\n friction: number;\n speedThreshold?: number | undefined;\n }" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "slideCamera" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#snaps:member", + "docComment": "/**\n * A manager for the app's snapping feature.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly snaps: " + }, + { + "kind": "Reference", + "text": "SnapManager", + "canonicalReference": "@tldraw/editor!SnapManager:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "snaps", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#stackShapes:member(1)", + "docComment": "/**\n * Stack shape.\n *\n * @param shapes - The shapes (or shape ids) to stack.\n *\n * @param operation - Whether to stack horizontally or vertically.\n *\n * @param gap - The gap to leave between shapes.\n *\n * @example\n * ```ts\n * editor.stackShapes([box1, box2], 'horizontal', 32)\n * editor.stackShapes(editor.getSelectedShapeIds(), 'horizontal', 32)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "stackShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", operation: " + }, + { + "kind": "Content", + "text": "'horizontal' | 'vertical'" + }, + { + "kind": "Content", + "text": ", gap: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "operation", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "gap", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "stackShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#startFollowingUser:member(1)", + "docComment": "/**\n * Start viewport-following a user.\n *\n * @param userId - The id of the user to follow.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "startFollowingUser(userId: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "userId", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "startFollowingUser" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#stopCameraAnimation:member(1)", + "docComment": "/**\n * Stop the current camera animation, if any.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "stopCameraAnimation(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "stopCameraAnimation" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#stopFollowingUser:member(1)", + "docComment": "/**\n * Stop viewport-following a user.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "stopFollowingUser(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "stopFollowingUser" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#store:member", + "docComment": "/**\n * The editor's store\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "store", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#stretchShapes:member(1)", + "docComment": "/**\n * Stretch shape sizes and positions to fill their common bounding box.\n *\n * @param shapes - The shapes (or shape ids) to stretch.\n *\n * @param operation - Whether to stretch shapes horizontally or vertically.\n *\n * @example\n * ```ts\n * editor.stretchShapes([box1, box2], 'horizontal')\n * editor.stretchShapes(editor.getSelectedShapeIds(), 'horizontal')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "stretchShapes(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", operation: " + }, + { + "kind": "Content", + "text": "'horizontal' | 'vertical'" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "operation", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "stretchShapes" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#styleProps:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "styleProps: " + }, + { + "kind": "Content", + "text": "{\n [key: string]: " + }, + { + "kind": "Reference", + "text": "Map", + "canonicalReference": "!Map:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": ", string>;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "styleProps", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#textMeasure:member", + "docComment": "/**\n * A helper for measuring text.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly textMeasure: " + }, + { + "kind": "Reference", + "text": "TextManager", + "canonicalReference": "@tldraw/editor!~TextManager:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "textMeasure", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#toggleLock:member(1)", + "docComment": "/**\n * Toggle the lock state of one or more shapes. If there is a mix of locked and unlocked shapes, all shapes will be locked.\n *\n * @param shapes - The shapes (or shape ids) to toggle.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "toggleLock(shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toggleLock" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#undo:member(1)", + "docComment": "/**\n * Undo to the last mark.\n *\n * @example\n * ```ts\n * editor.undo()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "undo(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "undo" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#ungroupShapes:member(1)", + "docComment": "/**\n * Ungroup some shapes.\n *\n * @param ids - Ids of the shapes to ungroup. Defaults to the selected shapes.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "ungroupShapes(ids: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "ids", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "ungroupShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#ungroupShapes:member(2)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "ungroupShapes(ids: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 2, + "parameters": [ + { + "parameterName": "ids", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "ungroupShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#updateAssets:member(1)", + "docComment": "/**\n * Update one or more assets.\n *\n * @param assets - The assets to update.\n *\n * @example\n * ```ts\n * editor.updateAssets([{ id: 'asset1', name: 'New name' }])\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "updateAssets(assets: " + }, + { + "kind": "Reference", + "text": "TLAssetPartial", + "canonicalReference": "@tldraw/tlschema!TLAssetPartial:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "assets", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "updateAssets" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#updateCurrentPageState:member(1)", + "docComment": "/**\n * Update this instance's page state.\n *\n * @param partial - The partial of the page state object containing the changes.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.updateCurrentPageState({ id: 'page1', editingShapeId: 'shape:123' })\n * editor.updateCurrentPageState({ id: 'page1', editingShapeId: 'shape:123' }, { ephemeral: true })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "updateCurrentPageState(partial: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLInstancePageState", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState:interface" + }, + { + "kind": "Content", + "text": ", 'editingShapeId' | 'focusedGroupId' | 'pageId' | 'selectedShapeIds'>>" + }, + { + "kind": "Content", + "text": ", historyOptions?: " + }, + { + "kind": "Reference", + "text": "TLCommandHistoryOptions", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "partial", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "historyOptions", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "updateCurrentPageState" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#updateDocumentSettings:member(1)", + "docComment": "/**\n * Update the global document settings that apply to all users.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "updateDocumentSettings(settings: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLDocument", + "canonicalReference": "@tldraw/tlschema!TLDocument:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "settings", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "updateDocumentSettings" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#updateInstanceState:member(1)", + "docComment": "/**\n * Update the instance's state.\n *\n * @param partial - A partial object to update the instance state with.\n *\n * @param historyOptions - The history options for the change.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "updateInstanceState(partial: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLInstance", + "canonicalReference": "@tldraw/tlschema!TLInstance:interface" + }, + { + "kind": "Content", + "text": ", 'currentPageId'>>" + }, + { + "kind": "Content", + "text": ", historyOptions?: " + }, + { + "kind": "Reference", + "text": "TLCommandHistoryOptions", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "partial", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "historyOptions", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "updateInstanceState" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#updatePage:member(1)", + "docComment": "/**\n * Update a page.\n *\n * @param partial - The partial of the shape to update.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.updatePage({ id: 'page2', name: 'Page 2' })\n * editor.updatePage({ id: 'page2', name: 'Page 2' }, { squashing: true })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "updatePage(partial: " + }, + { + "kind": "Reference", + "text": "RequiredKeys", + "canonicalReference": "@tldraw/editor!RequiredKeys:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": ", 'id'>" + }, + { + "kind": "Content", + "text": ", historyOptions?: " + }, + { + "kind": "Reference", + "text": "TLCommandHistoryOptions", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "partial", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "historyOptions", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "updatePage" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#updateShape:member(1)", + "docComment": "/**\n * Update a shape using a partial of the shape.\n *\n * @param partial - The shape partial to update.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.updateShape({ id: 'box1', type: 'geo', props: { w: 100, h: 100 } })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "updateShape(partial: " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ", historyOptions?: " + }, + { + "kind": "Reference", + "text": "TLCommandHistoryOptions", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "partial", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "historyOptions", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "updateShape" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#updateShapes:member(1)", + "docComment": "/**\n * Update shapes using partials of each shape.\n *\n * @param partials - The shape partials to update.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.updateShapes([{ id: 'box1', type: 'geo', props: { w: 100, h: 100 } }])\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "updateShapes(partials: " + }, + { + "kind": "Content", + "text": "(null | " + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": " | undefined)[]" + }, + { + "kind": "Content", + "text": ", historyOptions?: " + }, + { + "kind": "Reference", + "text": "TLCommandHistoryOptions", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "partials", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "historyOptions", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "updateShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#updateViewportScreenBounds:member(1)", + "docComment": "/**\n * Update the viewport. The viewport will measure the size and screen position of its container element. This should be done whenever the container's position on the screen changes.\n *\n * @param center - Whether to preserve the viewport page center as the viewport changes.\n *\n * @example\n * ```ts\n * editor.updateViewportScreenBounds()\n * editor.updateViewportScreenBounds(true)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "updateViewportScreenBounds(screenBounds: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ", center?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "screenBounds", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "center", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "updateViewportScreenBounds" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Editor#user:member", + "docComment": "/**\n * A manager for the user and their preferences.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly user: " + }, + { + "kind": "Reference", + "text": "UserPreferencesManager", + "canonicalReference": "@tldraw/editor!~UserPreferencesManager:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "user", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#visitDescendants:member(1)", + "docComment": "/**\n * Run a visitor function for all descendants of a shape.\n *\n * @param parentId - The id of the parent shape.\n *\n * @param visitor - The visitor function.\n *\n * @example\n * ```ts\n * editor.visitDescendants('frame1', myCallback)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "visitDescendants(parent: " + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ", visitor: " + }, + { + "kind": "Content", + "text": "(id: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ") => false | void" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "parent", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "visitor", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "visitDescendants" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#zoomIn:member(1)", + "docComment": "/**\n * Zoom the camera in.\n *\n * @param animation - The options for an animation.\n *\n * @example\n * ```ts\n * editor.zoomIn()\n * editor.zoomIn(editor.getViewportScreenCenter(), { duration: 120 })\n * editor.zoomIn(editor.inputs.currentScreenPoint, { duration: 120 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "zoomIn(point?: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", animation?: " + }, + { + "kind": "Reference", + "text": "TLAnimationOptions", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + }, + { + "parameterName": "animation", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "zoomIn" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#zoomOut:member(1)", + "docComment": "/**\n * Zoom the camera out.\n *\n * @param animation - The options for an animation.\n *\n * @example\n * ```ts\n * editor.zoomOut()\n * editor.zoomOut(editor.getViewportScreenCenter(), { duration: 120 })\n * editor.zoomOut(editor.inputs.currentScreenPoint, { duration: 120 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "zoomOut(point?: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", animation?: " + }, + { + "kind": "Reference", + "text": "TLAnimationOptions", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + }, + { + "parameterName": "animation", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "zoomOut" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#zoomToBounds:member(1)", + "docComment": "/**\n * Zoom the camera to fit a bounding box (in the current page space).\n *\n * @param bounds - The bounding box.\n *\n * @param options - The options for an animation, target zoom, or custom inset amount.\n *\n * @example\n * ```ts\n * editor.zoomToBounds(myBounds)\n * editor.zoomToBounds(myBounds)\n * editor.zoomToBounds(myBounds, { duration: 100 })\n * editor.zoomToBounds(myBounds, { inset: 0, targetZoom: 1 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "zoomToBounds(bounds: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Content", + "text": "{\n targetZoom?: number;\n inset?: number;\n } & " + }, + { + "kind": "Reference", + "text": "TLAnimationOptions", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "bounds", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "zoomToBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#zoomToContent:member(1)", + "docComment": "/**\n * Move the camera to the nearest content.\n *\n * @param opts - The options for an animation.\n *\n * @example\n * ```ts\n * editor.zoomToContent()\n * editor.zoomToContent({ duration: 200 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "zoomToContent(opts?: " + }, + { + "kind": "Reference", + "text": "TLAnimationOptions", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "zoomToContent" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#zoomToFit:member(1)", + "docComment": "/**\n * Zoom the camera to fit the current page's content in the viewport.\n *\n * @param animation - The options for an animation.\n *\n * @example\n * ```ts\n * editor.zoomToFit()\n * editor.zoomToFit({ duration: 200 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "zoomToFit(animation?: " + }, + { + "kind": "Reference", + "text": "TLAnimationOptions", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "animation", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "zoomToFit" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Editor#zoomToSelection:member(1)", + "docComment": "/**\n * Zoom the camera to fit the current selection in the viewport.\n *\n * @param animation - The options for an animation.\n *\n * @example\n * ```ts\n * editor.zoomToSelection()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "zoomToSelection(animation?: " + }, + { + "kind": "Reference", + "text": "TLAnimationOptions", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "animation", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "zoomToSelection" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Ellipse2d:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Ellipse2d extends " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Ellipse2d.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Ellipse2d", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Ellipse2d#_edges:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "_edges?: " + }, + { + "kind": "Reference", + "text": "Edge2d", + "canonicalReference": "@tldraw/editor!Edge2d:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "_edges", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Ellipse2d:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Ellipse2d` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed'> & {\n width: number;\n height: number;\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Ellipse2d#config:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed'> & {\n width: number;\n height: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "config", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Ellipse2d#edges:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get edges(): " + }, + { + "kind": "Reference", + "text": "Edge2d", + "canonicalReference": "@tldraw/editor!Edge2d:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "edges", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Ellipse2d#getBounds:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getBounds(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Ellipse2d#getVertices:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getVertices(): " + }, + { + "kind": "Content", + "text": "any[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getVertices" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Ellipse2d#h:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "h: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "h", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Ellipse2d#hitTestLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hitTestLineSegment(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", zoom: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "zoom", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hitTestLineSegment" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Ellipse2d#nearestPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "nearestPoint(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "nearestPoint" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Ellipse2d#w:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "w: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "w", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!ErrorBoundary:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ErrorBoundary extends " + }, + { + "kind": "Reference", + "text": "React.Component", + "canonicalReference": "@types/react!React.Component:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "React.PropsWithRef", + "canonicalReference": "@types/react!React.PropsWithRef:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "React.PropsWithChildren", + "canonicalReference": "@types/react!React.PropsWithChildren:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLErrorBoundaryProps", + "canonicalReference": "@tldraw/editor!TLErrorBoundaryProps:interface" + }, + { + "kind": "Content", + "text": ">>, " + }, + { + "kind": "Reference", + "text": "TLErrorBoundaryState", + "canonicalReference": "@tldraw/editor!~TLErrorBoundaryState:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/components/ErrorBoundary.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "ErrorBoundary", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ErrorBoundary#componentDidCatch:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "componentDidCatch(error: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "error", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "componentDidCatch" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ErrorBoundary.getDerivedStateFromError:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static getDerivedStateFromError(error: " + }, + { + "kind": "Reference", + "text": "Error", + "canonicalReference": "!Error:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n error: " + }, + { + "kind": "Reference", + "text": "Error", + "canonicalReference": "!Error:interface" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "error", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getDerivedStateFromError" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ErrorBoundary#render:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "render(): " + }, + { + "kind": "Content", + "text": "boolean | import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "Iterable", + "canonicalReference": "!Iterable:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": "> | null | number | string | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "render" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ErrorBoundary#state:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "state: " + }, + { + "kind": "Reference", + "text": "TLErrorBoundaryState", + "canonicalReference": "@tldraw/editor!~TLErrorBoundaryState:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "state", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 11 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!ErrorScreen:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ErrorScreen({ children }: " + }, + { + "kind": "Content", + "text": "{\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "ErrorScreen" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!EVENT_NAME_MAP:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "EVENT_NAME_MAP: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Exclude", + "canonicalReference": "!Exclude:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLEventName", + "canonicalReference": "@tldraw/editor!TLEventName:type" + }, + { + "kind": "Content", + "text": ", " + }, + { + "kind": "Reference", + "text": "TLPinchEventName", + "canonicalReference": "@tldraw/editor!TLPinchEventName:type" + }, + { + "kind": "Content", + "text": ">, keyof " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "EVENT_NAME_MAP", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 11 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!GapsSnapIndicator:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type GapsSnapIndicator = " + }, + { + "kind": "Content", + "text": "{\n id: string;\n type: 'gaps';\n direction: 'horizontal' | 'vertical';\n gaps: " + }, + { + "kind": "Reference", + "text": "Array", + "canonicalReference": "!Array:interface" + }, + { + "kind": "Content", + "text": "<{\n startEdge: [" + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "];\n endEdge: [" + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "];\n }>;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/SnapManager.ts", + "releaseTag": "Public", + "name": "GapsSnapIndicator", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 12 + } + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Geometry2d:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare abstract class Geometry2d " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Geometry2d.ts", + "releaseTag": "Public", + "isAbstract": true, + "name": "Geometry2d", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Geometry2d:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Geometry2d` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(opts: " + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Geometry2d#area:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get area(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "area", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Geometry2d#bounds:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get bounds(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "bounds", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Geometry2d#center:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get center(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "center", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Geometry2d#debugColor:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "debugColor?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "debugColor", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Geometry2d#distanceToLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "distanceToLineSegment(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "distanceToLineSegment" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Geometry2d#distanceToPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "distanceToPoint(point: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", hitInside?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "hitInside", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "distanceToPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Geometry2d#getArea:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getArea(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getArea" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Geometry2d#getBounds:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getBounds(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Geometry2d#getVertices:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "abstract getVertices(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": true, + "name": "getVertices" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Geometry2d#hitTestLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hitTestLineSegment(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", distance?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "distance", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hitTestLineSegment" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Geometry2d#hitTestPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hitTestPoint(point: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", margin?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", hitInside?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "margin", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "hitInside", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hitTestPoint" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Geometry2d#ignore:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "ignore?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "ignore", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Geometry2d#isClosed:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isClosed: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isClosed", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Geometry2d#isFilled:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isFilled: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isFilled", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Geometry2d#isLabel:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isLabel: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isLabel", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Geometry2d#isPointInBounds:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isPointInBounds(point: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", margin?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "margin", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isPointInBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Geometry2d#nearestPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "abstract nearestPoint(point: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": true, + "name": "nearestPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Geometry2d#nearestPointOnLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "nearestPointOnLineSegment(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "nearestPointOnLineSegment" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Geometry2d#toSimpleSvgPath:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toSimpleSvgPath(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "toSimpleSvgPath" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Geometry2d#vertices:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get vertices(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "vertices", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!getArcMeasure:function(1)", + "docComment": "/**\n * Get the measure of an arc.\n *\n * @param A - The angle from center to arc's start point (A) on the circle\n *\n * @param B - The angle from center to arc's end point (B) on the circle\n *\n * @param sweepFlag - 1 if the arc is clockwise, 0 if counter-clockwise\n *\n * @param largeArcFlag - 1 if the arc is greater than 180 degrees, 0 if less than 180 degrees\n *\n * @returns The measure of the arc, negative if counter-clockwise\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getArcMeasure(A: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", sweepFlag: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", largeArcFlag: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "sweepFlag", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "largeArcFlag", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + } + ], + "name": "getArcMeasure" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!getArrowTerminalsInArrowSpace:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getArrowTerminalsInArrowSpace(editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ", shape: " + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n start: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n end: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/shared/arrow/shared.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "editor", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "getArrowTerminalsInArrowSpace" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!getCursor:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getCursor(cursor: " + }, + { + "kind": "Reference", + "text": "TLCursorType", + "canonicalReference": "@tldraw/tlschema!TLCursorType:type" + }, + { + "kind": "Content", + "text": ", rotation?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", color?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/hooks/useCursor.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "cursor", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "rotation", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "color", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "name": "getCursor" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!getFreshUserPreferences:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getFreshUserPreferences(): " + }, + { + "kind": "Reference", + "text": "TLUserPreferences", + "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/config/TLUserPreferences.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "getFreshUserPreferences" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!getIncrementedName:function(1)", + "docComment": "/**\n * Get an incremented name (e.g. New page (2)) from a name (e.g. New page), based on an array of existing names.\n *\n * @param name - The name to increment.\n *\n * @param others - The array of existing names.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getIncrementedName(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", others: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/getIncrementedName.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "others", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "getIncrementedName" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!getPointerInfo:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getPointerInfo(e: " + }, + { + "kind": "Reference", + "text": "PointerEvent", + "canonicalReference": "!PointerEvent:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "React.PointerEvent", + "canonicalReference": "@types/react!React.PointerEvent:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n point: {\n x: number;\n y: number;\n z: number;\n };\n shiftKey: boolean;\n altKey: boolean;\n ctrlKey: boolean;\n pointerId: number;\n button: number;\n isPen: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/.tsbuild-api/lib/utils/getPointerInfo.d.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "e", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "getPointerInfo" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!getPointInArcT:function(1)", + "docComment": "/**\n * Returns the t value of the point on the arc.\n *\n * @param mAB - The measure of the arc from A to B, negative if counter-clockwise\n *\n * @param A - The angle from center to arc's start point (A) on the circle\n *\n * @param B - The angle from center to arc's end point (B) on the circle\n *\n * @param P - The angle on the circle (P) to find the t value for\n *\n * @returns The t value of the point on the arc, with 0 being the start and 1 being the end\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getPointInArcT(mAB: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", A: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", P: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "mAB", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "P", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + } + ], + "name": "getPointInArcT" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!getPointOnCircle:function(1)", + "docComment": "/**\n * Get a point on the perimeter of a circle.\n *\n * @param center - The center of the circle.\n *\n * @param r - The radius of the circle.\n *\n * @param a - The angle in radians.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getPointOnCircle(center: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", r: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", a: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "center", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "name": "getPointOnCircle" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!getPolygonVertices:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getPolygonVertices(width: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", height: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", sides: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "width", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "height", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "sides", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "name": "getPolygonVertices" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!getSvgPathFromPoints:function(1)", + "docComment": "/**\n * Turn an array of points into a path of quadradic curves.\n *\n * @param points - The points returned from perfect-freehand\n *\n * @param closed - Whether the stroke is closed\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getSvgPathFromPoints(points: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", closed?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/getSvgPathFromPoints.ts", + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "points", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "closed", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": true + } + ], + "name": "getSvgPathFromPoints" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!getUserPreferences:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getUserPreferences(): " + }, + { + "kind": "Reference", + "text": "TLUserPreferences", + "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/config/TLUserPreferences.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "getUserPreferences" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!GRID_STEPS:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "GRID_STEPS: " + }, + { + "kind": "Content", + "text": "{\n min: number;\n mid: number;\n step: number;\n}[]" + } + ], + "fileUrlPath": "packages/editor/src/lib/constants.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "GRID_STEPS", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Group2d:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Group2d extends " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Group2d.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Group2d", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Group2d:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Group2d` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed' | 'isFilled'> & {\n children: " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": "[];\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Group2d#children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "children: " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Group2d#distanceToPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "distanceToPoint(point: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", hitInside?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "hitInside", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "distanceToPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Group2d#getArea:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getArea(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getArea" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Group2d#getVertices:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getVertices(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getVertices" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Group2d#hitTestLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hitTestLineSegment(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", zoom: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "zoom", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hitTestLineSegment" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Group2d#hitTestPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hitTestPoint(point: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", margin: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", hitInside: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "margin", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "hitInside", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hitTestPoint" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Group2d#ignoredChildren:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "ignoredChildren: " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "ignoredChildren", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Group2d#nearestPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "nearestPoint(point: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "nearestPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Group2d#toSimpleSvgPath:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toSimpleSvgPath(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "toSimpleSvgPath" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!GroupShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class GroupShapeUtil extends " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLGroupShape", + "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/group/GroupShapeUtil.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "GroupShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!GroupShapeUtil#canBind:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canBind: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canBind", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!GroupShapeUtil#component:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component(shape: " + }, + { + "kind": "Reference", + "text": "TLGroupShape", + "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "component" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!GroupShapeUtil#getDefaultProps:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDefaultProps(): " + }, + { + "kind": "Reference", + "text": "TLGroupShape", + "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" + }, + { + "kind": "Content", + "text": "['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDefaultProps" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!GroupShapeUtil#getGeometry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getGeometry(shape: " + }, + { + "kind": "Reference", + "text": "TLGroupShape", + "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getGeometry" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!GroupShapeUtil#hideSelectionBoundsFg:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideSelectionBoundsFg: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideSelectionBoundsFg", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!GroupShapeUtil#indicator:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "indicator(shape: " + }, + { + "kind": "Reference", + "text": "TLGroupShape", + "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!GroupShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/tlschema\")." + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!GroupShapeUtil#onChildrenChange:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onChildrenChange: " + }, + { + "kind": "Reference", + "text": "TLOnChildrenChangeHandler", + "canonicalReference": "@tldraw/editor!TLOnChildrenChangeHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLGroupShape", + "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onChildrenChange", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!GroupShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/tlschema\")." + }, + { + "kind": "Reference", + "text": "ShapeProps", + "canonicalReference": "@tldraw/tlschema!ShapeProps:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLGroupShape", + "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!GroupShapeUtil.type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "\"group\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!HALF_PI:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "HALF_PI: " + }, + { + "kind": "Content", + "text": "number" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "HALF_PI", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!HandleSnapGeometry:interface", + "docComment": "/**\n * When dragging a handle, users can snap the handle to key geometry on other nearby shapes. Customize how handles snap to a shape by returning this from {@link ShapeUtil.getHandleSnapGeometry}.\n *\n * Any co-ordinates here should be in the shape's local space.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface HandleSnapGeometry " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/HandleSnaps.ts", + "releaseTag": "Public", + "name": "HandleSnapGeometry", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "@tldraw/editor!HandleSnapGeometry#getSelfSnapOutline:member(1)", + "docComment": "/**\n * By default, handles can't snap to their own shape because moving the handle might change the snapping location which can cause feedback loops. You can override this by returning a version of `outline` that won't be affected by the current handle's position to use for self-snapping.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSelfSnapOutline?(handle: " + }, + { + "kind": "Reference", + "text": "TLHandle", + "canonicalReference": "@tldraw/tlschema!TLHandle:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handle", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "getSelfSnapOutline" + }, + { + "kind": "MethodSignature", + "canonicalReference": "@tldraw/editor!HandleSnapGeometry#getSelfSnapPoints:member(1)", + "docComment": "/**\n * By default, handles can't snap to their own shape because moving the handle might change the snapping location which can cause feedback loops. You can override this by returning a version of `points` that won't be affected by the current handle's position to use for self-snapping.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSelfSnapPoints?(handle: " + }, + { + "kind": "Reference", + "text": "TLHandle", + "canonicalReference": "@tldraw/tlschema!TLHandle:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handle", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "getSelfSnapPoints" + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!HandleSnapGeometry#outline:member", + "docComment": "/**\n * A `Geometry2d` that describe the outline of the shape that the handle will snap to - fills are ignored. By default, this is the same geometry returned by {@link ShapeUtil.getGeometry}. Set this to `null` to disable handle snapping to this shape's outline.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "outline?: " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "outline", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!HandleSnapGeometry#points:member", + "docComment": "/**\n * Key points on the shape that the handle will snap to. For example, the corners of a rectangle, or the centroid of a triangle. By default, no points are used.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "points?: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "points", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!hardReset:function(1)", + "docComment": "/**\n * Clear the database of all data associated with tldraw.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function hardReset({ shouldReload }?: " + }, + { + "kind": "Content", + "text": "{\n shouldReload?: boolean | undefined;\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/sync/hardReset.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ shouldReload }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "name": "hardReset" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!hardResetEditor:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function hardResetEditor(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/hardResetEditor.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "hardResetEditor" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!HIT_TEST_MARGIN:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "HIT_TEST_MARGIN = " + }, + { + "kind": "Content", + "text": "8" + } + ], + "fileUrlPath": "packages/editor/src/lib/constants.ts", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isReadonly": true, + "releaseTag": "Public", + "name": "HIT_TEST_MARGIN", + "variableTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!HTMLContainer:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function HTMLContainer({ children, className, ...rest }: " + }, + { + "kind": "Reference", + "text": "HTMLContainerProps", + "canonicalReference": "@tldraw/editor!HTMLContainerProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/HTMLContainer.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children, className, ...rest }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "HTMLContainer" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!HTMLContainerProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type HTMLContainerProps = " + }, + { + "kind": "Reference", + "text": "React.HTMLAttributes", + "canonicalReference": "@types/react!React.HTMLAttributes:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "HTMLDivElement", + "canonicalReference": "!HTMLDivElement:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/HTMLContainer.tsx", + "releaseTag": "Public", + "name": "HTMLContainerProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!intersectCircleCircle:function(1)", + "docComment": "/**\n * Find the intersections between a circle and a circle.\n *\n * @param c1 - The first circle's center.\n *\n * @param r1 - The first circle's radius.\n *\n * @param c2 - The second circle's center.\n *\n * @param r2 - The second circle's radius.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function intersectCircleCircle(c1: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", r1: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", c2: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", r2: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "c1", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "r1", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "c2", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "r2", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + } + ], + "name": "intersectCircleCircle" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!intersectCirclePolygon:function(1)", + "docComment": "/**\n * Find the intersections between a circle and a bounding box.\n *\n * @param c - The circle's center.\n *\n * @param r - The circle's radius.\n *\n * @param points - The points in the polygon.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function intersectCirclePolygon(c: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", r: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", points: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "c", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "points", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "name": "intersectCirclePolygon" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!intersectCirclePolyline:function(1)", + "docComment": "/**\n * Find the intersections between a circle and a bounding box.\n *\n * @param c - The circle's center.\n *\n * @param r - The circle's radius.\n *\n * @param points - The points in the polyline.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function intersectCirclePolyline(c: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", r: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", points: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "c", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "points", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "name": "intersectCirclePolyline" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!intersectLineSegmentCircle:function(1)", + "docComment": "/**\n * Find the intersections between a line segment and a circle.\n *\n * @param a1 - The segment's first point.\n *\n * @param a2 - The segment's second point.\n *\n * @param c - The circle's center.\n *\n * @param r - The circle's radius.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function intersectLineSegmentCircle(a1: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", a2: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", c: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", r: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 12 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a1", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "a2", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "c", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + } + ], + "name": "intersectLineSegmentCircle" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!intersectLineSegmentLineSegment:function(1)", + "docComment": "/**\n * Find the intersection between a line segment and a line segment.\n *\n * @param a1 - The first segment's first point.\n *\n * @param a2 - The first segment's second point.\n *\n * @param b1 - The second segment's first point.\n *\n * @param b2 - The second segment's second point.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function intersectLineSegmentLineSegment(a1: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", a2: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", b1: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", b2: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a1", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "a2", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "b1", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "b2", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + } + ], + "name": "intersectLineSegmentLineSegment" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!intersectLineSegmentPolygon:function(1)", + "docComment": "/**\n * Find the intersections between a line segment and a closed polygon.\n *\n * @param a1 - The segment's first point.\n *\n * @param a2 - The segment's second point.\n *\n * @param points - The points in the polygon.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function intersectLineSegmentPolygon(a1: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", a2: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", points: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a1", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "a2", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "points", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "name": "intersectLineSegmentPolygon" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!intersectLineSegmentPolyline:function(1)", + "docComment": "/**\n * Find the intersections between a line segment and a polyline.\n *\n * @param a1 - The segment's first point.\n *\n * @param a2 - The segment's second point.\n *\n * @param points - The points in the polyline.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function intersectLineSegmentPolyline(a1: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", a2: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", points: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a1", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "a2", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "points", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "name": "intersectLineSegmentPolyline" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!intersectPolygonBounds:function(1)", + "docComment": "/**\n * Find the intersections between a polygon and a bounding box.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function intersectPolygonBounds(points: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", bounds: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 9 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "points", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "bounds", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + } + ], + "name": "intersectPolygonBounds" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!intersectPolygonPolygon:function(1)", + "docComment": "/**\n * Create a new convex polygon as the intersection of two convex polygons.\n *\n * @param polygonA - An array of points representing the first polygon.\n *\n * @param polygonB - An array of points representing the second polygon.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function intersectPolygonPolygon(polygonA: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", polygonB: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "polygonA", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "polygonB", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "isOptional": false + } + ], + "name": "intersectPolygonPolygon" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!isSafeFloat:function(1)", + "docComment": "/**\n * Check if a float is safe to use. ie: Not too big or small.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isSafeFloat: (n: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Content", + "text": "boolean" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "isSafeFloat" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!linesIntersect:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function linesIntersect(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", C: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", D: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "C", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "D", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + } + ], + "name": "linesIntersect" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!LoadingScreen:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function LoadingScreen({ children }: " + }, + { + "kind": "Content", + "text": "{\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "LoadingScreen" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!loadSessionStateSnapshotIntoStore:function(1)", + "docComment": "/**\n * Loads a snapshot of the editor's instance state into the store of a new editor instance.\n *\n * @param store - The store to load the instance state into\n *\n * @param snapshot - The instance state snapshot to load\n *\n * @returns \n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function loadSessionStateSnapshotIntoStore(store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": ", snapshot: " + }, + { + "kind": "Reference", + "text": "TLSessionStateSnapshot", + "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/config/TLSessionStateSnapshot.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "store", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "snapshot", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "loadSessionStateSnapshotIntoStore" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!loopToHtmlElement:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function loopToHtmlElement(elm: " + }, + { + "kind": "Reference", + "text": "Element", + "canonicalReference": "!Element:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "HTMLElement", + "canonicalReference": "!HTMLElement:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/dom.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "elm", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "loopToHtmlElement" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Mat:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Mat " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/Mat.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Mat", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Mat:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Mat` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(a: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", b: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", c: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", d: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", e: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", f: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "b", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "c", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "d", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "e", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + }, + { + "parameterName": "f", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Mat#a:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "a: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "a", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.Absolute:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Absolute(m: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "MatModel", + "canonicalReference": "@tldraw/editor!MatModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Absolute" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.applyToBounds:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static applyToBounds(m: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": ", box: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "box", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "applyToBounds" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#applyToPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "applyToPoint(point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "applyToPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.applyToPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static applyToPoint(m: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": ", point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "point", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "applyToPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#applyToPoints:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "applyToPoints(points: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "points", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "applyToPoints" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.applyToPoints:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static applyToPoints(m: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": ", points: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "points", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "applyToPoints" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.applyToXY:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static applyToXY(m: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": ", x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "applyToXY" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Mat#b:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "b: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "b", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Mat#c:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "c: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "c", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.Cast:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Cast(m: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Cast" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#clone:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "clone(): " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "clone" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.Compose:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Compose(...matrices: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "matrices", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Compose" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Mat#d:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "d: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "d", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#decompose:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "decompose(): " + }, + { + "kind": "Content", + "text": "{\n x: number;\n y: number;\n scaleX: number;\n scaleY: number;\n rotation: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "decompose" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.Decompose:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Decompose(m: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n x: number;\n y: number;\n scaleX: number;\n scaleY: number;\n rotation: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Decompose" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#decomposed:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "decomposed(): " + }, + { + "kind": "Content", + "text": "{\n x: number;\n y: number;\n scaleX: number;\n scaleY: number;\n rotation: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "decomposed" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Mat#e:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "e: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "e", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#equals:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "equals(m: " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "MatModel", + "canonicalReference": "@tldraw/editor!MatModel:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "equals" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Mat#f:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "f: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "f", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.From:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static From(m: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "From" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#identity:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "identity(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "identity" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.Identity:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Identity(): " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "Identity" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.Inverse:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Inverse(m: " + }, + { + "kind": "Reference", + "text": "MatModel", + "canonicalReference": "@tldraw/editor!MatModel:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "MatModel", + "canonicalReference": "@tldraw/editor!MatModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Inverse" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#invert:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "invert(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "invert" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#multiply:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "multiply(m: " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "MatModel", + "canonicalReference": "@tldraw/editor!MatModel:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "multiply" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.Multiply:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Multiply(m1: " + }, + { + "kind": "Reference", + "text": "MatModel", + "canonicalReference": "@tldraw/editor!MatModel:interface" + }, + { + "kind": "Content", + "text": ", m2: " + }, + { + "kind": "Reference", + "text": "MatModel", + "canonicalReference": "@tldraw/editor!MatModel:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "MatModel", + "canonicalReference": "@tldraw/editor!MatModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m1", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "m2", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Multiply" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#point:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "point(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "point" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.Point:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Point(m: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Point" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#rotate:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "rotate(r: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", cx?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", cy?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "cx", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "cy", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "rotate" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.Rotate:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Rotate(r: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", cx?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", cy?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "cx", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "cy", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Rotate" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#rotation:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "rotation(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "rotation" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.Rotation:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Rotation(m: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Rotation" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#scale:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "scale(x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "scale" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Mat.Scale:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Scale: " + }, + { + "kind": "Content", + "text": "{\n (x: number, y: number): " + }, + { + "kind": "Reference", + "text": "MatModel", + "canonicalReference": "@tldraw/editor!MatModel:interface" + }, + { + "kind": "Content", + "text": ";\n (x: number, y: number, cx: number, cy: number): " + }, + { + "kind": "Reference", + "text": "MatModel", + "canonicalReference": "@tldraw/editor!MatModel:interface" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "Scale", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#setTo:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "setTo(model: " + }, + { + "kind": "Reference", + "text": "MatModel", + "canonicalReference": "@tldraw/editor!MatModel:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "model", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setTo" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.Smooth:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Smooth(m: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": ", precision?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "precision", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Smooth" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#toCssString:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toCssString(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "toCssString" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.toCssString:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static toCssString(m: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "m", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toCssString" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat#translate:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "translate(x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "translate" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Mat.Translate:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Translate(x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Translate" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!MatLike:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type MatLike = " + }, + { + "kind": "Reference", + "text": "Mat", + "canonicalReference": "@tldraw/editor!Mat:class" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "MatModel", + "canonicalReference": "@tldraw/editor!MatModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/Mat.ts", + "releaseTag": "Public", + "name": "MatLike", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!MatModel:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface MatModel " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/Mat.ts", + "releaseTag": "Public", + "name": "MatModel", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!MatModel#a:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "a: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "a", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!MatModel#b:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "b: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "b", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!MatModel#c:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "c: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "c", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!MatModel#d:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "d: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "d", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!MatModel#e:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "e: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "e", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!MatModel#f:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "f: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "f", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!moveCameraWhenCloseToEdge:function(1)", + "docComment": "/**\n * Moves the camera when the mouse is close to the edge of the screen.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function moveCameraWhenCloseToEdge(editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/edgeScrolling.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "editor", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "moveCameraWhenCloseToEdge" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!openWindow:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function openWindow(url: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", target?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/window-open.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "url", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "target", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "name": "openWindow" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!perimeterOfEllipse:function(1)", + "docComment": "/**\n * Find the approximate perimeter of an ellipse.\n *\n * @param rx - The ellipse's x radius.\n *\n * @param ry - The ellipse's y radius.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function perimeterOfEllipse(rx: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", ry: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "rx", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "ry", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "perimeterOfEllipse" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!PI:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "PI: " + }, + { + "kind": "Content", + "text": "number" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "PI", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!PI2:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "PI2: " + }, + { + "kind": "Content", + "text": "number" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "PI2", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Point2d:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Point2d extends " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Point2d.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Point2d", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Point2d:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Point2d` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed' | 'isFilled'> & {\n margin: number;\n point: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Point2d#getVertices:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getVertices(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getVertices" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Point2d#hitTestLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hitTestLineSegment(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", margin: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "margin", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hitTestLineSegment" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Point2d#nearestPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "nearestPoint(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "nearestPoint" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Point2d#point:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "point: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "point", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!pointInPolygon:function(1)", + "docComment": "/**\n * Get whether a point is inside of a polygon.\n * ```ts\n * const result = pointInPolygon(myPoint, myPoints)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function pointInPolygon(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", points: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "points", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + } + ], + "name": "pointInPolygon" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!PointsSnapIndicator:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type PointsSnapIndicator = " + }, + { + "kind": "Content", + "text": "{\n id: string;\n type: 'points';\n points: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[];\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/SnapManager.ts", + "releaseTag": "Public", + "name": "PointsSnapIndicator", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Polygon2d:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Polygon2d extends " + }, + { + "kind": "Reference", + "text": "Polyline2d", + "canonicalReference": "@tldraw/editor!Polyline2d:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Polygon2d.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Polygon2d", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Polygon2d:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Polygon2d` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed'> & {\n points: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[];\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + }, + "isOptional": false + } + ] + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!polygonsIntersect:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function polygonsIntersect(a: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", b: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/intersect.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "b", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "isOptional": false + } + ], + "name": "polygonsIntersect" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Polyline2d:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Polyline2d extends " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Polyline2d.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Polyline2d", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Polyline2d#_length:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "_length?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "_length", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Polyline2d#_segments:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "_segments?: " + }, + { + "kind": "Reference", + "text": "Edge2d", + "canonicalReference": "@tldraw/editor!Edge2d:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "_segments", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Polyline2d:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Polyline2d` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed' | 'isFilled'> & {\n points: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[];\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Polyline2d#getVertices:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getVertices(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getVertices" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Polyline2d#hitTestLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hitTestLineSegment(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", zoom: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "zoom", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hitTestLineSegment" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Polyline2d#length:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get length(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "length", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Polyline2d#nearestPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "nearestPoint(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "nearestPoint" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Polyline2d#points:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "points: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "points", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Polyline2d#segments:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get segments(): " + }, + { + "kind": "Reference", + "text": "Edge2d", + "canonicalReference": "@tldraw/editor!Edge2d:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "segments", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!precise:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function precise(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "precise" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!preventDefault:function(1)", + "docComment": "/**\n * This function calls `event.preventDefault()` for you. Why is that useful?\n *\n * Beacuase if you enable `window.preventDefaultLogging = true` it'll log out a message when it happens. Because we use console.warn rather than (log) you'll get a stack trace in the inspector telling you exactly where it happened. This is important because `e.preventDefault()` is the source of many bugs, but unfortuantly it can't be avoided because it also stops a lot of default behaviour which doesn't make sense in our UI\n *\n * @param event - To prevent default on\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function preventDefault(event: " + }, + { + "kind": "Reference", + "text": "Event", + "canonicalReference": "!Event:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "React.BaseSyntheticEvent", + "canonicalReference": "@types/react!React.BaseSyntheticEvent:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/dom.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "preventDefault" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!radiansToDegrees:function(1)", + "docComment": "/**\n * Convert radians to degrees.\n *\n * @param r - The degree in radians.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function radiansToDegrees(r: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "radiansToDegrees" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!rangeIntersection:function(1)", + "docComment": "/**\n * Finds the intersection of two ranges.\n *\n * @param a0 - The start point in the A range\n *\n * @param a1 - The end point in the A range\n *\n * @param b0 - The start point in the B range\n *\n * @param b1 - The end point in the B range\n *\n * @returns The intersection of the ranges, or null if no intersection\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function rangeIntersection(a0: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", a1: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", b0: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", b1: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "[number, number] | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a0", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "a1", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "b0", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "b1", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + } + ], + "name": "rangeIntersection" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class", + "docComment": "/**\n * A map of {@link @tldraw/tlschema#StyleProp | StyleProps} to their {@link SharedStyle} values. See {@link Editor.getSharedStyles}.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ReadonlySharedStyleMap " + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/SharedStylesMap.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "ReadonlySharedStyleMap", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#[Symbol.iterator]:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "[" + }, + { + "kind": "Reference", + "text": "Symbol.iterator", + "canonicalReference": "!SymbolConstructor#iterator" + }, + { + "kind": "Content", + "text": "](): " + }, + { + "kind": "Reference", + "text": "IterableIterator", + "canonicalReference": "!IterableIterator:interface" + }, + { + "kind": "Content", + "text": "<[" + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": ", " + }, + { + "kind": "Reference", + "text": "SharedStyle", + "canonicalReference": "@tldraw/editor!SharedStyle:type" + }, + { + "kind": "Content", + "text": "]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "[Symbol.iterator]" + }, + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `ReadonlySharedStyleMap` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(entries?: " + }, + { + "kind": "Reference", + "text": "Iterable", + "canonicalReference": "!Iterable:interface" + }, + { + "kind": "Content", + "text": "<[" + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": ", " + }, + { + "kind": "Reference", + "text": "SharedStyle", + "canonicalReference": "@tldraw/editor!SharedStyle:type" + }, + { + "kind": "Content", + "text": "]>" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "entries", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#entries:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "entries(): " + }, + { + "kind": "Reference", + "text": "IterableIterator", + "canonicalReference": "!IterableIterator:interface" + }, + { + "kind": "Content", + "text": "<[" + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": ", " + }, + { + "kind": "Reference", + "text": "SharedStyle", + "canonicalReference": "@tldraw/editor!SharedStyle:type" + }, + { + "kind": "Content", + "text": "]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "entries" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#equals:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "equals(other: " + }, + { + "kind": "Reference", + "text": "ReadonlySharedStyleMap", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "other", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "equals" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#get:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get(prop: " + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "SharedStyle", + "canonicalReference": "@tldraw/editor!SharedStyle:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "prop", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "get" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#getAsKnownValue:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getAsKnownValue(prop: " + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "prop", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getAsKnownValue" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#keys:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "keys(): " + }, + { + "kind": "Reference", + "text": "IterableIterator", + "canonicalReference": "!IterableIterator:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "keys" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#size:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get size(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "size", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap#values:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "values(): " + }, + { + "kind": "Reference", + "text": "IterableIterator", + "canonicalReference": "!IterableIterator:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "SharedStyle", + "canonicalReference": "@tldraw/editor!SharedStyle:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "values" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Rectangle2d:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Rectangle2d extends " + }, + { + "kind": "Reference", + "text": "Polygon2d", + "canonicalReference": "@tldraw/editor!Polygon2d:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Rectangle2d.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Rectangle2d", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Rectangle2d:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Rectangle2d` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed'> & {\n x?: number;\n y?: number;\n width: number;\n height: number;\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Rectangle2d#getBounds:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getBounds(): " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getBounds" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Rectangle2d#h:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "h: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "h", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Rectangle2d#w:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "w: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "w", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Rectangle2d#x:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "x", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Rectangle2d#y:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "y", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!refreshPage:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function refreshPage(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/refreshPage.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "refreshPage" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!releasePointerCapture:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function releasePointerCapture(element: " + }, + { + "kind": "Reference", + "text": "Element", + "canonicalReference": "!Element:interface" + }, + { + "kind": "Content", + "text": ", event: " + }, + { + "kind": "Reference", + "text": "PointerEvent", + "canonicalReference": "!PointerEvent:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "React.PointerEvent", + "canonicalReference": "@types/react!React.PointerEvent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Element", + "canonicalReference": "!Element:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/dom.ts", + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "element", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 9 + }, + "isOptional": false + } + ], + "name": "releasePointerCapture" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!RequiredKeys:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type RequiredKeys = " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "> & " + }, + { + "kind": "Reference", + "text": "Pick", + "canonicalReference": "!Pick:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/misc-types.ts", + "releaseTag": "Public", + "name": "RequiredKeys", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "K", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 9 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!resizeBox:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function resizeBox(shape: " + }, + { + "kind": "Reference", + "text": "TLBaseBoxShape", + "canonicalReference": "@tldraw/editor!TLBaseBoxShape:type" + }, + { + "kind": "Content", + "text": ", info: " + }, + { + "kind": "Content", + "text": "{\n newPoint: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n handle: " + }, + { + "kind": "Reference", + "text": "TLResizeHandle", + "canonicalReference": "@tldraw/editor!TLResizeHandle:type" + }, + { + "kind": "Content", + "text": ";\n mode: " + }, + { + "kind": "Reference", + "text": "TLResizeMode", + "canonicalReference": "@tldraw/editor!TLResizeMode:type" + }, + { + "kind": "Content", + "text": ";\n scaleX: number;\n scaleY: number;\n initialBounds: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";\n initialShape: " + }, + { + "kind": "Reference", + "text": "TLBaseBoxShape", + "canonicalReference": "@tldraw/editor!TLBaseBoxShape:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n minWidth: number;\n maxWidth: number;\n minHeight: number;\n maxHeight: number;\n}>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n x: number;\n y: number;\n props: {\n w: number;\n h: number;\n };\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/shared/resizeBox.ts", + "returnTypeTokenRange": { + "startIndex": 18, + "endIndex": 19 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "info", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 14 + }, + "isOptional": false + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 15, + "endIndex": 17 + }, + "isOptional": true + } + ], + "name": "resizeBox" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!ResizeBoxOptions:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type ResizeBoxOptions = " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n minWidth: number;\n maxWidth: number;\n minHeight: number;\n maxHeight: number;\n}>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/shared/resizeBox.ts", + "releaseTag": "Public", + "name": "ResizeBoxOptions", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!ROTATE_CORNER_TO_SELECTION_CORNER:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "ROTATE_CORNER_TO_SELECTION_CORNER: " + }, + { + "kind": "Content", + "text": "{\n readonly top_left_rotate: \"top_left\";\n readonly top_right_rotate: \"top_right\";\n readonly bottom_right_rotate: \"bottom_right\";\n readonly bottom_left_rotate: \"bottom_left\";\n readonly mobile_rotate: \"top_left\";\n}" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "ROTATE_CORNER_TO_SELECTION_CORNER", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!RotateCorner:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type RotateCorner = " + }, + { + "kind": "Content", + "text": "'bottom_left_rotate' | 'bottom_right_rotate' | 'mobile_rotate' | 'top_left_rotate' | 'top_right_rotate'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", + "releaseTag": "Public", + "name": "RotateCorner", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!rotateSelectionHandle:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function rotateSelectionHandle(handle: " + }, + { + "kind": "Reference", + "text": "SelectionHandle", + "canonicalReference": "@tldraw/editor!SelectionHandle:type" + }, + { + "kind": "Content", + "text": ", rotation: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "SelectionHandle", + "canonicalReference": "@tldraw/editor!SelectionHandle:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handle", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "rotation", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "rotateSelectionHandle" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!runtime:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "runtime: " + }, + { + "kind": "Content", + "text": "{\n openWindow: (url: string, target: string) => void;\n refreshPage: () => void;\n hardReset: () => void;\n}" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/runtime.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "runtime", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!SelectionCorner:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type SelectionCorner = " + }, + { + "kind": "Content", + "text": "'bottom_left' | 'bottom_right' | 'top_left' | 'top_right'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", + "releaseTag": "Public", + "name": "SelectionCorner", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!SelectionEdge:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type SelectionEdge = " + }, + { + "kind": "Content", + "text": "'bottom' | 'left' | 'right' | 'top'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", + "releaseTag": "Public", + "name": "SelectionEdge", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!SelectionHandle:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type SelectionHandle = " + }, + { + "kind": "Reference", + "text": "SelectionCorner", + "canonicalReference": "@tldraw/editor!SelectionCorner:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "SelectionEdge", + "canonicalReference": "@tldraw/editor!SelectionEdge:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", + "releaseTag": "Public", + "name": "SelectionHandle", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!setPointerCapture:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function setPointerCapture(element: " + }, + { + "kind": "Reference", + "text": "Element", + "canonicalReference": "!Element:interface" + }, + { + "kind": "Content", + "text": ", event: " + }, + { + "kind": "Reference", + "text": "PointerEvent", + "canonicalReference": "!PointerEvent:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "React.PointerEvent", + "canonicalReference": "@types/react!React.PointerEvent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Element", + "canonicalReference": "!Element:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/dom.ts", + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "element", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 9 + }, + "isOptional": false + } + ], + "name": "setPointerCapture" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!setRuntimeOverrides:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function setRuntimeOverrides(input: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/runtime.ts", + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "input", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ], + "name": "setRuntimeOverrides" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!setUserPreferences:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function setUserPreferences(user: " + }, + { + "kind": "Reference", + "text": "TLUserPreferences", + "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/config/TLUserPreferences.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "user", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "setUserPreferences" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!ShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare abstract class ShapeUtil " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "Shape", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "isAbstract": true, + "name": "ShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!ShapeUtil:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `ShapeUtil` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "editor", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#canBind:member", + "docComment": "/**\n * Whether the shape can be bound to by an arrow.\n *\n * @param _otherShape - The other shape attempting to bind to this shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "canBind: " + }, + { + "kind": "Content", + "text": "(_shape: Shape, _otherShape?: K | undefined) => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canBind", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#canCrop:member", + "docComment": "/**\n * Whether the shape can be cropped.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "canCrop: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canCrop", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ShapeUtil#canDropShapes:member(1)", + "docComment": "/**\n * Get whether the shape can receive children of a given type.\n *\n * @param shape - The shape type.\n *\n * @param shapes - The shapes that are being dropped.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "canDropShapes(shape: " + }, + { + "kind": "Content", + "text": "Shape" + }, + { + "kind": "Content", + "text": ", shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "shapes", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "canDropShapes" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#canEdit:member", + "docComment": "/**\n * Whether the shape can be double clicked to edit.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "canEdit: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canEdit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#canEditInReadOnly:member", + "docComment": "/**\n * Whether the shape can be edited in read-only mode.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "canEditInReadOnly: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canEditInReadOnly", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ShapeUtil#canReceiveNewChildrenOfType:member(1)", + "docComment": "/**\n * Get whether the shape can receive children of a given type.\n *\n * @param type - The shape type.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "canReceiveNewChildrenOfType(shape: " + }, + { + "kind": "Content", + "text": "Shape" + }, + { + "kind": "Content", + "text": ", type: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "['type']" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "canReceiveNewChildrenOfType" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#canResize:member", + "docComment": "/**\n * Whether the shape can be resized.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "canResize: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canResize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#canScroll:member", + "docComment": "/**\n * Whether the shape can be scrolled while editing.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "canScroll: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canScroll", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#canSnap:member", + "docComment": "/**\n * Whether the shape can be snapped to by another shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "canSnap: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canSnap", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ShapeUtil#component:member(1)", + "docComment": "/**\n * Get a JSX element for the shape (as an HTML element).\n *\n * @param shape - The shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "abstract component(shape: " + }, + { + "kind": "Content", + "text": "Shape" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": true, + "name": "component" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#editor:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "editor", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ShapeUtil#getBoundsSnapGeometry:member(1)", + "docComment": "/**\n * Get the geometry to use when snapping to this this shape in translate/resize operations. See {@link BoundsSnapGeometry} for details.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getBoundsSnapGeometry(shape: " + }, + { + "kind": "Content", + "text": "Shape" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "BoundsSnapGeometry", + "canonicalReference": "@tldraw/editor!BoundsSnapGeometry:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getBoundsSnapGeometry" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ShapeUtil#getCanvasSvgDefs:member(1)", + "docComment": "/**\n * Return elements to be added to the \\ section of the canvases SVG context. This can be used to define SVG content (e.g. patterns & masks) that can be referred to by ID from svg elements returned by `component`.\n *\n * Each def should have a unique `key`. If multiple defs from different shapes all have the same key, only one will be used.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCanvasSvgDefs(): " + }, + { + "kind": "Reference", + "text": "TLShapeUtilCanvasSvgDef", + "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCanvasSvgDefs" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ShapeUtil#getDefaultProps:member(1)", + "docComment": "/**\n * Get the default props for a shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "abstract getDefaultProps(): " + }, + { + "kind": "Content", + "text": "Shape['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": true, + "name": "getDefaultProps" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ShapeUtil#getGeometry:member(1)", + "docComment": "/**\n * Get the shape's geometry.\n *\n * @param shape - The shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "abstract getGeometry(shape: " + }, + { + "kind": "Content", + "text": "Shape" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": true, + "name": "getGeometry" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ShapeUtil#getHandles:member(1)", + "docComment": "/**\n * Get an array of handle models for the shape. This is an optional method.\n *\n * @param shape - The shape.\n *\n * @example\n * ```ts\n * util.getHandles?.(myShape)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHandles?(shape: " + }, + { + "kind": "Content", + "text": "Shape" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLHandle", + "canonicalReference": "@tldraw/tlschema!TLHandle:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": true, + "isAbstract": false, + "name": "getHandles" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ShapeUtil#getHandleSnapGeometry:member(1)", + "docComment": "/**\n * Get the geometry to use when snapping handles to this shape. See {@link HandleSnapGeometry} for details.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHandleSnapGeometry(shape: " + }, + { + "kind": "Content", + "text": "Shape" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "HandleSnapGeometry", + "canonicalReference": "@tldraw/editor!HandleSnapGeometry:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getHandleSnapGeometry" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#hideResizeHandles:member", + "docComment": "/**\n * Whether the shape should hide its resize handles when selected.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideResizeHandles: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideResizeHandles", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#hideRotateHandle:member", + "docComment": "/**\n * Whether the shape should hide its rotation handles when selected.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideRotateHandle: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideRotateHandle", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#hideSelectionBoundsBg:member", + "docComment": "/**\n * Whether the shape should hide its selection bounds background when selected.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideSelectionBoundsBg: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideSelectionBoundsBg", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#hideSelectionBoundsFg:member", + "docComment": "/**\n * Whether the shape should hide its selection bounds foreground when selected.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideSelectionBoundsFg: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideSelectionBoundsFg", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ShapeUtil#indicator:member(1)", + "docComment": "/**\n * Get JSX describing the shape's indicator (as an SVG element).\n *\n * @param shape - The shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "abstract indicator(shape: " + }, + { + "kind": "Content", + "text": "Shape" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": true, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#isAspectRatioLocked:member", + "docComment": "/**\n * Whether the shape's aspect ratio is locked.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isAspectRatioLocked: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isAspectRatioLocked", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations?: " + }, + { + "kind": "Reference", + "text": "LegacyMigrations", + "canonicalReference": "@tldraw/store!LegacyMigrations:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onBeforeCreate:member", + "docComment": "/**\n * A callback called just before a shape is created. This method provides a last chance to modify the created shape.\n *\n * @param next - The next shape.\n *\n * @returns The next shape or void.\n *\n * @example\n * ```ts\n * onBeforeCreate = (next) => {\n * \treturn { ...next, x: next.x + 1 }\n * }\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBeforeCreate?: " + }, + { + "kind": "Reference", + "text": "TLOnBeforeCreateHandler", + "canonicalReference": "@tldraw/editor!TLOnBeforeCreateHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onBeforeCreate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onBeforeUpdate:member", + "docComment": "/**\n * A callback called just before a shape is updated. This method provides a last chance to modify the updated shape.\n *\n * @param prev - The previous shape.\n *\n * @param next - The next shape.\n *\n * @returns The next shape or void.\n *\n * @example\n * ```ts\n * onBeforeUpdate = (prev, next) => {\n * \tif (prev.x === next.x) {\n * \t\treturn { ...next, x: next.x + 1 }\n * \t}\n * }\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBeforeUpdate?: " + }, + { + "kind": "Reference", + "text": "TLOnBeforeUpdateHandler", + "canonicalReference": "@tldraw/editor!TLOnBeforeUpdateHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onBeforeUpdate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onChildrenChange:member", + "docComment": "/**\n * A callback called when a shape's children change.\n *\n * @param shape - The shape.\n *\n * @returns An array of shape updates, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onChildrenChange?: " + }, + { + "kind": "Reference", + "text": "TLOnChildrenChangeHandler", + "canonicalReference": "@tldraw/editor!TLOnChildrenChangeHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onChildrenChange", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onClick:member", + "docComment": "/**\n * A callback called when a shape is clicked.\n *\n * @param shape - The shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onClick?: " + }, + { + "kind": "Reference", + "text": "TLOnClickHandler", + "canonicalReference": "@tldraw/editor!TLOnClickHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onDoubleClick:member", + "docComment": "/**\n * A callback called when a shape is double clicked.\n *\n * @param shape - The shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDoubleClick?: " + }, + { + "kind": "Reference", + "text": "TLOnDoubleClickHandler", + "canonicalReference": "@tldraw/editor!TLOnDoubleClickHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onDoubleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onDoubleClickEdge:member", + "docComment": "/**\n * A callback called when a shape's edge is double clicked.\n *\n * @param shape - The shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDoubleClickEdge?: " + }, + { + "kind": "Reference", + "text": "TLOnDoubleClickHandler", + "canonicalReference": "@tldraw/editor!TLOnDoubleClickHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onDoubleClickEdge", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onDoubleClickHandle:member", + "docComment": "/**\n * A callback called when a shape's handle is double clicked.\n *\n * @param shape - The shape.\n *\n * @param handle - The handle that is double-clicked.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDoubleClickHandle?: " + }, + { + "kind": "Reference", + "text": "TLOnDoubleClickHandleHandler", + "canonicalReference": "@tldraw/editor!TLOnDoubleClickHandleHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onDoubleClickHandle", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onDragShapesOut:member", + "docComment": "/**\n * A callback called when some other shapes are dragged out of this one.\n *\n * @param shape - The shape.\n *\n * @param shapes - The shapes that are being dragged out.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDragShapesOut?: " + }, + { + "kind": "Reference", + "text": "TLOnDragHandler", + "canonicalReference": "@tldraw/editor!TLOnDragHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onDragShapesOut", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onDragShapesOver:member", + "docComment": "/**\n * A callback called when some other shapes are dragged over this one.\n *\n * @param shape - The shape.\n *\n * @param shapes - The shapes that are being dragged over this one.\n *\n * @returns An object specifying whether the shape should hint that it can receive the dragged shapes.\n *\n * @example\n * ```ts\n * onDragShapesOver = (shape, shapes) => {\n * \treturn { shouldHint: true }\n * }\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDragShapesOver?: " + }, + { + "kind": "Reference", + "text": "TLOnDragHandler", + "canonicalReference": "@tldraw/editor!TLOnDragHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onDragShapesOver", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onDropShapesOver:member", + "docComment": "/**\n * A callback called when some other shapes are dropped over this one.\n *\n * @param shape - The shape.\n *\n * @param shapes - The shapes that are being dropped over this one.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDropShapesOver?: " + }, + { + "kind": "Reference", + "text": "TLOnDragHandler", + "canonicalReference": "@tldraw/editor!TLOnDragHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onDropShapesOver", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onEditEnd:member", + "docComment": "/**\n * A callback called when a shape finishes being editing.\n *\n * @param shape - The shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onEditEnd?: " + }, + { + "kind": "Reference", + "text": "TLOnEditEndHandler", + "canonicalReference": "@tldraw/editor!TLOnEditEndHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onEditEnd", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onHandleDrag:member", + "docComment": "/**\n * A callback called when a shape's handle changes.\n *\n * @param shape - The current shape.\n *\n * @param info - An object containing the handle and whether the handle is 'precise' or not.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onHandleDrag?: " + }, + { + "kind": "Reference", + "text": "TLOnHandleDragHandler", + "canonicalReference": "@tldraw/editor!TLOnHandleDragHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onHandleDrag", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onResize:member", + "docComment": "/**\n * A callback called when a shape changes from a resize.\n *\n * @param shape - The shape at the start of the resize.\n *\n * @param info - Info about the resize.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onResize?: " + }, + { + "kind": "Reference", + "text": "TLOnResizeHandler", + "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onResize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onResizeEnd:member", + "docComment": "/**\n * A callback called when a shape finishes resizing.\n *\n * @param initial - The shape at the start of the resize.\n *\n * @param current - The current shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onResizeEnd?: " + }, + { + "kind": "Reference", + "text": "TLOnResizeEndHandler", + "canonicalReference": "@tldraw/editor!TLOnResizeEndHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onResizeEnd", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onResizeStart:member", + "docComment": "/**\n * A callback called when a shape starts being resized.\n *\n * @param shape - The shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onResizeStart?: " + }, + { + "kind": "Reference", + "text": "TLOnResizeStartHandler", + "canonicalReference": "@tldraw/editor!TLOnResizeStartHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onResizeStart", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onRotate:member", + "docComment": "/**\n * A callback called when a shape changes from a rotation.\n *\n * @param initial - The shape at the start of the rotation.\n *\n * @param current - The current shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onRotate?: " + }, + { + "kind": "Reference", + "text": "TLOnRotateHandler", + "canonicalReference": "@tldraw/editor!TLOnRotateHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onRotate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onRotateEnd:member", + "docComment": "/**\n * A callback called when a shape finishes rotating.\n *\n * @param initial - The shape at the start of the rotation.\n *\n * @param current - The current shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onRotateEnd?: " + }, + { + "kind": "Reference", + "text": "TLOnRotateEndHandler", + "canonicalReference": "@tldraw/editor!TLOnRotateEndHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onRotateEnd", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onRotateStart:member", + "docComment": "/**\n * A callback called when a shape starts being rotated.\n *\n * @param shape - The shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onRotateStart?: " + }, + { + "kind": "Reference", + "text": "TLOnRotateStartHandler", + "canonicalReference": "@tldraw/editor!TLOnRotateStartHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onRotateStart", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onTranslate:member", + "docComment": "/**\n * A callback called when a shape changes from a translation.\n *\n * @param initial - The shape at the start of the translation.\n *\n * @param current - The current shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onTranslate?: " + }, + { + "kind": "Reference", + "text": "TLOnTranslateHandler", + "canonicalReference": "@tldraw/editor!TLOnTranslateHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onTranslate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onTranslateEnd:member", + "docComment": "/**\n * A callback called when a shape finishes translating.\n *\n * @param initial - The shape at the start of the translation.\n *\n * @param current - The current shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onTranslateEnd?: " + }, + { + "kind": "Reference", + "text": "TLOnTranslateEndHandler", + "canonicalReference": "@tldraw/editor!TLOnTranslateEndHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onTranslateEnd", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil#onTranslateStart:member", + "docComment": "/**\n * A callback called when a shape starts being translated.\n *\n * @param shape - The shape.\n *\n * @returns A change to apply to the shape, or void.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onTranslateStart?: " + }, + { + "kind": "Reference", + "text": "TLOnTranslateStartHandler", + "canonicalReference": "@tldraw/editor!TLOnTranslateStartHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onTranslateStart", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props?: " + }, + { + "kind": "Reference", + "text": "ShapeProps", + "canonicalReference": "@tldraw/tlschema!ShapeProps:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUnknownShape", + "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ShapeUtil#toBackgroundSvg:member(1)", + "docComment": "/**\n * Get the shape's background layer as an SVG object.\n *\n * @param shape - The shape.\n *\n * @param ctx - ctx - The export context for the SVG - used for adding e.g. \\s\n *\n * @returns An SVG element.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "toBackgroundSvg?(shape: " + }, + { + "kind": "Content", + "text": "Shape" + }, + { + "kind": "Content", + "text": ", ctx: " + }, + { + "kind": "Reference", + "text": "SvgExportContext", + "canonicalReference": "@tldraw/editor!SvgExportContext:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "ReactElement", + "canonicalReference": "@types/react!React.ReactElement:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "ctx", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": true, + "isAbstract": false, + "name": "toBackgroundSvg" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!ShapeUtil#toSvg:member(1)", + "docComment": "/**\n * Get the shape as an SVG object.\n *\n * @param shape - The shape.\n *\n * @param ctx - The export context for the SVG - used for adding e.g. \\s\n *\n * @returns An SVG element.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "toSvg?(shape: " + }, + { + "kind": "Content", + "text": "Shape" + }, + { + "kind": "Content", + "text": ", ctx: " + }, + { + "kind": "Reference", + "text": "SvgExportContext", + "canonicalReference": "@tldraw/editor!SvgExportContext:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "ReactElement", + "canonicalReference": "@types/react!React.ReactElement:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "ctx", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": true, + "isAbstract": false, + "name": "toSvg" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!ShapeUtil.type:member", + "docComment": "/**\n * The type of the shape util, which should match the shape's type.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!SharedStyle:type", + "docComment": "/**\n * The value of a particular {@link @tldraw/tlschema#StyleProp}.\n *\n * A `mixed` style means that in the current selection, there are lots of different values for the same style prop - e.g. a red and a blue shape are selected.\n *\n * A `shared` style means that all shapes in the selection share the same value for this style prop.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type SharedStyle = " + }, + { + "kind": "Content", + "text": "{\n readonly type: 'mixed';\n} | {\n readonly type: 'shared';\n readonly value: T;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/SharedStylesMap.ts", + "releaseTag": "Public", + "name": "SharedStyle", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!shortAngleDist:function(1)", + "docComment": "/**\n * Get the short angle distance between two angles.\n *\n * @param a0 - The first angle.\n *\n * @param a1 - The second angle.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function shortAngleDist(a0: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", a1: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a0", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "a1", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "shortAngleDist" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!SideEffectManager:class", + "docComment": "/**\n * The side effect manager (aka a \"correct state enforcer\") is responsible for making sure that the editor's state is always correct. This includes things like: deleting a shape if its parent is deleted; unbinding arrows when their binding target is deleted; etc.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class SideEffectManager void;\n };\n}" + }, + { + "kind": "Content", + "text": "> " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "CTX", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "SideEffectManager", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!SideEffectManager:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `SideEffectManager` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(editor: " + }, + { + "kind": "Content", + "text": "CTX" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "editor", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!SideEffectManager#editor:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "editor: " + }, + { + "kind": "Content", + "text": "CTX" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "editor", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!SideEffectManager#history:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "history: " + }, + { + "kind": "Content", + "text": "{\n onBatchComplete: () => void;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "history", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!SideEffectManager#registerAfterChangeHandler:member(1)", + "docComment": "/**\n * Register a handler to be called after a record is changed. This is useful for side-effects that would update _other_ records - if you want to modify the record being changed, use {@link SideEffectManager.registerBeforeChangeHandler} instead.\n *\n * @param typeName - The type of record to listen for\n *\n * @param handler - The handler to call\n *\n * @example\n * ```ts\n * editor.sideEffects.registerAfterChangeHandler('shape', (prev, next, source) => {\n * if (next.props.color === 'red') {\n * // there can only be one red shape at a time:\n * const otherRedShapes = editor.getCurrentPageShapes().filter(s => s.props.color === 'red' && s.id !== next.id)\n * editor.updateShapes(otherRedShapes.map(s => ({...s, props: {...s.props, color: 'blue'}})))\n * }\n * })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "registerAfterChangeHandler(typeName: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "TLAfterChangeHandler", + "canonicalReference": "@tldraw/editor!TLAfterChangeHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": " & {\n typeName: T;\n }>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "typeName", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "registerAfterChangeHandler" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!SideEffectManager#registerAfterCreateHandler:member(1)", + "docComment": "/**\n * Register a handler to be called after a record is created. This is useful for side-effects that would update _other_ records. If you want to modify the record being created use {@link SideEffectManager.registerBeforeCreateHandler} instead.\n *\n * @param typeName - The type of record to listen for\n *\n * @param handler - The handler to call\n *\n * @example\n * ```ts\n * editor.sideEffects.registerAfterCreateHandler('page', (page, source) => {\n * // Automatically create a shape when a page is created\n * editor.createShape({\n * id: createShapeId(),\n * type: 'text',\n * props: { text: page.name },\n * })\n * })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "registerAfterCreateHandler(typeName: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "TLAfterCreateHandler", + "canonicalReference": "@tldraw/editor!TLAfterCreateHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": " & {\n typeName: T;\n }>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "typeName", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "registerAfterCreateHandler" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!SideEffectManager#registerAfterDeleteHandler:member(1)", + "docComment": "/**\n * Register a handler to be called after a record is deleted. This is useful for side-effects that would update _other_ records - if you want to block the deletion of the record itself, use {@link SideEffectManager.registerBeforeDeleteHandler} instead.\n *\n * @param typeName - The type of record to listen for\n *\n * @param handler - The handler to call\n *\n * @example\n * ```ts\n * editor.sideEffects.registerAfterDeleteHandler('shape', (shape, source) => {\n * // if the last shape in a frame is deleted, delete the frame too:\n * const parentFrame = editor.getShape(shape.parentId)\n * if (!parentFrame || parentFrame.type !== 'frame') return\n *\n * const siblings = editor.getSortedChildIdsForParent(parentFrame)\n * if (siblings.length === 0) {\n * editor.deleteShape(parentFrame.id)\n * }\n * })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "registerAfterDeleteHandler(typeName: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "TLAfterDeleteHandler", + "canonicalReference": "@tldraw/editor!TLAfterDeleteHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": " & {\n typeName: T;\n }>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "typeName", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "registerAfterDeleteHandler" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!SideEffectManager#registerBatchCompleteHandler:member(1)", + "docComment": "/**\n * Register a handler to be called when a store completes a batch.\n *\n * @param handler - The handler to call\n *\n * @example\n * ```ts\n * let count = 0\n *\n * editor.cleanup.registerBatchCompleteHandler(() => count++)\n *\n * editor.selectAll()\n * expect(count).toBe(1)\n *\n * editor.batch(() => {\n * \teditor.selectNone()\n * \teditor.selectAll()\n * })\n *\n * expect(count).toBe(2)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "registerBatchCompleteHandler(handler: " + }, + { + "kind": "Reference", + "text": "TLBatchCompleteHandler", + "canonicalReference": "@tldraw/editor!TLBatchCompleteHandler:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "registerBatchCompleteHandler" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!SideEffectManager#registerBeforeChangeHandler:member(1)", + "docComment": "/**\n * Register a handler to be called before a record is changed. The handler is given the old and new record - you can return a modified record to apply a different update, or the old record to block the update entirely.\n *\n * Use this handler only for intercepting updates to the record itself. If you want to update other records in response to a change, use {@link SideEffectManager.registerAfterChangeHandler} instead.\n *\n * @param typeName - The type of record to listen for\n *\n * @param handler - The handler to call\n *\n * @example\n * ```ts\n * editor.sideEffects.registerBeforeChangeHandler('shape', (prev, next, source) => {\n * if (next.isLocked && !prev.isLocked) {\n * // prevent shapes from ever being locked:\n * return prev\n * }\n * // other types of change are allowed\n * return next\n * })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "registerBeforeChangeHandler(typeName: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "TLBeforeChangeHandler", + "canonicalReference": "@tldraw/editor!TLBeforeChangeHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": " & {\n typeName: T;\n }>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "typeName", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "registerBeforeChangeHandler" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!SideEffectManager#registerBeforeCreateHandler:member(1)", + "docComment": "/**\n * Register a handler to be called before a record of a certain type is created. Return a modified record from the handler to change the record that will be created.\n *\n * Use this handle only to modify the creation of the record itself. If you want to trigger a side-effect on a different record (for example, moving one shape when another is created), use {@link SideEffectManager.registerAfterCreateHandler} instead.\n *\n * @param typeName - The type of record to listen for\n *\n * @param handler - The handler to call\n *\n * @example\n * ```ts\n * editor.sideEffects.registerBeforeCreateHandler('shape', (shape, source) => {\n * // only modify shapes created by the user\n * if (source !== 'user') return shape\n *\n * //by default, arrow shapes have no label. Let's make sure they always have a label.\n * if (shape.type === 'arrow') {\n * return {...shape, props: {...shape.props, text: 'an arrow'}}\n * }\n *\n * // other shapes get returned unmodified\n * return shape\n * })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "registerBeforeCreateHandler(typeName: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "TLBeforeCreateHandler", + "canonicalReference": "@tldraw/editor!TLBeforeCreateHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": " & {\n typeName: T;\n }>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "typeName", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "registerBeforeCreateHandler" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!SideEffectManager#registerBeforeDeleteHandler:member(1)", + "docComment": "/**\n * Register a handler to be called before a record is deleted. The handler can return `false` to prevent the deletion.\n *\n * Use this handler only for intercepting deletions of the record itself. If you want to do something to other records in response to a deletion, use {@link SideEffectManager.registerAfterDeleteHandler} instead.\n *\n * @param typeName - The type of record to listen for\n *\n * @param handler - The handler to call\n *\n * @example\n * ```ts\n * editor.sideEffects.registerBeforeDeleteHandler('shape', (shape, source) => {\n * if (shape.props.color === 'red') {\n * // prevent red shapes from being deleted\n * \t return false\n * }\n * })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "registerBeforeDeleteHandler(typeName: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "TLBeforeDeleteHandler", + "canonicalReference": "@tldraw/editor!TLBeforeDeleteHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": " & {\n typeName: T;\n }>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "typeName", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "registerBeforeDeleteHandler" + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!SideEffectManager#store:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "store", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!SIN:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "SIN: (x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Content", + "text": "number" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "SIN" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!snapAngle:function(1)", + "docComment": "/**\n * Clamp rotation to even segments.\n *\n * @param r - The rotation in radians.\n *\n * @param segments - The number of segments.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function snapAngle(r: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", segments: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "segments", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "snapAngle" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!SnapIndicator:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type SnapIndicator = " + }, + { + "kind": "Reference", + "text": "GapsSnapIndicator", + "canonicalReference": "@tldraw/editor!GapsSnapIndicator:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "PointsSnapIndicator", + "canonicalReference": "@tldraw/editor!PointsSnapIndicator:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/SnapManager.ts", + "releaseTag": "Public", + "name": "SnapIndicator", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!SnapManager:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class SnapManager " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SnapManager/SnapManager.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "SnapManager", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!SnapManager:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `SnapManager` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "editor", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!SnapManager#clearIndicators:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "clearIndicators(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "clearIndicators" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!SnapManager#editor:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "editor", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!SnapManager#getCurrentCommonAncestor:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCurrentCommonAncestor(): " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCurrentCommonAncestor" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!SnapManager#getIndicators:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getIndicators(): " + }, + { + "kind": "Reference", + "text": "SnapIndicator", + "canonicalReference": "@tldraw/editor!SnapIndicator:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getIndicators" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!SnapManager#getSnappableShapes:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSnappableShapes(): " + }, + { + "kind": "Reference", + "text": "Set", + "canonicalReference": "!Set:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getSnappableShapes" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!SnapManager#getSnapThreshold:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSnapThreshold(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getSnapThreshold" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!SnapManager#handles:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly handles: " + }, + { + "kind": "Reference", + "text": "HandleSnaps", + "canonicalReference": "@tldraw/editor!~HandleSnaps:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "handles", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!SnapManager#setIndicators:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "setIndicators(indicators: " + }, + { + "kind": "Reference", + "text": "SnapIndicator", + "canonicalReference": "@tldraw/editor!SnapIndicator:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "indicators", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setIndicators" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!SnapManager#shapeBounds:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly shapeBounds: " + }, + { + "kind": "Reference", + "text": "BoundsSnaps", + "canonicalReference": "@tldraw/editor!~BoundsSnaps:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "shapeBounds", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Stadium2d:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Stadium2d extends " + }, + { + "kind": "Reference", + "text": "Ellipse2d", + "canonicalReference": "@tldraw/editor!Ellipse2d:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/geometry/Stadium2d.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Stadium2d", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Stadium2d:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Stadium2d` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed'> & {\n width: number;\n height: number;\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Stadium2d#config:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "config: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Geometry2dOptions", + "canonicalReference": "@tldraw/editor!~Geometry2dOptions:interface" + }, + { + "kind": "Content", + "text": ", 'isClosed'> & {\n width: number;\n height: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "config", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Stadium2d#getVertices:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getVertices(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getVertices" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!StateNode:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare abstract class StateNode implements " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/tools/StateNode.ts", + "releaseTag": "Public", + "isAbstract": true, + "name": "StateNode", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#_currentToolIdMask:member", + "docComment": "/**\n * This is a hack / escape hatch that will tell the editor to report a different state as active (in `getCurrentToolId()`) when this state is active. This is usually used when a tool transitions to a child of a different state for a certain interaction and then returns to the original tool when that interaction completes; and where we would want to show the original tool as active in the UI.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "_currentToolIdMask: " + }, + { + "kind": "Reference", + "text": "Atom", + "canonicalReference": "@tldraw/state!Atom:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "_currentToolIdMask", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#_path:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "_path: " + }, + { + "kind": "Reference", + "text": "Computed", + "canonicalReference": "@tldraw/state!Computed:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "_path", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!StateNode:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `StateNode` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ", parent?: " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "editor", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "parent", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "children?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children?: " + }, + { + "kind": "Content", + "text": "() => " + }, + { + "kind": "Reference", + "text": "TLStateNodeConstructor", + "canonicalReference": "@tldraw/editor!TLStateNodeConstructor:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#editor:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "editor", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#enter:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "enter: " + }, + { + "kind": "Content", + "text": "(info: any, from: string) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "enter", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#exit:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "exit: " + }, + { + "kind": "Content", + "text": "(info: any, from: string) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "exit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!StateNode#getCurrent:member(1)", + "docComment": "/**\n * This node's current active child node, if any.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCurrent(): " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCurrent" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!StateNode#getCurrentToolIdMask:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCurrentToolIdMask(): " + }, + { + "kind": "Content", + "text": "string | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCurrentToolIdMask" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!StateNode#getIsActive:member(1)", + "docComment": "/**\n * Whether this node is active.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getIsActive(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getIsActive" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!StateNode#getPath:member(1)", + "docComment": "/**\n * This node's path of active state nodes\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getPath(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getPath" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#handleEvent:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "handleEvent: " + }, + { + "kind": "Content", + "text": "(info: " + }, + { + "kind": "Reference", + "text": "Exclude", + "canonicalReference": "!Exclude:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLEventInfo", + "canonicalReference": "@tldraw/editor!TLEventInfo:type" + }, + { + "kind": "Content", + "text": ", " + }, + { + "kind": "Reference", + "text": "TLPinchEventInfo", + "canonicalReference": "@tldraw/editor!TLPinchEventInfo:type" + }, + { + "kind": "Content", + "text": ">) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "handleEvent", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "initial?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onCancel:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onCancel?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onCancel']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onCancel", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onComplete:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onComplete?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onComplete']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onComplete", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onDoubleClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDoubleClick?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onDoubleClick']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onDoubleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onEnter:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onEnter?: " + }, + { + "kind": "Reference", + "text": "TLEnterEventHandler", + "canonicalReference": "@tldraw/editor!TLEnterEventHandler:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onEnter", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onExit:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onExit?: " + }, + { + "kind": "Reference", + "text": "TLExitEventHandler", + "canonicalReference": "@tldraw/editor!TLExitEventHandler:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onExit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onInterrupt:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onInterrupt?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onInterrupt']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onInterrupt", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onKeyDown:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onKeyDown?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onKeyDown']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onKeyDown", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onKeyRepeat:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onKeyRepeat?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onKeyRepeat']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onKeyRepeat", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onKeyUp:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onKeyUp?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onKeyUp']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onKeyUp", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onLongPress:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onLongPress?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onLongPress']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onLongPress", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onMiddleClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onMiddleClick?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onMiddleClick']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onMiddleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onPointerDown:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onPointerDown?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onPointerDown']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onPointerDown", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onPointerMove:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onPointerMove?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onPointerMove']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onPointerMove", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onPointerUp:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onPointerUp?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onPointerUp']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onPointerUp", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onQuadrupleClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onQuadrupleClick?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onQuadrupleClick']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onQuadrupleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onRightClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onRightClick?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onRightClick']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onRightClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onTick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onTick?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onTick']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onTick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onTripleClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onTripleClick?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onTripleClick']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onTripleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#onWheel:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onWheel?: " + }, + { + "kind": "Reference", + "text": "TLEventHandlers", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface" + }, + { + "kind": "Content", + "text": "['onWheel']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onWheel", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#parent:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "parent: " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "parent", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!StateNode#setCurrentToolIdMask:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "setCurrentToolIdMask(id: " + }, + { + "kind": "Content", + "text": "string | undefined" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setCurrentToolIdMask" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#shapeType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapeType?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "shapeType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#transition:member", + "docComment": "/**\n * Transition to a new active child state node.\n *\n * @param id - The id of the child state node to transition to.\n *\n * @param info - Any data to pass to the `onEnter` and `onExit` handlers.\n *\n * @example\n * ```ts\n * parentState.transition('childStateA')\n * parentState.transition('childStateB', { myData: 4 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "transition: " + }, + { + "kind": "Content", + "text": "(id: string, info?: any) => this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "transition", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!StateNode#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Reference", + "text": "TLStateNodeType", + "canonicalReference": "@tldraw/editor!~TLStateNodeType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 5 + } + ] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!stopEventPropagation:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "stopEventPropagation: (e: " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Content", + "text": "any" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/dom.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "e", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "stopEventPropagation" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!SVGContainer:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function SVGContainer({ children, className, ...rest }: " + }, + { + "kind": "Reference", + "text": "SVGContainerProps", + "canonicalReference": "@tldraw/editor!SVGContainerProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/SVGContainer.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children, className, ...rest }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "SVGContainer" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!SVGContainerProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type SVGContainerProps = " + }, + { + "kind": "Reference", + "text": "React.HTMLAttributes", + "canonicalReference": "@types/react!React.HTMLAttributes:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "SVGElement", + "canonicalReference": "!SVGElement:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/SVGContainer.tsx", + "releaseTag": "Public", + "name": "SVGContainerProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!SvgExportContext:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface SvgExportContext " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/SvgExportContext.tsx", + "releaseTag": "Public", + "name": "SvgExportContext", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "@tldraw/editor!SvgExportContext#addExportDef:member(1)", + "docComment": "/**\n * Add contents to the `` section of the export SVG. Each export def should have a unique key. If multiple defs come with the same key, only one will be added.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "addExportDef(def: " + }, + { + "kind": "Reference", + "text": "SvgExportDef", + "canonicalReference": "@tldraw/editor!SvgExportDef:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "def", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "addExportDef" + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!SvgExportContext#isDarkMode:member", + "docComment": "/**\n * Whether the export should be in dark mode.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly isDarkMode: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "isDarkMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!SvgExportDef:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface SvgExportDef " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/SvgExportContext.tsx", + "releaseTag": "Public", + "name": "SvgExportDef", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!SvgExportDef#getElement:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getElement: " + }, + { + "kind": "Content", + "text": "() => null | " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "ReactElement", + "canonicalReference": "@types/react!React.ReactElement:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "getElement", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!SvgExportDef#key:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "key: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "key", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!TAB_ID:var", + "docComment": "/**\n * A string that is unique per browser tab\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TAB_ID: " + }, + { + "kind": "Content", + "text": "string" + } + ], + "fileUrlPath": "packages/editor/src/lib/config/TLSessionStateSnapshot.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "TAB_ID", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLAfterChangeHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLAfterChangeHandler = " + }, + { + "kind": "Content", + "text": "(prev: R, next: R, source: 'remote' | 'user') => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", + "releaseTag": "Public", + "name": "TLAfterChangeHandler", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLAfterCreateHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLAfterCreateHandler = " + }, + { + "kind": "Content", + "text": "(record: R, source: 'remote' | 'user') => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", + "releaseTag": "Public", + "name": "TLAfterCreateHandler", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLAfterDeleteHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLAfterDeleteHandler = " + }, + { + "kind": "Content", + "text": "(record: R, source: 'remote' | 'user') => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", + "releaseTag": "Public", + "name": "TLAfterDeleteHandler", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLAnimationOptions:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLAnimationOptions = " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n duration: number;\n easing: (t: number) => number;\n}>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/Editor.ts", + "releaseTag": "Public", + "name": "TLAnimationOptions", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLAnyShapeUtilConstructor = " + }, + { + "kind": "Reference", + "text": "TLShapeUtilConstructor", + "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/config/defaultShapes.ts", + "releaseTag": "Public", + "name": "TLAnyShapeUtilConstructor", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!TLArcInfo:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLArcInfo " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/shared/arrow/arrow-types.ts", + "releaseTag": "Public", + "name": "TLArcInfo", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLArcInfo#center:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "center: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "center", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLArcInfo#largeArcFlag:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "largeArcFlag: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "largeArcFlag", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLArcInfo#length:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "length: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "length", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLArcInfo#radius:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "radius: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "radius", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLArcInfo#size:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "size: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "size", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLArcInfo#sweepFlag:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "sweepFlag: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "sweepFlag", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLArrowInfo:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLArrowInfo = " + }, + { + "kind": "Content", + "text": "{\n isStraight: false;\n start: " + }, + { + "kind": "Reference", + "text": "TLArrowPoint", + "canonicalReference": "@tldraw/editor!TLArrowPoint:type" + }, + { + "kind": "Content", + "text": ";\n end: " + }, + { + "kind": "Reference", + "text": "TLArrowPoint", + "canonicalReference": "@tldraw/editor!TLArrowPoint:type" + }, + { + "kind": "Content", + "text": ";\n middle: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ";\n handleArc: " + }, + { + "kind": "Reference", + "text": "TLArcInfo", + "canonicalReference": "@tldraw/editor!TLArcInfo:interface" + }, + { + "kind": "Content", + "text": ";\n bodyArc: " + }, + { + "kind": "Reference", + "text": "TLArcInfo", + "canonicalReference": "@tldraw/editor!TLArcInfo:interface" + }, + { + "kind": "Content", + "text": ";\n isValid: boolean;\n} | {\n isStraight: true;\n start: " + }, + { + "kind": "Reference", + "text": "TLArrowPoint", + "canonicalReference": "@tldraw/editor!TLArrowPoint:type" + }, + { + "kind": "Content", + "text": ";\n end: " + }, + { + "kind": "Reference", + "text": "TLArrowPoint", + "canonicalReference": "@tldraw/editor!TLArrowPoint:type" + }, + { + "kind": "Content", + "text": ";\n middle: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ";\n isValid: boolean;\n length: number;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/shared/arrow/arrow-types.ts", + "releaseTag": "Public", + "name": "TLArrowInfo", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 18 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLArrowPoint:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLArrowPoint = " + }, + { + "kind": "Content", + "text": "{\n handle: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ";\n point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ";\n arrowhead: " + }, + { + "kind": "Reference", + "text": "TLArrowShapeArrowheadStyle", + "canonicalReference": "@tldraw/tlschema!TLArrowShapeArrowheadStyle:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/shared/arrow/arrow-types.ts", + "releaseTag": "Public", + "name": "TLArrowPoint", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLBaseBoxShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLBaseBoxShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/BaseBoxShapeUtil.tsx", + "releaseTag": "Public", + "name": "TLBaseBoxShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!TLBaseEventInfo:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLBaseEventInfo " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLBaseEventInfo", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLBaseEventInfo#altKey:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "altKey: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "altKey", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLBaseEventInfo#ctrlKey:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "ctrlKey: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "ctrlKey", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLBaseEventInfo#shiftKey:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "shiftKey: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "shiftKey", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLBaseEventInfo#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Reference", + "text": "UiEventType", + "canonicalReference": "@tldraw/editor!UiEventType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLBatchCompleteHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLBatchCompleteHandler = " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", + "releaseTag": "Public", + "name": "TLBatchCompleteHandler", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLBeforeChangeHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLBeforeChangeHandler = " + }, + { + "kind": "Content", + "text": "(prev: R, next: R, source: 'remote' | 'user') => R" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", + "releaseTag": "Public", + "name": "TLBeforeChangeHandler", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLBeforeCreateHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLBeforeCreateHandler = " + }, + { + "kind": "Content", + "text": "(record: R, source: 'remote' | 'user') => R" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", + "releaseTag": "Public", + "name": "TLBeforeCreateHandler", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLBeforeDeleteHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLBeforeDeleteHandler = " + }, + { + "kind": "Content", + "text": "(record: R, source: 'remote' | 'user') => false | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/managers/SideEffectManager.ts", + "releaseTag": "Public", + "name": "TLBeforeDeleteHandler", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLBrushProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLBrushProps = " + }, + { + "kind": "Content", + "text": "{\n brush: " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": ";\n color?: string;\n opacity?: number;\n className?: string;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultBrush.tsx", + "releaseTag": "Public", + "name": "TLBrushProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLCancelEvent:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLCancelEvent = " + }, + { + "kind": "Content", + "text": "(info: " + }, + { + "kind": "Reference", + "text": "TLCancelEventInfo", + "canonicalReference": "@tldraw/editor!TLCancelEventInfo:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLCancelEvent", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLCancelEventInfo:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLCancelEventInfo = " + }, + { + "kind": "Content", + "text": "{\n type: 'misc';\n name: 'cancel';\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLCancelEventInfo", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLClickEvent:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLClickEvent = " + }, + { + "kind": "Content", + "text": "(info: " + }, + { + "kind": "Reference", + "text": "TLClickEventInfo", + "canonicalReference": "@tldraw/editor!TLClickEventInfo:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLClickEvent", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLClickEventInfo:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLClickEventInfo = " + }, + { + "kind": "Reference", + "text": "TLBaseEventInfo", + "canonicalReference": "@tldraw/editor!TLBaseEventInfo:interface" + }, + { + "kind": "Content", + "text": " & {\n type: 'click';\n name: " + }, + { + "kind": "Reference", + "text": "TLCLickEventName", + "canonicalReference": "@tldraw/editor!TLCLickEventName:type" + }, + { + "kind": "Content", + "text": ";\n point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ";\n pointerId: number;\n button: number;\n phase: 'down' | 'settle' | 'up';\n} & " + }, + { + "kind": "Reference", + "text": "TLPointerEventTarget", + "canonicalReference": "@tldraw/editor!TLPointerEventTarget:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLClickEventInfo", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLCLickEventName:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLCLickEventName = " + }, + { + "kind": "Content", + "text": "'double_click' | 'quadruple_click' | 'triple_click'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLCLickEventName", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLCollaboratorHintProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLCollaboratorHintProps = " + }, + { + "kind": "Content", + "text": "{\n className?: string;\n point: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n viewport: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";\n zoom: number;\n opacity?: number;\n color: string;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultCollaboratorHint.tsx", + "releaseTag": "Public", + "name": "TLCollaboratorHintProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLCommand:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLCommand = " + }, + { + "kind": "Content", + "text": "{\n type: 'command';\n data: Data;\n name: Name;\n preservesRedoStack?: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/history-types.ts", + "releaseTag": "Public", + "name": "TLCommand", + "typeParameters": [ + { + "typeParameterName": "Name", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "typeParameterName": "Data", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + } + } + ], + "typeTokenRange": { + "startIndex": 7, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLCommandHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLCommandHandler = " + }, + { + "kind": "Content", + "text": "{\n do: (data: Data) => void;\n undo: (data: Data) => void;\n redo?: (data: Data) => void;\n squash?: (prevData: Data, nextData: Data) => Data;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/history-types.ts", + "releaseTag": "Public", + "name": "TLCommandHandler", + "typeParameters": [ + { + "typeParameterName": "Data", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLCommandHistoryOptions:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLCommandHistoryOptions = " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n squashing: boolean;\n ephemeral: boolean;\n preservesRedoStack: boolean;\n}>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/history-types.ts", + "releaseTag": "Public", + "name": "TLCommandHistoryOptions", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLCompleteEvent:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLCompleteEvent = " + }, + { + "kind": "Content", + "text": "(info: " + }, + { + "kind": "Reference", + "text": "TLCompleteEventInfo", + "canonicalReference": "@tldraw/editor!TLCompleteEventInfo:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLCompleteEvent", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLCompleteEventInfo:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLCompleteEventInfo = " + }, + { + "kind": "Content", + "text": "{\n type: 'misc';\n name: 'complete';\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLCompleteEventInfo", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!TLContent:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLContent " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/clipboard-types.ts", + "releaseTag": "Public", + "name": "TLContent", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLContent#assets:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "assets: " + }, + { + "kind": "Reference", + "text": "TLAsset", + "canonicalReference": "@tldraw/tlschema!TLAsset:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "assets", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLContent#rootShapeIds:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "rootShapeIds: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "rootShapeIds", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLContent#schema:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "schema: " + }, + { + "kind": "Reference", + "text": "SerializedSchema", + "canonicalReference": "@tldraw/store!SerializedSchema:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "schema", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLContent#shapes:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "shapes", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLCursorProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLCursorProps = " + }, + { + "kind": "Content", + "text": "{\n className?: string;\n point: null | " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n zoom: number;\n color?: string;\n name: null | string;\n chatMessage: string;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultCursor.tsx", + "releaseTag": "Public", + "name": "TLCursorProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/editor!TldrawEditor:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TldrawEditor: " + }, + { + "kind": "Reference", + "text": "React.NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TldrawEditorProps", + "canonicalReference": "@tldraw/editor!TldrawEditorProps:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "TldrawEditor", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps:interface", + "docComment": "/**\n * Base props for the {@link tldraw#Tldraw} and {@link TldrawEditor} components.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TldrawEditorBaseProps " + } + ], + "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", + "releaseTag": "Public", + "name": "TldrawEditorBaseProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#autoFocus:member", + "docComment": "/**\n * Whether to automatically focus the editor when it mounts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "autoFocus?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "autoFocus", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#children:member", + "docComment": "/**\n * The component's children.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#className:member", + "docComment": "/**\n * A classname to pass to the editor's container.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "className?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "className", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#components:member", + "docComment": "/**\n * Overrides for the editor's components, such as handles, collaborator cursors, etc.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "components?: " + }, + { + "kind": "Reference", + "text": "TLEditorComponents", + "canonicalReference": "@tldraw/editor!TLEditorComponents:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "components", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#inferDarkMode:member", + "docComment": "/**\n * Whether to infer dark mode from the user's OS. Defaults to false.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "inferDarkMode?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "inferDarkMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#initialState:member", + "docComment": "/**\n * The editor's initial state (usually the id of the first active tool).\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "initialState?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "initialState", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#migrations:member", + "docComment": "/**\n * An array of migrations to apply to the editor's schema.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "migrations?: " + }, + { + "kind": "Content", + "text": "readonly " + }, + { + "kind": "Reference", + "text": "MigrationSequence", + "canonicalReference": "@tldraw/store!MigrationSequence:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#onMount:member", + "docComment": "/**\n * Called when the editor has mounted.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onMount?: " + }, + { + "kind": "Reference", + "text": "TLOnMountHandler", + "canonicalReference": "@tldraw/editor!TLOnMountHandler:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onMount", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#shapeUtils:member", + "docComment": "/**\n * An array of shape utils to use in the editor.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapeUtils?: " + }, + { + "kind": "Content", + "text": "readonly " + }, + { + "kind": "Reference", + "text": "TLAnyShapeUtilConstructor", + "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "shapeUtils", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#tools:member", + "docComment": "/**\n * An array of tools to add to the editor's state chart.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "tools?: " + }, + { + "kind": "Content", + "text": "readonly " + }, + { + "kind": "Reference", + "text": "TLStateNodeConstructor", + "canonicalReference": "@tldraw/editor!TLStateNodeConstructor:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "tools", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps#user:member", + "docComment": "/**\n * The user interacting with the editor.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "user?: " + }, + { + "kind": "Reference", + "text": "TLUser", + "canonicalReference": "@tldraw/editor!~TLUser:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "user", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TldrawEditorProps:type", + "docComment": "/**\n * Props for the {@link tldraw#Tldraw} and {@link TldrawEditor} components.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TldrawEditorProps = " + }, + { + "kind": "Reference", + "text": "Expand", + "canonicalReference": "@tldraw/utils!Expand:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TldrawEditorBaseProps", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps:interface" + }, + { + "kind": "Content", + "text": " & ({\n store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLStoreWithStatus", + "canonicalReference": "@tldraw/editor!TLStoreWithStatus:type" + }, + { + "kind": "Content", + "text": ";\n} | {\n store?: undefined;\n snapshot?: " + }, + { + "kind": "Reference", + "text": "StoreSnapshot", + "canonicalReference": "@tldraw/store!StoreSnapshot:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ">;\n initialData?: " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ">;\n persistenceKey?: string;\n sessionId?: string;\n defaultName?: string;\n})>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", + "releaseTag": "Public", + "name": "TldrawEditorProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 17 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLEditorComponents:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLEditorComponents = " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n [K in keyof " + }, + { + "kind": "Reference", + "text": "BaseEditorComponents", + "canonicalReference": "@tldraw/editor!~BaseEditorComponents:interface" + }, + { + "kind": "Content", + "text": "]: " + }, + { + "kind": "Reference", + "text": "BaseEditorComponents", + "canonicalReference": "@tldraw/editor!~BaseEditorComponents:interface" + }, + { + "kind": "Content", + "text": "[K] | null;\n} & " + }, + { + "kind": "Reference", + "text": "ErrorComponents", + "canonicalReference": "@tldraw/editor!~ErrorComponents:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/hooks/useEditorComponents.tsx", + "releaseTag": "Public", + "name": "TLEditorComponents", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 9 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!TLEditorOptions:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLEditorOptions " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/Editor.ts", + "releaseTag": "Public", + "name": "TLEditorOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEditorOptions#getContainer:member", + "docComment": "/**\n * Should return a containing html element which has all the styles applied to the editor. If not given, the body element will be used.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getContainer: " + }, + { + "kind": "Content", + "text": "() => " + }, + { + "kind": "Reference", + "text": "HTMLElement", + "canonicalReference": "!HTMLElement:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "getContainer", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEditorOptions#inferDarkMode:member", + "docComment": "/**\n * Whether to infer dark mode from the user's system preferences. Defaults to false.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "inferDarkMode?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "inferDarkMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEditorOptions#initialState:member", + "docComment": "/**\n * The editor's initial active tool (or other state node id).\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "initialState?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "initialState", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEditorOptions#shapeUtils:member", + "docComment": "/**\n * An array of shapes to use in the editor. These will be used to create and manage shapes in the editor.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapeUtils: " + }, + { + "kind": "Content", + "text": "readonly " + }, + { + "kind": "Reference", + "text": "TLShapeUtilConstructor", + "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUnknownShape", + "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" + }, + { + "kind": "Content", + "text": ">[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "shapeUtils", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEditorOptions#store:member", + "docComment": "/**\n * The Store instance to use for keeping the app's data. This may be prepopulated, e.g. by loading from a server or database.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "store", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEditorOptions#tools:member", + "docComment": "/**\n * An array of tools to use in the editor. These will be used to handle events and manage user interactions in the editor.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "tools: " + }, + { + "kind": "Content", + "text": "readonly " + }, + { + "kind": "Reference", + "text": "TLStateNodeConstructor", + "canonicalReference": "@tldraw/editor!TLStateNodeConstructor:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "tools", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEditorOptions#user:member", + "docComment": "/**\n * A user defined externally to replace the default user.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "user?: " + }, + { + "kind": "Reference", + "text": "TLUser", + "canonicalReference": "@tldraw/editor!~TLUser:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "user", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLEnterEventHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLEnterEventHandler = " + }, + { + "kind": "Content", + "text": "(info: any, from: string) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLEnterEventHandler", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!TLErrorBoundaryProps:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLErrorBoundaryProps " + } + ], + "fileUrlPath": "packages/editor/src/lib/components/ErrorBoundary.tsx", + "releaseTag": "Public", + "name": "TLErrorBoundaryProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLErrorBoundaryProps#children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "children: " + }, + { + "kind": "Reference", + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLErrorBoundaryProps#fallback:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "fallback: " + }, + { + "kind": "Reference", + "text": "TLErrorFallbackComponent", + "canonicalReference": "@tldraw/editor!~TLErrorFallbackComponent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "fallback", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLErrorBoundaryProps#onError:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onError?: " + }, + { + "kind": "Content", + "text": "((error: unknown) => void) | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onError", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!TLEventHandlers:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLEventHandlers " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLEventHandlers", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onCancel:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onCancel: " + }, + { + "kind": "Reference", + "text": "TLCancelEvent", + "canonicalReference": "@tldraw/editor!TLCancelEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onCancel", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onComplete:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onComplete: " + }, + { + "kind": "Reference", + "text": "TLCompleteEvent", + "canonicalReference": "@tldraw/editor!TLCompleteEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onComplete", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onDoubleClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDoubleClick: " + }, + { + "kind": "Reference", + "text": "TLClickEvent", + "canonicalReference": "@tldraw/editor!TLClickEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onDoubleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onInterrupt:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onInterrupt: " + }, + { + "kind": "Reference", + "text": "TLInterruptEvent", + "canonicalReference": "@tldraw/editor!TLInterruptEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onInterrupt", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onKeyDown:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onKeyDown: " + }, + { + "kind": "Reference", + "text": "TLKeyboardEvent", + "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onKeyDown", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onKeyRepeat:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onKeyRepeat: " + }, + { + "kind": "Reference", + "text": "TLKeyboardEvent", + "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onKeyRepeat", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onKeyUp:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onKeyUp: " + }, + { + "kind": "Reference", + "text": "TLKeyboardEvent", + "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onKeyUp", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onLongPress:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onLongPress: " + }, + { + "kind": "Reference", + "text": "TLPointerEvent", + "canonicalReference": "@tldraw/editor!TLPointerEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onLongPress", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onMiddleClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onMiddleClick: " + }, + { + "kind": "Reference", + "text": "TLPointerEvent", + "canonicalReference": "@tldraw/editor!TLPointerEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onMiddleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onPointerDown:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onPointerDown: " + }, + { + "kind": "Reference", + "text": "TLPointerEvent", + "canonicalReference": "@tldraw/editor!TLPointerEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onPointerDown", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onPointerMove:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onPointerMove: " + }, + { + "kind": "Reference", + "text": "TLPointerEvent", + "canonicalReference": "@tldraw/editor!TLPointerEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onPointerMove", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onPointerUp:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onPointerUp: " + }, + { + "kind": "Reference", + "text": "TLPointerEvent", + "canonicalReference": "@tldraw/editor!TLPointerEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onPointerUp", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onQuadrupleClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onQuadrupleClick: " + }, + { + "kind": "Reference", + "text": "TLClickEvent", + "canonicalReference": "@tldraw/editor!TLClickEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onQuadrupleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onRightClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onRightClick: " + }, + { + "kind": "Reference", + "text": "TLPointerEvent", + "canonicalReference": "@tldraw/editor!TLPointerEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onRightClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onTick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onTick: " + }, + { + "kind": "Reference", + "text": "TLTickEvent", + "canonicalReference": "@tldraw/editor!TLTickEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onTick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onTripleClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onTripleClick: " + }, + { + "kind": "Reference", + "text": "TLClickEvent", + "canonicalReference": "@tldraw/editor!TLClickEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onTripleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventHandlers#onWheel:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onWheel: " + }, + { + "kind": "Reference", + "text": "TLWheelEvent", + "canonicalReference": "@tldraw/editor!TLWheelEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onWheel", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLEventInfo:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLEventInfo = " + }, + { + "kind": "Reference", + "text": "TLCancelEventInfo", + "canonicalReference": "@tldraw/editor!TLCancelEventInfo:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLClickEventInfo", + "canonicalReference": "@tldraw/editor!TLClickEventInfo:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLCompleteEventInfo", + "canonicalReference": "@tldraw/editor!TLCompleteEventInfo:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLInterruptEventInfo", + "canonicalReference": "@tldraw/editor!TLInterruptEventInfo:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLKeyboardEventInfo", + "canonicalReference": "@tldraw/editor!TLKeyboardEventInfo:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPinchEventInfo", + "canonicalReference": "@tldraw/editor!TLPinchEventInfo:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPointerEventInfo", + "canonicalReference": "@tldraw/editor!TLPointerEventInfo:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLTickEventInfo", + "canonicalReference": "@tldraw/editor!~TLTickEventInfo:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLWheelEventInfo", + "canonicalReference": "@tldraw/editor!TLWheelEventInfo:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLEventInfo", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 18 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!TLEventMap:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLEventMap " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/emit-types.ts", + "releaseTag": "Public", + "name": "TLEventMap", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventMap#\"change-history\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'change-history': " + }, + { + "kind": "Content", + "text": "[{\n reason: 'bail';\n markId?: string;\n } | {\n reason: 'push' | 'redo' | 'undo';\n }]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"change-history\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventMap#\"mark-history\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'mark-history': " + }, + { + "kind": "Content", + "text": "[{\n id: string;\n }]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"mark-history\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventMap#\"max-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'max-shapes': " + }, + { + "kind": "Content", + "text": "[{\n name: string;\n pageId: " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ";\n count: number;\n }]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"max-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventMap#\"stop-camera-animation\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'stop-camera-animation': " + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"stop-camera-animation\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventMap#\"stop-following\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'stop-following': " + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"stop-following\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventMap#change:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "change: " + }, + { + "kind": "Content", + "text": "[" + }, + { + "kind": "Reference", + "text": "HistoryEntry", + "canonicalReference": "@tldraw/store!HistoryEntry:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ">]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "change", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventMap#crash:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "crash: " + }, + { + "kind": "Content", + "text": "[{\n error: unknown;\n }]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "crash", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventMap#event:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "event: " + }, + { + "kind": "Content", + "text": "[" + }, + { + "kind": "Reference", + "text": "TLEventInfo", + "canonicalReference": "@tldraw/editor!TLEventInfo:type" + }, + { + "kind": "Content", + "text": "]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "event", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventMap#frame:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "frame: " + }, + { + "kind": "Content", + "text": "[number]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "frame", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventMap#mount:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "mount: " + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "mount", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventMap#tick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "tick: " + }, + { + "kind": "Content", + "text": "[number]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "tick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLEventMap#update:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "update: " + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "update", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLEventMapHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLEventMapHandler = " + }, + { + "kind": "Content", + "text": "(...args: " + }, + { + "kind": "Reference", + "text": "TLEventMap", + "canonicalReference": "@tldraw/editor!TLEventMap:interface" + }, + { + "kind": "Content", + "text": "[T]) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/emit-types.ts", + "releaseTag": "Public", + "name": "TLEventMapHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 4, + "endIndex": 7 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLEventName:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLEventName = " + }, + { + "kind": "Content", + "text": "'cancel' | 'complete' | 'interrupt' | 'tick' | 'wheel' | " + }, + { + "kind": "Reference", + "text": "TLCLickEventName", + "canonicalReference": "@tldraw/editor!TLCLickEventName:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLKeyboardEventName", + "canonicalReference": "@tldraw/editor!TLKeyboardEventName:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPinchEventName", + "canonicalReference": "@tldraw/editor!TLPinchEventName:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPointerEventName", + "canonicalReference": "@tldraw/editor!TLPointerEventName:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLEventName", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 9 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLExitEventHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLExitEventHandler = " + }, + { + "kind": "Content", + "text": "(info: any, to: string) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLExitEventHandler", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLExternalAssetContent:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLExternalAssetContent = " + }, + { + "kind": "Content", + "text": "{\n type: 'file';\n file: " + }, + { + "kind": "Reference", + "text": "File", + "canonicalReference": "!File:interface" + }, + { + "kind": "Content", + "text": ";\n} | {\n type: 'url';\n url: string;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/external-content.ts", + "releaseTag": "Public", + "name": "TLExternalAssetContent", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLExternalContent:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLExternalContent = " + }, + { + "kind": "Content", + "text": "{\n sources?: " + }, + { + "kind": "Reference", + "text": "TLExternalContentSource", + "canonicalReference": "@tldraw/editor!TLExternalContentSource:type" + }, + { + "kind": "Content", + "text": "[];\n point?: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ";\n} & ({\n type: 'embed';\n url: string;\n embed: " + }, + { + "kind": "Reference", + "text": "EmbedDefinition", + "canonicalReference": "@tldraw/tlschema!EmbedDefinition:type" + }, + { + "kind": "Content", + "text": ";\n} | {\n type: 'files';\n files: " + }, + { + "kind": "Reference", + "text": "File", + "canonicalReference": "!File:interface" + }, + { + "kind": "Content", + "text": "[];\n ignoreParent: boolean;\n} | {\n type: 'svg-text';\n text: string;\n} | {\n type: 'text';\n text: string;\n} | {\n type: 'url';\n url: string;\n})" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/external-content.ts", + "releaseTag": "Public", + "name": "TLExternalContent", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 10 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLExternalContentSource:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLExternalContentSource = " + }, + { + "kind": "Content", + "text": "{\n type: 'error';\n data: null | string;\n reason: string;\n} | {\n type: 'excalidraw';\n data: any;\n} | {\n type: 'text';\n data: string;\n subtype: 'html' | 'json' | 'text' | 'url';\n} | {\n type: 'tldraw';\n data: " + }, + { + "kind": "Reference", + "text": "TLContent", + "canonicalReference": "@tldraw/editor!TLContent:interface" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/external-content.ts", + "releaseTag": "Public", + "name": "TLExternalContentSource", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLGridProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLGridProps = " + }, + { + "kind": "Content", + "text": "{\n x: number;\n y: number;\n z: number;\n size: number;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultGrid.tsx", + "releaseTag": "Public", + "name": "TLGridProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLHandleProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLHandleProps = " + }, + { + "kind": "Content", + "text": "{\n shapeId: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n handle: " + }, + { + "kind": "Reference", + "text": "TLHandle", + "canonicalReference": "@tldraw/tlschema!TLHandle:interface" + }, + { + "kind": "Content", + "text": ";\n zoom: number;\n isCoarse: boolean;\n className?: string;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultHandle.tsx", + "releaseTag": "Public", + "name": "TLHandleProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLHandlesProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLHandlesProps = " + }, + { + "kind": "Content", + "text": "{\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultHandles.tsx", + "releaseTag": "Public", + "name": "TLHandlesProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLHistoryEntry:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLHistoryEntry = " + }, + { + "kind": "Reference", + "text": "TLCommand", + "canonicalReference": "@tldraw/editor!TLCommand:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLHistoryMark", + "canonicalReference": "@tldraw/editor!TLHistoryMark:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/history-types.ts", + "releaseTag": "Public", + "name": "TLHistoryEntry", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLHistoryMark:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLHistoryMark = " + }, + { + "kind": "Content", + "text": "{\n type: 'STOP';\n id: string;\n onUndo: boolean;\n onRedo: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/history-types.ts", + "releaseTag": "Public", + "name": "TLHistoryMark", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLHoveredShapeIndicatorProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLHoveredShapeIndicatorProps = " + }, + { + "kind": "Content", + "text": "{\n shapeId: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultHoveredShapeIndicator.tsx", + "releaseTag": "Public", + "name": "TLHoveredShapeIndicatorProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLInterruptEvent:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLInterruptEvent = " + }, + { + "kind": "Content", + "text": "(info: " + }, + { + "kind": "Reference", + "text": "TLInterruptEventInfo", + "canonicalReference": "@tldraw/editor!TLInterruptEventInfo:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLInterruptEvent", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLInterruptEventInfo:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLInterruptEventInfo = " + }, + { + "kind": "Content", + "text": "{\n type: 'misc';\n name: 'interrupt';\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLInterruptEventInfo", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLKeyboardEvent = " + }, + { + "kind": "Content", + "text": "(info: " + }, + { + "kind": "Reference", + "text": "TLKeyboardEventInfo", + "canonicalReference": "@tldraw/editor!TLKeyboardEventInfo:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLKeyboardEvent", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLKeyboardEventInfo:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLKeyboardEventInfo = " + }, + { + "kind": "Reference", + "text": "TLBaseEventInfo", + "canonicalReference": "@tldraw/editor!TLBaseEventInfo:interface" + }, + { + "kind": "Content", + "text": " & {\n type: 'keyboard';\n name: " + }, + { + "kind": "Reference", + "text": "TLKeyboardEventName", + "canonicalReference": "@tldraw/editor!TLKeyboardEventName:type" + }, + { + "kind": "Content", + "text": ";\n key: string;\n code: string;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLKeyboardEventInfo", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLKeyboardEventName:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLKeyboardEventName = " + }, + { + "kind": "Content", + "text": "'key_down' | 'key_repeat' | 'key_up'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLKeyboardEventName", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnBeforeCreateHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnBeforeCreateHandler = " + }, + { + "kind": "Content", + "text": "(next: T) => T | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnBeforeCreateHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnBeforeUpdateHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnBeforeUpdateHandler = " + }, + { + "kind": "Content", + "text": "(prev: T, next: T) => T | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnBeforeUpdateHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnChildrenChangeHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnChildrenChangeHandler = " + }, + { + "kind": "Content", + "text": "(shape: T) => " + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": "[] | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnChildrenChangeHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 6 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnClickHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnClickHandler = " + }, + { + "kind": "Content", + "text": "(shape: T) => " + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": " | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnClickHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 6 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnDoubleClickHandleHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnDoubleClickHandleHandler = " + }, + { + "kind": "Content", + "text": "(shape: T, handle: " + }, + { + "kind": "Reference", + "text": "TLHandle", + "canonicalReference": "@tldraw/tlschema!TLHandle:interface" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": " | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnDoubleClickHandleHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnDoubleClickHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnDoubleClickHandler = " + }, + { + "kind": "Content", + "text": "(shape: T) => " + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": " | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnDoubleClickHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 6 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnDragHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnDragHandler = " + }, + { + "kind": "Content", + "text": "(shape: T, shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]) => R" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnDragHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "typeTokenRange": { + "startIndex": 5, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnEditEndHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnEditEndHandler = " + }, + { + "kind": "Content", + "text": "(shape: T) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnEditEndHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnHandleDragHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnHandleDragHandler = " + }, + { + "kind": "Content", + "text": "(shape: T, info: {\n handle: " + }, + { + "kind": "Reference", + "text": "TLHandle", + "canonicalReference": "@tldraw/tlschema!TLHandle:interface" + }, + { + "kind": "Content", + "text": ";\n isPrecise: boolean;\n initial?: T | undefined;\n}) => " + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": " | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnHandleDragHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnMountHandler:type", + "docComment": "/**\n * Called when the editor has mounted.\n *\n * @param editor - The editor instance.\n *\n * @example\n * ```ts\n * editor.selectAll()} />\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnMountHandler = " + }, + { + "kind": "Content", + "text": "(editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ") => (() => undefined | void) | undefined | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", + "releaseTag": "Public", + "name": "TLOnMountHandler", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnResizeEndHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnResizeEndHandler = " + }, + { + "kind": "Reference", + "text": "TLEventChangeHandler", + "canonicalReference": "@tldraw/editor!~TLEventChangeHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnResizeEndHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnResizeHandler = " + }, + { + "kind": "Content", + "text": "(shape: T, info: " + }, + { + "kind": "Reference", + "text": "TLResizeInfo", + "canonicalReference": "@tldraw/editor!TLResizeInfo:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": ", 'id' | 'type'> | undefined | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnResizeHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 10 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnResizeStartHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnResizeStartHandler = " + }, + { + "kind": "Reference", + "text": "TLEventStartHandler", + "canonicalReference": "@tldraw/editor!~TLEventStartHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnResizeStartHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnRotateEndHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnRotateEndHandler = " + }, + { + "kind": "Reference", + "text": "TLEventChangeHandler", + "canonicalReference": "@tldraw/editor!~TLEventChangeHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnRotateEndHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnRotateHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnRotateHandler = " + }, + { + "kind": "Reference", + "text": "TLEventChangeHandler", + "canonicalReference": "@tldraw/editor!~TLEventChangeHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnRotateHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnRotateStartHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnRotateStartHandler = " + }, + { + "kind": "Reference", + "text": "TLEventStartHandler", + "canonicalReference": "@tldraw/editor!~TLEventStartHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnRotateStartHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnTranslateEndHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnTranslateEndHandler = " + }, + { + "kind": "Reference", + "text": "TLEventChangeHandler", + "canonicalReference": "@tldraw/editor!~TLEventChangeHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnTranslateEndHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnTranslateHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnTranslateHandler = " + }, + { + "kind": "Reference", + "text": "TLEventChangeHandler", + "canonicalReference": "@tldraw/editor!~TLEventChangeHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnTranslateHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLOnTranslateStartHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOnTranslateStartHandler = " + }, + { + "kind": "Reference", + "text": "TLEventStartHandler", + "canonicalReference": "@tldraw/editor!~TLEventStartHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLOnTranslateStartHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLPinchEvent:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLPinchEvent = " + }, + { + "kind": "Content", + "text": "(info: " + }, + { + "kind": "Reference", + "text": "TLPinchEventInfo", + "canonicalReference": "@tldraw/editor!TLPinchEventInfo:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLPinchEvent", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLPinchEventInfo:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLPinchEventInfo = " + }, + { + "kind": "Reference", + "text": "TLBaseEventInfo", + "canonicalReference": "@tldraw/editor!TLBaseEventInfo:interface" + }, + { + "kind": "Content", + "text": " & {\n type: 'pinch';\n name: " + }, + { + "kind": "Reference", + "text": "TLPinchEventName", + "canonicalReference": "@tldraw/editor!TLPinchEventName:type" + }, + { + "kind": "Content", + "text": ";\n point: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n delta: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLPinchEventInfo", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 9 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLPinchEventName:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLPinchEventName = " + }, + { + "kind": "Content", + "text": "'pinch_end' | 'pinch_start' | 'pinch'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLPinchEventName", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLPointerEvent:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLPointerEvent = " + }, + { + "kind": "Content", + "text": "(info: " + }, + { + "kind": "Reference", + "text": "TLPointerEventInfo", + "canonicalReference": "@tldraw/editor!TLPointerEventInfo:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLPointerEvent", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLPointerEventInfo:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLPointerEventInfo = " + }, + { + "kind": "Reference", + "text": "TLBaseEventInfo", + "canonicalReference": "@tldraw/editor!TLBaseEventInfo:interface" + }, + { + "kind": "Content", + "text": " & {\n type: 'pointer';\n name: " + }, + { + "kind": "Reference", + "text": "TLPointerEventName", + "canonicalReference": "@tldraw/editor!TLPointerEventName:type" + }, + { + "kind": "Content", + "text": ";\n point: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ";\n pointerId: number;\n button: number;\n isPen: boolean;\n} & " + }, + { + "kind": "Reference", + "text": "TLPointerEventTarget", + "canonicalReference": "@tldraw/editor!TLPointerEventTarget:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLPointerEventInfo", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLPointerEventName:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLPointerEventName = " + }, + { + "kind": "Content", + "text": "'long_press' | 'middle_click' | 'pointer_down' | 'pointer_move' | 'pointer_up' | 'right_click'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLPointerEventName", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLPointerEventTarget:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLPointerEventTarget = " + }, + { + "kind": "Content", + "text": "{\n target: 'canvas';\n shape?: undefined;\n} | {\n target: 'handle';\n shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ";\n handle: " + }, + { + "kind": "Reference", + "text": "TLHandle", + "canonicalReference": "@tldraw/tlschema!TLHandle:interface" + }, + { + "kind": "Content", + "text": ";\n} | {\n target: 'selection';\n handle?: " + }, + { + "kind": "Reference", + "text": "TLSelectionHandle", + "canonicalReference": "@tldraw/editor!TLSelectionHandle:type" + }, + { + "kind": "Content", + "text": ";\n shape?: undefined;\n} | {\n target: 'shape';\n shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLPointerEventTarget", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 10 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLResizeHandle:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLResizeHandle = " + }, + { + "kind": "Reference", + "text": "SelectionCorner", + "canonicalReference": "@tldraw/editor!SelectionCorner:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "SelectionEdge", + "canonicalReference": "@tldraw/editor!SelectionEdge:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/selection-types.ts", + "releaseTag": "Public", + "name": "TLResizeHandle", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLResizeInfo:type", + "docComment": "/**\n * Info about a resize.\n *\n * @param newPoint - The new local position of the shape.\n *\n * @param handle - The handle being dragged.\n *\n * @param mode - The type of resize.\n *\n * @param scaleX - The scale in the x-axis.\n *\n * @param scaleY - The scale in the y-axis.\n *\n * @param initialBounds - The bounds of the shape at the start of the resize.\n *\n * @param initialShape - The shape at the start of the resize.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLResizeInfo = " + }, + { + "kind": "Content", + "text": "{\n newPoint: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n handle: " + }, + { + "kind": "Reference", + "text": "TLResizeHandle", + "canonicalReference": "@tldraw/editor!TLResizeHandle:type" + }, + { + "kind": "Content", + "text": ";\n mode: " + }, + { + "kind": "Reference", + "text": "TLResizeMode", + "canonicalReference": "@tldraw/editor!TLResizeMode:type" + }, + { + "kind": "Content", + "text": ";\n scaleX: number;\n scaleY: number;\n initialBounds: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";\n initialShape: T;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLResizeInfo", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 12 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLResizeMode:type", + "docComment": "/**\n * The type of resize.\n *\n * 'scale_shape' - The shape is being scaled, usually as part of a larger selection.\n *\n * 'resize_bounds' - The user is directly manipulating an individual shape's bounds using a resize handle. It is up to shape util implementers to decide how they want to handle the two situations.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLResizeMode = " + }, + { + "kind": "Content", + "text": "'resize_bounds' | 'scale_shape'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLResizeMode", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLResizeShapeOptions:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLResizeShapeOptions = " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n initialBounds: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";\n scaleOrigin: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ";\n scaleAxisRotation: number;\n initialShape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ";\n initialPageTransform: " + }, + { + "kind": "Reference", + "text": "MatLike", + "canonicalReference": "@tldraw/editor!MatLike:type" + }, + { + "kind": "Content", + "text": ";\n dragHandle: " + }, + { + "kind": "Reference", + "text": "TLResizeHandle", + "canonicalReference": "@tldraw/editor!TLResizeHandle:type" + }, + { + "kind": "Content", + "text": ";\n mode: " + }, + { + "kind": "Reference", + "text": "TLResizeMode", + "canonicalReference": "@tldraw/editor!TLResizeMode:type" + }, + { + "kind": "Content", + "text": ";\n}>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/Editor.ts", + "releaseTag": "Public", + "name": "TLResizeShapeOptions", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 15 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLRotationSnapshot:type", + "docComment": "/**\n * Info about a rotation that can be applied to the editor's selected shapes.\n *\n * @param selectionPageCenter - The center of the selection in page coordinates\n *\n * @param initialCursorAngle - The angle of the cursor relative to the selection center when the rotation started\n *\n * @param initialSelectionRotation - The rotation of the selection when the rotation started\n *\n * @param shapeSnapshots - Info about each shape that is being rotated\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLRotationSnapshot = " + }, + { + "kind": "Content", + "text": "{\n selectionPageCenter: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n initialCursorAngle: number;\n initialSelectionRotation: number;\n shapeSnapshots: {\n shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ";\n initialPagePoint: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n }[];\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/rotation.ts", + "releaseTag": "Public", + "name": "TLRotationSnapshot", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLScribbleProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLScribbleProps = " + }, + { + "kind": "Content", + "text": "{\n scribble: " + }, + { + "kind": "Reference", + "text": "TLScribble", + "canonicalReference": "@tldraw/tlschema!TLScribble:type" + }, + { + "kind": "Content", + "text": ";\n zoom: number;\n color?: string;\n opacity?: number;\n className?: string;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultScribble.tsx", + "releaseTag": "Public", + "name": "TLScribbleProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLSelectionBackgroundProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLSelectionBackgroundProps = " + }, + { + "kind": "Content", + "text": "{\n bounds: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";\n rotation: number;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSelectionBackground.tsx", + "releaseTag": "Public", + "name": "TLSelectionBackgroundProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLSelectionForegroundProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLSelectionForegroundProps = " + }, + { + "kind": "Content", + "text": "{\n bounds: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";\n rotation: number;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSelectionForeground.tsx", + "releaseTag": "Public", + "name": "TLSelectionForegroundProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLSelectionHandle:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLSelectionHandle = " + }, + { + "kind": "Reference", + "text": "RotateCorner", + "canonicalReference": "@tldraw/editor!RotateCorner:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "SelectionCorner", + "canonicalReference": "@tldraw/editor!SelectionCorner:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "SelectionEdge", + "canonicalReference": "@tldraw/editor!SelectionEdge:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/selection-types.ts", + "releaseTag": "Public", + "name": "TLSelectionHandle", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot:interface", + "docComment": "/**\n * The state of the editor instance, not including any document state.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLSessionStateSnapshot " + } + ], + "fileUrlPath": "packages/editor/src/lib/config/TLSessionStateSnapshot.ts", + "releaseTag": "Public", + "name": "TLSessionStateSnapshot", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#currentPageId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "currentPageId: " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "currentPageId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#exportBackground:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "exportBackground: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "exportBackground", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#isDebugMode:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isDebugMode: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isDebugMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#isFocusMode:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isFocusMode: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isFocusMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#isGridMode:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isGridMode: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isGridMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#isToolLocked:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isToolLocked: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isToolLocked", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#pageStates:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "pageStates: " + }, + { + "kind": "Reference", + "text": "Array", + "canonicalReference": "!Array:interface" + }, + { + "kind": "Content", + "text": "<{\n pageId: " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ";\n camera: {\n x: number;\n y: number;\n z: number;\n };\n selectedShapeIds: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[];\n focusedGroupId: null | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n }>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "pageStates", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 9 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLSessionStateSnapshot#version:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "version: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "version", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLShapeIndicatorProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLShapeIndicatorProps = " + }, + { + "kind": "Content", + "text": "{\n shapeId: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n color?: string | undefined;\n opacity?: number;\n className?: string;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultShapeIndicator.tsx", + "releaseTag": "Public", + "name": "TLShapeIndicatorProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLShapeUtilCanvasSvgDef " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLShapeUtilCanvasSvgDef", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef#component:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component: " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "component", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef#key:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "key: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "key", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLShapeUtilConstructor" + }, + { + "kind": "Content", + "text": " = " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "> " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "U", + "constraintTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "defaultTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + } + } + ], + "name": "TLShapeUtilConstructor", + "preserveMemberOrder": false, + "members": [ + { + "kind": "ConstructSignature", + "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor:new(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "new (editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "U" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "editor", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor#migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "migrations?: " + }, + { + "kind": "Reference", + "text": "LegacyMigrations", + "canonicalReference": "@tldraw/store!LegacyMigrations:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor#props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "props?: " + }, + { + "kind": "Reference", + "text": "ShapeProps", + "canonicalReference": "@tldraw/tlschema!ShapeProps:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLShapeUtilConstructor#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "T['type']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLShapeUtilFlag = " + }, + { + "kind": "Content", + "text": "(shape: T) => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/shapes/ShapeUtil.ts", + "releaseTag": "Public", + "name": "TLShapeUtilFlag", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLSnapIndicatorProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLSnapIndicatorProps = " + }, + { + "kind": "Content", + "text": "{\n className?: string;\n line: " + }, + { + "kind": "Reference", + "text": "SnapIndicator", + "canonicalReference": "@tldraw/editor!SnapIndicator:type" + }, + { + "kind": "Content", + "text": ";\n zoom: number;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/components/default-components/DefaultSnapIndictor.tsx", + "releaseTag": "Public", + "name": "TLSnapIndicatorProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!TLStateNodeConstructor:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLStateNodeConstructor " + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/tools/StateNode.ts", + "releaseTag": "Public", + "name": "TLStateNodeConstructor", + "preserveMemberOrder": false, + "members": [ + { + "kind": "ConstructSignature", + "canonicalReference": "@tldraw/editor!TLStateNodeConstructor:new(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "new (editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ", parent?: " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "editor", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "parent", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ] + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLStateNodeConstructor#children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "children?: " + }, + { + "kind": "Content", + "text": "() => " + }, + { + "kind": "Reference", + "text": "TLStateNodeConstructor", + "canonicalReference": "@tldraw/editor!TLStateNodeConstructor:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLStateNodeConstructor#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLStateNodeConstructor#initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "initial?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLStoreEventInfo:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLStoreEventInfo = " + }, + { + "kind": "Reference", + "text": "HistoryEntry", + "canonicalReference": "@tldraw/store!HistoryEntry:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/config/createTLStore.ts", + "releaseTag": "Public", + "name": "TLStoreEventInfo", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLStoreOptions:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLStoreOptions = " + }, + { + "kind": "Content", + "text": "{\n initialData?: " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ">;\n defaultName?: string;\n} & ({\n schema?: " + }, + { + "kind": "Reference", + "text": "StoreSchema", + "canonicalReference": "@tldraw/store!StoreSchema:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ", " + }, + { + "kind": "Reference", + "text": "TLStoreProps", + "canonicalReference": "@tldraw/tlschema!TLStoreProps:type" + }, + { + "kind": "Content", + "text": ">;\n} | {\n shapeUtils?: readonly " + }, + { + "kind": "Reference", + "text": "TLAnyShapeUtilConstructor", + "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" + }, + { + "kind": "Content", + "text": "[];\n migrations?: readonly " + }, + { + "kind": "Reference", + "text": "MigrationSequence", + "canonicalReference": "@tldraw/store!MigrationSequence:interface" + }, + { + "kind": "Content", + "text": "[];\n})" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/config/createTLStore.ts", + "releaseTag": "Public", + "name": "TLStoreOptions", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 16 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLStoreWithStatus:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLStoreWithStatus = " + }, + { + "kind": "Content", + "text": "{\n readonly status: 'error';\n readonly store?: undefined;\n readonly error: " + }, + { + "kind": "Reference", + "text": "Error", + "canonicalReference": "!Error:interface" + }, + { + "kind": "Content", + "text": ";\n} | {\n readonly status: 'loading';\n readonly store?: undefined;\n readonly error?: undefined;\n} | {\n readonly status: 'not-synced';\n readonly store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": ";\n readonly error?: undefined;\n} | {\n readonly status: 'synced-local';\n readonly store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": ";\n readonly error?: undefined;\n} | {\n readonly status: 'synced-remote';\n readonly connectionStatus: 'offline' | 'online';\n readonly store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": ";\n readonly error?: undefined;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/sync/StoreWithStatus.ts", + "releaseTag": "Public", + "name": "TLStoreWithStatus", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 10 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLSvgOptions:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLSvgOptions = " + }, + { + "kind": "Content", + "text": "{\n bounds: " + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": ";\n scale: number;\n background: boolean;\n padding: number;\n darkMode?: boolean;\n preserveAspectRatio: " + }, + { + "kind": "Reference", + "text": "React.SVGAttributes", + "canonicalReference": "@types/react!React.SVGAttributes:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "SVGSVGElement", + "canonicalReference": "!SVGSVGElement:interface" + }, + { + "kind": "Content", + "text": ">['preserveAspectRatio'];\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/misc-types.ts", + "releaseTag": "Public", + "name": "TLSvgOptions", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLTickEvent:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLTickEvent = " + }, + { + "kind": "Content", + "text": "(info: " + }, + { + "kind": "Reference", + "text": "TLTickEventInfo", + "canonicalReference": "@tldraw/editor!~TLTickEventInfo:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLTickEvent", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/editor!TLUserPreferences:interface", + "docComment": "/**\n * A user of tldraw\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUserPreferences " + } + ], + "fileUrlPath": "packages/editor/src/lib/config/TLUserPreferences.ts", + "releaseTag": "Public", + "name": "TLUserPreferences", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLUserPreferences#animationSpeed:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "animationSpeed?: " + }, + { + "kind": "Content", + "text": "null | number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "animationSpeed", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLUserPreferences#color:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "color?: " + }, + { + "kind": "Content", + "text": "null | string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "color", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLUserPreferences#edgeScrollSpeed:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "edgeScrollSpeed?: " + }, + { + "kind": "Content", + "text": "null | number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "edgeScrollSpeed", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLUserPreferences#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLUserPreferences#isDarkMode:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isDarkMode?: " + }, + { + "kind": "Content", + "text": "boolean | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "isDarkMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLUserPreferences#isSnapMode:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isSnapMode?: " + }, + { + "kind": "Content", + "text": "boolean | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "isSnapMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLUserPreferences#isWrapMode:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isWrapMode?: " + }, + { + "kind": "Content", + "text": "boolean | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "isWrapMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLUserPreferences#locale:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "locale?: " + }, + { + "kind": "Content", + "text": "null | string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "locale", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/editor!TLUserPreferences#name:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "name?: " + }, + { + "kind": "Content", + "text": "null | string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLWheelEvent:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLWheelEvent = " + }, + { + "kind": "Content", + "text": "(info: " + }, + { + "kind": "Reference", + "text": "TLWheelEventInfo", + "canonicalReference": "@tldraw/editor!TLWheelEventInfo:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLWheelEvent", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!TLWheelEventInfo:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLWheelEventInfo = " + }, + { + "kind": "Reference", + "text": "TLBaseEventInfo", + "canonicalReference": "@tldraw/editor!TLBaseEventInfo:interface" + }, + { + "kind": "Content", + "text": " & {\n type: 'wheel';\n name: 'wheel';\n delta: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n point: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "TLWheelEventInfo", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!toDomPrecision:function(1)", + "docComment": "/**\n * The DOM likes values to be fixed to 3 decimal places\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function toDomPrecision(v: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "v", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "toDomPrecision" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!toFixed:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function toFixed(v: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "v", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "toFixed" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!toPrecision:function(1)", + "docComment": "/**\n * Get a number to a precision.\n *\n * @param n - The number.\n *\n * @param precision - The precision.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function toPrecision(n: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", precision?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/utils.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "precision", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "name": "toPrecision" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!UiEvent:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type UiEvent = " + }, + { + "kind": "Reference", + "text": "TLCancelEvent", + "canonicalReference": "@tldraw/editor!TLCancelEvent:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLClickEvent", + "canonicalReference": "@tldraw/editor!TLClickEvent:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLCompleteEvent", + "canonicalReference": "@tldraw/editor!TLCompleteEvent:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLKeyboardEvent", + "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPinchEvent", + "canonicalReference": "@tldraw/editor!TLPinchEvent:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPointerEvent", + "canonicalReference": "@tldraw/editor!TLPointerEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "UiEvent", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 12 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!UiEventType:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type UiEventType = " + }, + { + "kind": "Content", + "text": "'click' | 'keyboard' | 'pinch' | 'pointer' | 'wheel' | 'zoom'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/event-types.ts", + "releaseTag": "Public", + "name": "UiEventType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!uniq:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function uniq(array: " + }, + { + "kind": "Content", + "text": "{\n readonly length: number;\n readonly [n: number]: T;\n} | null | undefined" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/uniq.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "array", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "uniq" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!uniqueId:function(1)", + "docComment": "/**\n * Generate a unique id.\n *\n * @example\n * ```ts\n * const id = uniqueId()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function uniqueId(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/uniqueId.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "uniqueId" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!useContainer:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useContainer(): " + }, + { + "kind": "Reference", + "text": "HTMLDivElement", + "canonicalReference": "!HTMLDivElement:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/hooks/useContainer.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useContainer" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!useEditor:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useEditor(): " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/hooks/useEditor.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useEditor" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!useEditorComponents:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useEditorComponents(): " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n Background: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n SvgDefs: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n Brush: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLBrushProps", + "canonicalReference": "@tldraw/editor!TLBrushProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n ZoomBrush: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLBrushProps", + "canonicalReference": "@tldraw/editor!TLBrushProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n ShapeIndicator: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShapeIndicatorProps", + "canonicalReference": "@tldraw/editor!TLShapeIndicatorProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n Cursor: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLCursorProps", + "canonicalReference": "@tldraw/editor!TLCursorProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n Canvas: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLCanvasComponentProps", + "canonicalReference": "@tldraw/editor!~TLCanvasComponentProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n CollaboratorBrush: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLBrushProps", + "canonicalReference": "@tldraw/editor!TLBrushProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n CollaboratorCursor: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLCursorProps", + "canonicalReference": "@tldraw/editor!TLCursorProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n CollaboratorHint: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLCollaboratorHintProps", + "canonicalReference": "@tldraw/editor!TLCollaboratorHintProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n CollaboratorShapeIndicator: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShapeIndicatorProps", + "canonicalReference": "@tldraw/editor!TLShapeIndicatorProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n Grid: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLGridProps", + "canonicalReference": "@tldraw/editor!TLGridProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n Scribble: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLScribbleProps", + "canonicalReference": "@tldraw/editor!TLScribbleProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n CollaboratorScribble: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLScribbleProps", + "canonicalReference": "@tldraw/editor!TLScribbleProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n SnapIndicator: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLSnapIndicatorProps", + "canonicalReference": "@tldraw/editor!TLSnapIndicatorProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n Handles: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLHandlesProps", + "canonicalReference": "@tldraw/editor!TLHandlesProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n Handle: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLHandleProps", + "canonicalReference": "@tldraw/editor!TLHandleProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n Spinner: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n SelectionForeground: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLSelectionForegroundProps", + "canonicalReference": "@tldraw/editor!TLSelectionForegroundProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n SelectionBackground: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLSelectionBackgroundProps", + "canonicalReference": "@tldraw/editor!TLSelectionBackgroundProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n HoveredShapeIndicator: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLHoveredShapeIndicatorProps", + "canonicalReference": "@tldraw/editor!TLHoveredShapeIndicatorProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n OnTheCanvas: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n InFrontOfTheCanvas: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n LoadingScreen: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n} & " + }, + { + "kind": "Reference", + "text": "ErrorComponents", + "canonicalReference": "@tldraw/editor!~ErrorComponents:type" + }, + { + "kind": "Content", + "text": "> & " + }, + { + "kind": "Reference", + "text": "ErrorComponents", + "canonicalReference": "@tldraw/editor!~ErrorComponents:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/hooks/useEditorComponents.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 90 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useEditorComponents" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!useIsCropping:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useIsCropping(shapeId: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/hooks/useIsCropping.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapeId", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "useIsCropping" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!useIsDarkMode:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useIsDarkMode(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/hooks/useIsDarkMode.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useIsDarkMode" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!useIsEditing:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useIsEditing(shapeId: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/hooks/useIsEditing.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapeId", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "useIsEditing" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!useSelectionEvents:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useSelectionEvents(handle: " + }, + { + "kind": "Reference", + "text": "TLSelectionHandle", + "canonicalReference": "@tldraw/editor!TLSelectionHandle:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n onPointerDown: import(\"react\")." + }, + { + "kind": "Reference", + "text": "PointerEventHandler", + "canonicalReference": "@types/react!React.PointerEventHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Element", + "canonicalReference": "!Element:interface" + }, + { + "kind": "Content", + "text": ">;\n onPointerMove: (e: " + }, + { + "kind": "Reference", + "text": "React.PointerEvent", + "canonicalReference": "@types/react!React.PointerEvent:interface" + }, + { + "kind": "Content", + "text": ") => void;\n onPointerUp: import(\"react\")." + }, + { + "kind": "Reference", + "text": "PointerEventHandler", + "canonicalReference": "@types/react!React.PointerEventHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Element", + "canonicalReference": "!Element:interface" + }, + { + "kind": "Content", + "text": ">;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/hooks/useSelectionEvents.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 14 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handle", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "useSelectionEvents" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!useSvgExportContext:function(1)", + "docComment": "/**\n * Returns the read-only parts of {@link SvgExportContext}.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useSvgExportContext(): " + }, + { + "kind": "Content", + "text": "{\n isDarkMode: boolean;\n} | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/editor/types/SvgExportContext.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useSvgExportContext" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!useTLStore:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useTLStore(opts: " + }, + { + "kind": "Reference", + "text": "TLStoreOptions", + "canonicalReference": "@tldraw/editor!TLStoreOptions:type" + }, + { + "kind": "Content", + "text": " & {\n snapshot?: " + }, + { + "kind": "Reference", + "text": "StoreSnapshot", + "canonicalReference": "@tldraw/store!StoreSnapshot:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ">;\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/tlschema\")." + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/hooks/useTLStore.ts", + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + }, + "isOptional": false + } + ], + "name": "useTLStore" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/editor!useTransform:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useTransform(ref: " + }, + { + "kind": "Reference", + "text": "React.RefObject", + "canonicalReference": "@types/react!React.RefObject:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "HTMLElement", + "canonicalReference": "!HTMLElement:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "SVGElement", + "canonicalReference": "!SVGElement:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ", x?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", scale?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", rotate?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", additionalOffset?: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/hooks/useTransform.ts", + "returnTypeTokenRange": { + "startIndex": 18, + "endIndex": 19 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "ref", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": true + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "isOptional": true + }, + { + "parameterName": "scale", + "parameterTypeTokenRange": { + "startIndex": 12, + "endIndex": 13 + }, + "isOptional": true + }, + { + "parameterName": "rotate", + "parameterTypeTokenRange": { + "startIndex": 14, + "endIndex": 15 + }, + "isOptional": true + }, + { + "parameterName": "additionalOffset", + "parameterTypeTokenRange": { + "startIndex": 16, + "endIndex": 17 + }, + "isOptional": true + } + ], + "name": "useTransform" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!Vec:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Vec " + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/Vec.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Vec", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/editor!Vec:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Vec` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(x?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", z?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "z", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#abs:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "abs(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "abs" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Abs:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Abs(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Abs" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#add:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "add(V: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "V", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "add" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Add:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Add(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Add" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#addScalar:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "addScalar(n: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "addScalar" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.AddScalar:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static AddScalar(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", n: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "AddScalar" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#addXY:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "addXY(x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "addXY" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.AddXY:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static AddXY(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "AddXY" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#angle:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "angle(B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "angle" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Angle:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Angle(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Angle" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Average:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Average(arr: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "arr", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Average" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Cast:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Cast(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Cast" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#clamp:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "clamp(min: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", max?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "min", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "max", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "clamp" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Clamp:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Clamp(A: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ", min: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", max?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "min", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "max", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Clamp" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Clockwise:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Clockwise(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", C: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "C", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Clockwise" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#clone:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "clone(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "clone" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#cpr:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "cpr(V: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "V", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "cpr" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Cpr:member(1)", + "docComment": "/**\n * Cross product of two vectors which is used to calculate the area of a parallelogram.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Cpr(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Cpr" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#cross:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "cross(V: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "V", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "cross" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Cross:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Cross(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", V: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "V", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Cross" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#dist:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "dist(V: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "V", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "dist" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Dist:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Dist(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Dist" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Dist2:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Dist2(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Dist2" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#distanceToLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "distanceToLineSegment(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "distanceToLineSegment" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.DistanceToLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static DistanceToLineSegment(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", P: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", clamp?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "P", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "clamp", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "DistanceToLineSegment" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.DistanceToLineThroughPoint:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static DistanceToLineThroughPoint(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", u: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", P: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "u", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "P", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "DistanceToLineThroughPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#div:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "div(t: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "t", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "div" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Div:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Div(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", t: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "t", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Div" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#divV:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "divV(V: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "V", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "divV" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.DivV:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static DivV(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "DivV" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#dpr:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "dpr(V: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "V", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "dpr" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Dpr:member(1)", + "docComment": "/**\n * Dot product of two vectors which is used to calculate the angle between them.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Dpr(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Dpr" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#equals:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "equals(B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "equals" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Equals:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Equals(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Equals" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#equalsXY:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "equalsXY(x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "equalsXY" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.EqualsXY:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static EqualsXY(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "EqualsXY" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.From:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static From({ x, y, z }: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ x, y, z }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "From" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.FromAngle:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static FromAngle(r: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", length?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "length", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "FromAngle" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.FromArray:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static FromArray(v: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "v", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "FromArray" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.IsNaN:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static IsNaN(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "IsNaN" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#len:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "len(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "len" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Len:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Len(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Len" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#len2:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "len2(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "len2" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Len2:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Len2(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Len2" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#lrp:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "lrp(B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", t: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "t", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "lrp" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Lrp:member(1)", + "docComment": "/**\n * Linearly interpolate between two points.\n *\n * @param A - The first point.\n *\n * @param B - The second point.\n *\n * @param t - The interpolation value between 0 and 1.\n *\n * @returns The interpolated point.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Lrp(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", t: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "t", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Lrp" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Max:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Max(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Max" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Med:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Med(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Med" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Min:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Min(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Min" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#mul:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "mul(t: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "t", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "mul" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Mul:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Mul(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", t: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "t", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Mul" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#mulV:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "mulV(V: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "V", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "mulV" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.MulV:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static MulV(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "MulV" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.NearestPointOnLineSegment:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static NearestPointOnLineSegment(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", P: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", clamp?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "P", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "clamp", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "NearestPointOnLineSegment" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.NearestPointOnLineThroughPoint:member(1)", + "docComment": "/**\n * Get the nearest point on a line with a known unit vector that passes through point A\n * ```ts\n * Vec.nearestPointOnLineThroughPoint(A, u, Point)\n * ```\n *\n * @param A - Any point on the line\n *\n * @param u - The unit vector for the line.\n *\n * @param P - A point not on the line to test.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static NearestPointOnLineThroughPoint(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", u: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", P: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "u", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "P", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "NearestPointOnLineThroughPoint" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#neg:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "neg(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "neg" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Neg:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Neg(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Neg" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#norm:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "norm(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "norm" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#nudge:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "nudge(B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", distance: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "distance", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "nudge" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Nudge:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Nudge(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", distance: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "distance", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Nudge" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#per:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "per(): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "per" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Per:member(1)", + "docComment": "/**\n * Get the perpendicular vector to A.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Per(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Per" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.PointsBetween:member(1)", + "docComment": "/**\n * Get an array of points (with simulated pressure) between two points.\n *\n * @param A - The first point.\n *\n * @param B - The second point.\n *\n * @param steps - The number of points to return.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static PointsBetween(A: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ", steps?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "steps", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "PointsBetween" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Vec#pressure:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get pressure(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "pressure", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#pry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "pry(V: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "V", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "pry" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Pry:member(1)", + "docComment": "/**\n * Get the projection of A onto B.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Pry(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Pry" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Rescale:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Rescale(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", n: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Rescale" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#rot:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "rot(r: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "rot" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Rot:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Rot(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", r?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Rot" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#rotWith:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "rotWith(C: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", r: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "C", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "rotWith" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.RotWith:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static RotWith(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", C: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", r: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "C", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "r", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "RotWith" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.ScaleWithOrigin:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static ScaleWithOrigin(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", scale: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", origin: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "scale", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "origin", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "ScaleWithOrigin" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#set:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "set(x?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", z?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "z", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "set" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#setTo:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "setTo({ x, y, z }: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ x, y, z }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setTo" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#slope:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "slope(B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "slope" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Slope:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Slope(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Slope" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Snap:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Snap(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", step?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "step", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Snap" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#snapToGrid:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "snapToGrid(gridSize: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "gridSize", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "snapToGrid" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.SnapToGrid:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static SnapToGrid(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", gridSize?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "gridSize", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "SnapToGrid" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#sub:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "sub(V: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "V", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "sub" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Sub:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Sub(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Sub" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#subScalar:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "subScalar(n: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "subScalar" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.SubScalar:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static SubScalar(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", n: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "SubScalar" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#subXY:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "subXY(x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "subXY" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.SubXY:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static SubXY(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "y", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "SubXY" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#tan:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "tan(V: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "V", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "tan" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Tan:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Tan(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", B: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "B", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Tan" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#toAngle:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toAngle(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "toAngle" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.ToAngle:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static ToAngle(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "ToAngle" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#toArray:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toArray(): " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "toArray" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.ToArray:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static ToArray(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "ToArray" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#toFixed:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toFixed(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "toFixed" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.ToFixed:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static ToFixed(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ", n?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "ToFixed" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#toJson:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toJson(): " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "toJson" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.ToJson:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static ToJson(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n x: number;\n y: number;\n z: number | undefined;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "ToJson" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#toString:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toString(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "toString" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.ToString:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static ToString(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "ToString" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec#uni:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "uni(): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "uni" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!Vec.Uni:member(1)", + "docComment": "/**\n * Get the unit vector of A.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static Uni(A: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "A", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "Uni" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Vec#x:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "x", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Vec#y:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "y", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!Vec#z:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "z: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "z", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/editor!VecLike:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type VecLike = " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/editor/src/lib/primitives/Vec.ts", + "releaseTag": "Public", + "name": "VecLike", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/editor!WeakMapCache:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class WeakMapCache " + } + ], + "fileUrlPath": "packages/editor/src/lib/utils/WeakMapCache.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "K", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "WeakMapCache", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!WeakMapCache#access:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "access(item: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "K | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "item", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "access" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!WeakMapCache#bust:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "bust(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "bust" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!WeakMapCache#get:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get

(item: " + }, + { + "kind": "Content", + "text": "P" + }, + { + "kind": "Content", + "text": ", cb: " + }, + { + "kind": "Content", + "text": "(item: P) => K" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "NonNullable", + "canonicalReference": "!NonNullable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "P", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "item", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "cb", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "get" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!WeakMapCache#has:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "has(item: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "item", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "has" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!WeakMapCache#invalidate:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "invalidate(item: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "item", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "invalidate" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/editor!WeakMapCache#items:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "items: " + }, + { + "kind": "Reference", + "text": "WeakMap", + "canonicalReference": "!WeakMap:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "items", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/editor!WeakMapCache#set:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "set(item: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", value: " + }, + { + "kind": "Content", + "text": "K" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "item", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "set" + } + ], + "implementsTokenRanges": [] + } + ] + } + ] } diff --git a/apps/docs/api/store.api.json b/apps/docs/api/store.api.json index beed66907..00be9c09f 100644 --- a/apps/docs/api/store.api.json +++ b/apps/docs/api/store.api.json @@ -1,5714 +1,5913 @@ { - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.41.0", - "schemaVersion": 1011, - "oldestForwardsCompatibleVersion": 1001, - "tsdocConfig": { - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "noStandardTags": true, - "tagDefinitions": [ - { - "tagName": "@alpha", - "syntaxKind": "modifier" - }, - { - "tagName": "@beta", - "syntaxKind": "modifier" - }, - { - "tagName": "@defaultValue", - "syntaxKind": "block" - }, - { - "tagName": "@decorator", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@deprecated", - "syntaxKind": "block" - }, - { - "tagName": "@eventProperty", - "syntaxKind": "modifier" - }, - { - "tagName": "@example", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@experimental", - "syntaxKind": "modifier" - }, - { - "tagName": "@inheritDoc", - "syntaxKind": "inline" - }, - { - "tagName": "@internal", - "syntaxKind": "modifier" - }, - { - "tagName": "@label", - "syntaxKind": "inline" - }, - { - "tagName": "@link", - "syntaxKind": "inline", - "allowMultiple": true - }, - { - "tagName": "@override", - "syntaxKind": "modifier" - }, - { - "tagName": "@packageDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@param", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@privateRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@public", - "syntaxKind": "modifier" - }, - { - "tagName": "@readonly", - "syntaxKind": "modifier" - }, - { - "tagName": "@remarks", - "syntaxKind": "block" - }, - { - "tagName": "@returns", - "syntaxKind": "block" - }, - { - "tagName": "@sealed", - "syntaxKind": "modifier" - }, - { - "tagName": "@see", - "syntaxKind": "block" - }, - { - "tagName": "@throws", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@typeParam", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@virtual", - "syntaxKind": "modifier" - }, - { - "tagName": "@betaDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@internalRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@preapproved", - "syntaxKind": "modifier" - } - ], - "supportForTags": { - "@alpha": true, - "@beta": true, - "@defaultValue": true, - "@decorator": true, - "@deprecated": true, - "@eventProperty": true, - "@example": true, - "@experimental": true, - "@inheritDoc": true, - "@internal": true, - "@label": true, - "@link": true, - "@override": true, - "@packageDocumentation": true, - "@param": true, - "@privateRemarks": true, - "@public": true, - "@readonly": true, - "@remarks": true, - "@returns": true, - "@sealed": true, - "@see": true, - "@throws": true, - "@typeParam": true, - "@virtual": true, - "@betaDocumentation": true, - "@internalRemarks": true, - "@preapproved": true - }, - "reportUnsupportedHtmlElements": false - } - }, - "kind": "Package", - "canonicalReference": "@tldraw/store!", - "docComment": "", - "name": "@tldraw/store", - "preserveMemberOrder": false, - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "@tldraw/store!", - "name": "", - "preserveMemberOrder": false, - "members": [ - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!AllRecords:type", - "docComment": "/**\n * Get the type of all records in a record store.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type AllRecords" - }, - { - "kind": "Content", - "text": "> = " - }, - { - "kind": "Reference", - "text": "ExtractR", - "canonicalReference": "@tldraw/store!~ExtractR:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ExtractRecordType", - "canonicalReference": "@tldraw/store!~ExtractRecordType:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/type-utils.ts", - "releaseTag": "Public", - "name": "AllRecords", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 4, - "endIndex": 8 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!assertIdType:function(1)", - "docComment": "/**\n * Assert whether an id correspond to a record type.\n *\n * @param id - The id to check.\n *\n * @param type - The type of the record.\n *\n * @example\n * ```ts\n * assertIdType(myId, \"shape\")\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function assertIdType(id: " - }, - { - "kind": "Content", - "text": "string | undefined" - }, - { - "kind": "Content", - "text": ", type: " - }, - { - "kind": "Reference", - "text": "RecordType", - "canonicalReference": "@tldraw/store!RecordType:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "asserts " - }, - { - "kind": "Reference", - "text": "id", - "canonicalReference": "@tldraw/store!~id" - }, - { - "kind": "Content", - "text": " is " - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/RecordType.ts", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 13 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "assertIdType" - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/store!BaseRecord:interface", - "docComment": "/**\n * The base record that all records must extend.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface BaseRecord" - }, - { - "kind": "Content", - "text": "> " - } - ], - "fileUrlPath": "packages/store/src/lib/BaseRecord.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TypeName", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Id", - "constraintTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "BaseRecord", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/store!BaseRecord#id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly id: " - }, - { - "kind": "Content", - "text": "Id" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/store!BaseRecord#typeName:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly typeName: " - }, - { - "kind": "Content", - "text": "TypeName" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "typeName", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!CollectionDiff:type", - "docComment": "/**\n * A diff describing the changes to a collection.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type CollectionDiff = " - }, - { - "kind": "Content", - "text": "{\n added?: " - }, - { - "kind": "Reference", - "text": "Set", - "canonicalReference": "!Set:interface" - }, - { - "kind": "Content", - "text": ";\n removed?: " - }, - { - "kind": "Reference", - "text": "Set", - "canonicalReference": "!Set:interface" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/Store.ts", - "releaseTag": "Public", - "name": "CollectionDiff", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!compareRecordVersions:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function compareRecordVersions(a: " - }, - { - "kind": "Reference", - "text": "RecordVersion", - "canonicalReference": "@tldraw/store!RecordVersion:type" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Reference", - "text": "RecordVersion", - "canonicalReference": "@tldraw/store!RecordVersion:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "-1 | 0 | 1" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "compareRecordVersions" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!compareSchemas:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "compareSchemas: (a: " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Content", - "text": "-1 | 0 | 1" - } - ], - "fileUrlPath": "packages/store/src/lib/compareSchemas.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "compareSchemas" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!ComputedCache:type", - "docComment": "/**\n * A record store is a collection of records of different types.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type ComputedCache = " - }, - { - "kind": "Content", - "text": "{\n get(id: " - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": "): Data | undefined;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/Store.ts", - "releaseTag": "Public", - "name": "ComputedCache", - "typeParameters": [ - { - "typeParameterName": "Data", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!createRecordType:function(1)", - "docComment": "/**\n * Create a record type.\n *\n * @param typeName - The name of the type to create.\n *\n * @example\n * ```ts\n * const Book = createRecordType('book')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function createRecordType(typeName: " - }, - { - "kind": "Content", - "text": "R['typeName']" - }, - { - "kind": "Content", - "text": ", config: " - }, - { - "kind": "Content", - "text": "{\n migrations?: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";\n validator?: " - }, - { - "kind": "Reference", - "text": "StoreValidator", - "canonicalReference": "@tldraw/store!StoreValidator:type" - }, - { - "kind": "Content", - "text": ";\n scope: " - }, - { - "kind": "Reference", - "text": "RecordScope", - "canonicalReference": "@tldraw/store!~RecordScope:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "RecordType", - "canonicalReference": "@tldraw/store!RecordType:class" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/RecordType.ts", - "returnTypeTokenRange": { - "startIndex": 13, - "endIndex": 17 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "typeName", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 12 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "createRecordType" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!defineMigrations:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function defineMigrations" - }, - { - "kind": "Content", - "text": " = " - }, - { - "kind": "Reference", - "text": "EMPTY_SYMBOL", - "canonicalReference": "@tldraw/store!~EMPTY_SYMBOL:type" - }, - { - "kind": "Content", - "text": ">(opts: " - }, - { - "kind": "Content", - "text": "{\n firstVersion?: CurrentVersion extends number ? FirstVersion : never;\n currentVersion?: CurrentVersion;\n migrators?: CurrentVersion extends number ? FirstVersion extends number ? CurrentVersion extends FirstVersion ? {\n [version in " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Range", - "canonicalReference": "@tldraw/store!~Range_2:type" - }, - { - "kind": "Content", - "text": "<1, CurrentVersion>, 0>]: " - }, - { - "kind": "Reference", - "text": "Migration", - "canonicalReference": "@tldraw/store!Migration:type" - }, - { - "kind": "Content", - "text": ";\n } : {\n [version in " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Range", - "canonicalReference": "@tldraw/store!~Range_2:type" - }, - { - "kind": "Content", - "text": ", FirstVersion>]: " - }, - { - "kind": "Reference", - "text": "Migration", - "canonicalReference": "@tldraw/store!Migration:type" - }, - { - "kind": "Content", - "text": ";\n } : {\n [version in " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Range", - "canonicalReference": "@tldraw/store!~Range_2:type" - }, - { - "kind": "Content", - "text": "<1, CurrentVersion>, 0>]: " - }, - { - "kind": "Reference", - "text": "Migration", - "canonicalReference": "@tldraw/store!Migration:type" - }, - { - "kind": "Content", - "text": ";\n } : never;\n subTypeKey?: string;\n subTypeMigrations?: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "returnTypeTokenRange": { - "startIndex": 37, - "endIndex": 38 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 13, - "endIndex": 36 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "FirstVersion", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - } - }, - { - "typeParameterName": "CurrentVersion", - "constraintTokenRange": { - "startIndex": 6, - "endIndex": 10 - }, - "defaultTypeTokenRange": { - "startIndex": 11, - "endIndex": 12 - } - } - ], - "name": "defineMigrations" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!devFreeze:function(1)", - "docComment": "/**\n * Freeze an object when in development mode. Copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n *\n * @param object - The object to freeze.\n *\n * @returns The frozen object when in development mode, or else the object when in other modes.\n *\n * @example\n * ```ts\n * const frozen = devFreeze({ a: 1 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function devFreeze(object: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/devFreeze.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "object", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "devFreeze" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!getRecordVersion:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getRecordVersion(record: " - }, - { - "kind": "Reference", - "text": "UnknownRecord", - "canonicalReference": "@tldraw/store!UnknownRecord:type" - }, - { - "kind": "Content", - "text": ", serializedSchema: " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "RecordVersion", - "canonicalReference": "@tldraw/store!RecordVersion:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "record", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "serializedSchema", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "getRecordVersion" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!HistoryEntry:type", - "docComment": "/**\n * An entry containing changes that originated either by user actions or remote changes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type HistoryEntry = " - }, - { - "kind": "Content", - "text": "{\n changes: " - }, - { - "kind": "Reference", - "text": "RecordsDiff", - "canonicalReference": "@tldraw/store!RecordsDiff:type" - }, - { - "kind": "Content", - "text": ";\n source: " - }, - { - "kind": "Reference", - "text": "ChangeSource", - "canonicalReference": "@tldraw/store!~ChangeSource:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/Store.ts", - "releaseTag": "Public", - "name": "HistoryEntry", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "typeTokenRange": { - "startIndex": 5, - "endIndex": 10 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!IdOf:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type IdOf = " - }, - { - "kind": "Content", - "text": "R['id']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/BaseRecord.ts", - "releaseTag": "Public", - "name": "IdOf", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!migrate:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function migrate({ value, migrations, fromVersion, toVersion, }: " - }, - { - "kind": "Content", - "text": "{\n value: unknown;\n migrations: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";\n fromVersion: number;\n toVersion: number;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "MigrationResult", - "canonicalReference": "@tldraw/store!MigrationResult:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ value, migrations, fromVersion, toVersion, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "migrate" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!migrateRecord:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function migrateRecord({ record, migrations, fromVersion, toVersion, }: " - }, - { - "kind": "Content", - "text": "{\n record: unknown;\n migrations: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";\n fromVersion: number;\n toVersion: number;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "MigrationResult", - "canonicalReference": "@tldraw/store!MigrationResult:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ record, migrations, fromVersion, toVersion, }", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "migrateRecord" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!Migration:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type Migration = " - }, - { - "kind": "Content", - "text": "{\n up: (oldState: Before) => After;\n down: (newState: After) => Before;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "releaseTag": "Public", - "name": "Migration", - "typeParameters": [ - { - "typeParameterName": "Before", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "typeParameterName": "After", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "typeTokenRange": { - "startIndex": 5, - "endIndex": 6 - } - }, - { - "kind": "Enum", - "canonicalReference": "@tldraw/store!MigrationFailureReason:enum", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum MigrationFailureReason " - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "releaseTag": "Public", - "name": "MigrationFailureReason", - "preserveMemberOrder": false, - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "@tldraw/store!MigrationFailureReason.IncompatibleSubtype:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "IncompatibleSubtype = " - }, - { - "kind": "Content", - "text": "\"incompatible-subtype\"" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "IncompatibleSubtype" - }, - { - "kind": "EnumMember", - "canonicalReference": "@tldraw/store!MigrationFailureReason.MigrationError:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "MigrationError = " - }, - { - "kind": "Content", - "text": "\"migration-error\"" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "MigrationError" - }, - { - "kind": "EnumMember", - "canonicalReference": "@tldraw/store!MigrationFailureReason.TargetVersionTooNew:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "TargetVersionTooNew = " - }, - { - "kind": "Content", - "text": "\"target-version-too-new\"" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "TargetVersionTooNew" - }, - { - "kind": "EnumMember", - "canonicalReference": "@tldraw/store!MigrationFailureReason.TargetVersionTooOld:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "TargetVersionTooOld = " - }, - { - "kind": "Content", - "text": "\"target-version-too-old\"" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "TargetVersionTooOld" - }, - { - "kind": "EnumMember", - "canonicalReference": "@tldraw/store!MigrationFailureReason.UnknownType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "UnknownType = " - }, - { - "kind": "Content", - "text": "\"unknown-type\"" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "UnknownType" - }, - { - "kind": "EnumMember", - "canonicalReference": "@tldraw/store!MigrationFailureReason.UnrecognizedSubtype:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "UnrecognizedSubtype = " - }, - { - "kind": "Content", - "text": "\"unrecognized-subtype\"" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "UnrecognizedSubtype" - } - ] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!MigrationResult:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type MigrationResult = " - }, - { - "kind": "Content", - "text": "{\n type: 'error';\n reason: " - }, - { - "kind": "Reference", - "text": "MigrationFailureReason", - "canonicalReference": "@tldraw/store!MigrationFailureReason:enum" - }, - { - "kind": "Content", - "text": ";\n} | {\n type: 'success';\n value: T;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "releaseTag": "Public", - "name": "MigrationResult", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/store!Migrations:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface Migrations extends " - }, - { - "kind": "Reference", - "text": "BaseMigrationsInfo", - "canonicalReference": "@tldraw/store!~BaseMigrationsInfo:interface" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "releaseTag": "Public", - "name": "Migrations", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/store!Migrations#subTypeKey:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "subTypeKey?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "subTypeKey", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/store!Migrations#subTypeMigrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "subTypeMigrations?: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "subTypeMigrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 2 - } - ] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!RecordId:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type RecordId = " - }, - { - "kind": "Content", - "text": "string & {\n __type__: R;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/BaseRecord.ts", - "releaseTag": "Public", - "name": "RecordId", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!RecordsDiff:type", - "docComment": "/**\n * A diff describing the changes to a record.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type RecordsDiff = " - }, - { - "kind": "Content", - "text": "{\n added: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": ", R>;\n updated: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": ", [from: R, to: R]>;\n removed: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": ", R>;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/Store.ts", - "releaseTag": "Public", - "name": "RecordsDiff", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 16 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/store!RecordType:class", - "docComment": "/**\n * A record type is a type that can be stored in a record store. It is created with `createRecordType`.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class RecordType" - }, - { - "kind": "Content", - "text": "> " - } - ], - "fileUrlPath": "packages/store/src/lib/RecordType.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "RequiredProperties", - "constraintTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "RecordType", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/store!RecordType:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `RecordType` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(\n typeName: " - }, - { - "kind": "Content", - "text": "R['typeName']" - }, - { - "kind": "Content", - "text": ", config: " - }, - { - "kind": "Content", - "text": "{\n readonly createDefaultProperties: () => " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "OmitMeta", - "canonicalReference": "@tldraw/store!~OmitMeta:type" - }, - { - "kind": "Content", - "text": ", RequiredProperties>;\n readonly migrations: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";\n readonly validator?: " - }, - { - "kind": "Reference", - "text": "StoreValidator", - "canonicalReference": "@tldraw/store!StoreValidator:type" - }, - { - "kind": "Content", - "text": ";\n readonly scope?: " - }, - { - "kind": "Reference", - "text": "RecordScope", - "canonicalReference": "@tldraw/store!~RecordScope:type" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "typeName", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 14 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!RecordType#clone:member(1)", - "docComment": "/**\n * Clone a record of this type.\n *\n * @param record - The record to clone.\n *\n * @returns The cloned record.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "clone(record: " - }, - { - "kind": "Content", - "text": "R" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "R" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "record", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "clone" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!RecordType#create:member(1)", - "docComment": "/**\n * Create a new record of this type.\n *\n * @param properties - The properties of the record.\n *\n * @returns The new record.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "create(properties: " - }, - { - "kind": "Reference", - "text": "Pick", - "canonicalReference": "!Pick:type" - }, - { - "kind": "Content", - "text": " & " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ", RequiredProperties>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "R" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "properties", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "create" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!RecordType#createCustomId:member(1)", - "docComment": "/**\n * Create a new ID for this record type based on the given ID.\n *\n * @deprecated\n *\n * - Use `createId` instead.\n *\n * @param id - The ID to base the new ID on.\n *\n * @returns The new ID.\n *\n * @example\n * ```ts\n * const id = recordType.createCustomId('myId')\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "createCustomId(id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "createCustomId" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!RecordType#createDefaultProperties:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly createDefaultProperties: " - }, - { - "kind": "Content", - "text": "() => " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "OmitMeta", - "canonicalReference": "@tldraw/store!~OmitMeta:type" - }, - { - "kind": "Content", - "text": ", RequiredProperties>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "createDefaultProperties", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!RecordType#createId:member(1)", - "docComment": "/**\n * Create a new ID for this record type.\n *\n * @returns The new ID.\n *\n * @example\n * ```ts\n * const id = recordType.createId()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "createId(customUniquePart?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "customUniquePart", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "createId" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!RecordType#isId:member(1)", - "docComment": "/**\n * Check whether an id is an id of this type.\n *\n * @param id - The id to check.\n *\n * @returns Whether the id is an id of this type.\n *\n * @example\n * ```ts\n * const result = recordType.isIn('someId')\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isId(id?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "id", - "canonicalReference": "@tldraw/store!~id" - }, - { - "kind": "Content", - "text": " is " - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isId" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!RecordType#isInstance:member", - "docComment": "/**\n * Check whether a record is an instance of this record type.\n *\n * @param record - The record to check.\n *\n * @returns Whether the record is an instance of this record type.\n *\n * @example\n * ```ts\n * const result = recordType.isInstance(someRecord)\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isInstance: " - }, - { - "kind": "Content", - "text": "(record?: " - }, - { - "kind": "Reference", - "text": "UnknownRecord", - "canonicalReference": "@tldraw/store!UnknownRecord:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "record", - "canonicalReference": "@tldraw/store!~record" - }, - { - "kind": "Content", - "text": " is R" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isInstance", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!RecordType#migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly migrations: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!RecordType#parseId:member(1)", - "docComment": "/**\n * Takes an id like `user:123` and returns the part after the colon `123`\n *\n * @param id - The id\n *\n * @returns \n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "parseId(id: " - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "parseId" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!RecordType#scope:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly scope: " - }, - { - "kind": "Reference", - "text": "RecordScope", - "canonicalReference": "@tldraw/store!~RecordScope:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "scope", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!RecordType#typeName:member", - "docComment": "/**\n * The unique type associated with this record.\n *\n * @public @readonly\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly typeName: " - }, - { - "kind": "Content", - "text": "R['typeName']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "typeName", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!RecordType#validate:member(1)", - "docComment": "/**\n * Check that the passed in record passes the validations for this type. Returns its input correctly typed if it does, but throws an error otherwise.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "validate(record: " - }, - { - "kind": "Content", - "text": "unknown" - }, - { - "kind": "Content", - "text": ", recordBefore?: " - }, - { - "kind": "Content", - "text": "R" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "R" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "record", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "recordBefore", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "validate" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!RecordType#validator:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly validator: " - }, - { - "kind": "Reference", - "text": "StoreValidator", - "canonicalReference": "@tldraw/store!StoreValidator:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "validator", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!RecordType#withDefaultProperties:member(1)", - "docComment": "/**\n * Create a new RecordType that has the same type name as this RecordType and includes the given default properties.\n *\n * @param fn - A function that returns the default properties of the new RecordType.\n *\n * @returns The new RecordType.\n *\n * @example\n * ```ts\n * const authorType = createRecordType('author', () => ({ living: true }))\n * const deadAuthorType = authorType.withDefaultProperties({ living: false })\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "withDefaultProperties, 'id' | 'typeName'>" - }, - { - "kind": "Content", - "text": ">(createDefaultProperties: " - }, - { - "kind": "Content", - "text": "() => DefaultProps" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "RecordType", - "canonicalReference": "@tldraw/store!RecordType:class" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "DefaultProps", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 12 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "createDefaultProperties", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "withDefaultProperties" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!RecordVersion:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type RecordVersion = " - }, - { - "kind": "Content", - "text": "{\n rootVersion: number;\n subTypeVersion?: number;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "releaseTag": "Public", - "name": "RecordVersion", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!reverseRecordsDiff:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function reverseRecordsDiff(diff: " - }, - { - "kind": "Reference", - "text": "RecordsDiff", - "canonicalReference": "@tldraw/store!RecordsDiff:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "RecordsDiff", - "canonicalReference": "@tldraw/store!RecordsDiff:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/Store.ts", - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "diff", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "name": "reverseRecordsDiff" - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/store!SerializedSchema:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface SerializedSchema " - } - ], - "fileUrlPath": "packages/store/src/lib/StoreSchema.ts", - "releaseTag": "Public", - "name": "SerializedSchema", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/store!SerializedSchema#recordVersions:member", - "docComment": "/**\n * Record versions are the versions for each record type. e.g. adding a new field to a record\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "recordVersions: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ";\n subTypeKey: string;\n } | {\n version: number;\n }>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "recordVersions", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/store!SerializedSchema#schemaVersion:member", - "docComment": "/**\n * Schema version is the version for this type you're looking at right now\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "schemaVersion: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "schemaVersion", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/store!SerializedSchema#storeVersion:member", - "docComment": "/**\n * Store version is the version for the structure of the store. e.g. higher level structure like removing or renaming a record type.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "storeVersion: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "storeVersion", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!SerializedStore:type", - "docComment": "/**\n * A serialized snapshot of the record store's values.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type SerializedStore = " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": ", R>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/Store.ts", - "releaseTag": "Public", - "name": "SerializedStore", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 7 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!squashRecordDiffs:function(1)", - "docComment": "/**\n * Squash a collection of diffs into a single diff.\n *\n * @param diffs - An array of diffs to squash.\n *\n * @returns A single diff that represents the squashed diffs.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function squashRecordDiffs(diffs: " - }, - { - "kind": "Reference", - "text": "RecordsDiff", - "canonicalReference": "@tldraw/store!RecordsDiff:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "RecordsDiff", - "canonicalReference": "@tldraw/store!RecordsDiff:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/Store.ts", - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "diffs", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "squashRecordDiffs" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/store!Store:class", - "docComment": "/**\n * A store of records.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Store " - } - ], - "fileUrlPath": "packages/store/src/lib/Store.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "typeParameterName": "Props", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - } - } - ], - "isAbstract": false, - "name": "Store", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@tldraw/store!Store#_flushHistory:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "_flushHistory(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "_flushHistory" - }, - { - "kind": "Constructor", - "canonicalReference": "@tldraw/store!Store:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Store` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Content", - "text": "{\n initialData?: " - }, - { - "kind": "Reference", - "text": "SerializedStore", - "canonicalReference": "@tldraw/store!SerializedStore:type" - }, - { - "kind": "Content", - "text": ";\n schema: " - }, - { - "kind": "Reference", - "text": "StoreSchema", - "canonicalReference": "@tldraw/store!StoreSchema:class" - }, - { - "kind": "Content", - "text": ";\n props: Props;\n }" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#allRecords:member", - "docComment": "/**\n * Get an array of all values in the store.\n *\n * @returns An array of all values in the store.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "allRecords: " - }, - { - "kind": "Content", - "text": "() => R[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "allRecords", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!Store#applyDiff:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "applyDiff(diff: " - }, - { - "kind": "Reference", - "text": "RecordsDiff", - "canonicalReference": "@tldraw/store!RecordsDiff:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", runCallbacks?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "diff", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "runCallbacks", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "applyDiff" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#clear:member", - "docComment": "/**\n * Removes all records from the store.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "clear: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "clear", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#createComputedCache:member", - "docComment": "/**\n * Create a computed cache.\n *\n * @param name - The name of the derivation cache.\n *\n * @param derive - A function used to derive the value of the cache.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "createComputedCache: " - }, - { - "kind": "Content", - "text": "(name: string, derive: (record: V) => T | undefined, isEqual?: ((a: V, b: V) => boolean) | undefined) => " - }, - { - "kind": "Reference", - "text": "ComputedCache", - "canonicalReference": "@tldraw/store!ComputedCache:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "createComputedCache", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#createSelectedComputedCache:member", - "docComment": "/**\n * Create a computed cache from a selector\n *\n * @param name - The name of the derivation cache.\n *\n * @param selector - A function that returns a subset of the original shape\n *\n * @param derive - A function used to derive the value of the cache.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "createSelectedComputedCache: " - }, - { - "kind": "Content", - "text": "(name: string, selector: (record: V) => T | undefined, derive: (input: T) => J | undefined) => " - }, - { - "kind": "Reference", - "text": "ComputedCache", - "canonicalReference": "@tldraw/store!ComputedCache:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "createSelectedComputedCache", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!Store#extractingChanges:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "extractingChanges(fn: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "RecordsDiff", - "canonicalReference": "@tldraw/store!RecordsDiff:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "fn", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "extractingChanges" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!Store#filterChangesByScope:member(1)", - "docComment": "/**\n * Filters out non-document changes from a diff. Returns null if there are no changes left.\n *\n * @param change - the records diff\n *\n * @returns \n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "filterChangesByScope(change: " - }, - { - "kind": "Reference", - "text": "RecordsDiff", - "canonicalReference": "@tldraw/store!RecordsDiff:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", scope: " - }, - { - "kind": "Reference", - "text": "RecordScope", - "canonicalReference": "@tldraw/store!~RecordScope:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n added: { [K in " - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": "]: R; };\n updated: { [K_1 in " - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": "]: [from: R, to: R]; };\n removed: { [K in " - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": "]: R; };\n } | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 13 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "change", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "scope", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "filterChangesByScope" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#get:member", - "docComment": "/**\n * Get the value of a store record by its id.\n *\n * @param id - The id of the record to get.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get: " - }, - { - "kind": "Content", - "text": ">(id: K) => " - }, - { - "kind": "Reference", - "text": "RecFromId", - "canonicalReference": "@tldraw/store!~RecFromId:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "get", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#getRecordType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getRecordType: " - }, - { - "kind": "Content", - "text": "(record: R) => T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "getRecordType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!Store#getSnapshot:member(1)", - "docComment": "/**\n * Get a serialized snapshot of the store and its schema.\n * ```ts\n * const snapshot = store.getSnapshot()\n * store.loadSnapshot(snapshot)\n * ```\n *\n * @param scope - The scope of records to serialize. Defaults to 'document'.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getSnapshot(scope?: " - }, - { - "kind": "Content", - "text": "'all' | " - }, - { - "kind": "Reference", - "text": "RecordScope", - "canonicalReference": "@tldraw/store!~RecordScope:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "scope", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getSnapshot" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#has:member", - "docComment": "/**\n * Get whether the record store has a id.\n *\n * @param id - The id of the record to check.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "has: " - }, - { - "kind": "Content", - "text": ">(id: K) => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "has", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#history:member", - "docComment": "/**\n * An atom containing the store's history.\n *\n * @public @readonly\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly history: " - }, - { - "kind": "Reference", - "text": "Atom", - "canonicalReference": "@tldraw/state!Atom:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "history", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#id:member", - "docComment": "/**\n * The random id of the store.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#listen:member", - "docComment": "/**\n * Add a new listener to the store.\n *\n * @param onHistory - The listener to call when the store updates.\n *\n * @param filters - Filters to apply to the listener.\n *\n * @returns A function to remove the listener.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "listen: " - }, - { - "kind": "Content", - "text": "(onHistory: " - }, - { - "kind": "Reference", - "text": "StoreListener", - "canonicalReference": "@tldraw/store!StoreListener:type" - }, - { - "kind": "Content", - "text": ", filters?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "StoreListenerFilters", - "canonicalReference": "@tldraw/store!~StoreListenerFilters:type" - }, - { - "kind": "Content", - "text": ">) => () => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "listen", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!Store#loadSnapshot:member(1)", - "docComment": "/**\n * Load a serialized snapshot.\n * ```ts\n * const snapshot = store.getSnapshot()\n * store.loadSnapshot(snapshot)\n * ```\n *\n * @param snapshot - The snapshot to load.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "loadSnapshot(snapshot: " - }, - { - "kind": "Reference", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "snapshot", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "loadSnapshot" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#mergeRemoteChanges:member", - "docComment": "/**\n * Merge changes from a remote source without triggering listeners.\n *\n * @param fn - A function that merges the external changes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "mergeRemoteChanges: " - }, - { - "kind": "Content", - "text": "(fn: () => void) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "mergeRemoteChanges", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!Store#migrateSnapshot:member(1)", - "docComment": "/**\n * Migrate a serialized snapshot of the store and its schema.\n * ```ts\n * const snapshot = store.getSnapshot()\n * store.migrateSnapshot(snapshot)\n * ```\n *\n * @param snapshot - The snapshot to load.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "migrateSnapshot(snapshot: " - }, - { - "kind": "Reference", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "snapshot", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "migrateSnapshot" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#onAfterChange:member", - "docComment": "/**\n * A callback fired after each record's change.\n *\n * @param prev - The previous value, if any.\n *\n * @param next - The next value.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onAfterChange?: " - }, - { - "kind": "Content", - "text": "(prev: R, next: R, source: 'remote' | 'user') => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onAfterChange", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#onAfterCreate:member", - "docComment": "/**\n * A callback fired after a record is created. Use this to perform related updates to other records in the store.\n *\n * @param record - The record to be created\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onAfterCreate?: " - }, - { - "kind": "Content", - "text": "(record: R, source: 'remote' | 'user') => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onAfterCreate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#onAfterDelete:member", - "docComment": "/**\n * A callback fired after a record is deleted.\n *\n * @param prev - The record that will be deleted.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onAfterDelete?: " - }, - { - "kind": "Content", - "text": "(prev: R, source: 'remote' | 'user') => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onAfterDelete", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#onBeforeChange:member", - "docComment": "/**\n * A callback before after each record's change.\n *\n * @param prev - The previous value, if any.\n *\n * @param next - The next value.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBeforeChange?: " - }, - { - "kind": "Content", - "text": "(prev: R, next: R, source: 'remote' | 'user') => R" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onBeforeChange", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#onBeforeCreate:member", - "docComment": "/**\n * A callback fired after each record's change.\n *\n * @param prev - The previous value, if any.\n *\n * @param next - The next value.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBeforeCreate?: " - }, - { - "kind": "Content", - "text": "(next: R, source: 'remote' | 'user') => R" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onBeforeCreate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#onBeforeDelete:member", - "docComment": "/**\n * A callback fired before a record is deleted.\n *\n * @param prev - The record that will be deleted.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBeforeDelete?: " - }, - { - "kind": "Content", - "text": "(prev: R, source: 'remote' | 'user') => false | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onBeforeDelete", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly props: " - }, - { - "kind": "Content", - "text": "Props" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#put:member", - "docComment": "/**\n * Add some records to the store. It's an error if they already exist.\n *\n * @param records - The records to add.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "put: " - }, - { - "kind": "Content", - "text": "(records: R[], phaseOverride?: 'initialize') => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "put", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#query:member", - "docComment": "/**\n * A StoreQueries instance for this store.\n *\n * @public @readonly\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly query: " - }, - { - "kind": "Reference", - "text": "StoreQueries", - "canonicalReference": "@tldraw/store!~StoreQueries:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "query", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#remove:member", - "docComment": "/**\n * Remove some records from the store via their ids.\n *\n * @param ids - The ids of the records to remove.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "remove: " - }, - { - "kind": "Content", - "text": "(ids: " - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": "[]) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "remove", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#schema:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly schema: " - }, - { - "kind": "Reference", - "text": "StoreSchema", - "canonicalReference": "@tldraw/store!StoreSchema:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "schema", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#scopedTypes:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly scopedTypes: " - }, - { - "kind": "Content", - "text": "{\n readonly [K in " - }, - { - "kind": "Reference", - "text": "RecordScope", - "canonicalReference": "@tldraw/store!~RecordScope:type" - }, - { - "kind": "Content", - "text": "]: " - }, - { - "kind": "Reference", - "text": "ReadonlySet", - "canonicalReference": "!ReadonlySet:interface" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "scopedTypes", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#serialize:member", - "docComment": "/**\n * Creates a JSON payload from the record store.\n *\n * @param scope - The scope of records to serialize. Defaults to 'document'.\n *\n * @returns The record store snapshot as a JSON payload.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "serialize: " - }, - { - "kind": "Content", - "text": "(scope?: 'all' | " - }, - { - "kind": "Reference", - "text": "RecordScope", - "canonicalReference": "@tldraw/store!~RecordScope:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "SerializedStore", - "canonicalReference": "@tldraw/store!SerializedStore:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "serialize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#unsafeGetWithoutCapture:member", - "docComment": "/**\n * Get the value of a store record by its id without updating its epoch.\n *\n * @param id - The id of the record to get.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "unsafeGetWithoutCapture: " - }, - { - "kind": "Content", - "text": ">(id: K) => " - }, - { - "kind": "Reference", - "text": "RecFromId", - "canonicalReference": "@tldraw/store!~RecFromId:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "unsafeGetWithoutCapture", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!Store#update:member", - "docComment": "/**\n * Update a record. To update multiple records at once, use the `update` method of the `TypedStore` class.\n *\n * @param id - The id of the record to update.\n *\n * @param updater - A function that updates the record.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "update: " - }, - { - "kind": "Content", - "text": ">(id: K, updater: (record: " - }, - { - "kind": "Reference", - "text": "RecFromId", - "canonicalReference": "@tldraw/store!~RecFromId:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "RecFromId", - "canonicalReference": "@tldraw/store!~RecFromId:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "update", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!Store#validate:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "validate(phase: " - }, - { - "kind": "Content", - "text": "'createRecord' | 'initialize' | 'tests' | 'updateRecord'" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "phase", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "validate" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!StoreError:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type StoreError = " - }, - { - "kind": "Content", - "text": "{\n error: " - }, - { - "kind": "Reference", - "text": "Error", - "canonicalReference": "!Error:interface" - }, - { - "kind": "Content", - "text": ";\n phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord';\n recordBefore?: unknown;\n recordAfter: unknown;\n isExistingValidationIssue: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/Store.ts", - "releaseTag": "Public", - "name": "StoreError", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!StoreListener:type", - "docComment": "/**\n * A function that will be called when the history changes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type StoreListener = " - }, - { - "kind": "Content", - "text": "(entry: " - }, - { - "kind": "Reference", - "text": "HistoryEntry", - "canonicalReference": "@tldraw/store!HistoryEntry:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/Store.ts", - "releaseTag": "Public", - "name": "StoreListener", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 6 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/store!StoreSchema:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class StoreSchema " - } - ], - "fileUrlPath": "packages/store/src/lib/StoreSchema.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "P", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "isAbstract": false, - "name": "StoreSchema", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@tldraw/store!StoreSchema.create:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static create(types: " - }, - { - "kind": "Content", - "text": "{\n [TypeName in R['typeName']]: {\n createId: any;\n };\n }" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Reference", - "text": "StoreSchemaOptions", - "canonicalReference": "@tldraw/store!StoreSchemaOptions:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "StoreSchema", - "canonicalReference": "@tldraw/store!StoreSchema:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "P", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 12 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "types", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "create" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!StoreSchema#currentStoreVersion:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get currentStoreVersion(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "currentStoreVersion", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!StoreSchema#migratePersistedRecord:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "migratePersistedRecord(record: " - }, - { - "kind": "Content", - "text": "R" - }, - { - "kind": "Content", - "text": ", persistedSchema: " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" - }, - { - "kind": "Content", - "text": ", direction?: " - }, - { - "kind": "Content", - "text": "'down' | 'up'" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "MigrationResult", - "canonicalReference": "@tldraw/store!MigrationResult:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "record", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "persistedSchema", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "direction", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "migratePersistedRecord" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!StoreSchema#migrateStoreSnapshot:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "migrateStoreSnapshot(snapshot: " - }, - { - "kind": "Reference", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "MigrationResult", - "canonicalReference": "@tldraw/store!MigrationResult:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "SerializedStore", - "canonicalReference": "@tldraw/store!SerializedStore:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "snapshot", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "migrateStoreSnapshot" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!StoreSchema#serialize:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "serialize(): " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "serialize" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!StoreSchema#serializeEarliestVersion:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "serializeEarliestVersion(): " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "serializeEarliestVersion" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!StoreSchema#types:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly types: " - }, - { - "kind": "Content", - "text": "{\n [Record in R as Record['typeName']]: " - }, - { - "kind": "Reference", - "text": "RecordType", - "canonicalReference": "@tldraw/store!RecordType:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "types", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/store!StoreSchema#validateRecord:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "validateRecord(store: " - }, - { - "kind": "Reference", - "text": "Store", - "canonicalReference": "@tldraw/store!Store:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", record: " - }, - { - "kind": "Content", - "text": "R" - }, - { - "kind": "Content", - "text": ", phase: " - }, - { - "kind": "Content", - "text": "'createRecord' | 'initialize' | 'tests' | 'updateRecord'" - }, - { - "kind": "Content", - "text": ", recordBefore: " - }, - { - "kind": "Content", - "text": "null | R" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "R" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "store", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "record", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "phase", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - }, - { - "parameterName": "recordBefore", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "validateRecord" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!StoreSchemaOptions:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type StoreSchemaOptions = " - }, - { - "kind": "Content", - "text": "{\n snapshotMigrations?: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";\n onValidationFailure?: (data: {\n error: unknown;\n store: " - }, - { - "kind": "Reference", - "text": "Store", - "canonicalReference": "@tldraw/store!Store:class" - }, - { - "kind": "Content", - "text": ";\n record: R;\n phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord';\n recordBefore: null | R;\n }) => R;\n createIntegrityChecker?: (store: " - }, - { - "kind": "Reference", - "text": "Store", - "canonicalReference": "@tldraw/store!Store:class" - }, - { - "kind": "Content", - "text": ") => void;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/StoreSchema.ts", - "releaseTag": "Public", - "name": "StoreSchemaOptions", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "P", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 10 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!StoreSnapshot:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type StoreSnapshot = " - }, - { - "kind": "Content", - "text": "{\n store: " - }, - { - "kind": "Reference", - "text": "SerializedStore", - "canonicalReference": "@tldraw/store!SerializedStore:type" - }, - { - "kind": "Content", - "text": ";\n schema: " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/Store.ts", - "releaseTag": "Public", - "name": "StoreSnapshot", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!StoreValidator:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type StoreValidator = " - }, - { - "kind": "Content", - "text": "{\n validate: (record: unknown) => R;\n validateUsingKnownGoodVersion?: (knownGoodVersion: R, record: unknown) => R;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/Store.ts", - "releaseTag": "Public", - "name": "StoreValidator", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!StoreValidators:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type StoreValidators = " - }, - { - "kind": "Content", - "text": "{\n [K in R['typeName']]: " - }, - { - "kind": "Reference", - "text": "StoreValidator", - "canonicalReference": "@tldraw/store!StoreValidator:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Extract", - "canonicalReference": "!Extract:type" - }, - { - "kind": "Content", - "text": ">;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/Store.ts", - "releaseTag": "Public", - "name": "StoreValidators", - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!UnknownRecord:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type UnknownRecord = " - }, - { - "kind": "Reference", - "text": "BaseRecord", - "canonicalReference": "@tldraw/store!BaseRecord:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/BaseRecord.ts", - "releaseTag": "Public", - "name": "UnknownRecord", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - } - ] - } - ] + "metadata": { + "toolPackage": "@microsoft/api-extractor", + "toolVersion": "7.41.0", + "schemaVersion": 1011, + "oldestForwardsCompatibleVersion": 1001, + "tsdocConfig": { + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "noStandardTags": true, + "tagDefinitions": [ + { + "tagName": "@alpha", + "syntaxKind": "modifier" + }, + { + "tagName": "@beta", + "syntaxKind": "modifier" + }, + { + "tagName": "@defaultValue", + "syntaxKind": "block" + }, + { + "tagName": "@decorator", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@deprecated", + "syntaxKind": "block" + }, + { + "tagName": "@eventProperty", + "syntaxKind": "modifier" + }, + { + "tagName": "@example", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@experimental", + "syntaxKind": "modifier" + }, + { + "tagName": "@inheritDoc", + "syntaxKind": "inline" + }, + { + "tagName": "@internal", + "syntaxKind": "modifier" + }, + { + "tagName": "@label", + "syntaxKind": "inline" + }, + { + "tagName": "@link", + "syntaxKind": "inline", + "allowMultiple": true + }, + { + "tagName": "@override", + "syntaxKind": "modifier" + }, + { + "tagName": "@packageDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@param", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@privateRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@public", + "syntaxKind": "modifier" + }, + { + "tagName": "@readonly", + "syntaxKind": "modifier" + }, + { + "tagName": "@remarks", + "syntaxKind": "block" + }, + { + "tagName": "@returns", + "syntaxKind": "block" + }, + { + "tagName": "@sealed", + "syntaxKind": "modifier" + }, + { + "tagName": "@see", + "syntaxKind": "block" + }, + { + "tagName": "@throws", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@typeParam", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@virtual", + "syntaxKind": "modifier" + }, + { + "tagName": "@betaDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@internalRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@preapproved", + "syntaxKind": "modifier" + } + ], + "supportForTags": { + "@alpha": true, + "@beta": true, + "@defaultValue": true, + "@decorator": true, + "@deprecated": true, + "@eventProperty": true, + "@example": true, + "@experimental": true, + "@inheritDoc": true, + "@internal": true, + "@label": true, + "@link": true, + "@override": true, + "@packageDocumentation": true, + "@param": true, + "@privateRemarks": true, + "@public": true, + "@readonly": true, + "@remarks": true, + "@returns": true, + "@sealed": true, + "@see": true, + "@throws": true, + "@typeParam": true, + "@virtual": true, + "@betaDocumentation": true, + "@internalRemarks": true, + "@preapproved": true + }, + "reportUnsupportedHtmlElements": false + } + }, + "kind": "Package", + "canonicalReference": "@tldraw/store!", + "docComment": "", + "name": "@tldraw/store", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EntryPoint", + "canonicalReference": "@tldraw/store!", + "name": "", + "preserveMemberOrder": false, + "members": [ + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!AllRecords:type", + "docComment": "/**\n * Get the type of all records in a record store.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type AllRecords" + }, + { + "kind": "Content", + "text": "> = " + }, + { + "kind": "Reference", + "text": "ExtractR", + "canonicalReference": "@tldraw/store!~ExtractR:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ExtractRecordType", + "canonicalReference": "@tldraw/store!~ExtractRecordType:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/type-utils.ts", + "releaseTag": "Public", + "name": "AllRecords", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 4, + "endIndex": 8 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/store!assertIdType:function(1)", + "docComment": "/**\n * Assert whether an id correspond to a record type.\n *\n * @param id - The id to check.\n *\n * @param type - The type of the record.\n *\n * @example\n * ```ts\n * assertIdType(myId, \"shape\")\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function assertIdType(id: " + }, + { + "kind": "Content", + "text": "string | undefined" + }, + { + "kind": "Content", + "text": ", type: " + }, + { + "kind": "Reference", + "text": "RecordType", + "canonicalReference": "@tldraw/store!RecordType:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "asserts " + }, + { + "kind": "Reference", + "text": "id", + "canonicalReference": "@tldraw/store!~id" + }, + { + "kind": "Content", + "text": " is " + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/RecordType.ts", + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 13 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "assertIdType" + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/store!BaseRecord:interface", + "docComment": "/**\n * The base record that all records must extend.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BaseRecord" + }, + { + "kind": "Content", + "text": "> " + } + ], + "fileUrlPath": "packages/store/src/lib/BaseRecord.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TypeName", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Id", + "constraintTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "BaseRecord", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!BaseRecord#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly id: " + }, + { + "kind": "Content", + "text": "Id" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!BaseRecord#typeName:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly typeName: " + }, + { + "kind": "Content", + "text": "TypeName" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "typeName", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!CollectionDiff:type", + "docComment": "/**\n * A diff describing the changes to a collection.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type CollectionDiff = " + }, + { + "kind": "Content", + "text": "{\n added?: " + }, + { + "kind": "Reference", + "text": "Set", + "canonicalReference": "!Set:interface" + }, + { + "kind": "Content", + "text": ";\n removed?: " + }, + { + "kind": "Reference", + "text": "Set", + "canonicalReference": "!Set:interface" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/Store.ts", + "releaseTag": "Public", + "name": "CollectionDiff", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/store!compareSchemas:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "compareSchemas: (_a: " + }, + { + "kind": "Reference", + "text": "SerializedSchema", + "canonicalReference": "@tldraw/store!SerializedSchema:type" + }, + { + "kind": "Content", + "text": ", _b: " + }, + { + "kind": "Reference", + "text": "SerializedSchema", + "canonicalReference": "@tldraw/store!SerializedSchema:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Content", + "text": "-1 | 0 | 1" + } + ], + "fileUrlPath": "packages/store/src/lib/compareSchemas.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "_a", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "_b", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "compareSchemas" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!ComputedCache:type", + "docComment": "/**\n * A record store is a collection of records of different types.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type ComputedCache = " + }, + { + "kind": "Content", + "text": "{\n get(id: " + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": "): Data | undefined;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/Store.ts", + "releaseTag": "Public", + "name": "ComputedCache", + "typeParameters": [ + { + "typeParameterName": "Data", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/store!createMigrationIds:function(1)", + "docComment": "/**\n * Creates a named set of migration ids given a named set of version numbers and a sequence id.\n *\n * See the [migration guide](https://tldraw.dev/docs/persistence#Migrations) for more info on how to use this API.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createMigrationIds" + }, + { + "kind": "Content", + "text": ">(sequenceId: " + }, + { + "kind": "Content", + "text": "ID" + }, + { + "kind": "Content", + "text": ", versions: " + }, + { + "kind": "Content", + "text": "Versions" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n [K in keyof Versions]: `${ID}/${Versions[K]}`;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "sequenceId", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "versions", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "ID", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Versions", + "constraintTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "createMigrationIds" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/store!createMigrationSequence:function(1)", + "docComment": "/**\n * Creates a migration sequence. See the [migration guide](https://tldraw.dev/docs/persistence#Migrations) for more info on how to use this API.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createMigrationSequence({ sequence, sequenceId, retroactive, }: " + }, + { + "kind": "Content", + "text": "{\n sequenceId: string;\n retroactive?: boolean;\n sequence: " + }, + { + "kind": "Reference", + "text": "Array", + "canonicalReference": "!Array:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Migration", + "canonicalReference": "@tldraw/store!Migration:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "StandaloneDependsOn", + "canonicalReference": "@tldraw/store!~StandaloneDependsOn:type" + }, + { + "kind": "Content", + "text": ">;\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "MigrationSequence", + "canonicalReference": "@tldraw/store!MigrationSequence:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ sequence, sequenceId, retroactive, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isOptional": false + } + ], + "name": "createMigrationSequence" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/store!createRecordType:function(1)", + "docComment": "/**\n * Create a record type.\n *\n * @param typeName - The name of the type to create.\n *\n * @example\n * ```ts\n * const Book = createRecordType('book')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createRecordType(typeName: " + }, + { + "kind": "Content", + "text": "R['typeName']" + }, + { + "kind": "Content", + "text": ", config: " + }, + { + "kind": "Content", + "text": "{\n validator?: " + }, + { + "kind": "Reference", + "text": "StoreValidator", + "canonicalReference": "@tldraw/store!StoreValidator:type" + }, + { + "kind": "Content", + "text": ";\n scope: " + }, + { + "kind": "Reference", + "text": "RecordScope", + "canonicalReference": "@tldraw/store!~RecordScope:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "RecordType", + "canonicalReference": "@tldraw/store!RecordType:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/RecordType.ts", + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 15 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "typeName", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 10 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "createRecordType" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/store!defineMigrations:function(1)", + "docComment": "/**\n * @deprecated\n *\n * use `createShapePropsMigrationSequence` instead. See [the docs](https://tldraw.dev/docs/persistence#Updating-legacy-shape-migrations-defineMigrations) for how to migrate.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function defineMigrations(opts: " + }, + { + "kind": "Content", + "text": "{\n firstVersion?: number;\n currentVersion?: number;\n migrators?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": ";\n subTypeKey?: string;\n subTypeMigrations?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "LegacyMigrations", + "canonicalReference": "@tldraw/store!LegacyMigrations:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 10 + }, + "isOptional": false + } + ], + "name": "defineMigrations" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/store!devFreeze:function(1)", + "docComment": "/**\n * Freeze an object when in development mode. Copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n *\n * @param object - The object to freeze.\n *\n * @returns The frozen object when in development mode, or else the object when in other modes.\n *\n * @example\n * ```ts\n * const frozen = devFreeze({ a: 1 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function devFreeze(object: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/devFreeze.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "object", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "devFreeze" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!HistoryEntry:type", + "docComment": "/**\n * An entry containing changes that originated either by user actions or remote changes.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type HistoryEntry = " + }, + { + "kind": "Content", + "text": "{\n changes: " + }, + { + "kind": "Reference", + "text": "RecordsDiff", + "canonicalReference": "@tldraw/store!RecordsDiff:type" + }, + { + "kind": "Content", + "text": ";\n source: " + }, + { + "kind": "Reference", + "text": "ChangeSource", + "canonicalReference": "@tldraw/store!~ChangeSource:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/Store.ts", + "releaseTag": "Public", + "name": "HistoryEntry", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "typeTokenRange": { + "startIndex": 5, + "endIndex": 10 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!IdOf:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type IdOf = " + }, + { + "kind": "Content", + "text": "R['id']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/BaseRecord.ts", + "releaseTag": "Public", + "name": "IdOf", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!LegacyMigration:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type LegacyMigration = " + }, + { + "kind": "Content", + "text": "{\n up: (oldState: Before) => After;\n down: (newState: After) => Before;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "releaseTag": "Public", + "name": "LegacyMigration", + "typeParameters": [ + { + "typeParameterName": "Before", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "typeParameterName": "After", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "typeTokenRange": { + "startIndex": 5, + "endIndex": 6 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/store!LegacyMigrations:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface LegacyMigrations extends " + }, + { + "kind": "Reference", + "text": "LegacyBaseMigrationsInfo", + "canonicalReference": "@tldraw/store!~LegacyBaseMigrationsInfo:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "releaseTag": "Public", + "name": "LegacyMigrations", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!LegacyMigrations#subTypeKey:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "subTypeKey?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "subTypeKey", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!LegacyMigrations#subTypeMigrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "subTypeMigrations?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "subTypeMigrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!Migration:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type Migration = " + }, + { + "kind": "Content", + "text": "{\n readonly id: " + }, + { + "kind": "Reference", + "text": "MigrationId", + "canonicalReference": "@tldraw/store!MigrationId:type" + }, + { + "kind": "Content", + "text": ";\n readonly dependsOn?: readonly " + }, + { + "kind": "Reference", + "text": "MigrationId", + "canonicalReference": "@tldraw/store!MigrationId:type" + }, + { + "kind": "Content", + "text": "[] | undefined;\n} & ({\n readonly scope: 'record';\n readonly filter?: (record: " + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": ") => boolean;\n readonly up: (oldState: " + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": " | void;\n readonly down?: (newState: " + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": " | void;\n} | {\n readonly scope: 'store';\n readonly up: (oldState: " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": ">) => " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": "> | void;\n readonly down?: (newState: " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": ">) => " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": "> | void;\n})" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "releaseTag": "Public", + "name": "Migration", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 32 + } + }, + { + "kind": "Enum", + "canonicalReference": "@tldraw/store!MigrationFailureReason:enum", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum MigrationFailureReason " + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "releaseTag": "Public", + "name": "MigrationFailureReason", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "@tldraw/store!MigrationFailureReason.IncompatibleSubtype:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "IncompatibleSubtype = " + }, + { + "kind": "Content", + "text": "\"incompatible-subtype\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "IncompatibleSubtype" + }, + { + "kind": "EnumMember", + "canonicalReference": "@tldraw/store!MigrationFailureReason.MigrationError:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "MigrationError = " + }, + { + "kind": "Content", + "text": "\"migration-error\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "MigrationError" + }, + { + "kind": "EnumMember", + "canonicalReference": "@tldraw/store!MigrationFailureReason.TargetVersionTooNew:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetVersionTooNew = " + }, + { + "kind": "Content", + "text": "\"target-version-too-new\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "TargetVersionTooNew" + }, + { + "kind": "EnumMember", + "canonicalReference": "@tldraw/store!MigrationFailureReason.TargetVersionTooOld:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetVersionTooOld = " + }, + { + "kind": "Content", + "text": "\"target-version-too-old\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "TargetVersionTooOld" + }, + { + "kind": "EnumMember", + "canonicalReference": "@tldraw/store!MigrationFailureReason.UnknownType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "UnknownType = " + }, + { + "kind": "Content", + "text": "\"unknown-type\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "UnknownType" + }, + { + "kind": "EnumMember", + "canonicalReference": "@tldraw/store!MigrationFailureReason.UnrecognizedSubtype:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "UnrecognizedSubtype = " + }, + { + "kind": "Content", + "text": "\"unrecognized-subtype\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "UnrecognizedSubtype" + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!MigrationId:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type MigrationId = " + }, + { + "kind": "Content", + "text": "`${string}/${number}`" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "releaseTag": "Public", + "name": "MigrationId", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!MigrationResult:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type MigrationResult = " + }, + { + "kind": "Content", + "text": "{\n type: 'error';\n reason: " + }, + { + "kind": "Reference", + "text": "MigrationFailureReason", + "canonicalReference": "@tldraw/store!MigrationFailureReason:enum" + }, + { + "kind": "Content", + "text": ";\n} | {\n type: 'success';\n value: T;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "releaseTag": "Public", + "name": "MigrationResult", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/store!MigrationSequence:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface MigrationSequence " + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "releaseTag": "Public", + "name": "MigrationSequence", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!MigrationSequence#retroactive:member", + "docComment": "/**\n * retroactive should be true if the migrations should be applied to snapshots that were created before this migration sequence was added to the schema.\n *\n * In general:\n *\n * - retroactive should be true when app developers create their own new migration sequences. - retroactive should be false when library developers ship a migration sequence. When you install a library for the first time, any migrations that were added in the library before that point should generally _not_ be applied to your existing data.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "retroactive: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "retroactive", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!MigrationSequence#sequence:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "sequence: " + }, + { + "kind": "Reference", + "text": "Migration", + "canonicalReference": "@tldraw/store!Migration:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "sequence", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!MigrationSequence#sequenceId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "sequenceId: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "sequenceId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!RecordId:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type RecordId = " + }, + { + "kind": "Content", + "text": "string & {\n __type__: R;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/BaseRecord.ts", + "releaseTag": "Public", + "name": "RecordId", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!RecordsDiff:type", + "docComment": "/**\n * A diff describing the changes to a record.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type RecordsDiff = " + }, + { + "kind": "Content", + "text": "{\n added: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": ", R>;\n updated: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": ", [from: R, to: R]>;\n removed: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": ", R>;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/Store.ts", + "releaseTag": "Public", + "name": "RecordsDiff", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 16 + } + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/store!RecordType:class", + "docComment": "/**\n * A record type is a type that can be stored in a record store. It is created with `createRecordType`.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class RecordType" + }, + { + "kind": "Content", + "text": "> " + } + ], + "fileUrlPath": "packages/store/src/lib/RecordType.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "RequiredProperties", + "constraintTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "RecordType", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/store!RecordType:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `RecordType` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(\n typeName: " + }, + { + "kind": "Content", + "text": "R['typeName']" + }, + { + "kind": "Content", + "text": ", config: " + }, + { + "kind": "Content", + "text": "{\n readonly createDefaultProperties: () => " + }, + { + "kind": "Reference", + "text": "Exclude", + "canonicalReference": "!Exclude:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "OmitMeta", + "canonicalReference": "@tldraw/store!~OmitMeta:type" + }, + { + "kind": "Content", + "text": ", RequiredProperties>;\n readonly validator?: " + }, + { + "kind": "Reference", + "text": "StoreValidator", + "canonicalReference": "@tldraw/store!StoreValidator:type" + }, + { + "kind": "Content", + "text": ";\n readonly scope?: " + }, + { + "kind": "Reference", + "text": "RecordScope", + "canonicalReference": "@tldraw/store!~RecordScope:type" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "typeName", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 12 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!RecordType#clone:member(1)", + "docComment": "/**\n * Clone a record of this type.\n *\n * @param record - The record to clone.\n *\n * @returns The cloned record.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "clone(record: " + }, + { + "kind": "Content", + "text": "R" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "R" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "record", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "clone" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!RecordType#create:member(1)", + "docComment": "/**\n * Create a new record of this type.\n *\n * @param properties - The properties of the record.\n *\n * @returns The new record.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "create(properties: " + }, + { + "kind": "Reference", + "text": "Pick", + "canonicalReference": "!Pick:type" + }, + { + "kind": "Content", + "text": " & " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": ", RequiredProperties>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "R" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "properties", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "create" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!RecordType#createCustomId:member(1)", + "docComment": "/**\n * Create a new ID for this record type based on the given ID.\n *\n * @deprecated\n *\n * - Use `createId` instead.\n *\n * @param id - The ID to base the new ID on.\n *\n * @returns The new ID.\n *\n * @example\n * ```ts\n * const id = recordType.createCustomId('myId')\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createCustomId(id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createCustomId" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!RecordType#createDefaultProperties:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly createDefaultProperties: " + }, + { + "kind": "Content", + "text": "() => " + }, + { + "kind": "Reference", + "text": "Exclude", + "canonicalReference": "!Exclude:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "OmitMeta", + "canonicalReference": "@tldraw/store!~OmitMeta:type" + }, + { + "kind": "Content", + "text": ", RequiredProperties>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "createDefaultProperties", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!RecordType#createId:member(1)", + "docComment": "/**\n * Create a new ID for this record type.\n *\n * @returns The new ID.\n *\n * @example\n * ```ts\n * const id = recordType.createId()\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createId(customUniquePart?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "customUniquePart", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createId" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!RecordType#isId:member(1)", + "docComment": "/**\n * Check whether an id is an id of this type.\n *\n * @param id - The id to check.\n *\n * @returns Whether the id is an id of this type.\n *\n * @example\n * ```ts\n * const result = recordType.isIn('someId')\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isId(id?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "id", + "canonicalReference": "@tldraw/store!~id" + }, + { + "kind": "Content", + "text": " is " + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isId" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!RecordType#isInstance:member", + "docComment": "/**\n * Check whether a record is an instance of this record type.\n *\n * @param record - The record to check.\n *\n * @returns Whether the record is an instance of this record type.\n *\n * @example\n * ```ts\n * const result = recordType.isInstance(someRecord)\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isInstance: " + }, + { + "kind": "Content", + "text": "(record?: " + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "record", + "canonicalReference": "@tldraw/store!~record" + }, + { + "kind": "Content", + "text": " is R" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isInstance", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!RecordType#parseId:member(1)", + "docComment": "/**\n * Takes an id like `user:123` and returns the part after the colon `123`\n *\n * @param id - The id\n *\n * @returns \n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "parseId(id: " + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "parseId" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!RecordType#scope:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly scope: " + }, + { + "kind": "Reference", + "text": "RecordScope", + "canonicalReference": "@tldraw/store!~RecordScope:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "scope", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!RecordType#typeName:member", + "docComment": "/**\n * The unique type associated with this record.\n *\n * @public @readonly\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly typeName: " + }, + { + "kind": "Content", + "text": "R['typeName']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "typeName", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!RecordType#validate:member(1)", + "docComment": "/**\n * Check that the passed in record passes the validations for this type. Returns its input correctly typed if it does, but throws an error otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "validate(record: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": ", recordBefore?: " + }, + { + "kind": "Content", + "text": "R" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "R" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "record", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "recordBefore", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validate" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!RecordType#validator:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly validator: " + }, + { + "kind": "Reference", + "text": "StoreValidator", + "canonicalReference": "@tldraw/store!StoreValidator:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "validator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!RecordType#withDefaultProperties:member(1)", + "docComment": "/**\n * Create a new RecordType that has the same type name as this RecordType and includes the given default properties.\n *\n * @param fn - A function that returns the default properties of the new RecordType.\n *\n * @returns The new RecordType.\n *\n * @example\n * ```ts\n * const authorType = createRecordType('author', () => ({ living: true }))\n * const deadAuthorType = authorType.withDefaultProperties({ living: false })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "withDefaultProperties, 'id' | 'typeName'>" + }, + { + "kind": "Content", + "text": ">(createDefaultProperties: " + }, + { + "kind": "Content", + "text": "() => DefaultProps" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "RecordType", + "canonicalReference": "@tldraw/store!RecordType:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "DefaultProps", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "createDefaultProperties", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "withDefaultProperties" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/store!reverseRecordsDiff:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function reverseRecordsDiff(diff: " + }, + { + "kind": "Reference", + "text": "RecordsDiff", + "canonicalReference": "@tldraw/store!RecordsDiff:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "RecordsDiff", + "canonicalReference": "@tldraw/store!RecordsDiff:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/Store.ts", + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "diff", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "name": "reverseRecordsDiff" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!SerializedSchema:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type SerializedSchema = " + }, + { + "kind": "Reference", + "text": "SerializedSchemaV1", + "canonicalReference": "@tldraw/store!SerializedSchemaV1:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "SerializedSchemaV2", + "canonicalReference": "@tldraw/store!SerializedSchemaV2:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/StoreSchema.ts", + "releaseTag": "Public", + "name": "SerializedSchema", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/store!SerializedSchemaV1:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface SerializedSchemaV1 " + } + ], + "fileUrlPath": "packages/store/src/lib/StoreSchema.ts", + "releaseTag": "Public", + "name": "SerializedSchemaV1", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!SerializedSchemaV1#recordVersions:member", + "docComment": "/**\n * Record versions are the versions for each record type. e.g. adding a new field to a record\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "recordVersions: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": ";\n subTypeKey: string;\n } | {\n version: number;\n }>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "recordVersions", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!SerializedSchemaV1#schemaVersion:member", + "docComment": "/**\n * Schema version is the version for this type you're looking at right now\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "schemaVersion: " + }, + { + "kind": "Content", + "text": "1" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "schemaVersion", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!SerializedSchemaV1#storeVersion:member", + "docComment": "/**\n * Store version is the version for the structure of the store. e.g. higher level structure like removing or renaming a record type.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "storeVersion: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "storeVersion", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/store!SerializedSchemaV2:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface SerializedSchemaV2 " + } + ], + "fileUrlPath": "packages/store/src/lib/StoreSchema.ts", + "releaseTag": "Public", + "name": "SerializedSchemaV2", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!SerializedSchemaV2#schemaVersion:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "schemaVersion: " + }, + { + "kind": "Content", + "text": "2" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "schemaVersion", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!SerializedSchemaV2#sequences:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "sequences: " + }, + { + "kind": "Content", + "text": "{\n [sequenceId: string]: {\n version: number;\n retroactive: boolean;\n };\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "sequences", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!SerializedStore:type", + "docComment": "/**\n * A serialized snapshot of the record store's values.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type SerializedStore = " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": ", R>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/Store.ts", + "releaseTag": "Public", + "name": "SerializedStore", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 7 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/store!squashRecordDiffs:function(1)", + "docComment": "/**\n * Squash a collection of diffs into a single diff.\n *\n * @param diffs - An array of diffs to squash.\n *\n * @returns A single diff that represents the squashed diffs.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function squashRecordDiffs(diffs: " + }, + { + "kind": "Reference", + "text": "RecordsDiff", + "canonicalReference": "@tldraw/store!RecordsDiff:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "RecordsDiff", + "canonicalReference": "@tldraw/store!RecordsDiff:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/Store.ts", + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "diffs", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "squashRecordDiffs" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/store!Store:class", + "docComment": "/**\n * A store of records.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Store " + } + ], + "fileUrlPath": "packages/store/src/lib/Store.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "typeParameterName": "Props", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + } + } + ], + "isAbstract": false, + "name": "Store", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "@tldraw/store!Store#_flushHistory:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "_flushHistory(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "_flushHistory" + }, + { + "kind": "Constructor", + "canonicalReference": "@tldraw/store!Store:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Store` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Content", + "text": "{\n initialData?: " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": ";\n schema: " + }, + { + "kind": "Reference", + "text": "StoreSchema", + "canonicalReference": "@tldraw/store!StoreSchema:class" + }, + { + "kind": "Content", + "text": ";\n props: Props;\n }" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#allRecords:member", + "docComment": "/**\n * Get an array of all values in the store.\n *\n * @returns An array of all values in the store.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "allRecords: " + }, + { + "kind": "Content", + "text": "() => R[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "allRecords", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!Store#applyDiff:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "applyDiff(diff: " + }, + { + "kind": "Reference", + "text": "RecordsDiff", + "canonicalReference": "@tldraw/store!RecordsDiff:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", runCallbacks?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "diff", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "runCallbacks", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "applyDiff" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#clear:member", + "docComment": "/**\n * Removes all records from the store.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "clear: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "clear", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#createComputedCache:member", + "docComment": "/**\n * Create a computed cache.\n *\n * @param name - The name of the derivation cache.\n *\n * @param derive - A function used to derive the value of the cache.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createComputedCache: " + }, + { + "kind": "Content", + "text": "(name: string, derive: (record: V) => T | undefined, isEqual?: ((a: V, b: V) => boolean) | undefined) => " + }, + { + "kind": "Reference", + "text": "ComputedCache", + "canonicalReference": "@tldraw/store!ComputedCache:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "createComputedCache", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#createSelectedComputedCache:member", + "docComment": "/**\n * Create a computed cache from a selector\n *\n * @param name - The name of the derivation cache.\n *\n * @param selector - A function that returns a subset of the original shape\n *\n * @param derive - A function used to derive the value of the cache.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createSelectedComputedCache: " + }, + { + "kind": "Content", + "text": "(name: string, selector: (record: V) => T | undefined, derive: (input: T) => J | undefined) => " + }, + { + "kind": "Reference", + "text": "ComputedCache", + "canonicalReference": "@tldraw/store!ComputedCache:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "createSelectedComputedCache", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!Store#extractingChanges:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "extractingChanges(fn: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "RecordsDiff", + "canonicalReference": "@tldraw/store!RecordsDiff:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "fn", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "extractingChanges" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!Store#filterChangesByScope:member(1)", + "docComment": "/**\n * Filters out non-document changes from a diff. Returns null if there are no changes left.\n *\n * @param change - the records diff\n *\n * @returns \n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "filterChangesByScope(change: " + }, + { + "kind": "Reference", + "text": "RecordsDiff", + "canonicalReference": "@tldraw/store!RecordsDiff:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", scope: " + }, + { + "kind": "Reference", + "text": "RecordScope", + "canonicalReference": "@tldraw/store!~RecordScope:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n added: { [K in " + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": "]: R; };\n updated: { [K_1 in " + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": "]: [from: R, to: R]; };\n removed: { [K in " + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": "]: R; };\n } | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 13 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "change", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "scope", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "filterChangesByScope" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#get:member", + "docComment": "/**\n * Get the value of a store record by its id.\n *\n * @param id - The id of the record to get.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get: " + }, + { + "kind": "Content", + "text": ">(id: K) => " + }, + { + "kind": "Reference", + "text": "RecFromId", + "canonicalReference": "@tldraw/store!~RecFromId:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "get", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#getRecordType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getRecordType: " + }, + { + "kind": "Content", + "text": "(record: R) => T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "getRecordType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!Store#getSnapshot:member(1)", + "docComment": "/**\n * Get a serialized snapshot of the store and its schema.\n * ```ts\n * const snapshot = store.getSnapshot()\n * store.loadSnapshot(snapshot)\n * ```\n *\n * @param scope - The scope of records to serialize. Defaults to 'document'.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getSnapshot(scope?: " + }, + { + "kind": "Content", + "text": "'all' | " + }, + { + "kind": "Reference", + "text": "RecordScope", + "canonicalReference": "@tldraw/store!~RecordScope:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "StoreSnapshot", + "canonicalReference": "@tldraw/store!StoreSnapshot:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "scope", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getSnapshot" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#has:member", + "docComment": "/**\n * Get whether the record store has a id.\n *\n * @param id - The id of the record to check.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "has: " + }, + { + "kind": "Content", + "text": ">(id: K) => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "has", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#history:member", + "docComment": "/**\n * An atom containing the store's history.\n *\n * @public @readonly\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly history: " + }, + { + "kind": "Reference", + "text": "Atom", + "canonicalReference": "@tldraw/state!Atom:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "history", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#id:member", + "docComment": "/**\n * The random id of the store.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#listen:member", + "docComment": "/**\n * Add a new listener to the store.\n *\n * @param onHistory - The listener to call when the store updates.\n *\n * @param filters - Filters to apply to the listener.\n *\n * @returns A function to remove the listener.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "listen: " + }, + { + "kind": "Content", + "text": "(onHistory: " + }, + { + "kind": "Reference", + "text": "StoreListener", + "canonicalReference": "@tldraw/store!StoreListener:type" + }, + { + "kind": "Content", + "text": ", filters?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "StoreListenerFilters", + "canonicalReference": "@tldraw/store!~StoreListenerFilters:type" + }, + { + "kind": "Content", + "text": ">) => () => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "listen", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!Store#loadSnapshot:member(1)", + "docComment": "/**\n * Load a serialized snapshot.\n * ```ts\n * const snapshot = store.getSnapshot()\n * store.loadSnapshot(snapshot)\n * ```\n *\n * @param snapshot - The snapshot to load.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "loadSnapshot(snapshot: " + }, + { + "kind": "Reference", + "text": "StoreSnapshot", + "canonicalReference": "@tldraw/store!StoreSnapshot:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "snapshot", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "loadSnapshot" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#mergeRemoteChanges:member", + "docComment": "/**\n * Merge changes from a remote source without triggering listeners.\n *\n * @param fn - A function that merges the external changes.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "mergeRemoteChanges: " + }, + { + "kind": "Content", + "text": "(fn: () => void) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "mergeRemoteChanges", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!Store#migrateSnapshot:member(1)", + "docComment": "/**\n * Migrate a serialized snapshot of the store and its schema.\n * ```ts\n * const snapshot = store.getSnapshot()\n * store.migrateSnapshot(snapshot)\n * ```\n *\n * @param snapshot - The snapshot to load.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "migrateSnapshot(snapshot: " + }, + { + "kind": "Reference", + "text": "StoreSnapshot", + "canonicalReference": "@tldraw/store!StoreSnapshot:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "StoreSnapshot", + "canonicalReference": "@tldraw/store!StoreSnapshot:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "snapshot", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "migrateSnapshot" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#onAfterChange:member", + "docComment": "/**\n * A callback fired after each record's change.\n *\n * @param prev - The previous value, if any.\n *\n * @param next - The next value.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onAfterChange?: " + }, + { + "kind": "Content", + "text": "(prev: R, next: R, source: 'remote' | 'user') => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onAfterChange", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#onAfterCreate:member", + "docComment": "/**\n * A callback fired after a record is created. Use this to perform related updates to other records in the store.\n *\n * @param record - The record to be created\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onAfterCreate?: " + }, + { + "kind": "Content", + "text": "(record: R, source: 'remote' | 'user') => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onAfterCreate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#onAfterDelete:member", + "docComment": "/**\n * A callback fired after a record is deleted.\n *\n * @param prev - The record that will be deleted.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onAfterDelete?: " + }, + { + "kind": "Content", + "text": "(prev: R, source: 'remote' | 'user') => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onAfterDelete", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#onBeforeChange:member", + "docComment": "/**\n * A callback fired before each record's change.\n *\n * @param prev - The previous value, if any.\n *\n * @param next - The next value.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBeforeChange?: " + }, + { + "kind": "Content", + "text": "(prev: R, next: R, source: 'remote' | 'user') => R" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onBeforeChange", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#onBeforeCreate:member", + "docComment": "/**\n * A callback fired after each record's change.\n *\n * @param prev - The previous value, if any.\n *\n * @param next - The next value.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBeforeCreate?: " + }, + { + "kind": "Content", + "text": "(next: R, source: 'remote' | 'user') => R" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onBeforeCreate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#onBeforeDelete:member", + "docComment": "/**\n * A callback fired before a record is deleted.\n *\n * @param prev - The record that will be deleted.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBeforeDelete?: " + }, + { + "kind": "Content", + "text": "(prev: R, source: 'remote' | 'user') => false | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onBeforeDelete", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly props: " + }, + { + "kind": "Content", + "text": "Props" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#put:member", + "docComment": "/**\n * Add some records to the store. It's an error if they already exist.\n *\n * @param records - The records to add.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "put: " + }, + { + "kind": "Content", + "text": "(records: R[], phaseOverride?: 'initialize') => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "put", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#query:member", + "docComment": "/**\n * A StoreQueries instance for this store.\n *\n * @public @readonly\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly query: " + }, + { + "kind": "Reference", + "text": "StoreQueries", + "canonicalReference": "@tldraw/store!~StoreQueries:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "query", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#remove:member", + "docComment": "/**\n * Remove some records from the store via their ids.\n *\n * @param ids - The ids of the records to remove.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "remove: " + }, + { + "kind": "Content", + "text": "(ids: " + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, + { + "kind": "Content", + "text": "[]) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "remove", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#schema:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly schema: " + }, + { + "kind": "Reference", + "text": "StoreSchema", + "canonicalReference": "@tldraw/store!StoreSchema:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "schema", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#scopedTypes:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly scopedTypes: " + }, + { + "kind": "Content", + "text": "{\n readonly [K in " + }, + { + "kind": "Reference", + "text": "RecordScope", + "canonicalReference": "@tldraw/store!~RecordScope:type" + }, + { + "kind": "Content", + "text": "]: " + }, + { + "kind": "Reference", + "text": "ReadonlySet", + "canonicalReference": "!ReadonlySet:interface" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "scopedTypes", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#serialize:member", + "docComment": "/**\n * Creates a JSON payload from the record store.\n *\n * @param scope - The scope of records to serialize. Defaults to 'document'.\n *\n * @returns The record store snapshot as a JSON payload.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "serialize: " + }, + { + "kind": "Content", + "text": "(scope?: 'all' | " + }, + { + "kind": "Reference", + "text": "RecordScope", + "canonicalReference": "@tldraw/store!~RecordScope:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "serialize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#unsafeGetWithoutCapture:member", + "docComment": "/**\n * Get the value of a store record by its id without updating its epoch.\n *\n * @param id - The id of the record to get.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "unsafeGetWithoutCapture: " + }, + { + "kind": "Content", + "text": ">(id: K) => " + }, + { + "kind": "Reference", + "text": "RecFromId", + "canonicalReference": "@tldraw/store!~RecFromId:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "unsafeGetWithoutCapture", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!Store#update:member", + "docComment": "/**\n * Update a record. To update multiple records at once, use the `update` method of the `TypedStore` class.\n *\n * @param id - The id of the record to update.\n *\n * @param updater - A function that updates the record.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "update: " + }, + { + "kind": "Content", + "text": ">(id: K, updater: (record: " + }, + { + "kind": "Reference", + "text": "RecFromId", + "canonicalReference": "@tldraw/store!~RecFromId:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "RecFromId", + "canonicalReference": "@tldraw/store!~RecFromId:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "update", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!Store#validate:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "validate(phase: " + }, + { + "kind": "Content", + "text": "'createRecord' | 'initialize' | 'tests' | 'updateRecord'" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "phase", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validate" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!StoreError:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type StoreError = " + }, + { + "kind": "Content", + "text": "{\n error: " + }, + { + "kind": "Reference", + "text": "Error", + "canonicalReference": "!Error:interface" + }, + { + "kind": "Content", + "text": ";\n phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord';\n recordBefore?: unknown;\n recordAfter: unknown;\n isExistingValidationIssue: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/Store.ts", + "releaseTag": "Public", + "name": "StoreError", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!StoreListener:type", + "docComment": "/**\n * A function that will be called when the history changes.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type StoreListener = " + }, + { + "kind": "Content", + "text": "(entry: " + }, + { + "kind": "Reference", + "text": "HistoryEntry", + "canonicalReference": "@tldraw/store!HistoryEntry:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/Store.ts", + "releaseTag": "Public", + "name": "StoreListener", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 6 + } + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/store!StoreSchema:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class StoreSchema " + } + ], + "fileUrlPath": "packages/store/src/lib/StoreSchema.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "P", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "isAbstract": false, + "name": "StoreSchema", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "@tldraw/store!StoreSchema.create:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static create(types: " + }, + { + "kind": "Content", + "text": "{\n [TypeName in R['typeName']]: {\n createId: any;\n };\n }" + }, + { + "kind": "Content", + "text": ", options?: " + }, + { + "kind": "Reference", + "text": "StoreSchemaOptions", + "canonicalReference": "@tldraw/store!StoreSchemaOptions:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "StoreSchema", + "canonicalReference": "@tldraw/store!StoreSchema:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "P", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "types", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "create" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!StoreSchema#getMigrationsSince:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getMigrationsSince(persistedSchema: " + }, + { + "kind": "Reference", + "text": "SerializedSchema", + "canonicalReference": "@tldraw/store!SerializedSchema:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Result", + "canonicalReference": "@tldraw/utils!Result:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Migration", + "canonicalReference": "@tldraw/store!Migration:type" + }, + { + "kind": "Content", + "text": "[], string>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "persistedSchema", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getMigrationsSince" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!StoreSchema#migratePersistedRecord:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "migratePersistedRecord(record: " + }, + { + "kind": "Content", + "text": "R" + }, + { + "kind": "Content", + "text": ", persistedSchema: " + }, + { + "kind": "Reference", + "text": "SerializedSchema", + "canonicalReference": "@tldraw/store!SerializedSchema:type" + }, + { + "kind": "Content", + "text": ", direction?: " + }, + { + "kind": "Content", + "text": "'down' | 'up'" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "MigrationResult", + "canonicalReference": "@tldraw/store!MigrationResult:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "record", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "persistedSchema", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "direction", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "migratePersistedRecord" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!StoreSchema#migrateStoreSnapshot:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "migrateStoreSnapshot(snapshot: " + }, + { + "kind": "Reference", + "text": "StoreSnapshot", + "canonicalReference": "@tldraw/store!StoreSnapshot:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "MigrationResult", + "canonicalReference": "@tldraw/store!MigrationResult:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "snapshot", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "migrateStoreSnapshot" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!StoreSchema#migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly migrations: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!StoreSchema#serialize:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "serialize(): " + }, + { + "kind": "Reference", + "text": "SerializedSchemaV2", + "canonicalReference": "@tldraw/store!SerializedSchemaV2:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "serialize" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!StoreSchema#serializeEarliestVersion:member(1)", + "docComment": "/**\n * @deprecated\n *\n * This is only here for legacy reasons, don't use it unless you have david's blessing!\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "serializeEarliestVersion(): " + }, + { + "kind": "Reference", + "text": "SerializedSchema", + "canonicalReference": "@tldraw/store!SerializedSchema:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "serializeEarliestVersion" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!StoreSchema#sortedMigrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly sortedMigrations: " + }, + { + "kind": "Content", + "text": "readonly " + }, + { + "kind": "Reference", + "text": "Migration", + "canonicalReference": "@tldraw/store!Migration:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "sortedMigrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!StoreSchema#types:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly types: " + }, + { + "kind": "Content", + "text": "{\n [Record in R as Record['typeName']]: " + }, + { + "kind": "Reference", + "text": "RecordType", + "canonicalReference": "@tldraw/store!RecordType:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "types", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/store!StoreSchema#validateRecord:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "validateRecord(store: " + }, + { + "kind": "Reference", + "text": "Store", + "canonicalReference": "@tldraw/store!Store:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", record: " + }, + { + "kind": "Content", + "text": "R" + }, + { + "kind": "Content", + "text": ", phase: " + }, + { + "kind": "Content", + "text": "'createRecord' | 'initialize' | 'tests' | 'updateRecord'" + }, + { + "kind": "Content", + "text": ", recordBefore: " + }, + { + "kind": "Content", + "text": "null | R" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "R" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "store", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "record", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "phase", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "recordBefore", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validateRecord" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!StoreSchemaOptions:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type StoreSchemaOptions = " + }, + { + "kind": "Content", + "text": "{\n migrations?: " + }, + { + "kind": "Reference", + "text": "MigrationSequence", + "canonicalReference": "@tldraw/store!MigrationSequence:interface" + }, + { + "kind": "Content", + "text": "[];\n onValidationFailure?: (data: {\n error: unknown;\n store: " + }, + { + "kind": "Reference", + "text": "Store", + "canonicalReference": "@tldraw/store!Store:class" + }, + { + "kind": "Content", + "text": ";\n record: R;\n phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord';\n recordBefore: null | R;\n }) => R;\n createIntegrityChecker?: (store: " + }, + { + "kind": "Reference", + "text": "Store", + "canonicalReference": "@tldraw/store!Store:class" + }, + { + "kind": "Content", + "text": ") => void;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/StoreSchema.ts", + "releaseTag": "Public", + "name": "StoreSchemaOptions", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "P", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 10 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!StoreSnapshot:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type StoreSnapshot = " + }, + { + "kind": "Content", + "text": "{\n store: " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": ";\n schema: " + }, + { + "kind": "Reference", + "text": "SerializedSchema", + "canonicalReference": "@tldraw/store!SerializedSchema:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/Store.ts", + "releaseTag": "Public", + "name": "StoreSnapshot", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!StoreValidator:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type StoreValidator = " + }, + { + "kind": "Content", + "text": "{\n validate: (record: unknown) => R;\n validateUsingKnownGoodVersion?: (knownGoodVersion: R, record: unknown) => R;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/Store.ts", + "releaseTag": "Public", + "name": "StoreValidator", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!StoreValidators:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type StoreValidators = " + }, + { + "kind": "Content", + "text": "{\n [K in R['typeName']]: " + }, + { + "kind": "Reference", + "text": "StoreValidator", + "canonicalReference": "@tldraw/store!StoreValidator:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Extract", + "canonicalReference": "!Extract:type" + }, + { + "kind": "Content", + "text": ">;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/Store.ts", + "releaseTag": "Public", + "name": "StoreValidators", + "typeParameters": [ + { + "typeParameterName": "R", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!UnknownRecord:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type UnknownRecord = " + }, + { + "kind": "Reference", + "text": "BaseRecord", + "canonicalReference": "@tldraw/store!BaseRecord:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/BaseRecord.ts", + "releaseTag": "Public", + "name": "UnknownRecord", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + } + ] + } + ] } diff --git a/apps/docs/api/tldraw.api.json b/apps/docs/api/tldraw.api.json index e8e1edaa5..d0f4e4856 100644 --- a/apps/docs/api/tldraw.api.json +++ b/apps/docs/api/tldraw.api.json @@ -1,28528 +1,29467 @@ { - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.41.0", - "schemaVersion": 1011, - "oldestForwardsCompatibleVersion": 1001, - "tsdocConfig": { - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "noStandardTags": true, - "tagDefinitions": [ - { - "tagName": "@alpha", - "syntaxKind": "modifier" - }, - { - "tagName": "@beta", - "syntaxKind": "modifier" - }, - { - "tagName": "@defaultValue", - "syntaxKind": "block" - }, - { - "tagName": "@decorator", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@deprecated", - "syntaxKind": "block" - }, - { - "tagName": "@eventProperty", - "syntaxKind": "modifier" - }, - { - "tagName": "@example", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@experimental", - "syntaxKind": "modifier" - }, - { - "tagName": "@inheritDoc", - "syntaxKind": "inline" - }, - { - "tagName": "@internal", - "syntaxKind": "modifier" - }, - { - "tagName": "@label", - "syntaxKind": "inline" - }, - { - "tagName": "@link", - "syntaxKind": "inline", - "allowMultiple": true - }, - { - "tagName": "@override", - "syntaxKind": "modifier" - }, - { - "tagName": "@packageDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@param", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@privateRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@public", - "syntaxKind": "modifier" - }, - { - "tagName": "@readonly", - "syntaxKind": "modifier" - }, - { - "tagName": "@remarks", - "syntaxKind": "block" - }, - { - "tagName": "@returns", - "syntaxKind": "block" - }, - { - "tagName": "@sealed", - "syntaxKind": "modifier" - }, - { - "tagName": "@see", - "syntaxKind": "block" - }, - { - "tagName": "@throws", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@typeParam", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@virtual", - "syntaxKind": "modifier" - }, - { - "tagName": "@betaDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@internalRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@preapproved", - "syntaxKind": "modifier" - } - ], - "supportForTags": { - "@alpha": true, - "@beta": true, - "@defaultValue": true, - "@decorator": true, - "@deprecated": true, - "@eventProperty": true, - "@example": true, - "@experimental": true, - "@inheritDoc": true, - "@internal": true, - "@label": true, - "@link": true, - "@override": true, - "@packageDocumentation": true, - "@param": true, - "@privateRemarks": true, - "@public": true, - "@readonly": true, - "@remarks": true, - "@returns": true, - "@sealed": true, - "@see": true, - "@throws": true, - "@typeParam": true, - "@virtual": true, - "@betaDocumentation": true, - "@internalRemarks": true, - "@preapproved": true - }, - "reportUnsupportedHtmlElements": false - } - }, - "kind": "Package", - "canonicalReference": "tldraw!", - "docComment": "", - "name": "tldraw", - "preserveMemberOrder": false, - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "tldraw!", - "name": "", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Function", - "canonicalReference": "tldraw!AlignMenuItems:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function AlignMenuItems(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "AlignMenuItems" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ArrangeMenuSubmenu:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ArrangeMenuSubmenu(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ArrangeMenuSubmenu" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ArrowheadStylePickerSet:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ArrowheadStylePickerSet({ styles }: " - }, - { - "kind": "Content", - "text": "{\n styles: " - }, - { - "kind": "Reference", - "text": "ReadonlySharedStyleMap", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ styles }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "ArrowheadStylePickerSet" - }, - { - "kind": "Class", - "canonicalReference": "tldraw!ArrowShapeTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ArrowShapeTool extends " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/arrow/ArrowShapeTool.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "ArrowShapeTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeTool.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children: " - }, - { - "kind": "Content", - "text": "() => (typeof " - }, - { - "kind": "Reference", - "text": "Idle", - "canonicalReference": "tldraw!~Idle:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Pointing", - "canonicalReference": "tldraw!~Pointing:class" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeTool#shapeType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapeType: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "shapeType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!ArrowShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ArrowShapeUtil extends " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/arrow/ArrowShapeUtil.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "ArrowShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil#canBind:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canBind: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canBind", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil#canEdit:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canEdit: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canEdit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil#canSnap:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canSnap: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canSnap", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!ArrowShapeUtil#component:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component(shape: " - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "component" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!ArrowShapeUtil#getCanvasSvgDefs:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCanvasSvgDefs(): " - }, - { - "kind": "Reference", - "text": "TLShapeUtilCanvasSvgDef", - "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCanvasSvgDefs" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!ArrowShapeUtil#getDefaultProps:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDefaultProps(): " - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": "['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDefaultProps" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!ArrowShapeUtil#getGeometry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getGeometry(shape: " - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Group2d", - "canonicalReference": "@tldraw/editor!Group2d:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getGeometry" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!ArrowShapeUtil#getHandles:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHandles(shape: " - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getHandles" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil#hideResizeHandles:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideResizeHandles: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideResizeHandles", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil#hideRotateHandle:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideRotateHandle: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideRotateHandle", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil#hideSelectionBoundsBg:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideSelectionBoundsBg: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideSelectionBoundsBg", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil#hideSelectionBoundsFg:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideSelectionBoundsFg: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideSelectionBoundsFg", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!ArrowShapeUtil#indicator:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "indicator(shape: " - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil#onDoubleClickHandle:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDoubleClickHandle: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": ", handle: " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "TLShapePartial", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": "> | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onDoubleClickHandle", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 10 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil#onEditEnd:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onEditEnd: " - }, - { - "kind": "Reference", - "text": "TLOnEditEndHandler", - "canonicalReference": "@tldraw/editor!TLOnEditEndHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onEditEnd", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil#onHandleDrag:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onHandleDrag: " - }, - { - "kind": "Reference", - "text": "TLOnHandleDragHandler", - "canonicalReference": "@tldraw/editor!TLOnHandleDragHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onHandleDrag", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil#onResize:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onResize: " - }, - { - "kind": "Reference", - "text": "TLOnResizeHandler", - "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onResize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil#onTranslate:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onTranslate?: " - }, - { - "kind": "Reference", - "text": "TLOnTranslateHandler", - "canonicalReference": "@tldraw/editor!TLOnTranslateHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onTranslate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil#onTranslateStart:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onTranslateStart: " - }, - { - "kind": "Reference", - "text": "TLOnTranslateStartHandler", - "canonicalReference": "@tldraw/editor!TLOnTranslateStartHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onTranslateStart", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "kind": "Content", - "text": "{\n labelColor: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n color: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n fill: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n arrowheadStart: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n arrowheadEnd: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n font: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n start: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "UnionValidator", - "canonicalReference": "@tldraw/validate!UnionValidator:class" - }, - { - "kind": "Content", - "text": "<\"type\", {\n binding: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"binding\";\n boundShapeId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n normalizedAnchor: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n }>;\n point: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{\n x: number;\n y: number;\n type: \"point\";\n }>;\n }, never>;\n end: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "UnionValidator", - "canonicalReference": "@tldraw/validate!UnionValidator:class" - }, - { - "kind": "Content", - "text": "<\"type\", {\n binding: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"binding\";\n boundShapeId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n normalizedAnchor: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n }>;\n point: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{\n x: number;\n y: number;\n type: \"point\";\n }>;\n }, never>;\n bend: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n text: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n labelPosition: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 44 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!ArrowShapeUtil#toSvg:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toSvg(shape: " - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": ", ctx: " - }, - { - "kind": "Reference", - "text": "SvgExportContext", - "canonicalReference": "@tldraw/editor!SvgExportContext:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "SVGGElement", - "canonicalReference": "!SVGGElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ctx", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toSvg" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ArrowShapeUtil.type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "\"arrow\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!BookmarkShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class BookmarkShapeUtil extends " - }, - { - "kind": "Reference", - "text": "BaseBoxShapeUtil", - "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLBookmarkShape", - "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "BookmarkShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!BookmarkShapeUtil#canResize:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canResize: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canResize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!BookmarkShapeUtil#component:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component(shape: " - }, - { - "kind": "Reference", - "text": "TLBookmarkShape", - "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "component" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!BookmarkShapeUtil#getDefaultProps:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDefaultProps(): " - }, - { - "kind": "Reference", - "text": "TLBookmarkShape", - "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" - }, - { - "kind": "Content", - "text": "['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDefaultProps" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!BookmarkShapeUtil#hideSelectionBoundsFg:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideSelectionBoundsFg: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideSelectionBoundsFg", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!BookmarkShapeUtil#indicator:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "indicator(shape: " - }, - { - "kind": "Reference", - "text": "TLBookmarkShape", - "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!BookmarkShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!BookmarkShapeUtil#onBeforeCreate:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBeforeCreate?: " - }, - { - "kind": "Reference", - "text": "TLOnBeforeCreateHandler", - "canonicalReference": "@tldraw/editor!TLOnBeforeCreateHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLBookmarkShape", - "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onBeforeCreate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!BookmarkShapeUtil#onBeforeUpdate:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBeforeUpdate?: " - }, - { - "kind": "Reference", - "text": "TLOnBeforeUpdateHandler", - "canonicalReference": "@tldraw/editor!TLOnBeforeUpdateHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLBookmarkShape", - "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onBeforeUpdate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!BookmarkShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "kind": "Content", - "text": "{\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n assetId: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 12 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!BookmarkShapeUtil.type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "\"bookmark\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "tldraw!BreakPointProvider:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function BreakPointProvider({ forceMobile, children, }: " - }, - { - "kind": "Content", - "text": "{\n forceMobile?: boolean;\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/breakpoints.tsx", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ forceMobile, children, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "BreakPointProvider" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ClipboardMenuGroup:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ClipboardMenuGroup(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ClipboardMenuGroup" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!CommonStylePickerSet:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function CommonStylePickerSet({ styles }: " - }, - { - "kind": "Content", - "text": "{\n styles: " - }, - { - "kind": "Reference", - "text": "ReadonlySharedStyleMap", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ styles }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "CommonStylePickerSet" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!containBoxSize:function(1)", - "docComment": "/**\n * Contains the size within the given box size\n *\n * @param originalSize - The size of the asset\n *\n * @param containBoxSize - The container size\n *\n * @returns Adjusted size\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function containBoxSize(originalSize: " - }, - { - "kind": "Reference", - "text": "BoxWidthHeight", - "canonicalReference": "tldraw!~BoxWidthHeight:type" - }, - { - "kind": "Content", - "text": ", containBoxSize: " - }, - { - "kind": "Reference", - "text": "BoxWidthHeight", - "canonicalReference": "tldraw!~BoxWidthHeight:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "BoxWidthHeight", - "canonicalReference": "tldraw!~BoxWidthHeight:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/assets/assets.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "originalSize", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "containBoxSize", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "containBoxSize" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ConversionsMenuGroup:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ConversionsMenuGroup(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ConversionsMenuGroup" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ConvertToBookmarkMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ConvertToBookmarkMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ConvertToBookmarkMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ConvertToEmbedMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ConvertToEmbedMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ConvertToEmbedMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!copyAs:function(1)", - "docComment": "/**\n * Copy the given shapes to the clipboard.\n *\n * @param editor - The editor instance.\n *\n * @param ids - The ids of the shapes to copy.\n *\n * @param format - The format to copy as.\n *\n * @param opts - Options for the copy.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function copyAs(editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ", ids: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", format?: " - }, - { - "kind": "Reference", - "text": "TLCopyType", - "canonicalReference": "tldraw!~TLCopyType:type" - }, - { - "kind": "Content", - "text": ", opts?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLSvgOptions", - "canonicalReference": "@tldraw/editor!TLSvgOptions:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/export/copyAs.ts", - "returnTypeTokenRange": { - "startIndex": 13, - "endIndex": 15 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "editor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ids", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "format", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": true - }, - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 12 - }, - "isOptional": true - } - ], - "name": "copyAs" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!CopyAsMenuGroup:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function CopyAsMenuGroup(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "CopyAsMenuGroup" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!CopyMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function CopyMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "CopyMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!CutMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function CutMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "CutMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DebugFlags:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DebugFlags(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/DebugMenu/DefaultDebugMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DebugFlags" - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!DEFAULT_ACCEPTED_IMG_TYPE:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DEFAULT_ACCEPTED_IMG_TYPE: " - }, - { - "kind": "Content", - "text": "string[]" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/assets/assets.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "DEFAULT_ACCEPTED_IMG_TYPE", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!DEFAULT_ACCEPTED_VID_TYPE:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DEFAULT_ACCEPTED_VID_TYPE: " - }, - { - "kind": "Content", - "text": "string[]" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/assets/assets.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "DEFAULT_ACCEPTED_VID_TYPE", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!DefaultActionsMenu:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultActionsMenu: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiActionsMenuProps", - "canonicalReference": "tldraw!TLUiActionsMenuProps:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultActionsMenu", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DefaultActionsMenuContent:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultActionsMenuContent(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DefaultActionsMenuContent" - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!DefaultContextMenu:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultContextMenu: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiContextMenuProps", - "canonicalReference": "tldraw!TLUiContextMenuProps:interface" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ContextMenu/DefaultContextMenu.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultContextMenu", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DefaultContextMenuContent:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultContextMenuContent(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ContextMenu/DefaultContextMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DefaultContextMenuContent" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DefaultDebugMenu:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultDebugMenu({ children }: " - }, - { - "kind": "Reference", - "text": "TLUiDebugMenuProps", - "canonicalReference": "tldraw!TLUiDebugMenuProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/DebugMenu/DefaultDebugMenu.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultDebugMenu" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DefaultDebugMenuContent:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultDebugMenuContent(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/DebugMenu/DefaultDebugMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DefaultDebugMenuContent" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DefaultHelperButtons:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultHelperButtons({ children }: " - }, - { - "kind": "Reference", - "text": "TLUiHelperButtonsProps", - "canonicalReference": "tldraw!TLUiHelperButtonsProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelperButtons/DefaultHelperButtons.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultHelperButtons" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DefaultHelperButtonsContent:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultHelperButtonsContent(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelperButtons/DefaultHelperButtonsContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DefaultHelperButtonsContent" - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!DefaultHelpMenu:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultHelpMenu: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiHelpMenuProps", - "canonicalReference": "tldraw!TLUiHelpMenuProps:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelpMenu/DefaultHelpMenu.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultHelpMenu", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DefaultHelpMenuContent:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultHelpMenuContent(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelpMenu/DefaultHelpMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DefaultHelpMenuContent" - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!DefaultKeyboardShortcutsDialog:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultKeyboardShortcutsDialog: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiKeyboardShortcutsDialogProps", - "canonicalReference": "tldraw!TLUiKeyboardShortcutsDialogProps:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialog.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultKeyboardShortcutsDialog", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DefaultKeyboardShortcutsDialogContent:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultKeyboardShortcutsDialogContent(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DefaultKeyboardShortcutsDialogContent" - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!DefaultMainMenu:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultMainMenu: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiMainMenuProps", - "canonicalReference": "tldraw!TLUiMainMenuProps:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenu.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultMainMenu", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DefaultMainMenuContent:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultMainMenuContent(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DefaultMainMenuContent" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DefaultMinimap:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultMinimap(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/Minimap/DefaultMinimap.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DefaultMinimap" - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!DefaultPageMenu:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultPageMenu: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultPageMenu", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!DefaultQuickActions:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultQuickActions: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiQuickActionsProps", - "canonicalReference": "tldraw!TLUiQuickActionsProps:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/QuickActions/DefaultQuickActions.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultQuickActions", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DefaultQuickActionsContent:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultQuickActionsContent(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/QuickActions/DefaultQuickActionsContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DefaultQuickActionsContent" - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!defaultShapeTools:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "defaultShapeTools: " - }, - { - "kind": "Content", - "text": "(typeof " - }, - { - "kind": "Reference", - "text": "ArrowShapeTool", - "canonicalReference": "tldraw!ArrowShapeTool:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "DrawShapeTool", - "canonicalReference": "tldraw!DrawShapeTool:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "FrameShapeTool", - "canonicalReference": "tldraw!FrameShapeTool:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "GeoShapeTool", - "canonicalReference": "tldraw!GeoShapeTool:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "LineShapeTool", - "canonicalReference": "tldraw!LineShapeTool:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "NoteShapeTool", - "canonicalReference": "tldraw!NoteShapeTool:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "TextShapeTool", - "canonicalReference": "tldraw!TextShapeTool:class" - }, - { - "kind": "Content", - "text": ")[]" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/defaultShapeTools.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "defaultShapeTools", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 16 - } - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!defaultShapeUtils:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "defaultShapeUtils: " - }, - { - "kind": "Reference", - "text": "TLAnyShapeUtilConstructor", - "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" - }, - { - "kind": "Content", - "text": "[]" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/defaultShapeUtils.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "defaultShapeUtils", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!DefaultStylePanel:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultStylePanel: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiStylePanelProps", - "canonicalReference": "tldraw!TLUiStylePanelProps:interface" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultStylePanel", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DefaultStylePanelContent:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultStylePanelContent({ styles }: " - }, - { - "kind": "Reference", - "text": "TLUiStylePanelContentProps", - "canonicalReference": "tldraw!TLUiStylePanelContentProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ styles }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "DefaultStylePanelContent" - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!DefaultToolbar:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultToolbar: " - }, - { - "kind": "Reference", - "text": "React.NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbar.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultToolbar", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!defaultTools:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "defaultTools: " - }, - { - "kind": "Content", - "text": "(typeof " - }, - { - "kind": "Reference", - "text": "EraserTool", - "canonicalReference": "tldraw!EraserTool:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "HandTool", - "canonicalReference": "tldraw!HandTool:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "LaserTool", - "canonicalReference": "tldraw!LaserTool:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "SelectTool", - "canonicalReference": "tldraw!SelectTool:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "ZoomTool", - "canonicalReference": "tldraw!ZoomTool:class" - }, - { - "kind": "Content", - "text": ")[]" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/defaultTools.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "defaultTools", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 12 - } - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!DefaultZoomMenu:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultZoomMenu: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiZoomMenuProps", - "canonicalReference": "tldraw!TLUiZoomMenuProps:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ZoomMenu/DefaultZoomMenu.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultZoomMenu", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DefaultZoomMenuContent:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DefaultZoomMenuContent(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ZoomMenu/DefaultZoomMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DefaultZoomMenuContent" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DeleteMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DeleteMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DeleteMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DistributeMenuItems:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DistributeMenuItems(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DistributeMenuItems" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!downsizeImage:function(1)", - "docComment": "/**\n * Resize an image Blob to be smaller than it is currently.\n *\n * @param image - The image Blob.\n *\n * @param width - The desired width.\n *\n * @param height - The desired height.\n *\n * @param opts - Options for the image.\n *\n * @example\n * ```ts\n * const image = await (await fetch('/image.jpg')).blob()\n * const size = await getImageSize(image)\n * const resizedImage = await downsizeImage(image, size.w / 2, size.h / 2, { type: \"image/jpeg\", quality: 0.92 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function downsizeImage(blob: " - }, - { - "kind": "Reference", - "text": "Blob", - "canonicalReference": "!Blob:interface" - }, - { - "kind": "Content", - "text": ", width: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", height: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", opts?: " - }, - { - "kind": "Content", - "text": "{\n type?: string | undefined;\n quality?: number | undefined;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Blob", - "canonicalReference": "!Blob:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/assets/assets.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 13 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "blob", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "width", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "height", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": true - } - ], - "name": "downsizeImage" - }, - { - "kind": "Class", - "canonicalReference": "tldraw!DrawShapeTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class DrawShapeTool extends " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/draw/DrawShapeTool.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "DrawShapeTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!DrawShapeTool.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children: " - }, - { - "kind": "Content", - "text": "() => (typeof " - }, - { - "kind": "Reference", - "text": "Drawing", - "canonicalReference": "tldraw!~Drawing:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Idle", - "canonicalReference": "tldraw!~Idle_2:class" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!DrawShapeTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!DrawShapeTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!DrawShapeTool#onExit:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onExit: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onExit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!DrawShapeTool#shapeType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapeType: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "shapeType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!DrawShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class DrawShapeUtil extends " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLDrawShape", - "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/draw/DrawShapeUtil.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "DrawShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "tldraw!DrawShapeUtil#component:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component(shape: " - }, - { - "kind": "Reference", - "text": "TLDrawShape", - "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "component" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!DrawShapeUtil#expandSelectionOutlinePx:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "expandSelectionOutlinePx(shape: " - }, - { - "kind": "Reference", - "text": "TLDrawShape", - "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "expandSelectionOutlinePx" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!DrawShapeUtil#getCanvasSvgDefs:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCanvasSvgDefs(): " - }, - { - "kind": "Reference", - "text": "TLShapeUtilCanvasSvgDef", - "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCanvasSvgDefs" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!DrawShapeUtil#getDefaultProps:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDefaultProps(): " - }, - { - "kind": "Reference", - "text": "TLDrawShape", - "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" - }, - { - "kind": "Content", - "text": "['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDefaultProps" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!DrawShapeUtil#getGeometry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getGeometry(shape: " - }, - { - "kind": "Reference", - "text": "TLDrawShape", - "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Circle2d", - "canonicalReference": "@tldraw/editor!Circle2d:class" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "Polyline2d", - "canonicalReference": "@tldraw/editor!Polyline2d:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getGeometry" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!DrawShapeUtil#hideResizeHandles:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideResizeHandles: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLDrawShape", - "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" - }, - { - "kind": "Content", - "text": ") => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideResizeHandles", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!DrawShapeUtil#hideRotateHandle:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideRotateHandle: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLDrawShape", - "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" - }, - { - "kind": "Content", - "text": ") => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideRotateHandle", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!DrawShapeUtil#hideSelectionBoundsFg:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideSelectionBoundsFg: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLDrawShape", - "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" - }, - { - "kind": "Content", - "text": ") => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideSelectionBoundsFg", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!DrawShapeUtil#indicator:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "indicator(shape: " - }, - { - "kind": "Reference", - "text": "TLDrawShape", - "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!DrawShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!DrawShapeUtil#onResize:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onResize: " - }, - { - "kind": "Reference", - "text": "TLOnResizeHandler", - "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLDrawShape", - "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onResize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!DrawShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "kind": "Content", - "text": "{\n color: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n fill: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n segments: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "ArrayOfValidator", - "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"free\" | \"straight\";\n points: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "[];\n }>;\n isComplete: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n isClosed: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n isPen: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 20 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!DrawShapeUtil#toSvg:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toSvg(shape: " - }, - { - "kind": "Reference", - "text": "TLDrawShape", - "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" - }, - { - "kind": "Content", - "text": ", ctx: " - }, - { - "kind": "Reference", - "text": "SvgExportContext", - "canonicalReference": "@tldraw/editor!SvgExportContext:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "SVGGElement", - "canonicalReference": "!SVGGElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ctx", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toSvg" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!DrawShapeUtil.type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "\"draw\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "tldraw!DuplicateMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function DuplicateMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "DuplicateMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!EditLinkMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function EditLinkMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "EditLinkMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!EditSubmenu:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function EditSubmenu(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "EditSubmenu" - }, - { - "kind": "Class", - "canonicalReference": "tldraw!EmbedShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class EmbedShapeUtil extends " - }, - { - "kind": "Reference", - "text": "BaseBoxShapeUtil", - "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLEmbedShape", - "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/embed/EmbedShapeUtil.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "EmbedShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!EmbedShapeUtil#canEdit:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canEdit: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLEmbedShape", - "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canEdit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!EmbedShapeUtil#canEditInReadOnly:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canEditInReadOnly: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canEditInReadOnly", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!EmbedShapeUtil#canResize:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canResize: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLEmbedShape", - "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" - }, - { - "kind": "Content", - "text": ") => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canResize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!EmbedShapeUtil#canUnmount:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canUnmount: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLEmbedShape", - "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canUnmount", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!EmbedShapeUtil#component:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component(shape: " - }, - { - "kind": "Reference", - "text": "TLEmbedShape", - "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "component" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!EmbedShapeUtil#getDefaultProps:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDefaultProps(): " - }, - { - "kind": "Reference", - "text": "TLEmbedShape", - "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" - }, - { - "kind": "Content", - "text": "['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDefaultProps" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!EmbedShapeUtil#hideSelectionBoundsFg:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideSelectionBoundsFg: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLEmbedShape", - "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideSelectionBoundsFg", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!EmbedShapeUtil#indicator:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "indicator(shape: " - }, - { - "kind": "Reference", - "text": "TLEmbedShape", - "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!EmbedShapeUtil#isAspectRatioLocked:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isAspectRatioLocked: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLEmbedShape", - "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isAspectRatioLocked", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!EmbedShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!EmbedShapeUtil#onResize:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onResize: " - }, - { - "kind": "Reference", - "text": "TLOnResizeHandler", - "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLEmbedShape", - "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onResize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!EmbedShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "kind": "Content", - "text": "{\n w: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!EmbedShapeUtil.type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "\"embed\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!EraserTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class EraserTool extends " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/tools/EraserTool/EraserTool.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "EraserTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!EraserTool.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children: " - }, - { - "kind": "Content", - "text": "() => (typeof " - }, - { - "kind": "Reference", - "text": "Erasing", - "canonicalReference": "tldraw!~Erasing:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Idle", - "canonicalReference": "tldraw!~Idle_7:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Pointing", - "canonicalReference": "tldraw!~Pointing_6:class" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!EraserTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!EraserTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!EraserTool#onEnter:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onEnter: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onEnter", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!EventsProviderProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type EventsProviderProps = " - }, - { - "kind": "Content", - "text": "{\n onEvent?: " - }, - { - "kind": "Reference", - "text": "TLUiEventHandler", - "canonicalReference": "tldraw!TLUiEventHandler:type" - }, - { - "kind": "Content", - "text": ";\n children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", - "releaseTag": "Public", - "name": "EventsProviderProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ExampleDialog:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ExampleDialog({ title, body, cancel, confirm, displayDontShowAgain, onCancel, onContinue, }: " - }, - { - "kind": "Content", - "text": "{\n title?: string;\n body?: string;\n cancel?: string;\n confirm?: string;\n displayDontShowAgain?: boolean;\n onCancel: () => void;\n onContinue: () => void;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/DebugMenu/DefaultDebugMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ title, body, cancel, confirm, displayDontShowAgain, onCancel, onContinue, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "ExampleDialog" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!exportAs:function(1)", - "docComment": "/**\n * Export the given shapes as files.\n *\n * @param editor - The editor instance.\n *\n * @param ids - The ids of the shapes to export.\n *\n * @param format - The format to export as.\n *\n * @param name - Name of the exported file. If undefined a predefined name, based on the selection, will be used.\n *\n * @param opts - Options for the export.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function exportAs(editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ", ids: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", format: " - }, - { - "kind": "Reference", - "text": "TLExportType", - "canonicalReference": "tldraw!~TLExportType:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ", name: " - }, - { - "kind": "Content", - "text": "string | undefined" - }, - { - "kind": "Content", - "text": ", opts?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLSvgOptions", - "canonicalReference": "@tldraw/editor!TLSvgOptions:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/export/exportAs.ts", - "returnTypeTokenRange": { - "startIndex": 16, - "endIndex": 18 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "editor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ids", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "format", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 8 - }, - "isOptional": false - }, - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "isOptional": false - }, - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 15 - }, - "isOptional": true - } - ], - "name": "exportAs" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ExportFileContentSubMenu:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ExportFileContentSubMenu(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ExportFileContentSubMenu" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!exportToBlob:function(1)", - "docComment": "/**\n * Export the given shapes as a blob.\n *\n * @param editor - The editor instance.\n *\n * @param ids - The ids of the shapes to export.\n *\n * @param format - The format to export as.\n *\n * @param opts - Rendering options.\n *\n * @returns A promise that resolves to a blob.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function exportToBlob({ editor, ids, format, opts, }: " - }, - { - "kind": "Content", - "text": "{\n editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ";\n ids: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[];\n format: 'jpeg' | 'json' | 'png' | 'svg' | 'webp';\n opts?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLSvgOptions", - "canonicalReference": "@tldraw/editor!TLSvgOptions:type" - }, - { - "kind": "Content", - "text": ">;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Blob", - "canonicalReference": "!Blob:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/export/export.ts", - "returnTypeTokenRange": { - "startIndex": 11, - "endIndex": 15 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ editor, ids, format, opts, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 10 - }, - "isOptional": false - } - ], - "name": "exportToBlob" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ExtrasGroup:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ExtrasGroup(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ExtrasGroup" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!FeatureFlags:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function FeatureFlags(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/DebugMenu/DefaultDebugMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "FeatureFlags" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!fitFrameToContent:function(1)", - "docComment": "/**\n * Fit a frame to its content.\n *\n * @param id - Id of the frame you wish to fit to content.\n *\n * @param editor - tlraw editor instance.\n *\n * @param opts - Options for fitting the frame.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function fitFrameToContent(editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ", id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ", opts?: " - }, - { - "kind": "Content", - "text": "{\n padding: number;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/frames/frames.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "editor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "name": "fitFrameToContent" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!FitFrameToContentMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function FitFrameToContentMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "FitFrameToContentMenuItem" - }, - { - "kind": "Class", - "canonicalReference": "tldraw!FrameShapeTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class FrameShapeTool extends " - }, - { - "kind": "Reference", - "text": "BaseBoxShapeTool", - "canonicalReference": "@tldraw/editor!BaseBoxShapeTool:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/frame/FrameShapeTool.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "FrameShapeTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeTool#onCreate:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onCreate: " - }, - { - "kind": "Content", - "text": "(shape: null | " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onCreate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeTool#shapeType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapeType: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "shapeType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!FrameShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class FrameShapeUtil extends " - }, - { - "kind": "Reference", - "text": "BaseBoxShapeUtil", - "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLFrameShape", - "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/frame/FrameShapeUtil.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "FrameShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeUtil#canBind:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canBind: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canBind", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeUtil#canDropShapes:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canDropShapes: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLFrameShape", - "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" - }, - { - "kind": "Content", - "text": ", _shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]) => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canDropShapes", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeUtil#canEdit:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canEdit: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canEdit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeUtil#canReceiveNewChildrenOfType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canReceiveNewChildrenOfType: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ", _type: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "['type']) => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canReceiveNewChildrenOfType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!FrameShapeUtil#component:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component(shape: " - }, - { - "kind": "Reference", - "text": "TLFrameShape", - "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "component" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!FrameShapeUtil#getDefaultProps:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDefaultProps(): " - }, - { - "kind": "Reference", - "text": "TLFrameShape", - "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" - }, - { - "kind": "Content", - "text": "['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDefaultProps" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!FrameShapeUtil#getGeometry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getGeometry(shape: " - }, - { - "kind": "Reference", - "text": "TLFrameShape", - "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Geometry2d", - "canonicalReference": "@tldraw/editor!Geometry2d:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getGeometry" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!FrameShapeUtil#indicator:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "indicator(shape: " - }, - { - "kind": "Reference", - "text": "TLFrameShape", - "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeUtil#onDragShapesOut:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDragShapesOut: " - }, - { - "kind": "Content", - "text": "(_shape: " - }, - { - "kind": "Reference", - "text": "TLFrameShape", - "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" - }, - { - "kind": "Content", - "text": ", shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onDragShapesOut", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeUtil#onDragShapesOver:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDragShapesOver: " - }, - { - "kind": "Content", - "text": "(frame: " - }, - { - "kind": "Reference", - "text": "TLFrameShape", - "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" - }, - { - "kind": "Content", - "text": ", shapes: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": "[]) => {\n shouldHint: boolean;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onDragShapesOver", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeUtil#onResize:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onResize: " - }, - { - "kind": "Reference", - "text": "TLOnResizeHandler", - "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onResize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeUtil#onResizeEnd:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onResizeEnd: " - }, - { - "kind": "Reference", - "text": "TLOnResizeEndHandler", - "canonicalReference": "@tldraw/editor!TLOnResizeEndHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLFrameShape", - "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onResizeEnd", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "kind": "Content", - "text": "{\n w: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n name: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!FrameShapeUtil#providesBackgroundForChildren:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "providesBackgroundForChildren(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "providesBackgroundForChildren" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!FrameShapeUtil#toSvg:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toSvg(shape: " - }, - { - "kind": "Reference", - "text": "TLFrameShape", - "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" - }, - { - "kind": "Content", - "text": ", ctx: " - }, - { - "kind": "Reference", - "text": "SvgExportContext", - "canonicalReference": "@tldraw/editor!SvgExportContext:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "SVGElement", - "canonicalReference": "!SVGElement:interface" - }, - { - "kind": "Content", - "text": "> | " - }, - { - "kind": "Reference", - "text": "SVGElement", - "canonicalReference": "!SVGElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ctx", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toSvg" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!FrameShapeUtil.type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "\"frame\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!GeoShapeTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class GeoShapeTool extends " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/geo/GeoShapeTool.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "GeoShapeTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!GeoShapeTool.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children: " - }, - { - "kind": "Content", - "text": "() => (typeof " - }, - { - "kind": "Reference", - "text": "Idle", - "canonicalReference": "tldraw!~Idle_3:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Pointing", - "canonicalReference": "tldraw!~Pointing_2:class" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!GeoShapeTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!GeoShapeTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!GeoShapeTool#shapeType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapeType: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "shapeType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!GeoShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class GeoShapeUtil extends " - }, - { - "kind": "Reference", - "text": "BaseBoxShapeUtil", - "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/geo/GeoShapeUtil.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "GeoShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!GeoShapeUtil#canEdit:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canEdit: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canEdit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!GeoShapeUtil#component:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component(shape: " - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "component" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!GeoShapeUtil#getCanvasSvgDefs:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCanvasSvgDefs(): " - }, - { - "kind": "Reference", - "text": "TLShapeUtilCanvasSvgDef", - "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCanvasSvgDefs" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!GeoShapeUtil#getDefaultProps:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDefaultProps(): " - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": "['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDefaultProps" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!GeoShapeUtil#getGeometry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getGeometry(shape: " - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Group2d", - "canonicalReference": "@tldraw/editor!Group2d:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getGeometry" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!GeoShapeUtil#getHandleSnapGeometry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHandleSnapGeometry(shape: " - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "HandleSnapGeometry", - "canonicalReference": "@tldraw/editor!HandleSnapGeometry:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getHandleSnapGeometry" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!GeoShapeUtil#indicator:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "indicator(shape: " - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!GeoShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!GeoShapeUtil#onBeforeCreate:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBeforeCreate: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": ") => {\n props: {\n growY: number;\n geo: \"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\";\n labelColor: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\";\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\";\n fill: \"none\" | \"pattern\" | \"semi\" | \"solid\";\n dash: \"dashed\" | \"dotted\" | \"draw\" | \"solid\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n verticalAlign: \"end\" | \"middle\" | \"start\";\n url: string;\n w: number;\n h: number;\n text: string;\n };\n type: \"geo\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onBeforeCreate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 12 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!GeoShapeUtil#onBeforeUpdate:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBeforeUpdate: " - }, - { - "kind": "Content", - "text": "(prev: " - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": ", next: " - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": ") => {\n props: {\n growY: number;\n geo: \"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\";\n labelColor: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\";\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\";\n fill: \"none\" | \"pattern\" | \"semi\" | \"solid\";\n dash: \"dashed\" | \"dotted\" | \"draw\" | \"solid\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n verticalAlign: \"end\" | \"middle\" | \"start\";\n url: string;\n w: number;\n h: number;\n text: string;\n };\n type: \"geo\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onBeforeUpdate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 14 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!GeoShapeUtil#onDoubleClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDoubleClick: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": ") => {\n props: {\n geo: \"check-box\";\n };\n type: \"geo\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | {\n props: {\n geo: \"rectangle\";\n };\n type: \"geo\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onDoubleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 20 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!GeoShapeUtil#onEditEnd:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onEditEnd: " - }, - { - "kind": "Reference", - "text": "TLOnEditEndHandler", - "canonicalReference": "@tldraw/editor!TLOnEditEndHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onEditEnd", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!GeoShapeUtil#onResize:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onResize: " - }, - { - "kind": "Reference", - "text": "TLOnResizeHandler", - "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onResize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!GeoShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "kind": "Content", - "text": "{\n geo: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\">;\n labelColor: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n color: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n fill: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n verticalAlign: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end\" | \"middle\" | \"start\">;\n url: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n w: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n growY: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n text: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 30 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!GeoShapeUtil#toSvg:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toSvg(shape: " - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": ", ctx: " - }, - { - "kind": "Reference", - "text": "SvgExportContext", - "canonicalReference": "@tldraw/editor!SvgExportContext:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "SVGElement", - "canonicalReference": "!SVGElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ctx", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toSvg" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!GeoShapeUtil.type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "\"geo\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "tldraw!GeoStylePickerSet:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function GeoStylePickerSet({ styles }: " - }, - { - "kind": "Content", - "text": "{\n styles: " - }, - { - "kind": "Reference", - "text": "ReadonlySharedStyleMap", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ styles }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "GeoStylePickerSet" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!getEmbedInfo:function(1)", - "docComment": "/**\n * Tests whether an URL supports embedding and returns the result. If we encounter an error, we return undefined.\n *\n * @param inputUrl - The URL to match\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getEmbedInfo(inputUrl: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLEmbedResult", - "canonicalReference": "tldraw!~TLEmbedResult:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/embeds/embeds.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "inputUrl", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "getEmbedInfo" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!getSvgAsImage:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getSvgAsImage(svg: " - }, - { - "kind": "Reference", - "text": "SVGElement", - "canonicalReference": "!SVGElement:interface" - }, - { - "kind": "Content", - "text": ", isSafari: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ", options: " - }, - { - "kind": "Content", - "text": "{\n type: 'jpeg' | 'png' | 'webp';\n quality: number;\n scale: number;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Blob", - "canonicalReference": "!Blob:interface" - }, - { - "kind": "Content", - "text": " | null>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/export/export.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "svg", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "isSafari", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "getSvgAsImage" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!getSvgAsString:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getSvgAsString(svg: " - }, - { - "kind": "Reference", - "text": "SVGElement", - "canonicalReference": "!SVGElement:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/export/export.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "svg", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "getSvgAsString" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!GroupMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function GroupMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "GroupMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!GroupOrUngroupMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function GroupOrUngroupMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "GroupOrUngroupMenuItem" - }, - { - "kind": "Class", - "canonicalReference": "tldraw!HandTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class HandTool extends " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/tools/HandTool/HandTool.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "HandTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!HandTool.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children: " - }, - { - "kind": "Content", - "text": "() => (typeof " - }, - { - "kind": "Reference", - "text": "Dragging", - "canonicalReference": "tldraw!~Dragging:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Idle", - "canonicalReference": "tldraw!~Idle_8:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Pointing", - "canonicalReference": "tldraw!~Pointing_7:class" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HandTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HandTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HandTool#onDoubleClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDoubleClick: " - }, - { - "kind": "Reference", - "text": "TLClickEvent", - "canonicalReference": "@tldraw/editor!TLClickEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onDoubleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HandTool#onQuadrupleClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onQuadrupleClick: " - }, - { - "kind": "Reference", - "text": "TLClickEvent", - "canonicalReference": "@tldraw/editor!TLClickEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onQuadrupleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HandTool#onTripleClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onTripleClick: " - }, - { - "kind": "Reference", - "text": "TLClickEvent", - "canonicalReference": "@tldraw/editor!TLClickEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onTripleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!HighlightShapeTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class HighlightShapeTool extends " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/highlight/HighlightShapeTool.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "HighlightShapeTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!HighlightShapeTool.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children: " - }, - { - "kind": "Content", - "text": "() => (typeof " - }, - { - "kind": "Reference", - "text": "Drawing", - "canonicalReference": "tldraw!~Drawing:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Idle", - "canonicalReference": "tldraw!~Idle_2:class" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HighlightShapeTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HighlightShapeTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HighlightShapeTool#onExit:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onExit: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onExit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HighlightShapeTool#shapeType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapeType: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "shapeType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!HighlightShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class HighlightShapeUtil extends " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLHighlightShape", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/highlight/HighlightShapeUtil.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "HighlightShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "tldraw!HighlightShapeUtil#backgroundComponent:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "backgroundComponent(shape: " - }, - { - "kind": "Reference", - "text": "TLHighlightShape", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "backgroundComponent" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!HighlightShapeUtil#component:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component(shape: " - }, - { - "kind": "Reference", - "text": "TLHighlightShape", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "component" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!HighlightShapeUtil#getDefaultProps:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDefaultProps(): " - }, - { - "kind": "Reference", - "text": "TLHighlightShape", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" - }, - { - "kind": "Content", - "text": "['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDefaultProps" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!HighlightShapeUtil#getGeometry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getGeometry(shape: " - }, - { - "kind": "Reference", - "text": "TLHighlightShape", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Circle2d", - "canonicalReference": "@tldraw/editor!Circle2d:class" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "Polygon2d", - "canonicalReference": "@tldraw/editor!Polygon2d:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getGeometry" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HighlightShapeUtil#hideResizeHandles:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideResizeHandles: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLHighlightShape", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" - }, - { - "kind": "Content", - "text": ") => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideResizeHandles", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HighlightShapeUtil#hideRotateHandle:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideRotateHandle: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLHighlightShape", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" - }, - { - "kind": "Content", - "text": ") => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideRotateHandle", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HighlightShapeUtil#hideSelectionBoundsFg:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideSelectionBoundsFg: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLHighlightShape", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" - }, - { - "kind": "Content", - "text": ") => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideSelectionBoundsFg", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!HighlightShapeUtil#indicator:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "indicator(shape: " - }, - { - "kind": "Reference", - "text": "TLHighlightShape", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HighlightShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HighlightShapeUtil#onResize:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onResize: " - }, - { - "kind": "Reference", - "text": "TLOnResizeHandler", - "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLHighlightShape", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onResize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HighlightShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "kind": "Content", - "text": "{\n color: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n size: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n segments: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "ArrayOfValidator", - "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"free\" | \"straight\";\n points: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "[];\n }>;\n isComplete: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n isPen: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 14 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!HighlightShapeUtil#toBackgroundSvg:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toBackgroundSvg(shape: " - }, - { - "kind": "Reference", - "text": "TLHighlightShape", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "SVGPathElement", - "canonicalReference": "!SVGPathElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toBackgroundSvg" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!HighlightShapeUtil#toSvg:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toSvg(shape: " - }, - { - "kind": "Reference", - "text": "TLHighlightShape", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" - }, - { - "kind": "Content", - "text": ", ctx: " - }, - { - "kind": "Reference", - "text": "SvgExportContext", - "canonicalReference": "@tldraw/editor!SvgExportContext:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "SVGPathElement", - "canonicalReference": "!SVGPathElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ctx", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toSvg" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!HighlightShapeUtil.type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "\"highlight\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!ImageShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ImageShapeUtil extends " - }, - { - "kind": "Reference", - "text": "BaseBoxShapeUtil", - "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLImageShape", - "canonicalReference": "@tldraw/tlschema!TLImageShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/image/ImageShapeUtil.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "ImageShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!ImageShapeUtil#canCrop:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canCrop: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canCrop", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!ImageShapeUtil#component:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component(shape: " - }, - { - "kind": "Reference", - "text": "TLImageShape", - "canonicalReference": "@tldraw/tlschema!TLImageShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "component" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!ImageShapeUtil#getDefaultProps:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDefaultProps(): " - }, - { - "kind": "Reference", - "text": "TLImageShape", - "canonicalReference": "@tldraw/tlschema!TLImageShape:type" - }, - { - "kind": "Content", - "text": "['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDefaultProps" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!ImageShapeUtil#indicator:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "indicator(shape: " - }, - { - "kind": "Reference", - "text": "TLImageShape", - "canonicalReference": "@tldraw/tlschema!TLImageShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ImageShapeUtil#isAspectRatioLocked:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isAspectRatioLocked: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isAspectRatioLocked", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ImageShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ImageShapeUtil#onDoubleClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDoubleClick: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLImageShape", - "canonicalReference": "@tldraw/tlschema!TLImageShape:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onDoubleClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ImageShapeUtil#onDoubleClickEdge:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDoubleClickEdge: " - }, - { - "kind": "Reference", - "text": "TLOnDoubleClickHandler", - "canonicalReference": "@tldraw/editor!TLOnDoubleClickHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLImageShape", - "canonicalReference": "@tldraw/tlschema!TLImageShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onDoubleClickEdge", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ImageShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "kind": "Content", - "text": "{\n w: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n playing: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n assetId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n crop: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<{\n topLeft: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n bottomRight: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n } | null>;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 20 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!ImageShapeUtil#toSvg:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toSvg(shape: " - }, - { - "kind": "Reference", - "text": "TLImageShape", - "canonicalReference": "@tldraw/tlschema!TLImageShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "SVGGElement", - "canonicalReference": "!SVGGElement:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toSvg" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ImageShapeUtil.type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "\"image\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "tldraw!isGifAnimated:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function isGifAnimated(file: " - }, - { - "kind": "Reference", - "text": "Blob", - "canonicalReference": "!Blob:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/assets/assets.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "file", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "isGifAnimated" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!KeyboardShortcutsMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function KeyboardShortcutsMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelpMenu/DefaultHelpMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "KeyboardShortcutsMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!LanguageMenu:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function LanguageMenu(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/LanguageMenu.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "LanguageMenu" - }, - { - "kind": "Class", - "canonicalReference": "tldraw!LaserTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class LaserTool extends " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/tools/LaserTool/LaserTool.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "LaserTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!LaserTool.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children: " - }, - { - "kind": "Content", - "text": "() => (typeof " - }, - { - "kind": "Reference", - "text": "Idle", - "canonicalReference": "tldraw!~Idle_9:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Lasering", - "canonicalReference": "tldraw!~Lasering:class" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LaserTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LaserTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LaserTool#onEnter:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onEnter: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onEnter", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!LineShapeTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class LineShapeTool extends " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/line/LineShapeTool.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "LineShapeTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!LineShapeTool.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children: " - }, - { - "kind": "Content", - "text": "() => (typeof " - }, - { - "kind": "Reference", - "text": "Idle", - "canonicalReference": "tldraw!~Idle_4:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Pointing", - "canonicalReference": "tldraw!~Pointing_3:class" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LineShapeTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LineShapeTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LineShapeTool#shapeType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapeType: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "shapeType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!LineShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class LineShapeUtil extends " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLLineShape", - "canonicalReference": "@tldraw/tlschema!TLLineShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/line/LineShapeUtil.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "LineShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "tldraw!LineShapeUtil#component:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component(shape: " - }, - { - "kind": "Reference", - "text": "TLLineShape", - "canonicalReference": "@tldraw/tlschema!TLLineShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "component" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!LineShapeUtil#getDefaultProps:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDefaultProps(): " - }, - { - "kind": "Reference", - "text": "TLLineShape", - "canonicalReference": "@tldraw/tlschema!TLLineShape:type" - }, - { - "kind": "Content", - "text": "['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDefaultProps" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!LineShapeUtil#getGeometry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getGeometry(shape: " - }, - { - "kind": "Reference", - "text": "TLLineShape", - "canonicalReference": "@tldraw/tlschema!TLLineShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "CubicSpline2d", - "canonicalReference": "@tldraw/editor!CubicSpline2d:class" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "Polyline2d", - "canonicalReference": "@tldraw/editor!Polyline2d:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getGeometry" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!LineShapeUtil#getHandles:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHandles(shape: " - }, - { - "kind": "Reference", - "text": "TLLineShape", - "canonicalReference": "@tldraw/tlschema!TLLineShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getHandles" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!LineShapeUtil#getHandleSnapGeometry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHandleSnapGeometry(shape: " - }, - { - "kind": "Reference", - "text": "TLLineShape", - "canonicalReference": "@tldraw/tlschema!TLLineShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "HandleSnapGeometry", - "canonicalReference": "@tldraw/editor!HandleSnapGeometry:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getHandleSnapGeometry" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LineShapeUtil#hideResizeHandles:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideResizeHandles: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideResizeHandles", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LineShapeUtil#hideRotateHandle:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideRotateHandle: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideRotateHandle", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LineShapeUtil#hideSelectionBoundsBg:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideSelectionBoundsBg: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideSelectionBoundsBg", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LineShapeUtil#hideSelectionBoundsFg:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideSelectionBoundsFg: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideSelectionBoundsFg", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!LineShapeUtil#indicator:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "indicator(shape: " - }, - { - "kind": "Reference", - "text": "TLLineShape", - "canonicalReference": "@tldraw/tlschema!TLLineShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LineShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LineShapeUtil#onHandleDrag:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onHandleDrag: " - }, - { - "kind": "Reference", - "text": "TLOnHandleDragHandler", - "canonicalReference": "@tldraw/editor!TLOnHandleDragHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLLineShape", - "canonicalReference": "@tldraw/tlschema!TLLineShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onHandleDrag", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LineShapeUtil#onResize:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onResize: " - }, - { - "kind": "Reference", - "text": "TLOnResizeHandler", - "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLLineShape", - "canonicalReference": "@tldraw/tlschema!TLLineShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onResize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LineShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "kind": "Content", - "text": "{\n color: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n dash: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n spline: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"cubic\" | \"line\">;\n points: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "DictValidator", - "canonicalReference": "@tldraw/validate!DictValidator:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 14 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!LineShapeUtil#toSvg:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toSvg(shape: " - }, - { - "kind": "Reference", - "text": "TLLineShape", - "canonicalReference": "@tldraw/tlschema!TLLineShape:type" - }, - { - "kind": "Content", - "text": ", ctx: " - }, - { - "kind": "Reference", - "text": "SvgExportContext", - "canonicalReference": "@tldraw/editor!SvgExportContext:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "SVGGElement", - "canonicalReference": "!SVGGElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ctx", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toSvg" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!LineShapeUtil.type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "\"line\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "tldraw!MiscMenuGroup:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function MiscMenuGroup(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "MiscMenuGroup" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!MoveToPageMenu:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function MoveToPageMenu(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "MoveToPageMenu" - }, - { - "kind": "Class", - "canonicalReference": "tldraw!NoteShapeTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class NoteShapeTool extends " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/note/NoteShapeTool.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "NoteShapeTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!NoteShapeTool.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children: " - }, - { - "kind": "Content", - "text": "() => (typeof " - }, - { - "kind": "Reference", - "text": "Idle", - "canonicalReference": "tldraw!~Idle_5:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Pointing", - "canonicalReference": "tldraw!~Pointing_4:class" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!NoteShapeTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!NoteShapeTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!NoteShapeTool#shapeType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapeType: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "shapeType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!NoteShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class NoteShapeUtil extends " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/note/NoteShapeUtil.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "NoteShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!NoteShapeUtil#canEdit:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canEdit: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canEdit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!NoteShapeUtil#component:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component(shape: " - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "component" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!NoteShapeUtil#getDefaultProps:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDefaultProps(): " - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" - }, - { - "kind": "Content", - "text": "['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDefaultProps" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!NoteShapeUtil#getGeometry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getGeometry(shape: " - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Rectangle2d", - "canonicalReference": "@tldraw/editor!Rectangle2d:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getGeometry" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!NoteShapeUtil#getHeight:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHeight(shape: " - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getHeight" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!NoteShapeUtil#hideResizeHandles:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideResizeHandles: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideResizeHandles", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!NoteShapeUtil#hideSelectionBoundsFg:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideSelectionBoundsFg: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hideSelectionBoundsFg", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!NoteShapeUtil#indicator:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "indicator(shape: " - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!NoteShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!NoteShapeUtil#onBeforeCreate:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBeforeCreate: " - }, - { - "kind": "Content", - "text": "(next: " - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" - }, - { - "kind": "Content", - "text": ") => {\n props: {\n growY: number;\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n verticalAlign: \"end\" | \"middle\" | \"start\";\n url: string;\n text: string;\n };\n type: \"note\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onBeforeCreate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 12 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!NoteShapeUtil#onBeforeUpdate:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBeforeUpdate: " - }, - { - "kind": "Content", - "text": "(prev: " - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" - }, - { - "kind": "Content", - "text": ", next: " - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" - }, - { - "kind": "Content", - "text": ") => {\n props: {\n growY: number;\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n verticalAlign: \"end\" | \"middle\" | \"start\";\n url: string;\n text: string;\n };\n type: \"note\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onBeforeUpdate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 14 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!NoteShapeUtil#onEditEnd:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onEditEnd: " - }, - { - "kind": "Reference", - "text": "TLOnEditEndHandler", - "canonicalReference": "@tldraw/editor!TLOnEditEndHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onEditEnd", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!NoteShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "kind": "Content", - "text": "{\n color: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n size: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n verticalAlign: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end\" | \"middle\" | \"start\">;\n growY: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n text: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 18 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!NoteShapeUtil#toSvg:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toSvg(shape: " - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" - }, - { - "kind": "Content", - "text": ", ctx: " - }, - { - "kind": "Reference", - "text": "SvgExportContext", - "canonicalReference": "@tldraw/editor!SvgExportContext:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "SVGGElement", - "canonicalReference": "!SVGGElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ctx", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toSvg" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!NoteShapeUtil.type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "\"note\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "tldraw!OfflineIndicator:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function OfflineIndicator(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/OfflineIndicator/OfflineIndicator.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "OfflineIndicator" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!OpacitySlider:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function OpacitySlider(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "OpacitySlider" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!PageItemInput:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "PageItemInput: ({ name, id, isCurrentPage, }: " - }, - { - "kind": "Content", - "text": "{\n name: string;\n id: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";\n isCurrentPage: boolean;\n}" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/PageMenu/PageItemInput.tsx", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ name, id, isCurrentPage, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "PageItemInput" - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!PageItemSubmenu:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "PageItemSubmenu: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "MemoExoticComponent", - "canonicalReference": "@types/react!React.MemoExoticComponent:type" - }, - { - "kind": "Content", - "text": "<({ index, listSize, item, onRename, }: " - }, - { - "kind": "Reference", - "text": "PageItemSubmenuProps", - "canonicalReference": "tldraw!~PageItemSubmenuProps:interface" - }, - { - "kind": "Content", - "text": ") => import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/PageMenu/PageItemSubmenu.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "PageItemSubmenu", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!parseTldrawJsonFile:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function parseTldrawJsonFile({ json, schema, }: " - }, - { - "kind": "Content", - "text": "{\n schema: " - }, - { - "kind": "Reference", - "text": "TLSchema", - "canonicalReference": "@tldraw/tlschema!TLSchema:type" - }, - { - "kind": "Content", - "text": ";\n json: string;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Result", - "canonicalReference": "@tldraw/utils!Result:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "TldrawFileParseError", - "canonicalReference": "tldraw!~TldrawFileParseError:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/tldr/file.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ json, schema, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "parseTldrawJsonFile" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!PasteMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function PasteMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "PasteMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!PreferencesGroup:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function PreferencesGroup(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "PreferencesGroup" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!preloadFont:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function preloadFont(id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", font: " - }, - { - "kind": "Reference", - "text": "TLTypeFace", - "canonicalReference": "tldraw!~TLTypeFace:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "FontFace", - "canonicalReference": "!FontFace:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/assets/preload-font.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "font", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "preloadFont" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!PrintItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function PrintItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "PrintItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!removeFrame:function(1)", - "docComment": "/**\n * Remove a frame.\n *\n * @param editor - tlraw editor instance.\n *\n * @param ids - Ids of the frames you wish to remove.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function removeFrame(editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ", ids: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/frames/frames.ts", - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "editor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ids", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": false - } - ], - "name": "removeFrame" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!RemoveFrameMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function RemoveFrameMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "RemoveFrameMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ReorderMenuItems:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ReorderMenuItems(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ReorderMenuItems" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ReorderMenuSubmenu:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ReorderMenuSubmenu(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ReorderMenuSubmenu" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!RotateCWMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function RotateCWMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "RotateCWMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!SelectAllMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function SelectAllMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "SelectAllMenuItem" - }, - { - "kind": "Class", - "canonicalReference": "tldraw!SelectTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class SelectTool extends " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/tools/SelectTool/SelectTool.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "SelectTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!SelectTool.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children: " - }, - { - "kind": "Content", - "text": "() => (typeof " - }, - { - "kind": "Reference", - "text": "Brushing", - "canonicalReference": "tldraw!~Brushing:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Crop", - "canonicalReference": "tldraw!~Crop:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Cropping", - "canonicalReference": "tldraw!~Cropping:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "DraggingHandle", - "canonicalReference": "tldraw!~DraggingHandle:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "EditingShape", - "canonicalReference": "tldraw!~EditingShape:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Idle", - "canonicalReference": "tldraw!~Idle_11:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "PointingArrowLabel", - "canonicalReference": "tldraw!~PointingArrowLabel:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "PointingCanvas", - "canonicalReference": "tldraw!~PointingCanvas:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "PointingCropHandle", - "canonicalReference": "tldraw!~PointingCropHandle:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "PointingHandle", - "canonicalReference": "tldraw!~PointingHandle:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "PointingResizeHandle", - "canonicalReference": "tldraw!~PointingResizeHandle:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "PointingRotateHandle", - "canonicalReference": "tldraw!~PointingRotateHandle:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "PointingSelection", - "canonicalReference": "tldraw!~PointingSelection:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "PointingShape", - "canonicalReference": "tldraw!~PointingShape:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Resizing", - "canonicalReference": "tldraw!~Resizing:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Rotating", - "canonicalReference": "tldraw!~Rotating:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "ScribbleBrushing", - "canonicalReference": "tldraw!~ScribbleBrushing:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Translating", - "canonicalReference": "tldraw!~Translating:class" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 38 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!SelectTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!SelectTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!SelectTool#onEnter:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onEnter: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onEnter", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!SelectTool#onExit:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onExit: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onExit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!SelectTool#reactor:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "reactor: " - }, - { - "kind": "Content", - "text": "(() => void) | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "reactor", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "tldraw!serializeTldrawJson:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function serializeTldrawJson(store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/tldr/file.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "store", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "serializeTldrawJson" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!serializeTldrawJsonBlob:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function serializeTldrawJsonBlob(store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Blob", - "canonicalReference": "!Blob:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/tldr/file.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "store", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "serializeTldrawJsonBlob" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!setDefaultEditorAssetUrls:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function setDefaultEditorAssetUrls(assetUrls: " - }, - { - "kind": "Reference", - "text": "TLEditorAssetUrls", - "canonicalReference": "tldraw!~TLEditorAssetUrls:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/static-assets/assetUrls.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "assetUrls", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "setDefaultEditorAssetUrls" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!SplineStylePickerSet:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function SplineStylePickerSet({ styles }: " - }, - { - "kind": "Content", - "text": "{\n styles: " - }, - { - "kind": "Reference", - "text": "ReadonlySharedStyleMap", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ styles }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "SplineStylePickerSet" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!StackMenuItems:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function StackMenuItems(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "StackMenuItems" - }, - { - "kind": "Class", - "canonicalReference": "tldraw!TextShapeTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class TextShapeTool extends " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/text/TextShapeTool.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "TextShapeTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeTool.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children: " - }, - { - "kind": "Content", - "text": "() => (typeof " - }, - { - "kind": "Reference", - "text": "Idle", - "canonicalReference": "tldraw!~Idle_6:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Pointing", - "canonicalReference": "tldraw!~Pointing_5:class" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeTool#shapeType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapeType: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "shapeType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "tldraw!TextShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class TextShapeUtil extends " - }, - { - "kind": "Reference", - "text": "ShapeUtil", - "canonicalReference": "@tldraw/editor!ShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/text/TextShapeUtil.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "TextShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeUtil#canEdit:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canEdit: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canEdit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!TextShapeUtil#component:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component(shape: " - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "component" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!TextShapeUtil#getDefaultProps:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDefaultProps(): " - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": "['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDefaultProps" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!TextShapeUtil#getGeometry:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getGeometry(shape: " - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Rectangle2d", - "canonicalReference": "@tldraw/editor!Rectangle2d:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getGeometry" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!TextShapeUtil#getMinDimensions:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getMinDimensions(shape: " - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n height: number;\n width: number;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getMinDimensions" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!TextShapeUtil#indicator:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "indicator(shape: " - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeUtil#isAspectRatioLocked:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isAspectRatioLocked: " - }, - { - "kind": "Reference", - "text": "TLShapeUtilFlag", - "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isAspectRatioLocked", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeUtil#onBeforeCreate:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBeforeCreate: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": ") => {\n x: number;\n y: number;\n type: \"text\";\n rotation: number;\n index: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n props: {\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n w: number;\n text: string;\n scale: number;\n autoSize: boolean;\n };\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onBeforeCreate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 12 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeUtil#onBeforeUpdate:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBeforeUpdate: " - }, - { - "kind": "Content", - "text": "(prev: " - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": ", next: " - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": ") => {\n x: number;\n y: number;\n props: {\n w: number;\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n text: string;\n scale: number;\n autoSize: boolean;\n };\n type: \"text\";\n rotation: number;\n index: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onBeforeUpdate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 14 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeUtil#onDoubleClickEdge:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onDoubleClickEdge: " - }, - { - "kind": "Content", - "text": "(shape: " - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": ") => {\n id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n type: \"text\";\n props: {\n autoSize: boolean;\n scale?: undefined;\n };\n } | {\n id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n type: \"text\";\n props: {\n scale: number;\n autoSize?: undefined;\n };\n } | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onDoubleClickEdge", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeUtil#onEditEnd:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onEditEnd: " - }, - { - "kind": "Reference", - "text": "TLOnEditEndHandler", - "canonicalReference": "@tldraw/editor!TLOnEditEndHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onEditEnd", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeUtil#onResize:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onResize: " - }, - { - "kind": "Reference", - "text": "TLOnResizeHandler", - "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onResize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "kind": "Content", - "text": "{\n color: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n size: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n w: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n text: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n scale: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n autoSize: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 18 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!TextShapeUtil#toSvg:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toSvg(shape: " - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": ", ctx: " - }, - { - "kind": "Reference", - "text": "SvgExportContext", - "canonicalReference": "@tldraw/editor!SvgExportContext:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "SVGGElement", - "canonicalReference": "!SVGGElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "ctx", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toSvg" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!TextShapeUtil.type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "\"text\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TextStylePickerSet:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TextStylePickerSet({ styles }: " - }, - { - "kind": "Content", - "text": "{\n styles: " - }, - { - "kind": "Reference", - "text": "ReadonlySharedStyleMap", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ styles }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "TextStylePickerSet" - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLComponents:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLComponents = " - }, - { - "kind": "Reference", - "text": "Expand", - "canonicalReference": "@tldraw/utils!Expand:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLEditorComponents", - "canonicalReference": "@tldraw/editor!TLEditorComponents:type" - }, - { - "kind": "Content", - "text": " & " - }, - { - "kind": "Reference", - "text": "TLUiComponents", - "canonicalReference": "tldraw!TLUiComponents:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/Tldraw.tsx", - "releaseTag": "Public", - "name": "TLComponents", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!TLDRAW_FILE_EXTENSION:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TLDRAW_FILE_EXTENSION: " - }, - { - "kind": "Content", - "text": "\".tldr\"" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/tldr/file.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "TLDRAW_FILE_EXTENSION", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!Tldraw:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function Tldraw(props: " - }, - { - "kind": "Reference", - "text": "TldrawProps", - "canonicalReference": "tldraw!TldrawProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/Tldraw.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "props", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "Tldraw" - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TldrawFile:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TldrawFile " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/tldr/file.ts", - "releaseTag": "Public", - "name": "TldrawFile", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawFile#records:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "records: " - }, - { - "kind": "Reference", - "text": "UnknownRecord", - "canonicalReference": "@tldraw/store!UnknownRecord:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "records", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawFile#schema:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "schema: " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "schema", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawFile#tldrawFileFormatVersion:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "tldrawFileFormatVersion: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "tldrawFileFormatVersion", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawHandles:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawHandles({ children }: " - }, - { - "kind": "Reference", - "text": "TLHandlesProps", - "canonicalReference": "@tldraw/editor!TLHandlesProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/canvas/TldrawHandles.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawHandles" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawHoveredShapeIndicator:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawHoveredShapeIndicator({ shapeId }: " - }, - { - "kind": "Reference", - "text": "TLHoveredShapeIndicatorProps", - "canonicalReference": "@tldraw/editor!TLHoveredShapeIndicatorProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/canvas/TldrawHoveredShapeIndicator.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ shapeId }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawHoveredShapeIndicator" - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!TldrawImage:var", - "docComment": "/**\n * A renderered SVG image of a Tldraw snapshot.\n *\n * @example\n * ```tsx\n * \n * \tsnapshot={snapshot}\n * \tpageId={pageId}\n * \tbackground={false}\n * darkMode={true}\n * bounds={new Box(0,0,600,400)}\n * scale={1}\n * />\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TldrawImage: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<{\n snapshot: " - }, - { - "kind": "Reference", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">;\n format?: \"png\" | \"svg\" | undefined;\n pageId?: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": " | undefined;\n shapeUtils?: readonly " - }, - { - "kind": "Reference", - "text": "TLAnyShapeUtilConstructor", - "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" - }, - { - "kind": "Content", - "text": "[] | undefined;\n bounds?: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | undefined;\n scale?: number | undefined;\n background?: boolean | undefined;\n padding?: number | undefined;\n darkMode?: boolean | undefined;\n preserveAspectRatio?: string | undefined;\n}>" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/TldrawImage.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "TldrawImage", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 14 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TldrawImageProps:type", - "docComment": "/**\n * Props for the {@link tldraw#TldrawImage} component.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TldrawImageProps = " - }, - { - "kind": "Reference", - "text": "Expand", - "canonicalReference": "@tldraw/utils!Expand:type" - }, - { - "kind": "Content", - "text": "<{\n snapshot: " - }, - { - "kind": "Reference", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">;\n format?: 'png' | 'svg';\n pageId?: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";\n shapeUtils?: readonly " - }, - { - "kind": "Reference", - "text": "TLAnyShapeUtilConstructor", - "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" - }, - { - "kind": "Content", - "text": "[];\n} & " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLSvgOptions", - "canonicalReference": "@tldraw/editor!TLSvgOptions:type" - }, - { - "kind": "Content", - "text": ">>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/TldrawImage.tsx", - "releaseTag": "Public", - "name": "TldrawImageProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 15 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TldrawProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TldrawProps = " - }, - { - "kind": "Reference", - "text": "Expand", - "canonicalReference": "@tldraw/utils!Expand:type" - }, - { - "kind": "Content", - "text": "<(" - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TldrawUiProps", - "canonicalReference": "tldraw!TldrawUiProps:type" - }, - { - "kind": "Content", - "text": ", 'components'> & " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TldrawEditorBaseProps", - "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps:interface" - }, - { - "kind": "Content", - "text": ", 'components'> & {\n components?: " - }, - { - "kind": "Reference", - "text": "TLComponents", - "canonicalReference": "tldraw!TLComponents:type" - }, - { - "kind": "Content", - "text": ";\n}) & " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLExternalContentProps", - "canonicalReference": "tldraw!~TLExternalContentProps:type" - }, - { - "kind": "Content", - "text": "> & ({\n store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLStoreWithStatus", - "canonicalReference": "@tldraw/editor!TLStoreWithStatus:type" - }, - { - "kind": "Content", - "text": ";\n} | {\n store?: undefined;\n persistenceKey?: string;\n sessionId?: string;\n defaultName?: string;\n snapshot?: " - }, - { - "kind": "Reference", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">;\n})>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/Tldraw.tsx", - "releaseTag": "Public", - "name": "TldrawProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 25 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawScribble:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawScribble({ scribble, zoom, color, opacity, className }: " - }, - { - "kind": "Reference", - "text": "TLScribbleProps", - "canonicalReference": "@tldraw/editor!TLScribbleProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/canvas/TldrawScribble.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ scribble, zoom, color, opacity, className }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawScribble" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawSelectionBackground:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TldrawSelectionBackground: ({ bounds, rotation }: " - }, - { - "kind": "Reference", - "text": "TLSelectionBackgroundProps", - "canonicalReference": "@tldraw/editor!TLSelectionBackgroundProps:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/canvas/TldrawSelectionBackground.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ bounds, rotation }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawSelectionBackground" - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!TldrawSelectionForeground:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TldrawSelectionForeground: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "MemoExoticComponent", - "canonicalReference": "@types/react!React.MemoExoticComponent:type" - }, - { - "kind": "Content", - "text": "<({ bounds, rotation, }: " - }, - { - "kind": "Reference", - "text": "TLSelectionForegroundProps", - "canonicalReference": "@tldraw/editor!TLSelectionForegroundProps:type" - }, - { - "kind": "Content", - "text": ") => import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null>" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/canvas/TldrawSelectionForeground.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "TldrawSelectionForeground", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!TldrawUi:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TldrawUi: " - }, - { - "kind": "Reference", - "text": "React.NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<{\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n hideUi?: boolean | undefined;\n components?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n ContextMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n ActionsMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n HelpMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n ZoomMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n MainMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n Minimap: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n StylePanel: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n PageMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n NavigationPanel: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n Toolbar: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n KeyboardShortcutsDialog: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n QuickActions: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n HelperButtons: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n DebugMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n MenuPanel: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n TopPanel: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n SharePanel: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n }> | undefined;\n renderDebugMenuItems?: (() => " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ") | undefined;\n assetUrls?: (import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "RecursivePartial", - "canonicalReference": "@tldraw/utils!RecursivePartial:type" - }, - { - "kind": "Content", - "text": " & import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "RecursivePartial", - "canonicalReference": "@tldraw/utils!RecursivePartial:type" - }, - { - "kind": "Content", - "text": ") | undefined;\n overrides?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n actions: import(\"./overrides\")." - }, - { - "kind": "Reference", - "text": "TLUiOverride", - "canonicalReference": "tldraw!~TLUiOverride:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n toolbar: import(\"./overrides\")." - }, - { - "kind": "Reference", - "text": "TLUiOverride", - "canonicalReference": "tldraw!~TLUiOverride:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n tools: import(\"./overrides\")." - }, - { - "kind": "Reference", - "text": "TLUiOverride", - "canonicalReference": "tldraw!~TLUiOverride:type" - }, - { - "kind": "Content", - "text": " void;\n } & {\n addToast: (toast: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n translations: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "> | undefined;\n }> | " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n actions: import(\"./overrides\")." - }, - { - "kind": "Reference", - "text": "TLUiOverride", - "canonicalReference": "tldraw!~TLUiOverride:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n toolbar: import(\"./overrides\")." - }, - { - "kind": "Reference", - "text": "TLUiOverride", - "canonicalReference": "tldraw!~TLUiOverride:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n tools: import(\"./overrides\")." - }, - { - "kind": "Reference", - "text": "TLUiOverride", - "canonicalReference": "tldraw!~TLUiOverride:type" - }, - { - "kind": "Content", - "text": " void;\n } & {\n addToast: (toast: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n translations: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "> | undefined;\n }>[] | undefined;\n onUiEvent?: import(\"./context/events\")." - }, - { - "kind": "Reference", - "text": "TLUiEventHandler", - "canonicalReference": "tldraw!TLUiEventHandler:type" - }, - { - "kind": "Content", - "text": " | undefined;\n forceMobile?: boolean | undefined;\n}>" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/TldrawUi.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "TldrawUi", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 183 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TldrawUiBaseProps:interface", - "docComment": "/**\n * Base props for the {@link tldraw#Tldraw} and {@link TldrawUi} components.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TldrawUiBaseProps " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/TldrawUi.tsx", - "releaseTag": "Public", - "name": "TldrawUiBaseProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawUiBaseProps#assetUrls:member", - "docComment": "/**\n * Asset URL override.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "assetUrls?: " - }, - { - "kind": "Reference", - "text": "TLUiAssetUrlOverrides", - "canonicalReference": "tldraw!TLUiAssetUrlOverrides:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "assetUrls", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawUiBaseProps#children:member", - "docComment": "/**\n * The component's children.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawUiBaseProps#components:member", - "docComment": "/**\n * Overrides for the UI components.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "components?: " - }, - { - "kind": "Reference", - "text": "TLUiComponents", - "canonicalReference": "tldraw!TLUiComponents:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "components", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawUiBaseProps#hideUi:member", - "docComment": "/**\n * Whether to hide the user interface and only display the canvas.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "hideUi?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "hideUi", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawUiBaseProps#renderDebugMenuItems:member", - "docComment": "/**\n * Additional items to add to the debug menu (will be deprecated)\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "renderDebugMenuItems?: " - }, - { - "kind": "Content", - "text": "() => " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "renderDebugMenuItems", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!TldrawUiButton:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TldrawUiButton: " - }, - { - "kind": "Reference", - "text": "React.ForwardRefExoticComponent", - "canonicalReference": "@types/react!React.ForwardRefExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiButtonProps", - "canonicalReference": "tldraw!TLUiButtonProps:interface" - }, - { - "kind": "Content", - "text": " & " - }, - { - "kind": "Reference", - "text": "React.RefAttributes", - "canonicalReference": "@types/react!React.RefAttributes:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HTMLButtonElement", - "canonicalReference": "!HTMLButtonElement:interface" - }, - { - "kind": "Content", - "text": ">>" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButton.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "TldrawUiButton", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 9 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiButtonCheck:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiButtonCheck({ checked }: " - }, - { - "kind": "Reference", - "text": "TLUiButtonCheckProps", - "canonicalReference": "tldraw!TLUiButtonCheckProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButtonCheck.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ checked }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiButtonCheck" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiButtonIcon:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiButtonIcon({ icon, small, invertIcon }: " - }, - { - "kind": "Reference", - "text": "TLUiButtonIconProps", - "canonicalReference": "tldraw!TLUiButtonIconProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButtonIcon.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ icon, small, invertIcon }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiButtonIcon" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiButtonLabel:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiButtonLabel({ children }: " - }, - { - "kind": "Reference", - "text": "TLUiButtonLabelProps", - "canonicalReference": "tldraw!TLUiButtonLabelProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButtonLabel.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiButtonLabel" - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!TldrawUiButtonPicker:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TldrawUiButtonPicker: " - }, - { - "kind": "Content", - "text": "typeof " - }, - { - "kind": "Reference", - "text": "_TldrawUiButtonPicker", - "canonicalReference": "tldraw!~_TldrawUiButtonPicker:function" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiButtonPicker.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "TldrawUiButtonPicker", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiComponentsProvider:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiComponentsProvider({ overrides, children, }: " - }, - { - "kind": "Reference", - "text": "TLUiComponentsProviderProps", - "canonicalReference": "tldraw!TLUiComponentsProviderProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/components.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ overrides, children, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiComponentsProvider" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiContextProvider:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiContextProvider({ overrides, components, assetUrls, onUiEvent, forceMobile, children, }: " - }, - { - "kind": "Reference", - "text": "TldrawUiContextProviderProps", - "canonicalReference": "tldraw!TldrawUiContextProviderProps:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/TldrawUiContextProvider.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ overrides, components, assetUrls, onUiEvent, forceMobile, children, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiContextProvider" - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TldrawUiContextProviderProps:interface", - "docComment": "/**\n * Props for the {@link tldraw#Tldraw} and {@link TldrawUi} components.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TldrawUiContextProviderProps " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/TldrawUiContextProvider.tsx", - "releaseTag": "Public", - "name": "TldrawUiContextProviderProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawUiContextProviderProps#assetUrls:member", - "docComment": "/**\n * Urls for where to find fonts and other assets for the UI.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "assetUrls?: " - }, - { - "kind": "Reference", - "text": "RecursivePartial", - "canonicalReference": "@tldraw/utils!RecursivePartial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiAssetUrls", - "canonicalReference": "tldraw!~TLUiAssetUrls:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "assetUrls", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawUiContextProviderProps#children:member", - "docComment": "/**\n * The component's children.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawUiContextProviderProps#components:member", - "docComment": "/**\n * Overrides for the UI components.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "components?: " - }, - { - "kind": "Reference", - "text": "TLUiComponents", - "canonicalReference": "tldraw!TLUiComponents:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "components", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawUiContextProviderProps#forceMobile:member", - "docComment": "/**\n * Whether to always should the mobile breakpoints.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "forceMobile?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "forceMobile", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawUiContextProviderProps#onUiEvent:member", - "docComment": "/**\n * Callback for when an event occurs in the UI.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "onUiEvent?: " - }, - { - "kind": "Reference", - "text": "TLUiEventHandler", - "canonicalReference": "tldraw!TLUiEventHandler:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onUiEvent", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TldrawUiContextProviderProps#overrides:member", - "docComment": "/**\n * Overrides for the UI.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "overrides?: " - }, - { - "kind": "Reference", - "text": "TLUiOverrides", - "canonicalReference": "tldraw!TLUiOverrides:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLUiOverrides", - "canonicalReference": "tldraw!TLUiOverrides:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "overrides", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDialogBody:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDialogBody({ className, children, style }: " - }, - { - "kind": "Reference", - "text": "TLUiDialogBodyProps", - "canonicalReference": "tldraw!TLUiDialogBodyProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ className, children, style }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiDialogBody" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDialogCloseButton:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDialogCloseButton(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "TldrawUiDialogCloseButton" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDialogFooter:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDialogFooter({ className, children }: " - }, - { - "kind": "Reference", - "text": "TLUiDialogFooterProps", - "canonicalReference": "tldraw!TLUiDialogFooterProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ className, children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiDialogFooter" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDialogHeader:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDialogHeader({ className, children }: " - }, - { - "kind": "Reference", - "text": "TLUiDialogHeaderProps", - "canonicalReference": "tldraw!TLUiDialogHeaderProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ className, children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiDialogHeader" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDialogTitle:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDialogTitle({ className, children }: " - }, - { - "kind": "Reference", - "text": "TLUiDialogTitleProps", - "canonicalReference": "tldraw!TLUiDialogTitleProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ className, children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiDialogTitle" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDropdownMenuCheckboxItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDropdownMenuCheckboxItem({ children, onSelect, ...rest }: " - }, - { - "kind": "Reference", - "text": "TLUiDropdownMenuCheckboxItemProps", - "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children, onSelect, ...rest }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiDropdownMenuCheckboxItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDropdownMenuContent:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDropdownMenuContent({ side, align, sideOffset, alignOffset, children, }: " - }, - { - "kind": "Reference", - "text": "TLUiDropdownMenuContentProps", - "canonicalReference": "tldraw!TLUiDropdownMenuContentProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ side, align, sideOffset, alignOffset, children, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiDropdownMenuContent" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDropdownMenuGroup:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDropdownMenuGroup({ children }: " - }, - { - "kind": "Reference", - "text": "TLUiDropdownMenuGroupProps", - "canonicalReference": "tldraw!TLUiDropdownMenuGroupProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiDropdownMenuGroup" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDropdownMenuIndicator:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDropdownMenuIndicator(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "TldrawUiDropdownMenuIndicator" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDropdownMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDropdownMenuItem({ noClose, children }: " - }, - { - "kind": "Reference", - "text": "TLUiDropdownMenuItemProps", - "canonicalReference": "tldraw!TLUiDropdownMenuItemProps:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ noClose, children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiDropdownMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDropdownMenuRoot:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDropdownMenuRoot({ id, children, modal, debugOpen, }: " - }, - { - "kind": "Reference", - "text": "TLUiDropdownMenuRootProps", - "canonicalReference": "tldraw!TLUiDropdownMenuRootProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ id, children, modal, debugOpen, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiDropdownMenuRoot" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDropdownMenuSub:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDropdownMenuSub({ id, children }: " - }, - { - "kind": "Reference", - "text": "TLUiDropdownMenuSubProps", - "canonicalReference": "tldraw!TLUiDropdownMenuSubProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ id, children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiDropdownMenuSub" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDropdownMenuSubTrigger:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDropdownMenuSubTrigger({ id, label, title, disabled, }: " - }, - { - "kind": "Reference", - "text": "TLUiDropdownMenuSubTriggerProps", - "canonicalReference": "tldraw!TLUiDropdownMenuSubTriggerProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ id, label, title, disabled, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiDropdownMenuSubTrigger" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiDropdownMenuTrigger:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiDropdownMenuTrigger({ children, ...rest }: " - }, - { - "kind": "Reference", - "text": "TLUiDropdownMenuTriggerProps", - "canonicalReference": "tldraw!TLUiDropdownMenuTriggerProps:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children, ...rest }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiDropdownMenuTrigger" - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!TldrawUiIcon:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TldrawUiIcon: " - }, - { - "kind": "Content", - "text": "import(\"react\")." - }, - { - "kind": "Reference", - "text": "NamedExoticComponent", - "canonicalReference": "@types/react!React.NamedExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiIconProps", - "canonicalReference": "tldraw!TLUiIconProps:interface" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiIcon.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "TldrawUiIcon", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Variable", - "canonicalReference": "tldraw!TldrawUiInput:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TldrawUiInput: " - }, - { - "kind": "Reference", - "text": "React.ForwardRefExoticComponent", - "canonicalReference": "@types/react!React.ForwardRefExoticComponent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiInputProps", - "canonicalReference": "tldraw!TLUiInputProps:interface" - }, - { - "kind": "Content", - "text": " & " - }, - { - "kind": "Reference", - "text": "React.RefAttributes", - "canonicalReference": "@types/react!React.RefAttributes:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HTMLInputElement", - "canonicalReference": "!HTMLInputElement:interface" - }, - { - "kind": "Content", - "text": ">>" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiInput.tsx", - "isReadonly": true, - "releaseTag": "Public", - "name": "TldrawUiInput", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 9 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiKbd:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiKbd({ children, visibleOnMobileLayout }: " - }, - { - "kind": "Reference", - "text": "TLUiKbdProps", - "canonicalReference": "tldraw!TLUiKbdProps:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiKbd.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children, visibleOnMobileLayout }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiKbd" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiMenuCheckboxItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiMenuCheckboxItem({ id, kbd, label, readonlyOk, onSelect, disabled, checked, }: " - }, - { - "kind": "Reference", - "text": "TLUiMenuCheckboxItemProps", - "canonicalReference": "tldraw!TLUiMenuCheckboxItemProps:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.tsx", - "returnTypeTokenRange": { - "startIndex": 12, - "endIndex": 15 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ id, kbd, label, readonlyOk, onSelect, disabled, checked, }", - "parameterTypeTokenRange": { - "startIndex": 9, - "endIndex": 11 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "TranslationKey", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "typeParameterName": "IconType", - "constraintTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - } - } - ], - "name": "TldrawUiMenuCheckboxItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiMenuContextProvider:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiMenuContextProvider({ type, sourceId, children, }: " - }, - { - "kind": "Reference", - "text": "TLUiMenuContextProviderProps", - "canonicalReference": "tldraw!TLUiMenuContextProviderProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuContext.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ type, sourceId, children, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiMenuContextProvider" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiMenuGroup:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiMenuGroup({ id, label, children }: " - }, - { - "kind": "Reference", - "text": "TLUiMenuGroupProps", - "canonicalReference": "tldraw!TLUiMenuGroupProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean | import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "Iterable", - "canonicalReference": "!Iterable:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": "> | null | number | string | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuGroup.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ id, label, children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiMenuGroup" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiMenuItem({ disabled, spinner, readonlyOk, id, kbd, label, icon, onSelect, noClose, }: " - }, - { - "kind": "Reference", - "text": "TLUiMenuItemProps", - "canonicalReference": "tldraw!TLUiMenuItemProps:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx", - "returnTypeTokenRange": { - "startIndex": 12, - "endIndex": 15 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ disabled, spinner, readonlyOk, id, kbd, label, icon, onSelect, noClose, }", - "parameterTypeTokenRange": { - "startIndex": 9, - "endIndex": 11 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "TranslationKey", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "typeParameterName": "IconType", - "constraintTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - } - } - ], - "name": "TldrawUiMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiMenuSubmenu:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiMenuSubmenu({ id, disabled, label, size, children, }: " - }, - { - "kind": "Reference", - "text": "TLUiMenuSubmenuProps", - "canonicalReference": "tldraw!TLUiMenuSubmenuProps:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean | import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "Iterable", - "canonicalReference": "!Iterable:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": "> | null | number | string | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuSubmenu.tsx", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 15 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ id, disabled, label, size, children, }", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "Translation", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "name": "TldrawUiMenuSubmenu" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiPopover:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiPopover({ id, children, onOpenChange, open }: " - }, - { - "kind": "Reference", - "text": "TLUiPopoverProps", - "canonicalReference": "tldraw!TLUiPopoverProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiPopover.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ id, children, onOpenChange, open }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiPopover" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiPopoverContent:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiPopoverContent({ side, children, align, sideOffset, alignOffset, }: " - }, - { - "kind": "Reference", - "text": "TLUiPopoverContentProps", - "canonicalReference": "tldraw!TLUiPopoverContentProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiPopover.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ side, children, align, sideOffset, alignOffset, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiPopoverContent" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!TldrawUiPopoverTrigger:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function TldrawUiPopoverTrigger({ children }: " - }, - { - "kind": "Reference", - "text": "TLUiPopoverTriggerProps", - "canonicalReference": "tldraw!TLUiPopoverTriggerProps:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiPopover.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "TldrawUiPopoverTrigger" - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TldrawUiProps:type", - "docComment": "/**\n * Props for the {@link @tldraw/tldraw#Tldraw} and {@link TldrawUi} components.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TldrawUiProps = " - }, - { - "kind": "Reference", - "text": "Expand", - "canonicalReference": "@tldraw/utils!Expand:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TldrawUiBaseProps", - "canonicalReference": "tldraw!TldrawUiBaseProps:interface" - }, - { - "kind": "Content", - "text": " & " - }, - { - "kind": "Reference", - "text": "TldrawUiContextProviderProps", - "canonicalReference": "tldraw!TldrawUiContextProviderProps:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/TldrawUi.tsx", - "releaseTag": "Public", - "name": "TldrawUiProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiActionItem:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiActionItem " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/actions.tsx", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TransationKey", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "typeParameterName": "IconType", - "constraintTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - } - } - ], - "name": "TLUiActionItem", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiActionItem#checkbox:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "checkbox?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "checkbox", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiActionItem#icon:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "icon?: " - }, - { - "kind": "Content", - "text": "IconType" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "icon", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiActionItem#id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiActionItem#kbd:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "kbd?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "kbd", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiActionItem#label:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "label?: " - }, - { - "kind": "Content", - "text": "{\n [key: string]: TransationKey;\n } | TransationKey" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "label", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiActionItem#onSelect:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onSelect: " - }, - { - "kind": "Content", - "text": "(source: " - }, - { - "kind": "Reference", - "text": "TLUiEventSource", - "canonicalReference": "tldraw!TLUiEventSource:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": " | void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onSelect", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiActionItem#readonlyOk:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonlyOk?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "readonlyOk", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiActionItem#title:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "title?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "title", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiActionsContextType:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiActionsContextType = " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/actions.tsx", - "releaseTag": "Public", - "name": "TLUiActionsContextType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiActionsMenuProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiActionsMenuProps = " - }, - { - "kind": "Content", - "text": "{\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx", - "releaseTag": "Public", - "name": "TLUiActionsMenuProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiAssetUrlOverrides:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiAssetUrlOverrides = " - }, - { - "kind": "Reference", - "text": "RecursivePartial", - "canonicalReference": "@tldraw/utils!RecursivePartial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiAssetUrls", - "canonicalReference": "tldraw!~TLUiAssetUrls:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/assetUrls.ts", - "releaseTag": "Public", - "name": "TLUiAssetUrlOverrides", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiButtonCheckProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiButtonCheckProps = " - }, - { - "kind": "Content", - "text": "{\n checked: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButtonCheck.tsx", - "releaseTag": "Public", - "name": "TLUiButtonCheckProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiButtonIconProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiButtonIconProps = " - }, - { - "kind": "Content", - "text": "{\n icon: string;\n small?: boolean;\n invertIcon?: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButtonIcon.tsx", - "releaseTag": "Public", - "name": "TLUiButtonIconProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiButtonLabelProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiButtonLabelProps = " - }, - { - "kind": "Content", - "text": "{\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButtonLabel.tsx", - "releaseTag": "Public", - "name": "TLUiButtonLabelProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiButtonPickerProps:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiButtonPickerProps " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiButtonPicker.tsx", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "TLUiButtonPickerProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiButtonPickerProps#items:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "items: " - }, - { - "kind": "Reference", - "text": "StyleValuesForUi", - "canonicalReference": "tldraw!~StyleValuesForUi:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "items", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiButtonPickerProps#onValueChange:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onValueChange: " - }, - { - "kind": "Content", - "text": "(style: " - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": ", value: T, squashing: boolean) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onValueChange", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiButtonPickerProps#style:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "style: " - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "style", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiButtonPickerProps#title:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "title: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "title", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiButtonPickerProps#uiType:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "uiType: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "uiType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiButtonPickerProps#value:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "value: " - }, - { - "kind": "Reference", - "text": "SharedStyle", - "canonicalReference": "@tldraw/editor!SharedStyle:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "value", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiButtonProps:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiButtonProps extends " - }, - { - "kind": "Reference", - "text": "React.HTMLAttributes", - "canonicalReference": "@types/react!React.HTMLAttributes:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HTMLButtonElement", - "canonicalReference": "!HTMLButtonElement:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButton.tsx", - "releaseTag": "Public", - "name": "TLUiButtonProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiButtonProps#disabled:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "disabled?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "disabled", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiButtonProps#type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Content", - "text": "'danger' | 'help' | 'icon' | 'low' | 'menu' | 'normal' | 'primary' | 'tool'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 5 - } - ] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiComponents:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiComponents = " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n [K in keyof " - }, - { - "kind": "Reference", - "text": "BaseTLUiComponents", - "canonicalReference": "tldraw!~BaseTLUiComponents:interface" - }, - { - "kind": "Content", - "text": "]: " - }, - { - "kind": "Reference", - "text": "BaseTLUiComponents", - "canonicalReference": "tldraw!~BaseTLUiComponents:interface" - }, - { - "kind": "Content", - "text": "[K] | null;\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/components.tsx", - "releaseTag": "Public", - "name": "TLUiComponents", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiComponentsProviderProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiComponentsProviderProps = " - }, - { - "kind": "Content", - "text": "{\n overrides?: " - }, - { - "kind": "Reference", - "text": "TLUiComponents", - "canonicalReference": "tldraw!TLUiComponents:type" - }, - { - "kind": "Content", - "text": ";\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/components.tsx", - "releaseTag": "Public", - "name": "TLUiComponentsProviderProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiContextMenuProps:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiContextMenuProps " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ContextMenu/DefaultContextMenu.tsx", - "releaseTag": "Public", - "name": "TLUiContextMenuProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiContextMenuProps#children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiDebugMenuProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiDebugMenuProps = " - }, - { - "kind": "Content", - "text": "{\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/DebugMenu/DefaultDebugMenu.tsx", - "releaseTag": "Public", - "name": "TLUiDebugMenuProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiDialog:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiDialog " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/dialogs.tsx", - "releaseTag": "Public", - "name": "TLUiDialog", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiDialog#component:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiDialogProps", - "canonicalReference": "tldraw!TLUiDialogProps:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "component", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiDialog#id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiDialog#onClose:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onClose?: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onClose", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiDialogBodyProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiDialogBodyProps = " - }, - { - "kind": "Content", - "text": "{\n className?: string;\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n style?: " - }, - { - "kind": "Reference", - "text": "React.CSSProperties", - "canonicalReference": "@types/react!React.CSSProperties:interface" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", - "releaseTag": "Public", - "name": "TLUiDialogBodyProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiDialogFooterProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiDialogFooterProps = " - }, - { - "kind": "Content", - "text": "{\n className?: string;\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", - "releaseTag": "Public", - "name": "TLUiDialogFooterProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiDialogHeaderProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiDialogHeaderProps = " - }, - { - "kind": "Content", - "text": "{\n className?: string;\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", - "releaseTag": "Public", - "name": "TLUiDialogHeaderProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiDialogProps:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiDialogProps " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/dialogs.tsx", - "releaseTag": "Public", - "name": "TLUiDialogProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiDialogProps#onClose:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onClose: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onClose", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiDialogsContextType:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiDialogsContextType = " - }, - { - "kind": "Content", - "text": "{\n addDialog: (dialog: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiDialog", - "canonicalReference": "tldraw!TLUiDialog:interface" - }, - { - "kind": "Content", - "text": ", 'id'> & {\n id?: string;\n }) => string;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiDialog", - "canonicalReference": "tldraw!TLUiDialog:interface" - }, - { - "kind": "Content", - "text": ">) => string;\n clearDialogs: () => void;\n dialogs: " - }, - { - "kind": "Reference", - "text": "TLUiDialog", - "canonicalReference": "tldraw!TLUiDialog:interface" - }, - { - "kind": "Content", - "text": "[];\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/dialogs.tsx", - "releaseTag": "Public", - "name": "TLUiDialogsContextType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 12 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiDialogTitleProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiDialogTitleProps = " - }, - { - "kind": "Content", - "text": "{\n className?: string;\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", - "releaseTag": "Public", - "name": "TLUiDialogTitleProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiDropdownMenuCheckboxItemProps " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "releaseTag": "Public", - "name": "TLUiDropdownMenuCheckboxItemProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps#checked:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "checked?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "checked", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps#children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps#disabled:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "disabled?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "disabled", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps#onSelect:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onSelect?: " - }, - { - "kind": "Content", - "text": "(e: " - }, - { - "kind": "Reference", - "text": "Event", - "canonicalReference": "!Event:interface" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onSelect", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps#title:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "title: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "title", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiDropdownMenuContentProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiDropdownMenuContentProps = " - }, - { - "kind": "Content", - "text": "{\n id?: string;\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n alignOffset?: number;\n sideOffset?: number;\n align?: 'center' | 'end' | 'start';\n side?: 'bottom' | 'left' | 'right' | 'top';\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "releaseTag": "Public", - "name": "TLUiDropdownMenuContentProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiDropdownMenuGroupProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiDropdownMenuGroupProps = " - }, - { - "kind": "Content", - "text": "{\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "releaseTag": "Public", - "name": "TLUiDropdownMenuGroupProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiDropdownMenuItemProps:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiDropdownMenuItemProps " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "releaseTag": "Public", - "name": "TLUiDropdownMenuItemProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiDropdownMenuItemProps#children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiDropdownMenuItemProps#noClose:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "noClose?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "noClose", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiDropdownMenuRootProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiDropdownMenuRootProps = " - }, - { - "kind": "Content", - "text": "{\n id: string;\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n modal?: boolean;\n debugOpen?: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "releaseTag": "Public", - "name": "TLUiDropdownMenuRootProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiDropdownMenuSubProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiDropdownMenuSubProps = " - }, - { - "kind": "Content", - "text": "{\n id: string;\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "releaseTag": "Public", - "name": "TLUiDropdownMenuSubProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiDropdownMenuSubTriggerProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiDropdownMenuSubTriggerProps = " - }, - { - "kind": "Content", - "text": "{\n label: string;\n id?: string;\n title?: string;\n disabled?: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "releaseTag": "Public", - "name": "TLUiDropdownMenuSubTriggerProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiDropdownMenuTriggerProps:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiDropdownMenuTriggerProps " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", - "releaseTag": "Public", - "name": "TLUiDropdownMenuTriggerProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiDropdownMenuTriggerProps#children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiEventContextType:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiEventContextType = " - }, - { - "kind": "Reference", - "text": "TLUiEventHandler", - "canonicalReference": "tldraw!TLUiEventHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", - "releaseTag": "Public", - "name": "TLUiEventContextType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiEventHandler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiEventHandler = " - }, - { - "kind": "Content", - "text": "(name: T, data: " - }, - { - "kind": "Reference", - "text": "Join", - "canonicalReference": "tldraw!~Join:type" - }, - { - "kind": "Content", - "text": "<{\n source: " - }, - { - "kind": "Reference", - "text": "TLUiEventSource", - "canonicalReference": "tldraw!TLUiEventSource:type" - }, - { - "kind": "Content", - "text": ";\n}, " - }, - { - "kind": "Reference", - "text": "TLUiEventMap", - "canonicalReference": "tldraw!TLUiEventMap:interface" - }, - { - "kind": "Content", - "text": "[T]>) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", - "releaseTag": "Public", - "name": "TLUiEventHandler", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - } - } - ], - "typeTokenRange": { - "startIndex": 7, - "endIndex": 14 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiEventMap:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiEventMap " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", - "releaseTag": "Public", - "name": "TLUiEventMap", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"align-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'align-shapes': " - }, - { - "kind": "Content", - "text": "{\n operation: 'bottom' | 'center-horizontal' | 'center-vertical' | 'left' | 'right' | 'top';\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"align-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"change-language\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'change-language': " - }, - { - "kind": "Content", - "text": "{\n locale: string;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"change-language\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"close-menu\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'close-menu': " - }, - { - "kind": "Content", - "text": "{\n id: string;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"close-menu\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"convert-to-bookmark\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'convert-to-bookmark': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"convert-to-bookmark\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"convert-to-embed\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'convert-to-embed': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"convert-to-embed\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"copy-as\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'copy-as': " - }, - { - "kind": "Content", - "text": "{\n format: 'json' | 'png' | 'svg';\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"copy-as\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"create-new-project\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'create-new-project': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"create-new-project\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"delete-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'delete-shapes': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"delete-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"distribute-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'distribute-shapes': " - }, - { - "kind": "Content", - "text": "{\n operation: 'horizontal' | 'vertical';\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"distribute-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"duplicate-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'duplicate-shapes': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"duplicate-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"edit-link\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'edit-link': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"edit-link\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"exit-pen-mode\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'exit-pen-mode': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"exit-pen-mode\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"export-all-as\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'export-all-as': " - }, - { - "kind": "Content", - "text": "{\n format: 'json' | 'png' | 'svg';\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"export-all-as\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"export-as\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'export-as': " - }, - { - "kind": "Content", - "text": "{\n format: 'json' | 'png' | 'svg';\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"export-as\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"fit-frame-to-content\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'fit-frame-to-content': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"fit-frame-to-content\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"flip-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'flip-shapes': " - }, - { - "kind": "Content", - "text": "{\n operation: 'horizontal' | 'vertical';\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"flip-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"group-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'group-shapes': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"group-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"insert-embed\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'insert-embed': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"insert-embed\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"insert-media\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'insert-media': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"insert-media\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"move-to-page\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'move-to-page': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"move-to-page\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"new-page\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'new-page': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"new-page\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"open-cursor-chat\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'open-cursor-chat': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"open-cursor-chat\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"open-embed-link\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'open-embed-link': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"open-embed-link\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"open-file\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'open-file': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"open-file\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"open-menu\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'open-menu': " - }, - { - "kind": "Content", - "text": "{\n id: string;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"open-menu\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"pack-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'pack-shapes': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"pack-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"remove-frame\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'remove-frame': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"remove-frame\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"reorder-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'reorder-shapes': " - }, - { - "kind": "Content", - "text": "{\n operation: 'backward' | 'forward' | 'toBack' | 'toFront';\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"reorder-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"reset-zoom\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'reset-zoom': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"reset-zoom\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"rotate-ccw\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'rotate-ccw': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"rotate-ccw\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"rotate-cw\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'rotate-cw': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"rotate-cw\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"save-project-to-file\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'save-project-to-file': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"save-project-to-file\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"select-all-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'select-all-shapes': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"select-all-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"select-none-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'select-none-shapes': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"select-none-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"select-tool\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'select-tool': " - }, - { - "kind": "Content", - "text": "{\n id: string;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"select-tool\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"set-style\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'set-style': " - }, - { - "kind": "Content", - "text": "{\n id: string;\n value: number | string;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"set-style\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"stack-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'stack-shapes': " - }, - { - "kind": "Content", - "text": "{\n operation: 'horizontal' | 'vertical';\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"stack-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"stop-following\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'stop-following': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"stop-following\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"stretch-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'stretch-shapes': " - }, - { - "kind": "Content", - "text": "{\n operation: 'horizontal' | 'vertical';\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"stretch-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"toggle-auto-size\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'toggle-auto-size': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"toggle-auto-size\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"toggle-dark-mode\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'toggle-dark-mode': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"toggle-dark-mode\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"toggle-debug-mode\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'toggle-debug-mode': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"toggle-debug-mode\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"toggle-edge-scrolling\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'toggle-edge-scrolling': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"toggle-edge-scrolling\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"toggle-focus-mode\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'toggle-focus-mode': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"toggle-focus-mode\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"toggle-grid-mode\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'toggle-grid-mode': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"toggle-grid-mode\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"toggle-lock\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'toggle-lock': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"toggle-lock\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"toggle-reduce-motion\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'toggle-reduce-motion': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"toggle-reduce-motion\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"toggle-snap-mode\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'toggle-snap-mode': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"toggle-snap-mode\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"toggle-tool-lock\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'toggle-tool-lock': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"toggle-tool-lock\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"toggle-transparent\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'toggle-transparent': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"toggle-transparent\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"toggle-wrap-mode\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'toggle-wrap-mode': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"toggle-wrap-mode\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"ungroup-shapes\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'ungroup-shapes': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"ungroup-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"unlock-all\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'unlock-all': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"unlock-all\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"zoom-in\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'zoom-in': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"zoom-in\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"zoom-into-view\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'zoom-into-view': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"zoom-into-view\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"zoom-out\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'zoom-out': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"zoom-out\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"zoom-to-content\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'zoom-to-content': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"zoom-to-content\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"zoom-to-fit\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'zoom-to-fit': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"zoom-to-fit\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"zoom-to-selection\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'zoom-to-selection': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"zoom-to-selection\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#\"zoom-tool\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'zoom-tool': " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"zoom-tool\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#copy:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "copy: " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "copy", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#cut:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "cut: " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "cut", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#paste:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "paste: " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "paste", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#print:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "print: " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "print", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#redo:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "redo: " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "redo", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiEventMap#undo:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "undo: " - }, - { - "kind": "Content", - "text": "null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "undo", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiEventSource:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiEventSource = " - }, - { - "kind": "Content", - "text": "'actions-menu' | 'context-menu' | 'debug-panel' | 'dialog' | 'document-name' | 'export-menu' | 'help-menu' | 'helper-buttons' | 'kbd' | 'main-menu' | 'menu' | 'navigation-zone' | 'page-menu' | 'people-menu' | 'quick-actions' | 'share-menu' | 'style-panel' | 'toolbar' | 'unknown' | 'zoom-menu'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", - "releaseTag": "Public", - "name": "TLUiEventSource", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiHelperButtonsProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiHelperButtonsProps = " - }, - { - "kind": "Content", - "text": "{\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelperButtons/DefaultHelperButtons.tsx", - "releaseTag": "Public", - "name": "TLUiHelperButtonsProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiHelpMenuProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiHelpMenuProps = " - }, - { - "kind": "Content", - "text": "{\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelpMenu/DefaultHelpMenu.tsx", - "releaseTag": "Public", - "name": "TLUiHelpMenuProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiIconProps:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiIconProps extends " - }, - { - "kind": "Reference", - "text": "React.HTMLProps", - "canonicalReference": "@types/react!React.HTMLProps:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HTMLDivElement", - "canonicalReference": "!HTMLDivElement:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiIcon.tsx", - "releaseTag": "Public", - "name": "TLUiIconProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiIconProps#children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "children?: " - }, - { - "kind": "Content", - "text": "undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiIconProps#color:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "color?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "color", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiIconProps#crossOrigin:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "crossOrigin?: " - }, - { - "kind": "Content", - "text": "'anonymous' | 'use-credentials'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "crossOrigin", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiIconProps#icon:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "icon: " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLUiIconType", - "canonicalReference": "tldraw!TLUiIconType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "icon", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiIconProps#invertIcon:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "invertIcon?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "invertIcon", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiIconProps#small:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "small?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "small", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 5 - } - ] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiIconType:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiIconType = " - }, - { - "kind": "Content", - "text": "'align-bottom-center' | 'align-bottom-left' | 'align-bottom-right' | 'align-bottom' | 'align-center-center' | 'align-center-horizontal' | 'align-center-left' | 'align-center-right' | 'align-center-vertical' | 'align-left' | 'align-right' | 'align-top-center' | 'align-top-left' | 'align-top-right' | 'align-top' | 'arrow-left' | 'arrowhead-arrow' | 'arrowhead-bar' | 'arrowhead-diamond' | 'arrowhead-dot' | 'arrowhead-none' | 'arrowhead-square' | 'arrowhead-triangle-inverted' | 'arrowhead-triangle' | 'aspect-ratio' | 'avatar' | 'blob' | 'bring-forward' | 'bring-to-front' | 'check' | 'checkbox-checked' | 'checkbox-empty' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chevrons-ne' | 'chevrons-sw' | 'clipboard-copied' | 'clipboard-copy' | 'code' | 'collab' | 'color' | 'comment' | 'cross-2' | 'cross' | 'dash-dashed' | 'dash-dotted' | 'dash-draw' | 'dash-solid' | 'discord' | 'distribute-horizontal' | 'distribute-vertical' | 'dot' | 'dots-horizontal' | 'dots-vertical' | 'drag-handle-dots' | 'duplicate' | 'edit' | 'external-link' | 'file' | 'fill-none' | 'fill-pattern' | 'fill-semi' | 'fill-solid' | 'follow' | 'following' | 'font-draw' | 'font-mono' | 'font-sans' | 'font-serif' | 'geo-arrow-down' | 'geo-arrow-left' | 'geo-arrow-right' | 'geo-arrow-up' | 'geo-check-box' | 'geo-cloud' | 'geo-diamond' | 'geo-ellipse' | 'geo-hexagon' | 'geo-octagon' | 'geo-oval' | 'geo-pentagon' | 'geo-rectangle' | 'geo-rhombus-2' | 'geo-rhombus' | 'geo-star' | 'geo-trapezoid' | 'geo-triangle' | 'geo-x-box' | 'github' | 'group' | 'hidden' | 'image' | 'info-circle' | 'leading' | 'link' | 'lock-small' | 'lock' | 'menu' | 'minus' | 'mixed' | 'pack' | 'page' | 'plus' | 'question-mark-circle' | 'question-mark' | 'redo' | 'reset-zoom' | 'rotate-ccw' | 'rotate-cw' | 'ruler' | 'search' | 'send-backward' | 'send-to-back' | 'settings-horizontal' | 'settings-vertical-1' | 'settings-vertical' | 'share-1' | 'share-2' | 'size-extra-large' | 'size-large' | 'size-medium' | 'size-small' | 'spline-cubic' | 'spline-line' | 'stack-horizontal' | 'stack-vertical' | 'status-offline' | 'status-online' | 'stretch-horizontal' | 'stretch-vertical' | 'text-align-center' | 'text-align-justify' | 'text-align-left' | 'text-align-right' | 'tool-arrow' | 'tool-embed' | 'tool-eraser' | 'tool-frame' | 'tool-hand' | 'tool-highlight' | 'tool-laser' | 'tool-line' | 'tool-media' | 'tool-note' | 'tool-pencil' | 'tool-pointer' | 'tool-text' | 'trash' | 'triangle-down' | 'triangle-up' | 'twitter' | 'undo' | 'ungroup' | 'unlock-small' | 'unlock' | 'vertical-align-center' | 'vertical-align-end' | 'vertical-align-start' | 'visible' | 'warning-triangle' | 'zoom-in' | 'zoom-out'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/icon-types.ts", - "releaseTag": "Public", - "name": "TLUiIconType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiInputProps:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiInputProps " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiInput.tsx", - "releaseTag": "Public", - "name": "TLUiInputProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#autofocus:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "autofocus?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "autofocus", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#autoselect:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "autoselect?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "autoselect", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "children?: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#className:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "className?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "className", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#defaultValue:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "defaultValue?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "defaultValue", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#disabled:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "disabled?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "disabled", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#icon:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "icon?: " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLUiIconType", - "canonicalReference": "tldraw!TLUiIconType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "icon", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#iconLeft:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "iconLeft?: " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLUiIconType", - "canonicalReference": "tldraw!TLUiIconType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "iconLeft", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#label:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "label?: " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLUiTranslationKey", - "canonicalReference": "tldraw!TLUiTranslationKey:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "label", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#onBlur:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onBlur?: " - }, - { - "kind": "Content", - "text": "(value: string) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onBlur", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#onCancel:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onCancel?: " - }, - { - "kind": "Content", - "text": "(value: string) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onCancel", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#onComplete:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onComplete?: " - }, - { - "kind": "Content", - "text": "(value: string) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onComplete", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#onValueChange:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onValueChange?: " - }, - { - "kind": "Content", - "text": "(value: string) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "onValueChange", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#placeholder:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "placeholder?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "placeholder", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#shouldManuallyMaintainScrollPositionWhenFocused:member", - "docComment": "/**\n * Usually on iOS when you focus an input, the browser will adjust the viewport to bring the input into view. Sometimes this doesn't work properly though - for example, if the input is newly created, iOS seems to have a hard time adjusting the viewport for it. This prop allows you to opt-in to some extra code to manually bring the input into view when the visual viewport of the browser changes, but we don't want to use it everywhere because generally the native behavior looks nicer in scenarios where it's sufficient.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "shouldManuallyMaintainScrollPositionWhenFocused?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "shouldManuallyMaintainScrollPositionWhenFocused", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiInputProps#value:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "value?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "value", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiKbdProps:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiKbdProps " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiKbd.tsx", - "releaseTag": "Public", - "name": "TLUiKbdProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiKbdProps#children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "children: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiKbdProps#visibleOnMobileLayout:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "visibleOnMobileLayout?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "visibleOnMobileLayout", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiKeyboardShortcutsDialogProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiKeyboardShortcutsDialogProps = " - }, - { - "kind": "Reference", - "text": "TLUiDialogProps", - "canonicalReference": "tldraw!TLUiDialogProps:interface" - }, - { - "kind": "Content", - "text": " & {\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialog.tsx", - "releaseTag": "Public", - "name": "TLUiKeyboardShortcutsDialogProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiMainMenuProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiMainMenuProps = " - }, - { - "kind": "Content", - "text": "{\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenu.tsx", - "releaseTag": "Public", - "name": "TLUiMainMenuProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiMenuCheckboxItemProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiMenuCheckboxItemProps = " - }, - { - "kind": "Content", - "text": "{\n icon?: IconType;\n id: string;\n kbd?: string;\n title?: string;\n label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n readonlyOk?: boolean;\n onSelect: (source: " - }, - { - "kind": "Reference", - "text": "TLUiEventSource", - "canonicalReference": "tldraw!TLUiEventSource:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": " | void;\n checked?: boolean;\n disabled?: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.tsx", - "releaseTag": "Public", - "name": "TLUiMenuCheckboxItemProps", - "typeParameters": [ - { - "typeParameterName": "TranslationKey", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "typeParameterName": "IconType", - "constraintTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - } - } - ], - "typeTokenRange": { - "startIndex": 9, - "endIndex": 14 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiMenuContextProviderProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiMenuContextProviderProps = " - }, - { - "kind": "Content", - "text": "{\n type: " - }, - { - "kind": "Reference", - "text": "TldrawUiMenuContextType", - "canonicalReference": "tldraw!~TldrawUiMenuContextType:type" - }, - { - "kind": "Content", - "text": ";\n sourceId: " - }, - { - "kind": "Reference", - "text": "TLUiEventSource", - "canonicalReference": "tldraw!TLUiEventSource:type" - }, - { - "kind": "Content", - "text": ";\n children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuContext.tsx", - "releaseTag": "Public", - "name": "TLUiMenuContextProviderProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiMenuGroupProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiMenuGroupProps = " - }, - { - "kind": "Content", - "text": "{\n id: string;\n label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuGroup.tsx", - "releaseTag": "Public", - "name": "TLUiMenuGroupProps", - "typeParameters": [ - { - "typeParameterName": "TranslationKey", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "typeTokenRange": { - "startIndex": 5, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiMenuItemProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiMenuItemProps = " - }, - { - "kind": "Content", - "text": "{\n id: string;\n icon?: IconType;\n kbd?: string;\n title?: string;\n label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n readonlyOk?: boolean;\n onSelect: (source: " - }, - { - "kind": "Reference", - "text": "TLUiEventSource", - "canonicalReference": "tldraw!TLUiEventSource:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": " | void;\n disabled?: boolean;\n noClose?: boolean;\n spinner?: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx", - "releaseTag": "Public", - "name": "TLUiMenuItemProps", - "typeParameters": [ - { - "typeParameterName": "TranslationKey", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "typeParameterName": "IconType", - "constraintTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - } - } - ], - "typeTokenRange": { - "startIndex": 9, - "endIndex": 14 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiMenuSubmenuProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiMenuSubmenuProps = " - }, - { - "kind": "Content", - "text": "{\n id: string;\n label?: {\n [key: string]: Translation;\n } | Translation;\n disabled?: boolean;\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n size?: 'medium' | 'small' | 'tiny' | 'wide';\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuSubmenu.tsx", - "releaseTag": "Public", - "name": "TLUiMenuSubmenuProps", - "typeParameters": [ - { - "typeParameterName": "Translation", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "typeTokenRange": { - "startIndex": 5, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiOverrides:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiOverrides = " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n actions: " - }, - { - "kind": "Reference", - "text": "WithDefaultHelpers", - "canonicalReference": "tldraw!~WithDefaultHelpers:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "NonNullable", - "canonicalReference": "!NonNullable:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ActionsProviderProps", - "canonicalReference": "tldraw!~ActionsProviderProps:type" - }, - { - "kind": "Content", - "text": "['overrides']>>;\n toolbar: " - }, - { - "kind": "Reference", - "text": "WithDefaultHelpers", - "canonicalReference": "tldraw!~WithDefaultHelpers:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "NonNullable", - "canonicalReference": "!NonNullable:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiToolbarSchemaProviderProps", - "canonicalReference": "tldraw!~TLUiToolbarSchemaProviderProps:type" - }, - { - "kind": "Content", - "text": "['overrides']>>;\n tools: " - }, - { - "kind": "Reference", - "text": "WithDefaultHelpers", - "canonicalReference": "tldraw!~WithDefaultHelpers:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "NonNullable", - "canonicalReference": "!NonNullable:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiToolsProviderProps", - "canonicalReference": "tldraw!TLUiToolsProviderProps:type" - }, - { - "kind": "Content", - "text": "['overrides']>>;\n translations: " - }, - { - "kind": "Reference", - "text": "TLUiTranslationProviderProps", - "canonicalReference": "tldraw!~TLUiTranslationProviderProps:interface" - }, - { - "kind": "Content", - "text": "['overrides'];\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/overrides.ts", - "releaseTag": "Public", - "name": "TLUiOverrides", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 23 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiPopoverContentProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiPopoverContentProps = " - }, - { - "kind": "Content", - "text": "{\n children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n side: 'bottom' | 'left' | 'right' | 'top';\n align?: 'center' | 'end' | 'start';\n alignOffset?: number;\n sideOffset?: number;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiPopover.tsx", - "releaseTag": "Public", - "name": "TLUiPopoverContentProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiPopoverProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiPopoverProps = " - }, - { - "kind": "Content", - "text": "{\n id: string;\n open?: boolean;\n children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n onOpenChange?: (isOpen: boolean) => void;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiPopover.tsx", - "releaseTag": "Public", - "name": "TLUiPopoverProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiPopoverTriggerProps:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiPopoverTriggerProps " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiPopover.tsx", - "releaseTag": "Public", - "name": "TLUiPopoverTriggerProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiPopoverTriggerProps#children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "children?: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiQuickActionsProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiQuickActionsProps = " - }, - { - "kind": "Content", - "text": "{\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/QuickActions/DefaultQuickActions.tsx", - "releaseTag": "Public", - "name": "TLUiQuickActionsProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiStylePanelContentProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiStylePanelContentProps = " - }, - { - "kind": "Content", - "text": "{\n styles: " - }, - { - "kind": "Reference", - "text": "ReturnType", - "canonicalReference": "!ReturnType:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", - "releaseTag": "Public", - "name": "TLUiStylePanelContentProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiStylePanelProps:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiStylePanelProps " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx", - "releaseTag": "Public", - "name": "TLUiStylePanelProps", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiStylePanelProps#children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiStylePanelProps#isMobile:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isMobile?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "isMobile", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiToast:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiToast " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/toasts.tsx", - "releaseTag": "Public", - "name": "TLUiToast", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToast#actions:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "actions?: " - }, - { - "kind": "Reference", - "text": "TLUiToastAction", - "canonicalReference": "tldraw!TLUiToastAction:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "actions", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToast#closeLabel:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "closeLabel?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "closeLabel", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToast#description:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "description?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "description", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToast#icon:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "icon?: " - }, - { - "kind": "Reference", - "text": "TLUiIconType", - "canonicalReference": "tldraw!TLUiIconType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "icon", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToast#id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToast#keepOpen:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "keepOpen?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "keepOpen", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToast#title:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "title?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "title", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiToastAction:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiToastAction " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/toasts.tsx", - "releaseTag": "Public", - "name": "TLUiToastAction", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToastAction#label:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "label: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "label", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToastAction#onClick:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onClick: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onClick", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToastAction#type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Content", - "text": "'danger' | 'normal' | 'primary'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiToastsContextType:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiToastsContextType = " - }, - { - "kind": "Content", - "text": "{\n addToast: (toast: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiToast", - "canonicalReference": "tldraw!TLUiToast:interface" - }, - { - "kind": "Content", - "text": ", 'id'> & {\n id?: string;\n }) => string;\n removeToast: (id: " - }, - { - "kind": "Reference", - "text": "TLUiToast", - "canonicalReference": "tldraw!TLUiToast:interface" - }, - { - "kind": "Content", - "text": "['id']) => string;\n clearToasts: () => void;\n toasts: " - }, - { - "kind": "Reference", - "text": "TLUiToast", - "canonicalReference": "tldraw!TLUiToast:interface" - }, - { - "kind": "Content", - "text": "[];\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/toasts.tsx", - "releaseTag": "Public", - "name": "TLUiToastsContextType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiToolbarItem:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiToolbarItem = " - }, - { - "kind": "Content", - "text": "{\n id: string;\n type: 'item';\n readonlyOk?: boolean;\n toolItem: " - }, - { - "kind": "Reference", - "text": "TLUiToolItem", - "canonicalReference": "tldraw!TLUiToolItem:interface" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useToolbarSchema.tsx", - "releaseTag": "Public", - "name": "TLUiToolbarItem", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiToolbarSchemaContextType:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiToolbarSchemaContextType = " - }, - { - "kind": "Reference", - "text": "TLUiToolbarItem", - "canonicalReference": "tldraw!TLUiToolbarItem:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useToolbarSchema.tsx", - "releaseTag": "Public", - "name": "TLUiToolbarSchemaContextType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Interface", - "canonicalReference": "tldraw!TLUiToolItem:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLUiToolItem " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTools.tsx", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TranslationKey", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "typeParameterName": "IconType", - "constraintTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - } - } - ], - "name": "TLUiToolItem", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToolItem#icon:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "icon: " - }, - { - "kind": "Content", - "text": "IconType" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "icon", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToolItem#id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToolItem#kbd:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "kbd?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "kbd", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToolItem#label:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "label: " - }, - { - "kind": "Content", - "text": "TranslationKey" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "label", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToolItem#meta:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "meta?: " - }, - { - "kind": "Content", - "text": "{\n [key: string]: any;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "meta", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToolItem#onSelect:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onSelect: " - }, - { - "kind": "Content", - "text": "(source: " - }, - { - "kind": "Reference", - "text": "TLUiEventSource", - "canonicalReference": "tldraw!TLUiEventSource:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onSelect", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToolItem#readonlyOk:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonlyOk?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "readonlyOk", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "tldraw!TLUiToolItem#shortcutsLabel:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "shortcutsLabel?: " - }, - { - "kind": "Content", - "text": "TranslationKey" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "shortcutsLabel", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiToolsContextType:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiToolsContextType = " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTools.tsx", - "releaseTag": "Public", - "name": "TLUiToolsContextType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiToolsProviderProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiToolsProviderProps = " - }, - { - "kind": "Content", - "text": "{\n overrides?: (editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ", tools: " - }, - { - "kind": "Reference", - "text": "TLUiToolsContextType", - "canonicalReference": "tldraw!TLUiToolsContextType:type" - }, - { - "kind": "Content", - "text": ", helpers: {\n insertMedia: () => void;\n }) => " - }, - { - "kind": "Reference", - "text": "TLUiToolsContextType", - "canonicalReference": "tldraw!TLUiToolsContextType:type" - }, - { - "kind": "Content", - "text": ";\n children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTools.tsx", - "releaseTag": "Public", - "name": "TLUiToolsProviderProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiTranslation:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiTranslation = " - }, - { - "kind": "Content", - "text": "{\n readonly locale: string;\n readonly label: string;\n readonly messages: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiTranslationKey", - "canonicalReference": "tldraw!TLUiTranslationKey:type" - }, - { - "kind": "Content", - "text": ", string>;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTranslation/translations.ts", - "releaseTag": "Public", - "name": "TLUiTranslation", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiTranslationContextType:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiTranslationContextType = " - }, - { - "kind": "Reference", - "text": "TLUiTranslation", - "canonicalReference": "tldraw!TLUiTranslation:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTranslation/useTranslation.tsx", - "releaseTag": "Public", - "name": "TLUiTranslationContextType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiTranslationKey:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiTranslationKey = " - }, - { - "kind": "Content", - "text": "'action.align-bottom' | 'action.align-center-horizontal.short' | 'action.align-center-horizontal' | 'action.align-center-vertical.short' | 'action.align-center-vertical' | 'action.align-left' | 'action.align-right' | 'action.align-top' | 'action.back-to-content' | 'action.bring-forward' | 'action.bring-to-front' | 'action.convert-to-bookmark' | 'action.convert-to-embed' | 'action.copy-as-json.short' | 'action.copy-as-json' | 'action.copy-as-png.short' | 'action.copy-as-png' | 'action.copy-as-svg.short' | 'action.copy-as-svg' | 'action.copy' | 'action.cut' | 'action.delete' | 'action.distribute-horizontal.short' | 'action.distribute-horizontal' | 'action.distribute-vertical.short' | 'action.distribute-vertical' | 'action.duplicate' | 'action.edit-link' | 'action.exit-pen-mode' | 'action.export-all-as-json.short' | 'action.export-all-as-json' | 'action.export-all-as-png.short' | 'action.export-all-as-png' | 'action.export-all-as-svg.short' | 'action.export-all-as-svg' | 'action.export-as-json.short' | 'action.export-as-json' | 'action.export-as-png.short' | 'action.export-as-png' | 'action.export-as-svg.short' | 'action.export-as-svg' | 'action.fit-frame-to-content' | 'action.flip-horizontal.short' | 'action.flip-horizontal' | 'action.flip-vertical.short' | 'action.flip-vertical' | 'action.fork-project' | 'action.group' | 'action.insert-embed' | 'action.insert-media' | 'action.leave-shared-project' | 'action.new-project' | 'action.new-shared-project' | 'action.open-cursor-chat' | 'action.open-embed-link' | 'action.open-file' | 'action.pack' | 'action.paste' | 'action.print' | 'action.redo' | 'action.remove-frame' | 'action.rename' | 'action.rotate-ccw' | 'action.rotate-cw' | 'action.save-copy' | 'action.select-all' | 'action.select-none' | 'action.send-backward' | 'action.send-to-back' | 'action.share-project' | 'action.stack-horizontal.short' | 'action.stack-horizontal' | 'action.stack-vertical.short' | 'action.stack-vertical' | 'action.stop-following' | 'action.stretch-horizontal.short' | 'action.stretch-horizontal' | 'action.stretch-vertical.short' | 'action.stretch-vertical' | 'action.toggle-auto-size' | 'action.toggle-dark-mode.menu' | 'action.toggle-dark-mode' | 'action.toggle-debug-mode.menu' | 'action.toggle-debug-mode' | 'action.toggle-edge-scrolling.menu' | 'action.toggle-edge-scrolling' | 'action.toggle-focus-mode.menu' | 'action.toggle-focus-mode' | 'action.toggle-grid.menu' | 'action.toggle-grid' | 'action.toggle-lock' | 'action.toggle-reduce-motion.menu' | 'action.toggle-reduce-motion' | 'action.toggle-snap-mode.menu' | 'action.toggle-snap-mode' | 'action.toggle-tool-lock.menu' | 'action.toggle-tool-lock' | 'action.toggle-transparent.context-menu' | 'action.toggle-transparent.menu' | 'action.toggle-transparent' | 'action.toggle-wrap-mode.menu' | 'action.toggle-wrap-mode' | 'action.undo' | 'action.ungroup' | 'action.unlock-all' | 'action.zoom-in' | 'action.zoom-out' | 'action.zoom-to-100' | 'action.zoom-to-fit' | 'action.zoom-to-selection' | 'actions-menu.title' | 'align-style.end' | 'align-style.justify' | 'align-style.middle' | 'align-style.start' | 'arrowheadEnd-style.arrow' | 'arrowheadEnd-style.bar' | 'arrowheadEnd-style.diamond' | 'arrowheadEnd-style.dot' | 'arrowheadEnd-style.inverted' | 'arrowheadEnd-style.none' | 'arrowheadEnd-style.pipe' | 'arrowheadEnd-style.square' | 'arrowheadEnd-style.triangle' | 'arrowheadStart-style.arrow' | 'arrowheadStart-style.bar' | 'arrowheadStart-style.diamond' | 'arrowheadStart-style.dot' | 'arrowheadStart-style.inverted' | 'arrowheadStart-style.none' | 'arrowheadStart-style.pipe' | 'arrowheadStart-style.square' | 'arrowheadStart-style.triangle' | 'assets.files.upload-failed' | 'assets.url.failed' | 'color-style.black' | 'color-style.blue' | 'color-style.green' | 'color-style.grey' | 'color-style.light-blue' | 'color-style.light-green' | 'color-style.light-red' | 'color-style.light-violet' | 'color-style.orange' | 'color-style.red' | 'color-style.violet' | 'color-style.yellow' | 'context-menu.arrange' | 'context-menu.copy-as' | 'context-menu.export-all-as' | 'context-menu.export-as' | 'context-menu.move-to-page' | 'context-menu.reorder' | 'context.pages.new-page' | 'cursor-chat.type-to-chat' | 'dash-style.dashed' | 'dash-style.dotted' | 'dash-style.draw' | 'dash-style.solid' | 'debug-panel.more' | 'document.default-name' | 'edit-link-dialog.cancel' | 'edit-link-dialog.clear' | 'edit-link-dialog.detail' | 'edit-link-dialog.invalid-url' | 'edit-link-dialog.save' | 'edit-link-dialog.title' | 'edit-link-dialog.url' | 'edit-pages-dialog.move-down' | 'edit-pages-dialog.move-up' | 'embed-dialog.back' | 'embed-dialog.cancel' | 'embed-dialog.create' | 'embed-dialog.instruction' | 'embed-dialog.invalid-url' | 'embed-dialog.title' | 'embed-dialog.url' | 'file-system.confirm-clear.cancel' | 'file-system.confirm-clear.continue' | 'file-system.confirm-clear.description' | 'file-system.confirm-clear.dont-show-again' | 'file-system.confirm-clear.title' | 'file-system.confirm-open.cancel' | 'file-system.confirm-open.description' | 'file-system.confirm-open.dont-show-again' | 'file-system.confirm-open.open' | 'file-system.confirm-open.title' | 'file-system.file-open-error.file-format-version-too-new' | 'file-system.file-open-error.generic-corrupted-file' | 'file-system.file-open-error.not-a-tldraw-file' | 'file-system.file-open-error.title' | 'file-system.shared-document-file-open-error.description' | 'file-system.shared-document-file-open-error.title' | 'fill-style.none' | 'fill-style.pattern' | 'fill-style.semi' | 'fill-style.solid' | 'focus-mode.toggle-focus-mode' | 'font-style.draw' | 'font-style.mono' | 'font-style.sans' | 'font-style.serif' | 'geo-style.arrow-down' | 'geo-style.arrow-left' | 'geo-style.arrow-right' | 'geo-style.arrow-up' | 'geo-style.check-box' | 'geo-style.cloud' | 'geo-style.diamond' | 'geo-style.ellipse' | 'geo-style.hexagon' | 'geo-style.octagon' | 'geo-style.oval' | 'geo-style.pentagon' | 'geo-style.rectangle' | 'geo-style.rhombus-2' | 'geo-style.rhombus' | 'geo-style.star' | 'geo-style.trapezoid' | 'geo-style.triangle' | 'geo-style.x-box' | 'help-menu.about' | 'help-menu.discord' | 'help-menu.github' | 'help-menu.keyboard-shortcuts' | 'help-menu.title' | 'help-menu.twitter' | 'home-project-dialog.description' | 'home-project-dialog.ok' | 'home-project-dialog.title' | 'menu.copy-as' | 'menu.edit' | 'menu.export-as' | 'menu.file' | 'menu.language' | 'menu.preferences' | 'menu.title' | 'menu.view' | 'navigation-zone.toggle-minimap' | 'navigation-zone.zoom' | 'opacity-style.0.1' | 'opacity-style.0.25' | 'opacity-style.0.5' | 'opacity-style.0.75' | 'opacity-style.1' | 'page-menu.create-new-page' | 'page-menu.edit-done' | 'page-menu.edit-start' | 'page-menu.go-to-page' | 'page-menu.max-page-count-reached' | 'page-menu.new-page-initial-name' | 'page-menu.submenu.delete' | 'page-menu.submenu.duplicate-page' | 'page-menu.submenu.move-down' | 'page-menu.submenu.move-up' | 'page-menu.submenu.rename' | 'page-menu.submenu.title' | 'page-menu.title' | 'people-menu.change-color' | 'people-menu.change-name' | 'people-menu.follow' | 'people-menu.following' | 'people-menu.invite' | 'people-menu.leading' | 'people-menu.title' | 'people-menu.user' | 'rename-project-dialog.cancel' | 'rename-project-dialog.rename' | 'rename-project-dialog.title' | 'share-menu.copy-link-note' | 'share-menu.copy-link' | 'share-menu.copy-readonly-link-note' | 'share-menu.copy-readonly-link' | 'share-menu.create-snapshot-link' | 'share-menu.default-project-name' | 'share-menu.fork-note' | 'share-menu.offline-note' | 'share-menu.project-too-large' | 'share-menu.readonly-link' | 'share-menu.save-note' | 'share-menu.share-project' | 'share-menu.snapshot-link-note' | 'share-menu.title' | 'share-menu.upload-failed' | 'sharing.confirm-leave.cancel' | 'sharing.confirm-leave.description' | 'sharing.confirm-leave.dont-show-again' | 'sharing.confirm-leave.leave' | 'sharing.confirm-leave.title' | 'shortcuts-dialog.collaboration' | 'shortcuts-dialog.edit' | 'shortcuts-dialog.file' | 'shortcuts-dialog.preferences' | 'shortcuts-dialog.title' | 'shortcuts-dialog.tools' | 'shortcuts-dialog.transform' | 'shortcuts-dialog.view' | 'size-style.l' | 'size-style.m' | 'size-style.s' | 'size-style.xl' | 'spline-style.cubic' | 'spline-style.line' | 'status.offline' | 'status.online' | 'style-panel.align' | 'style-panel.arrowhead-end' | 'style-panel.arrowhead-start' | 'style-panel.arrowheads' | 'style-panel.color' | 'style-panel.dash' | 'style-panel.fill' | 'style-panel.font' | 'style-panel.geo' | 'style-panel.mixed' | 'style-panel.opacity' | 'style-panel.position' | 'style-panel.size' | 'style-panel.spline' | 'style-panel.title' | 'style-panel.vertical-align' | 'toast.close' | 'toast.error.copy-fail.desc' | 'toast.error.copy-fail.title' | 'toast.error.export-fail.desc' | 'toast.error.export-fail.title' | 'tool-panel.drawing' | 'tool-panel.more' | 'tool-panel.shapes' | 'tool.arrow-down' | 'tool.arrow-left' | 'tool.arrow-right' | 'tool.arrow-up' | 'tool.arrow' | 'tool.asset' | 'tool.check-box' | 'tool.cloud' | 'tool.diamond' | 'tool.draw' | 'tool.ellipse' | 'tool.embed' | 'tool.eraser' | 'tool.frame' | 'tool.hand' | 'tool.hexagon' | 'tool.highlight' | 'tool.laser' | 'tool.line' | 'tool.note' | 'tool.octagon' | 'tool.oval' | 'tool.pentagon' | 'tool.rectangle' | 'tool.rhombus' | 'tool.select' | 'tool.star' | 'tool.text' | 'tool.trapezoid' | 'tool.triangle' | 'tool.x-box' | 'verticalAlign-style.end' | 'verticalAlign-style.middle' | 'verticalAlign-style.start' | 'vscode.file-open.backup-failed' | 'vscode.file-open.backup-saved' | 'vscode.file-open.backup' | 'vscode.file-open.desc' | 'vscode.file-open.dont-show-again' | 'vscode.file-open.open'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts", - "releaseTag": "Public", - "name": "TLUiTranslationKey", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "tldraw!TLUiZoomMenuProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUiZoomMenuProps = " - }, - { - "kind": "Content", - "text": "{\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ZoomMenu/DefaultZoomMenu.tsx", - "releaseTag": "Public", - "name": "TLUiZoomMenuProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ToggleAutoSizeMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ToggleAutoSizeMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ToggleAutoSizeMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ToggleDarkModeItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ToggleDarkModeItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ToggleDarkModeItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ToggleDebugModeItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ToggleDebugModeItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ToggleDebugModeItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ToggleEdgeScrollingItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ToggleEdgeScrollingItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ToggleEdgeScrollingItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ToggleFocusModeItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ToggleFocusModeItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ToggleFocusModeItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ToggleGridItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ToggleGridItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ToggleGridItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ToggleLockMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ToggleLockMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ToggleLockMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ToggleReduceMotionItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ToggleReduceMotionItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ToggleReduceMotionItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ToggleSnapModeItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ToggleSnapModeItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ToggleSnapModeItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ToggleToolLockItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ToggleToolLockItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ToggleToolLockItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ToggleTransparentBgMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ToggleTransparentBgMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ToggleTransparentBgMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ToggleWrapModeItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ToggleWrapModeItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ToggleWrapModeItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!toolbarItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function toolbarItem(toolItem: " - }, - { - "kind": "Reference", - "text": "TLUiToolItem", - "canonicalReference": "tldraw!TLUiToolItem:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLUiToolbarItem", - "canonicalReference": "tldraw!TLUiToolbarItem:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useToolbarSchema.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "toolItem", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "toolbarItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!truncateStringWithEllipsis:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "truncateStringWithEllipsis: (str: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", maxLength: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Content", - "text": "string" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/text/text.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "str", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "maxLength", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "truncateStringWithEllipsis" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!UiEventsProvider:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function UiEventsProvider({ onEvent, children }: " - }, - { - "kind": "Reference", - "text": "EventsProviderProps", - "canonicalReference": "tldraw!EventsProviderProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ onEvent, children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "UiEventsProvider" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!UndoRedoGroup:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function UndoRedoGroup(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "UndoRedoGroup" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!UngroupMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function UngroupMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "UngroupMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!UnlockAllMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function UnlockAllMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "UnlockAllMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!unwrapLabel:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function unwrapLabel(label?: " - }, - { - "kind": "Reference", - "text": "TLUiActionItem", - "canonicalReference": "tldraw!TLUiActionItem:interface" - }, - { - "kind": "Content", - "text": "['label']" - }, - { - "kind": "Content", - "text": ", menuType?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/actions.tsx", - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "label", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": true - }, - { - "parameterName": "menuType", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": true - } - ], - "name": "unwrapLabel" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useActions:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useActions(): " - }, - { - "kind": "Reference", - "text": "TLUiActionsContextType", - "canonicalReference": "tldraw!TLUiActionsContextType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/actions.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useActions" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useBreakpoint:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useBreakpoint(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/breakpoints.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useBreakpoint" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useCanRedo:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useCanRedo(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/menu-hooks.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useCanRedo" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useCanUndo:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useCanUndo(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/menu-hooks.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useCanUndo" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useCopyAs:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useCopyAs(): " - }, - { - "kind": "Content", - "text": "(ids: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[], format?: " - }, - { - "kind": "Reference", - "text": "TLCopyType", - "canonicalReference": "tldraw!~TLCopyType:type" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useCopyAs.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useCopyAs" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useDefaultHelpers:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useDefaultHelpers(): " - }, - { - "kind": "Content", - "text": "{\n addToast: (toast: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/overrides.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 14 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useDefaultHelpers" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useDialogs:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useDialogs(): " - }, - { - "kind": "Reference", - "text": "TLUiDialogsContextType", - "canonicalReference": "tldraw!TLUiDialogsContextType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/dialogs.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useDialogs" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useExportAs:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useExportAs(): " - }, - { - "kind": "Content", - "text": "(ids: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[], format: " - }, - { - "kind": "Reference", - "text": "TLExportType", - "canonicalReference": "tldraw!~TLExportType:type" - }, - { - "kind": "Content", - "text": " | undefined, name: string | undefined) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useExportAs.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useExportAs" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useKeyboardShortcuts:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useKeyboardShortcuts(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useKeyboardShortcuts.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useKeyboardShortcuts" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useLocalStorageState:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useLocalStorageState(key: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", defaultValue: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "readonly [T, (setter: ((value: T) => T) | T) => void]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useLocalStorageState.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "key", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "defaultValue", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "name": "useLocalStorageState" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useMenuClipboardEvents:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useMenuClipboardEvents(): " - }, - { - "kind": "Content", - "text": "{\n copy: (source: " - }, - { - "kind": "Reference", - "text": "TLUiEventSource", - "canonicalReference": "tldraw!TLUiEventSource:type" - }, - { - "kind": "Content", - "text": ") => void;\n cut: (source: " - }, - { - "kind": "Reference", - "text": "TLUiEventSource", - "canonicalReference": "tldraw!TLUiEventSource:type" - }, - { - "kind": "Content", - "text": ") => void;\n paste: (data: " - }, - { - "kind": "Reference", - "text": "ClipboardItem", - "canonicalReference": "!ClipboardItem:interface" - }, - { - "kind": "Content", - "text": "[] | " - }, - { - "kind": "Reference", - "text": "DataTransfer", - "canonicalReference": "!DataTransfer:interface" - }, - { - "kind": "Content", - "text": ", source: " - }, - { - "kind": "Reference", - "text": "TLUiEventSource", - "canonicalReference": "tldraw!TLUiEventSource:type" - }, - { - "kind": "Content", - "text": ", point?: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useClipboardEvents.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 16 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useMenuClipboardEvents" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useMenuIsOpen:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useMenuIsOpen(id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", cb?: " - }, - { - "kind": "Content", - "text": "(isOpen: boolean) => void" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "readonly [boolean, (isOpen: boolean) => void]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useMenuIsOpen.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "cb", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "name": "useMenuIsOpen" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useNativeClipboardEvents:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useNativeClipboardEvents(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useClipboardEvents.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useNativeClipboardEvents" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useReadonly:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useReadonly(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useReadonly.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useReadonly" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useRelevantStyles:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useRelevantStyles(stylesToCheck?: " - }, - { - "kind": "Content", - "text": "readonly " - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "ReadonlySharedStyleMap", - "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useRelevantStyles.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "stylesToCheck", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": true - } - ], - "name": "useRelevantStyles" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useTldrawUiComponents:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useTldrawUiComponents(): " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n ContextMenu: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiContextMenuProps", - "canonicalReference": "tldraw!TLUiContextMenuProps:interface" - }, - { - "kind": "Content", - "text": "> | null;\n ActionsMenu: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiActionsMenuProps", - "canonicalReference": "tldraw!TLUiActionsMenuProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n HelpMenu: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiHelpMenuProps", - "canonicalReference": "tldraw!TLUiHelpMenuProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n ZoomMenu: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiZoomMenuProps", - "canonicalReference": "tldraw!TLUiZoomMenuProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n MainMenu: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiMainMenuProps", - "canonicalReference": "tldraw!TLUiMainMenuProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n Minimap: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n StylePanel: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiStylePanelProps", - "canonicalReference": "tldraw!TLUiStylePanelProps:interface" - }, - { - "kind": "Content", - "text": "> | null;\n PageMenu: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n NavigationPanel: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n Toolbar: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n KeyboardShortcutsDialog: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiKeyboardShortcutsDialogProps", - "canonicalReference": "tldraw!TLUiKeyboardShortcutsDialogProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n QuickActions: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiQuickActionsProps", - "canonicalReference": "tldraw!TLUiQuickActionsProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n HelperButtons: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiHelperButtonsProps", - "canonicalReference": "tldraw!TLUiHelperButtonsProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n DebugMenu: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n MenuPanel: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n TopPanel: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n SharePanel: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/components.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 55 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useTldrawUiComponents" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useToasts:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useToasts(): " - }, - { - "kind": "Reference", - "text": "TLUiToastsContextType", - "canonicalReference": "tldraw!TLUiToastsContextType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/toasts.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useToasts" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useToolbarSchema:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useToolbarSchema(): " - }, - { - "kind": "Reference", - "text": "TLUiToolbarSchemaContextType", - "canonicalReference": "tldraw!TLUiToolbarSchemaContextType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useToolbarSchema.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useToolbarSchema" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useTools:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useTools(): " - }, - { - "kind": "Reference", - "text": "TLUiToolsContextType", - "canonicalReference": "tldraw!TLUiToolsContextType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTools.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useTools" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useTranslation:function(1)", - "docComment": "/**\n * Returns a function to translate a translation key into a string based on the current translation.\n *\n * @example\n * ```ts\n * const msg = useTranslation()\n * const label = msg('style-panel.styles')\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useTranslation(): " - }, - { - "kind": "Content", - "text": "(id?: " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": " | string) => string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTranslation/useTranslation.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useTranslation" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useUiEvents:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useUiEvents(): " - }, - { - "kind": "Reference", - "text": "TLUiEventContextType", - "canonicalReference": "tldraw!TLUiEventContextType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useUiEvents" - }, - { - "kind": "Class", - "canonicalReference": "tldraw!VideoShapeUtil:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class VideoShapeUtil extends " - }, - { - "kind": "Reference", - "text": "BaseBoxShapeUtil", - "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLVideoShape", - "canonicalReference": "@tldraw/tlschema!TLVideoShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/video/VideoShapeUtil.tsx", - "releaseTag": "Public", - "isAbstract": false, - "name": "VideoShapeUtil", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!VideoShapeUtil#canEdit:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canEdit: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canEdit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!VideoShapeUtil#component:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "component(shape: " - }, - { - "kind": "Reference", - "text": "TLVideoShape", - "canonicalReference": "@tldraw/tlschema!TLVideoShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "component" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!VideoShapeUtil#getDefaultProps:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDefaultProps(): " - }, - { - "kind": "Reference", - "text": "TLVideoShape", - "canonicalReference": "@tldraw/tlschema!TLVideoShape:type" - }, - { - "kind": "Content", - "text": "['props']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getDefaultProps" - }, - { - "kind": "Method", - "canonicalReference": "tldraw!VideoShapeUtil#indicator:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "indicator(shape: " - }, - { - "kind": "Reference", - "text": "TLVideoShape", - "canonicalReference": "@tldraw/tlschema!TLVideoShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "indicator" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!VideoShapeUtil#isAspectRatioLocked:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isAspectRatioLocked: " - }, - { - "kind": "Content", - "text": "() => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isAspectRatioLocked", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!VideoShapeUtil.migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static migrations: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!VideoShapeUtil.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "kind": "Content", - "text": "{\n w: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n time: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n playing: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n assetId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 16 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "tldraw!VideoShapeUtil#toSvg:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "toSvg(shape: " - }, - { - "kind": "Reference", - "text": "TLVideoShape", - "canonicalReference": "@tldraw/tlschema!TLVideoShape:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "SVGGElement", - "canonicalReference": "!SVGGElement:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shape", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toSvg" - }, - { - "kind": "Property", - "canonicalReference": "tldraw!VideoShapeUtil.type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static type: " - }, - { - "kind": "Content", - "text": "\"video\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ViewSubmenu:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ViewSubmenu(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ViewSubmenu" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ZoomOrRotateMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ZoomOrRotateMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ZoomOrRotateMenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ZoomTo100MenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ZoomTo100MenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ZoomTo100MenuItem" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ZoomToFitMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ZoomToFitMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ZoomToFitMenuItem" - }, - { - "kind": "Class", - "canonicalReference": "tldraw!ZoomTool:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ZoomTool extends " - }, - { - "kind": "Reference", - "text": "StateNode", - "canonicalReference": "@tldraw/editor!StateNode:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/tools/ZoomTool/ZoomTool.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "ZoomTool", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "tldraw!ZoomTool.children:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static children: " - }, - { - "kind": "Content", - "text": "() => (typeof " - }, - { - "kind": "Reference", - "text": "Idle", - "canonicalReference": "tldraw!~Idle_12:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "Pointing", - "canonicalReference": "tldraw!~Pointing_8:class" - }, - { - "kind": "Content", - "text": " | typeof " - }, - { - "kind": "Reference", - "text": "ZoomBrushing", - "canonicalReference": "tldraw!~ZoomBrushing:class" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "children", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ZoomTool.id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ZoomTool#info:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "info: " - }, - { - "kind": "Reference", - "text": "TLPointerEventInfo", - "canonicalReference": "@tldraw/editor!TLPointerEventInfo:type" - }, - { - "kind": "Content", - "text": " & {\n onInteractionEnd?: string | undefined;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "info", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ZoomTool.initial:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static initial: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "initial", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ZoomTool#onEnter:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onEnter: " - }, - { - "kind": "Content", - "text": "(info: " - }, - { - "kind": "Reference", - "text": "TLPointerEventInfo", - "canonicalReference": "@tldraw/editor!TLPointerEventInfo:type" - }, - { - "kind": "Content", - "text": " & {\n onInteractionEnd: string;\n }) => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onEnter", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ZoomTool#onExit:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onExit: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onExit", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ZoomTool#onInterrupt:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onInterrupt: " - }, - { - "kind": "Reference", - "text": "TLInterruptEvent", - "canonicalReference": "@tldraw/editor!TLInterruptEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onInterrupt", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ZoomTool#onKeyDown:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onKeyDown: " - }, - { - "kind": "Reference", - "text": "TLKeyboardEvent", - "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onKeyDown", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "tldraw!ZoomTool#onKeyUp:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "onKeyUp: " - }, - { - "kind": "Reference", - "text": "TLKeyboardEvent", - "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "onKeyUp", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "tldraw!ZoomToSelectionMenuItem:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function ZoomToSelectionMenuItem(): " - }, - { - "kind": "Content", - "text": "import(\"react/jsx-runtime\")." - }, - { - "kind": "Reference", - "text": "JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "ZoomToSelectionMenuItem" - } - ] - } - ] + "metadata": { + "toolPackage": "@microsoft/api-extractor", + "toolVersion": "7.41.0", + "schemaVersion": 1011, + "oldestForwardsCompatibleVersion": 1001, + "tsdocConfig": { + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "noStandardTags": true, + "tagDefinitions": [ + { + "tagName": "@alpha", + "syntaxKind": "modifier" + }, + { + "tagName": "@beta", + "syntaxKind": "modifier" + }, + { + "tagName": "@defaultValue", + "syntaxKind": "block" + }, + { + "tagName": "@decorator", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@deprecated", + "syntaxKind": "block" + }, + { + "tagName": "@eventProperty", + "syntaxKind": "modifier" + }, + { + "tagName": "@example", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@experimental", + "syntaxKind": "modifier" + }, + { + "tagName": "@inheritDoc", + "syntaxKind": "inline" + }, + { + "tagName": "@internal", + "syntaxKind": "modifier" + }, + { + "tagName": "@label", + "syntaxKind": "inline" + }, + { + "tagName": "@link", + "syntaxKind": "inline", + "allowMultiple": true + }, + { + "tagName": "@override", + "syntaxKind": "modifier" + }, + { + "tagName": "@packageDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@param", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@privateRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@public", + "syntaxKind": "modifier" + }, + { + "tagName": "@readonly", + "syntaxKind": "modifier" + }, + { + "tagName": "@remarks", + "syntaxKind": "block" + }, + { + "tagName": "@returns", + "syntaxKind": "block" + }, + { + "tagName": "@sealed", + "syntaxKind": "modifier" + }, + { + "tagName": "@see", + "syntaxKind": "block" + }, + { + "tagName": "@throws", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@typeParam", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@virtual", + "syntaxKind": "modifier" + }, + { + "tagName": "@betaDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@internalRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@preapproved", + "syntaxKind": "modifier" + } + ], + "supportForTags": { + "@alpha": true, + "@beta": true, + "@defaultValue": true, + "@decorator": true, + "@deprecated": true, + "@eventProperty": true, + "@example": true, + "@experimental": true, + "@inheritDoc": true, + "@internal": true, + "@label": true, + "@link": true, + "@override": true, + "@packageDocumentation": true, + "@param": true, + "@privateRemarks": true, + "@public": true, + "@readonly": true, + "@remarks": true, + "@returns": true, + "@sealed": true, + "@see": true, + "@throws": true, + "@typeParam": true, + "@virtual": true, + "@betaDocumentation": true, + "@internalRemarks": true, + "@preapproved": true + }, + "reportUnsupportedHtmlElements": false + } + }, + "kind": "Package", + "canonicalReference": "tldraw!", + "docComment": "", + "name": "tldraw", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EntryPoint", + "canonicalReference": "tldraw!", + "name": "", + "preserveMemberOrder": false, + "members": [ + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!AlertSeverity:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type AlertSeverity = " + }, + { + "kind": "Content", + "text": "'error' | 'info' | 'success' | 'warning'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/toasts.tsx", + "releaseTag": "Public", + "name": "AlertSeverity", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!AlignMenuItems:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function AlignMenuItems(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "AlignMenuItems" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ArrangeMenuSubmenu:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ArrangeMenuSubmenu(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ArrangeMenuSubmenu" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ArrowDownToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ArrowDownToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ArrowDownToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ArrowheadStylePickerSet:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ArrowheadStylePickerSet({ styles }: " + }, + { + "kind": "Content", + "text": "{\n styles: " + }, + { + "kind": "Reference", + "text": "ReadonlySharedStyleMap", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 8 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ styles }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "ArrowheadStylePickerSet" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ArrowLeftToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ArrowLeftToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ArrowLeftToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ArrowRightToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ArrowRightToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ArrowRightToolbarItem" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!ArrowShapeTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ArrowShapeTool extends " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/arrow/ArrowShapeTool.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "ArrowShapeTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeTool.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children: " + }, + { + "kind": "Content", + "text": "() => (typeof " + }, + { + "kind": "Reference", + "text": "Idle", + "canonicalReference": "tldraw!~Idle:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Pointing", + "canonicalReference": "tldraw!~Pointing:class" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeTool#shapeType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapeType: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "shapeType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "tldraw!ArrowShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ArrowShapeUtil extends " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/arrow/ArrowShapeUtil.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "ArrowShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil#canBind:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canBind: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canBind", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil#canEdit:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canEdit: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canEdit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil#canSnap:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canSnap: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canSnap", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!ArrowShapeUtil#component:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component(shape: " + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "component" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!ArrowShapeUtil#getCanvasSvgDefs:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCanvasSvgDefs(): " + }, + { + "kind": "Reference", + "text": "TLShapeUtilCanvasSvgDef", + "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCanvasSvgDefs" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!ArrowShapeUtil#getDefaultProps:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDefaultProps(): " + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": "['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDefaultProps" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!ArrowShapeUtil#getGeometry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getGeometry(shape: " + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Group2d", + "canonicalReference": "@tldraw/editor!Group2d:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getGeometry" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!ArrowShapeUtil#getHandles:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHandles(shape: " + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLHandle", + "canonicalReference": "@tldraw/tlschema!TLHandle:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getHandles" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil#hideResizeHandles:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideResizeHandles: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideResizeHandles", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil#hideRotateHandle:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideRotateHandle: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideRotateHandle", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil#hideSelectionBoundsBg:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideSelectionBoundsBg: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideSelectionBoundsBg", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil#hideSelectionBoundsFg:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideSelectionBoundsFg: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideSelectionBoundsFg", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!ArrowShapeUtil#indicator:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "indicator(shape: " + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil#onDoubleClickHandle:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDoubleClickHandle: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": ", handle: " + }, + { + "kind": "Reference", + "text": "TLHandle", + "canonicalReference": "@tldraw/tlschema!TLHandle:interface" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "TLShapePartial", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": "> | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onDoubleClickHandle", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 10 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil#onEditEnd:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onEditEnd: " + }, + { + "kind": "Reference", + "text": "TLOnEditEndHandler", + "canonicalReference": "@tldraw/editor!TLOnEditEndHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onEditEnd", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil#onHandleDrag:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onHandleDrag: " + }, + { + "kind": "Reference", + "text": "TLOnHandleDragHandler", + "canonicalReference": "@tldraw/editor!TLOnHandleDragHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onHandleDrag", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil#onResize:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onResize: " + }, + { + "kind": "Reference", + "text": "TLOnResizeHandler", + "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onResize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil#onTranslate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onTranslate?: " + }, + { + "kind": "Reference", + "text": "TLOnTranslateHandler", + "canonicalReference": "@tldraw/editor!TLOnTranslateHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onTranslate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil#onTranslateStart:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onTranslateStart: " + }, + { + "kind": "Reference", + "text": "TLOnTranslateStartHandler", + "canonicalReference": "@tldraw/editor!TLOnTranslateStartHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onTranslateStart", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props: " + }, + { + "kind": "Content", + "text": "{\n labelColor: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n color: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n fill: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n arrowheadStart: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n arrowheadEnd: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n font: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n start: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "UnionValidator", + "canonicalReference": "@tldraw/validate!UnionValidator:class" + }, + { + "kind": "Content", + "text": "<\"type\", {\n binding: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "<{\n type: \"binding\";\n boundShapeId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n normalizedAnchor: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n isExact: boolean;\n isPrecise: boolean;\n }>;\n point: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "<{\n x: number;\n y: number;\n type: \"point\";\n }>;\n }, never>;\n end: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "UnionValidator", + "canonicalReference": "@tldraw/validate!UnionValidator:class" + }, + { + "kind": "Content", + "text": "<\"type\", {\n binding: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "<{\n type: \"binding\";\n boundShapeId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n normalizedAnchor: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n isExact: boolean;\n isPrecise: boolean;\n }>;\n point: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "<{\n x: number;\n y: number;\n type: \"point\";\n }>;\n }, never>;\n bend: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n text: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n labelPosition: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 44 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!ArrowShapeUtil#toSvg:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toSvg(shape: " + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": ", ctx: " + }, + { + "kind": "Reference", + "text": "SvgExportContext", + "canonicalReference": "@tldraw/editor!SvgExportContext:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "ctx", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toSvg" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ArrowShapeUtil.type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "\"arrow\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ArrowToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ArrowToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ArrowToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ArrowUpToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ArrowUpToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ArrowUpToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!AssetToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function AssetToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "AssetToolbarItem" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!BookmarkShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class BookmarkShapeUtil extends " + }, + { + "kind": "Reference", + "text": "BaseBoxShapeUtil", + "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLBookmarkShape", + "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "BookmarkShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!BookmarkShapeUtil#canResize:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canResize: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canResize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!BookmarkShapeUtil#component:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component(shape: " + }, + { + "kind": "Reference", + "text": "TLBookmarkShape", + "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "component" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!BookmarkShapeUtil#getDefaultProps:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDefaultProps(): " + }, + { + "kind": "Reference", + "text": "TLBookmarkShape", + "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" + }, + { + "kind": "Content", + "text": "['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDefaultProps" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!BookmarkShapeUtil#hideSelectionBoundsFg:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideSelectionBoundsFg: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideSelectionBoundsFg", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!BookmarkShapeUtil#indicator:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "indicator(shape: " + }, + { + "kind": "Reference", + "text": "TLBookmarkShape", + "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!BookmarkShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!BookmarkShapeUtil#onBeforeCreate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBeforeCreate?: " + }, + { + "kind": "Reference", + "text": "TLOnBeforeCreateHandler", + "canonicalReference": "@tldraw/editor!TLOnBeforeCreateHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLBookmarkShape", + "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onBeforeCreate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!BookmarkShapeUtil#onBeforeUpdate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBeforeUpdate?: " + }, + { + "kind": "Reference", + "text": "TLOnBeforeUpdateHandler", + "canonicalReference": "@tldraw/editor!TLOnBeforeUpdateHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLBookmarkShape", + "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onBeforeUpdate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!BookmarkShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props: " + }, + { + "kind": "Content", + "text": "{\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n h: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n assetId: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 12 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!BookmarkShapeUtil.type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "\"bookmark\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!BreakPointProvider:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function BreakPointProvider({ forceMobile, children, }: " + }, + { + "kind": "Content", + "text": "{\n forceMobile?: boolean;\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/breakpoints.tsx", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ forceMobile, children, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "BreakPointProvider" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!CheckBoxToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function CheckBoxToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "CheckBoxToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ClipboardMenuGroup:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ClipboardMenuGroup(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ClipboardMenuGroup" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!CloudToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function CloudToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "CloudToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!CommonStylePickerSet:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function CommonStylePickerSet({ styles, theme, }: " + }, + { + "kind": "Content", + "text": "{\n styles: " + }, + { + "kind": "Reference", + "text": "ReadonlySharedStyleMap", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" + }, + { + "kind": "Content", + "text": ";\n theme: " + }, + { + "kind": "Reference", + "text": "TLDefaultColorTheme", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ styles, theme, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isOptional": false + } + ], + "name": "CommonStylePickerSet" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!containBoxSize:function(1)", + "docComment": "/**\n * Contains the size within the given box size\n *\n * @param originalSize - The size of the asset\n *\n * @param containBoxSize - The container size\n *\n * @returns Adjusted size\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function containBoxSize(originalSize: " + }, + { + "kind": "Reference", + "text": "BoxWidthHeight", + "canonicalReference": "tldraw!~BoxWidthHeight:type" + }, + { + "kind": "Content", + "text": ", containBoxSize: " + }, + { + "kind": "Reference", + "text": "BoxWidthHeight", + "canonicalReference": "tldraw!~BoxWidthHeight:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "BoxWidthHeight", + "canonicalReference": "tldraw!~BoxWidthHeight:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/assets/assets.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "originalSize", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "containBoxSize", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "containBoxSize" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ConversionsMenuGroup:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ConversionsMenuGroup(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ConversionsMenuGroup" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ConvertToBookmarkMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ConvertToBookmarkMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ConvertToBookmarkMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ConvertToEmbedMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ConvertToEmbedMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ConvertToEmbedMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!copyAs:function(1)", + "docComment": "/**\n * Copy the given shapes to the clipboard.\n *\n * @param editor - The editor instance.\n *\n * @param ids - The ids of the shapes to copy.\n *\n * @param format - The format to copy as.\n *\n * @param opts - Options for the copy.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function copyAs(editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ", ids: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", format?: " + }, + { + "kind": "Reference", + "text": "TLCopyType", + "canonicalReference": "tldraw!~TLCopyType:type" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLSvgOptions", + "canonicalReference": "@tldraw/editor!TLSvgOptions:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/export/copyAs.ts", + "returnTypeTokenRange": { + "startIndex": 13, + "endIndex": 15 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "editor", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "ids", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "format", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": true + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 12 + }, + "isOptional": true + } + ], + "name": "copyAs" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!CopyAsMenuGroup:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function CopyAsMenuGroup(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "CopyAsMenuGroup" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!CopyMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function CopyMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "CopyMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!CutMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function CutMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "CutMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DebugFlags:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DebugFlags(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/DebugMenu/DefaultDebugMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DebugFlags" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!DEFAULT_ACCEPTED_IMG_TYPE:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DEFAULT_ACCEPTED_IMG_TYPE: " + }, + { + "kind": "Content", + "text": "string[]" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/assets/assets.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "DEFAULT_ACCEPTED_IMG_TYPE", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!DEFAULT_ACCEPTED_VID_TYPE:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DEFAULT_ACCEPTED_VID_TYPE: " + }, + { + "kind": "Content", + "text": "string[]" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/assets/assets.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "DEFAULT_ACCEPTED_VID_TYPE", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!DefaultActionsMenu:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultActionsMenu: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiActionsMenuProps", + "canonicalReference": "tldraw!TLUiActionsMenuProps:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultActionsMenu", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultActionsMenuContent:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultActionsMenuContent(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultActionsMenuContent" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!DefaultContextMenu:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultContextMenu: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiContextMenuProps", + "canonicalReference": "tldraw!TLUiContextMenuProps:interface" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ContextMenu/DefaultContextMenu.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultContextMenu", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultContextMenuContent:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultContextMenuContent(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ContextMenu/DefaultContextMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultContextMenuContent" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultDebugMenu:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultDebugMenu({ children }: " + }, + { + "kind": "Reference", + "text": "TLUiDebugMenuProps", + "canonicalReference": "tldraw!TLUiDebugMenuProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/DebugMenu/DefaultDebugMenu.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultDebugMenu" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultDebugMenuContent:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultDebugMenuContent(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/DebugMenu/DefaultDebugMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultDebugMenuContent" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultHelperButtons:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultHelperButtons({ children }: " + }, + { + "kind": "Reference", + "text": "TLUiHelperButtonsProps", + "canonicalReference": "tldraw!TLUiHelperButtonsProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelperButtons/DefaultHelperButtons.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultHelperButtons" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultHelperButtonsContent:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultHelperButtonsContent(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelperButtons/DefaultHelperButtonsContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultHelperButtonsContent" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!DefaultHelpMenu:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultHelpMenu: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiHelpMenuProps", + "canonicalReference": "tldraw!TLUiHelpMenuProps:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelpMenu/DefaultHelpMenu.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultHelpMenu", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultHelpMenuContent:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultHelpMenuContent(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelpMenu/DefaultHelpMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultHelpMenuContent" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!DefaultKeyboardShortcutsDialog:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultKeyboardShortcutsDialog: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiKeyboardShortcutsDialogProps", + "canonicalReference": "tldraw!TLUiKeyboardShortcutsDialogProps:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialog.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultKeyboardShortcutsDialog", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultKeyboardShortcutsDialogContent:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultKeyboardShortcutsDialogContent(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultKeyboardShortcutsDialogContent" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!DefaultMainMenu:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultMainMenu: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiMainMenuProps", + "canonicalReference": "tldraw!TLUiMainMenuProps:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenu.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultMainMenu", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultMainMenuContent:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultMainMenuContent(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultMainMenuContent" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultMinimap:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultMinimap(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Minimap/DefaultMinimap.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultMinimap" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!DefaultPageMenu:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultPageMenu: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultPageMenu", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!DefaultQuickActions:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultQuickActions: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiQuickActionsProps", + "canonicalReference": "tldraw!TLUiQuickActionsProps:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/QuickActions/DefaultQuickActions.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultQuickActions", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultQuickActionsContent:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultQuickActionsContent(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/QuickActions/DefaultQuickActionsContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultQuickActionsContent" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!defaultShapeTools:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultShapeTools: " + }, + { + "kind": "Content", + "text": "(typeof " + }, + { + "kind": "Reference", + "text": "ArrowShapeTool", + "canonicalReference": "tldraw!ArrowShapeTool:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "DrawShapeTool", + "canonicalReference": "tldraw!DrawShapeTool:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "FrameShapeTool", + "canonicalReference": "tldraw!FrameShapeTool:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "GeoShapeTool", + "canonicalReference": "tldraw!GeoShapeTool:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "LineShapeTool", + "canonicalReference": "tldraw!LineShapeTool:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "NoteShapeTool", + "canonicalReference": "tldraw!NoteShapeTool:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "TextShapeTool", + "canonicalReference": "tldraw!TextShapeTool:class" + }, + { + "kind": "Content", + "text": ")[]" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/defaultShapeTools.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "defaultShapeTools", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 16 + } + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!defaultShapeUtils:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultShapeUtils: " + }, + { + "kind": "Reference", + "text": "TLAnyShapeUtilConstructor", + "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" + }, + { + "kind": "Content", + "text": "[]" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/defaultShapeUtils.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "defaultShapeUtils", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!DefaultStylePanel:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultStylePanel: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiStylePanelProps", + "canonicalReference": "tldraw!TLUiStylePanelProps:interface" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultStylePanel", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultStylePanelContent:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultStylePanelContent({ styles }: " + }, + { + "kind": "Reference", + "text": "TLUiStylePanelContentProps", + "canonicalReference": "tldraw!TLUiStylePanelContentProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ styles }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "DefaultStylePanelContent" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!DefaultToolbar:var", + "docComment": "/**\n * The default toolbar for the editor. `children` defaults to the `DefaultToolbarContent` component. Depending on the screen size, the children will overflow into a drop-down menu, with the most recently active item from the overflow being shown in the main toolbar.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultToolbar: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<{\n children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}>" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbar.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultToolbar", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultToolbarContent:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultToolbarContent(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultToolbarContent" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!defaultTools:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultTools: " + }, + { + "kind": "Content", + "text": "(typeof " + }, + { + "kind": "Reference", + "text": "EraserTool", + "canonicalReference": "tldraw!EraserTool:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "HandTool", + "canonicalReference": "tldraw!HandTool:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "LaserTool", + "canonicalReference": "tldraw!LaserTool:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "SelectTool", + "canonicalReference": "tldraw!SelectTool:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "ZoomTool", + "canonicalReference": "tldraw!ZoomTool:class" + }, + { + "kind": "Content", + "text": ")[]" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/defaultTools.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "defaultTools", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 12 + } + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!DefaultZoomMenu:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultZoomMenu: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiZoomMenuProps", + "canonicalReference": "tldraw!TLUiZoomMenuProps:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ZoomMenu/DefaultZoomMenu.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultZoomMenu", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DefaultZoomMenuContent:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DefaultZoomMenuContent(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ZoomMenu/DefaultZoomMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DefaultZoomMenuContent" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DeleteMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DeleteMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DeleteMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DiamondToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DiamondToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DiamondToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DistributeMenuItems:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DistributeMenuItems(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DistributeMenuItems" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!downsizeImage:function(1)", + "docComment": "/**\n * Resize an image Blob to be smaller than it is currently.\n *\n * @param image - The image Blob.\n *\n * @param width - The desired width.\n *\n * @param height - The desired height.\n *\n * @param opts - Options for the image.\n *\n * @example\n * ```ts\n * const image = await (await fetch('/image.jpg')).blob()\n * const size = await getImageSize(image)\n * const resizedImage = await downsizeImage(image, size.w / 2, size.h / 2, { type: \"image/jpeg\", quality: 0.92 })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function downsizeImage(blob: " + }, + { + "kind": "Reference", + "text": "Blob", + "canonicalReference": "!Blob:interface" + }, + { + "kind": "Content", + "text": ", width: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", height: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Content", + "text": "{\n type?: string | undefined;\n quality?: number | undefined;\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Blob", + "canonicalReference": "!Blob:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/assets/assets.ts", + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 13 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "blob", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "width", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "height", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "name": "downsizeImage" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!DrawShapeTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class DrawShapeTool extends " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/draw/DrawShapeTool.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "DrawShapeTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!DrawShapeTool.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children: " + }, + { + "kind": "Content", + "text": "() => (typeof " + }, + { + "kind": "Reference", + "text": "Drawing", + "canonicalReference": "tldraw!~Drawing:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Idle", + "canonicalReference": "tldraw!~Idle_2:class" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!DrawShapeTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!DrawShapeTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!DrawShapeTool#onExit:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onExit: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onExit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!DrawShapeTool#shapeType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapeType: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "shapeType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "tldraw!DrawShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class DrawShapeUtil extends " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLDrawShape", + "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/draw/DrawShapeUtil.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "DrawShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "tldraw!DrawShapeUtil#component:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component(shape: " + }, + { + "kind": "Reference", + "text": "TLDrawShape", + "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "component" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!DrawShapeUtil#expandSelectionOutlinePx:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "expandSelectionOutlinePx(shape: " + }, + { + "kind": "Reference", + "text": "TLDrawShape", + "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "expandSelectionOutlinePx" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!DrawShapeUtil#getCanvasSvgDefs:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCanvasSvgDefs(): " + }, + { + "kind": "Reference", + "text": "TLShapeUtilCanvasSvgDef", + "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCanvasSvgDefs" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!DrawShapeUtil#getDefaultProps:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDefaultProps(): " + }, + { + "kind": "Reference", + "text": "TLDrawShape", + "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" + }, + { + "kind": "Content", + "text": "['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDefaultProps" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!DrawShapeUtil#getGeometry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getGeometry(shape: " + }, + { + "kind": "Reference", + "text": "TLDrawShape", + "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Circle2d", + "canonicalReference": "@tldraw/editor!Circle2d:class" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "Polyline2d", + "canonicalReference": "@tldraw/editor!Polyline2d:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getGeometry" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!DrawShapeUtil#hideResizeHandles:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideResizeHandles: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLDrawShape", + "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" + }, + { + "kind": "Content", + "text": ") => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideResizeHandles", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!DrawShapeUtil#hideRotateHandle:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideRotateHandle: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLDrawShape", + "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" + }, + { + "kind": "Content", + "text": ") => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideRotateHandle", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!DrawShapeUtil#hideSelectionBoundsFg:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideSelectionBoundsFg: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLDrawShape", + "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" + }, + { + "kind": "Content", + "text": ") => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideSelectionBoundsFg", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!DrawShapeUtil#indicator:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "indicator(shape: " + }, + { + "kind": "Reference", + "text": "TLDrawShape", + "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!DrawShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!DrawShapeUtil#onResize:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onResize: " + }, + { + "kind": "Reference", + "text": "TLOnResizeHandler", + "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLDrawShape", + "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onResize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!DrawShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props: " + }, + { + "kind": "Content", + "text": "{\n color: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n fill: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n segments: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "ArrayOfValidator", + "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" + }, + { + "kind": "Content", + "text": "<{\n type: \"free\" | \"straight\";\n points: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "[];\n }>;\n isComplete: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n isClosed: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n isPen: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 20 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!DrawShapeUtil#toSvg:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toSvg(shape: " + }, + { + "kind": "Reference", + "text": "TLDrawShape", + "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" + }, + { + "kind": "Content", + "text": ", ctx: " + }, + { + "kind": "Reference", + "text": "SvgExportContext", + "canonicalReference": "@tldraw/editor!SvgExportContext:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "ctx", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toSvg" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!DrawShapeUtil.type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "\"draw\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DrawToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DrawToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DrawToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!DuplicateMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function DuplicateMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "DuplicateMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!EditLinkMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function EditLinkMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "EditLinkMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!EditSubmenu:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function EditSubmenu(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "EditSubmenu" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!EllipseToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function EllipseToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "EllipseToolbarItem" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!EmbedShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class EmbedShapeUtil extends " + }, + { + "kind": "Reference", + "text": "BaseBoxShapeUtil", + "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLEmbedShape", + "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/embed/EmbedShapeUtil.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "EmbedShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!EmbedShapeUtil#canEdit:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canEdit: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLEmbedShape", + "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canEdit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!EmbedShapeUtil#canEditInReadOnly:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canEditInReadOnly: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canEditInReadOnly", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!EmbedShapeUtil#canResize:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canResize: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLEmbedShape", + "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" + }, + { + "kind": "Content", + "text": ") => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canResize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!EmbedShapeUtil#component:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component(shape: " + }, + { + "kind": "Reference", + "text": "TLEmbedShape", + "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "component" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!EmbedShapeUtil#getDefaultProps:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDefaultProps(): " + }, + { + "kind": "Reference", + "text": "TLEmbedShape", + "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" + }, + { + "kind": "Content", + "text": "['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDefaultProps" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!EmbedShapeUtil#hideSelectionBoundsFg:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideSelectionBoundsFg: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLEmbedShape", + "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideSelectionBoundsFg", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!EmbedShapeUtil#indicator:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "indicator(shape: " + }, + { + "kind": "Reference", + "text": "TLEmbedShape", + "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!EmbedShapeUtil#isAspectRatioLocked:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isAspectRatioLocked: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLEmbedShape", + "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isAspectRatioLocked", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!EmbedShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!EmbedShapeUtil#onResize:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onResize: " + }, + { + "kind": "Reference", + "text": "TLOnResizeHandler", + "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLEmbedShape", + "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onResize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!EmbedShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props: " + }, + { + "kind": "Content", + "text": "{\n w: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n h: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!EmbedShapeUtil.type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "\"embed\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "tldraw!EraserTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class EraserTool extends " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/tools/EraserTool/EraserTool.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "EraserTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!EraserTool.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children: " + }, + { + "kind": "Content", + "text": "() => (typeof " + }, + { + "kind": "Reference", + "text": "Erasing", + "canonicalReference": "tldraw!~Erasing:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Idle", + "canonicalReference": "tldraw!~Idle_7:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Pointing", + "canonicalReference": "tldraw!~Pointing_6:class" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!EraserTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!EraserTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!EraserTool#onEnter:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onEnter: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onEnter", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!EraserToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function EraserToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "EraserToolbarItem" + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!EventsProviderProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type EventsProviderProps = " + }, + { + "kind": "Content", + "text": "{\n onEvent?: " + }, + { + "kind": "Reference", + "text": "TLUiEventHandler", + "canonicalReference": "tldraw!TLUiEventHandler:type" + }, + { + "kind": "Content", + "text": ";\n children: " + }, + { + "kind": "Reference", + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", + "releaseTag": "Public", + "name": "EventsProviderProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ExampleDialog:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ExampleDialog({ title, body, cancel, confirm, displayDontShowAgain, onCancel, onContinue, }: " + }, + { + "kind": "Content", + "text": "{\n title?: string;\n body?: string;\n cancel?: string;\n confirm?: string;\n displayDontShowAgain?: boolean;\n onCancel: () => void;\n onContinue: () => void;\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/DebugMenu/DefaultDebugMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ title, body, cancel, confirm, displayDontShowAgain, onCancel, onContinue, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "ExampleDialog" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!exportAs:function(1)", + "docComment": "/**\n * Export the given shapes as files.\n *\n * @param editor - The editor instance.\n *\n * @param ids - The ids of the shapes to export.\n *\n * @param format - The format to export as.\n *\n * @param name - Name of the exported file. If undefined a predefined name, based on the selection, will be used.\n *\n * @param opts - Options for the export.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function exportAs(editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ", ids: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", format: " + }, + { + "kind": "Reference", + "text": "TLExportType", + "canonicalReference": "tldraw!~TLExportType:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ", name: " + }, + { + "kind": "Content", + "text": "string | undefined" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLSvgOptions", + "canonicalReference": "@tldraw/editor!TLSvgOptions:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/export/exportAs.ts", + "returnTypeTokenRange": { + "startIndex": 16, + "endIndex": 18 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "editor", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "ids", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "format", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 15 + }, + "isOptional": true + } + ], + "name": "exportAs" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ExportFileContentSubMenu:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ExportFileContentSubMenu(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ExportFileContentSubMenu" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!exportToBlob:function(1)", + "docComment": "/**\n * Export the given shapes as a blob.\n *\n * @param editor - The editor instance.\n *\n * @param ids - The ids of the shapes to export.\n *\n * @param format - The format to export as.\n *\n * @param opts - Rendering options.\n *\n * @returns A promise that resolves to a blob.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function exportToBlob({ editor, ids, format, opts, }: " + }, + { + "kind": "Content", + "text": "{\n editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ";\n ids: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[];\n format: 'jpeg' | 'json' | 'png' | 'svg' | 'webp';\n opts?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLSvgOptions", + "canonicalReference": "@tldraw/editor!TLSvgOptions:type" + }, + { + "kind": "Content", + "text": ">;\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Blob", + "canonicalReference": "!Blob:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/export/export.ts", + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 15 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ editor, ids, format, opts, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 10 + }, + "isOptional": false + } + ], + "name": "exportToBlob" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ExtrasGroup:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ExtrasGroup(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ExtrasGroup" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!FeatureFlags:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function FeatureFlags(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/DebugMenu/DefaultDebugMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "FeatureFlags" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!fitFrameToContent:function(1)", + "docComment": "/**\n * Fit a frame to its content.\n *\n * @param id - Id of the frame you wish to fit to content.\n *\n * @param editor - tlraw editor instance.\n *\n * @param opts - Options for fitting the frame.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function fitFrameToContent(editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ", id: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Content", + "text": "{\n padding: number;\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/frames/frames.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "editor", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "name": "fitFrameToContent" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!FitFrameToContentMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function FitFrameToContentMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "FitFrameToContentMenuItem" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!FONT_FAMILIES:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "FONT_FAMILIES: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLDefaultFontStyle", + "canonicalReference": "@tldraw/tlschema!TLDefaultFontStyle:type" + }, + { + "kind": "Content", + "text": ", string>" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/default-shape-constants.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "FONT_FAMILIES", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Class", + "canonicalReference": "tldraw!FrameShapeTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class FrameShapeTool extends " + }, + { + "kind": "Reference", + "text": "BaseBoxShapeTool", + "canonicalReference": "@tldraw/editor!BaseBoxShapeTool:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/frame/FrameShapeTool.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "FrameShapeTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeTool#onCreate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onCreate: " + }, + { + "kind": "Content", + "text": "(shape: null | " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onCreate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeTool#shapeType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapeType: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "shapeType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "tldraw!FrameShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class FrameShapeUtil extends " + }, + { + "kind": "Reference", + "text": "BaseBoxShapeUtil", + "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLFrameShape", + "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/frame/FrameShapeUtil.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "FrameShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeUtil#canBind:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canBind: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canBind", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeUtil#canDropShapes:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canDropShapes: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLFrameShape", + "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" + }, + { + "kind": "Content", + "text": ", _shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]) => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canDropShapes", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeUtil#canEdit:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canEdit: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canEdit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeUtil#canReceiveNewChildrenOfType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canReceiveNewChildrenOfType: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ", _type: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "['type']) => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canReceiveNewChildrenOfType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!FrameShapeUtil#component:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component(shape: " + }, + { + "kind": "Reference", + "text": "TLFrameShape", + "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "component" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!FrameShapeUtil#getDefaultProps:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDefaultProps(): " + }, + { + "kind": "Reference", + "text": "TLFrameShape", + "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" + }, + { + "kind": "Content", + "text": "['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDefaultProps" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!FrameShapeUtil#getGeometry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getGeometry(shape: " + }, + { + "kind": "Reference", + "text": "TLFrameShape", + "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Geometry2d", + "canonicalReference": "@tldraw/editor!Geometry2d:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getGeometry" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!FrameShapeUtil#indicator:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "indicator(shape: " + }, + { + "kind": "Reference", + "text": "TLFrameShape", + "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeUtil#onDragShapesOut:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDragShapesOut: " + }, + { + "kind": "Content", + "text": "(_shape: " + }, + { + "kind": "Reference", + "text": "TLFrameShape", + "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" + }, + { + "kind": "Content", + "text": ", shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onDragShapesOut", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeUtil#onDragShapesOver:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDragShapesOver: " + }, + { + "kind": "Content", + "text": "(frame: " + }, + { + "kind": "Reference", + "text": "TLFrameShape", + "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" + }, + { + "kind": "Content", + "text": ", shapes: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": "[]) => {\n shouldHint: boolean;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onDragShapesOver", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeUtil#onResize:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onResize: " + }, + { + "kind": "Reference", + "text": "TLOnResizeHandler", + "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onResize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeUtil#onResizeEnd:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onResizeEnd: " + }, + { + "kind": "Reference", + "text": "TLOnResizeEndHandler", + "canonicalReference": "@tldraw/editor!TLOnResizeEndHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLFrameShape", + "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onResizeEnd", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props: " + }, + { + "kind": "Content", + "text": "{\n w: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n h: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n name: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!FrameShapeUtil#providesBackgroundForChildren:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "providesBackgroundForChildren(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "providesBackgroundForChildren" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!FrameShapeUtil#toSvg:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toSvg(shape: " + }, + { + "kind": "Reference", + "text": "TLFrameShape", + "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" + }, + { + "kind": "Content", + "text": ", ctx: " + }, + { + "kind": "Reference", + "text": "SvgExportContext", + "canonicalReference": "@tldraw/editor!SvgExportContext:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "ctx", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toSvg" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!FrameShapeUtil.type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "\"frame\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!FrameToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function FrameToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "FrameToolbarItem" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!GeoShapeTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class GeoShapeTool extends " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/geo/GeoShapeTool.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "GeoShapeTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!GeoShapeTool.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children: " + }, + { + "kind": "Content", + "text": "() => (typeof " + }, + { + "kind": "Reference", + "text": "Idle", + "canonicalReference": "tldraw!~Idle_3:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Pointing", + "canonicalReference": "tldraw!~Pointing_2:class" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!GeoShapeTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!GeoShapeTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!GeoShapeTool#shapeType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapeType: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "shapeType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "tldraw!GeoShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class GeoShapeUtil extends " + }, + { + "kind": "Reference", + "text": "BaseBoxShapeUtil", + "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/geo/GeoShapeUtil.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "GeoShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!GeoShapeUtil#canEdit:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canEdit: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canEdit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!GeoShapeUtil#component:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component(shape: " + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "component" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!GeoShapeUtil#getCanvasSvgDefs:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getCanvasSvgDefs(): " + }, + { + "kind": "Reference", + "text": "TLShapeUtilCanvasSvgDef", + "canonicalReference": "@tldraw/editor!TLShapeUtilCanvasSvgDef:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getCanvasSvgDefs" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!GeoShapeUtil#getDefaultProps:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDefaultProps(): " + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": "['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDefaultProps" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!GeoShapeUtil#getGeometry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getGeometry(shape: " + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Group2d", + "canonicalReference": "@tldraw/editor!Group2d:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getGeometry" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!GeoShapeUtil#getHandleSnapGeometry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHandleSnapGeometry(shape: " + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "HandleSnapGeometry", + "canonicalReference": "@tldraw/editor!HandleSnapGeometry:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getHandleSnapGeometry" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!GeoShapeUtil#indicator:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "indicator(shape: " + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!GeoShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!GeoShapeUtil#onBeforeCreate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBeforeCreate: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": ") => {\n props: {\n growY: number;\n geo: \"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\";\n labelColor: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n fill: \"none\" | \"pattern\" | \"semi\" | \"solid\";\n dash: \"dashed\" | \"dotted\" | \"draw\" | \"solid\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n verticalAlign: \"end\" | \"middle\" | \"start\";\n url: string;\n w: number;\n h: number;\n text: string;\n };\n type: \"geo\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n id: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n typeName: \"shape\";\n } | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onBeforeCreate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 12 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!GeoShapeUtil#onBeforeUpdate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBeforeUpdate: " + }, + { + "kind": "Content", + "text": "(prev: " + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": ", next: " + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": ") => {\n props: {\n growY: number;\n geo: \"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\";\n labelColor: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n fill: \"none\" | \"pattern\" | \"semi\" | \"solid\";\n dash: \"dashed\" | \"dotted\" | \"draw\" | \"solid\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n verticalAlign: \"end\" | \"middle\" | \"start\";\n url: string;\n w: number;\n h: number;\n text: string;\n };\n type: \"geo\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n id: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n typeName: \"shape\";\n } | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onBeforeUpdate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 14 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!GeoShapeUtil#onDoubleClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDoubleClick: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": ") => {\n props: {\n geo: \"check-box\";\n };\n type: \"geo\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n id: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n typeName: \"shape\";\n } | {\n props: {\n geo: \"rectangle\";\n };\n type: \"geo\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n id: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n typeName: \"shape\";\n } | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onDoubleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 20 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!GeoShapeUtil#onEditEnd:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onEditEnd: " + }, + { + "kind": "Reference", + "text": "TLOnEditEndHandler", + "canonicalReference": "@tldraw/editor!TLOnEditEndHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onEditEnd", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!GeoShapeUtil#onResize:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onResize: " + }, + { + "kind": "Reference", + "text": "TLOnResizeHandler", + "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onResize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!GeoShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props: " + }, + { + "kind": "Content", + "text": "{\n geo: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\">;\n labelColor: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n color: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n fill: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n verticalAlign: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end\" | \"middle\" | \"start\">;\n url: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n w: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n h: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n growY: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n text: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 30 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!GeoShapeUtil#toSvg:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toSvg(shape: " + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": ", ctx: " + }, + { + "kind": "Reference", + "text": "SvgExportContext", + "canonicalReference": "@tldraw/editor!SvgExportContext:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "ctx", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toSvg" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!GeoShapeUtil.type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "\"geo\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!GeoStylePickerSet:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function GeoStylePickerSet({ styles }: " + }, + { + "kind": "Content", + "text": "{\n styles: " + }, + { + "kind": "Reference", + "text": "ReadonlySharedStyleMap", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 8 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ styles }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "GeoStylePickerSet" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!getEmbedInfo:function(1)", + "docComment": "/**\n * Tests whether an URL supports embedding and returns the result. If we encounter an error, we return undefined.\n *\n * @param inputUrl - The URL to match\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getEmbedInfo(inputUrl: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLEmbedResult", + "canonicalReference": "tldraw!~TLEmbedResult:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/embeds/embeds.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "inputUrl", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "getEmbedInfo" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!getSvgAsImage:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getSvgAsImage(svgString: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", isSafari: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ", options: " + }, + { + "kind": "Content", + "text": "{\n type: 'jpeg' | 'png' | 'webp';\n quality: number;\n scale: number;\n width: number;\n height: number;\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Blob", + "canonicalReference": "!Blob:interface" + }, + { + "kind": "Content", + "text": " | null>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/export/export.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "svgString", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "isSafari", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "name": "getSvgAsImage" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!GroupMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function GroupMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "GroupMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!GroupOrUngroupMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function GroupOrUngroupMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "GroupOrUngroupMenuItem" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!HandTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class HandTool extends " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/tools/HandTool/HandTool.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "HandTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!HandTool.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children: " + }, + { + "kind": "Content", + "text": "() => (typeof " + }, + { + "kind": "Reference", + "text": "Dragging", + "canonicalReference": "tldraw!~Dragging:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Idle", + "canonicalReference": "tldraw!~Idle_8:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Pointing", + "canonicalReference": "tldraw!~Pointing_7:class" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HandTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HandTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HandTool#onDoubleClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDoubleClick: " + }, + { + "kind": "Reference", + "text": "TLClickEvent", + "canonicalReference": "@tldraw/editor!TLClickEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onDoubleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HandTool#onQuadrupleClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onQuadrupleClick: " + }, + { + "kind": "Reference", + "text": "TLClickEvent", + "canonicalReference": "@tldraw/editor!TLClickEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onQuadrupleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HandTool#onTripleClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onTripleClick: " + }, + { + "kind": "Reference", + "text": "TLClickEvent", + "canonicalReference": "@tldraw/editor!TLClickEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onTripleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!HandToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function HandToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "HandToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!HexagonToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function HexagonToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "HexagonToolbarItem" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!HighlightShapeTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class HighlightShapeTool extends " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/highlight/HighlightShapeTool.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "HighlightShapeTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!HighlightShapeTool.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children: " + }, + { + "kind": "Content", + "text": "() => (typeof " + }, + { + "kind": "Reference", + "text": "Drawing", + "canonicalReference": "tldraw!~Drawing:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Idle", + "canonicalReference": "tldraw!~Idle_2:class" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HighlightShapeTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HighlightShapeTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HighlightShapeTool#onExit:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onExit: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onExit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HighlightShapeTool#shapeType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapeType: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "shapeType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "tldraw!HighlightShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class HighlightShapeUtil extends " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLHighlightShape", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/highlight/HighlightShapeUtil.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "HighlightShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "tldraw!HighlightShapeUtil#backgroundComponent:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "backgroundComponent(shape: " + }, + { + "kind": "Reference", + "text": "TLHighlightShape", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "backgroundComponent" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!HighlightShapeUtil#component:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component(shape: " + }, + { + "kind": "Reference", + "text": "TLHighlightShape", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "component" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!HighlightShapeUtil#getDefaultProps:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDefaultProps(): " + }, + { + "kind": "Reference", + "text": "TLHighlightShape", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" + }, + { + "kind": "Content", + "text": "['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDefaultProps" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!HighlightShapeUtil#getGeometry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getGeometry(shape: " + }, + { + "kind": "Reference", + "text": "TLHighlightShape", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Circle2d", + "canonicalReference": "@tldraw/editor!Circle2d:class" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "Polygon2d", + "canonicalReference": "@tldraw/editor!Polygon2d:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getGeometry" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HighlightShapeUtil#hideResizeHandles:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideResizeHandles: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLHighlightShape", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" + }, + { + "kind": "Content", + "text": ") => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideResizeHandles", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HighlightShapeUtil#hideRotateHandle:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideRotateHandle: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLHighlightShape", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" + }, + { + "kind": "Content", + "text": ") => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideRotateHandle", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HighlightShapeUtil#hideSelectionBoundsFg:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideSelectionBoundsFg: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLHighlightShape", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" + }, + { + "kind": "Content", + "text": ") => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideSelectionBoundsFg", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!HighlightShapeUtil#indicator:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "indicator(shape: " + }, + { + "kind": "Reference", + "text": "TLHighlightShape", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HighlightShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HighlightShapeUtil#onResize:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onResize: " + }, + { + "kind": "Reference", + "text": "TLOnResizeHandler", + "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLHighlightShape", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onResize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HighlightShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props: " + }, + { + "kind": "Content", + "text": "{\n color: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n segments: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "ArrayOfValidator", + "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" + }, + { + "kind": "Content", + "text": "<{\n type: \"free\" | \"straight\";\n points: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "[];\n }>;\n isComplete: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n isPen: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 14 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!HighlightShapeUtil#toBackgroundSvg:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toBackgroundSvg(shape: " + }, + { + "kind": "Reference", + "text": "TLHighlightShape", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toBackgroundSvg" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!HighlightShapeUtil#toSvg:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toSvg(shape: " + }, + { + "kind": "Reference", + "text": "TLHighlightShape", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toSvg" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!HighlightShapeUtil.type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "\"highlight\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!HighlightToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function HighlightToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "HighlightToolbarItem" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!ImageShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ImageShapeUtil extends " + }, + { + "kind": "Reference", + "text": "BaseBoxShapeUtil", + "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLImageShape", + "canonicalReference": "@tldraw/tlschema!TLImageShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/image/ImageShapeUtil.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "ImageShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!ImageShapeUtil#canCrop:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canCrop: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canCrop", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!ImageShapeUtil#component:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component(shape: " + }, + { + "kind": "Reference", + "text": "TLImageShape", + "canonicalReference": "@tldraw/tlschema!TLImageShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "component" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!ImageShapeUtil#getDefaultProps:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDefaultProps(): " + }, + { + "kind": "Reference", + "text": "TLImageShape", + "canonicalReference": "@tldraw/tlschema!TLImageShape:type" + }, + { + "kind": "Content", + "text": "['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDefaultProps" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!ImageShapeUtil#indicator:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "indicator(shape: " + }, + { + "kind": "Reference", + "text": "TLImageShape", + "canonicalReference": "@tldraw/tlschema!TLImageShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ImageShapeUtil#isAspectRatioLocked:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isAspectRatioLocked: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isAspectRatioLocked", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ImageShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ImageShapeUtil#onDoubleClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDoubleClick: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLImageShape", + "canonicalReference": "@tldraw/tlschema!TLImageShape:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onDoubleClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ImageShapeUtil#onDoubleClickEdge:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDoubleClickEdge: " + }, + { + "kind": "Reference", + "text": "TLOnDoubleClickHandler", + "canonicalReference": "@tldraw/editor!TLOnDoubleClickHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLImageShape", + "canonicalReference": "@tldraw/tlschema!TLImageShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onDoubleClickEdge", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ImageShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props: " + }, + { + "kind": "Content", + "text": "{\n w: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n h: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n playing: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n assetId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n crop: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<{\n topLeft: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n bottomRight: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n } | null>;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 20 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!ImageShapeUtil#toSvg:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toSvg(shape: " + }, + { + "kind": "Reference", + "text": "TLImageShape", + "canonicalReference": "@tldraw/tlschema!TLImageShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toSvg" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ImageShapeUtil.type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "\"image\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!isGifAnimated:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function isGifAnimated(file: " + }, + { + "kind": "Reference", + "text": "Blob", + "canonicalReference": "!Blob:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/assets/assets.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "file", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "isGifAnimated" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!KeyboardShortcutsMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function KeyboardShortcutsMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelpMenu/DefaultHelpMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "KeyboardShortcutsMenuItem" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!LABEL_FONT_SIZES:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "LABEL_FONT_SIZES: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLDefaultSizeStyle", + "canonicalReference": "@tldraw/tlschema!TLDefaultSizeStyle:type" + }, + { + "kind": "Content", + "text": ", number>" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/default-shape-constants.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "LABEL_FONT_SIZES", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!LanguageMenu:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function LanguageMenu(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/LanguageMenu.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "LanguageMenu" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!LaserTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class LaserTool extends " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/tools/LaserTool/LaserTool.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "LaserTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!LaserTool.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children: " + }, + { + "kind": "Content", + "text": "() => (typeof " + }, + { + "kind": "Reference", + "text": "Idle", + "canonicalReference": "tldraw!~Idle_9:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Lasering", + "canonicalReference": "tldraw!~Lasering:class" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LaserTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LaserTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LaserTool#onEnter:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onEnter: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onEnter", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!LaserToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function LaserToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "LaserToolbarItem" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!LineShapeTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class LineShapeTool extends " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/line/LineShapeTool.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "LineShapeTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!LineShapeTool.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children: " + }, + { + "kind": "Content", + "text": "() => (typeof " + }, + { + "kind": "Reference", + "text": "Idle", + "canonicalReference": "tldraw!~Idle_4:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Pointing", + "canonicalReference": "tldraw!~Pointing_3:class" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LineShapeTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LineShapeTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LineShapeTool#shapeType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapeType: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "shapeType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "tldraw!LineShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class LineShapeUtil extends " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLLineShape", + "canonicalReference": "@tldraw/tlschema!TLLineShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/line/LineShapeUtil.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "LineShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "tldraw!LineShapeUtil#component:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component(shape: " + }, + { + "kind": "Reference", + "text": "TLLineShape", + "canonicalReference": "@tldraw/tlschema!TLLineShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "component" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!LineShapeUtil#getDefaultProps:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDefaultProps(): " + }, + { + "kind": "Reference", + "text": "TLLineShape", + "canonicalReference": "@tldraw/tlschema!TLLineShape:type" + }, + { + "kind": "Content", + "text": "['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDefaultProps" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!LineShapeUtil#getGeometry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getGeometry(shape: " + }, + { + "kind": "Reference", + "text": "TLLineShape", + "canonicalReference": "@tldraw/tlschema!TLLineShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CubicSpline2d", + "canonicalReference": "@tldraw/editor!CubicSpline2d:class" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "Polyline2d", + "canonicalReference": "@tldraw/editor!Polyline2d:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getGeometry" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!LineShapeUtil#getHandles:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHandles(shape: " + }, + { + "kind": "Reference", + "text": "TLLineShape", + "canonicalReference": "@tldraw/tlschema!TLLineShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLHandle", + "canonicalReference": "@tldraw/tlschema!TLHandle:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getHandles" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!LineShapeUtil#getHandleSnapGeometry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHandleSnapGeometry(shape: " + }, + { + "kind": "Reference", + "text": "TLLineShape", + "canonicalReference": "@tldraw/tlschema!TLLineShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "HandleSnapGeometry", + "canonicalReference": "@tldraw/editor!HandleSnapGeometry:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getHandleSnapGeometry" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LineShapeUtil#hideResizeHandles:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideResizeHandles: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideResizeHandles", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LineShapeUtil#hideRotateHandle:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideRotateHandle: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideRotateHandle", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LineShapeUtil#hideSelectionBoundsBg:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideSelectionBoundsBg: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideSelectionBoundsBg", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LineShapeUtil#hideSelectionBoundsFg:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideSelectionBoundsFg: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideSelectionBoundsFg", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!LineShapeUtil#indicator:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "indicator(shape: " + }, + { + "kind": "Reference", + "text": "TLLineShape", + "canonicalReference": "@tldraw/tlschema!TLLineShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LineShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LineShapeUtil#onHandleDrag:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onHandleDrag: " + }, + { + "kind": "Reference", + "text": "TLOnHandleDragHandler", + "canonicalReference": "@tldraw/editor!TLOnHandleDragHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLLineShape", + "canonicalReference": "@tldraw/tlschema!TLLineShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onHandleDrag", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LineShapeUtil#onResize:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onResize: " + }, + { + "kind": "Reference", + "text": "TLOnResizeHandler", + "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLLineShape", + "canonicalReference": "@tldraw/tlschema!TLLineShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onResize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LineShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props: " + }, + { + "kind": "Content", + "text": "{\n color: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n dash: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n spline: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"cubic\" | \"line\">;\n points: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "DictValidator", + "canonicalReference": "@tldraw/validate!DictValidator:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 14 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!LineShapeUtil#toSvg:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toSvg(shape: " + }, + { + "kind": "Reference", + "text": "TLLineShape", + "canonicalReference": "@tldraw/tlschema!TLLineShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toSvg" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!LineShapeUtil.type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "\"line\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!LineToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function LineToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "LineToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!MiscMenuGroup:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function MiscMenuGroup(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "MiscMenuGroup" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!MoveToPageMenu:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function MoveToPageMenu(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "MoveToPageMenu" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!NoteShapeTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class NoteShapeTool extends " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/note/NoteShapeTool.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "NoteShapeTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!NoteShapeTool.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children: " + }, + { + "kind": "Content", + "text": "() => (typeof " + }, + { + "kind": "Reference", + "text": "Idle", + "canonicalReference": "tldraw!~Idle_5:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Pointing", + "canonicalReference": "tldraw!~Pointing_4:class" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!NoteShapeTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!NoteShapeTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!NoteShapeTool#shapeType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapeType: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "shapeType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "tldraw!NoteShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class NoteShapeUtil extends " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLNoteShape", + "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/note/NoteShapeUtil.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "NoteShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!NoteShapeUtil#canEdit:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canEdit: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canEdit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!NoteShapeUtil#component:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component(shape: " + }, + { + "kind": "Reference", + "text": "TLNoteShape", + "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "component" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!NoteShapeUtil#getDefaultProps:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDefaultProps(): " + }, + { + "kind": "Reference", + "text": "TLNoteShape", + "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" + }, + { + "kind": "Content", + "text": "['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDefaultProps" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!NoteShapeUtil#getGeometry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getGeometry(shape: " + }, + { + "kind": "Reference", + "text": "TLNoteShape", + "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Rectangle2d", + "canonicalReference": "@tldraw/editor!Rectangle2d:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getGeometry" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!NoteShapeUtil#getHeight:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getHeight(shape: " + }, + { + "kind": "Reference", + "text": "TLNoteShape", + "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getHeight" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!NoteShapeUtil#hideResizeHandles:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideResizeHandles: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideResizeHandles", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!NoteShapeUtil#hideSelectionBoundsFg:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideSelectionBoundsFg: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hideSelectionBoundsFg", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!NoteShapeUtil#indicator:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "indicator(shape: " + }, + { + "kind": "Reference", + "text": "TLNoteShape", + "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!NoteShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!NoteShapeUtil#onBeforeCreate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBeforeCreate: " + }, + { + "kind": "Content", + "text": "(next: " + }, + { + "kind": "Reference", + "text": "TLNoteShape", + "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" + }, + { + "kind": "Content", + "text": ") => {\n props: {\n growY: number;\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n verticalAlign: \"end\" | \"middle\" | \"start\";\n url: string;\n text: string;\n };\n type: \"note\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n id: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n typeName: \"shape\";\n } | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onBeforeCreate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 12 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!NoteShapeUtil#onBeforeUpdate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBeforeUpdate: " + }, + { + "kind": "Content", + "text": "(prev: " + }, + { + "kind": "Reference", + "text": "TLNoteShape", + "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" + }, + { + "kind": "Content", + "text": ", next: " + }, + { + "kind": "Reference", + "text": "TLNoteShape", + "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" + }, + { + "kind": "Content", + "text": ") => {\n props: {\n growY: number;\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n verticalAlign: \"end\" | \"middle\" | \"start\";\n url: string;\n text: string;\n };\n type: \"note\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n id: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n typeName: \"shape\";\n } | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onBeforeUpdate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 14 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!NoteShapeUtil#onEditEnd:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onEditEnd: " + }, + { + "kind": "Reference", + "text": "TLOnEditEndHandler", + "canonicalReference": "@tldraw/editor!TLOnEditEndHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLNoteShape", + "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onEditEnd", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!NoteShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props: " + }, + { + "kind": "Content", + "text": "{\n color: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n verticalAlign: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end\" | \"middle\" | \"start\">;\n growY: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n text: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 18 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!NoteShapeUtil#toSvg:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toSvg(shape: " + }, + { + "kind": "Reference", + "text": "TLNoteShape", + "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" + }, + { + "kind": "Content", + "text": ", ctx: " + }, + { + "kind": "Reference", + "text": "SvgExportContext", + "canonicalReference": "@tldraw/editor!SvgExportContext:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "ctx", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toSvg" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!NoteShapeUtil.type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "\"note\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!NoteToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function NoteToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "NoteToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!OfflineIndicator:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function OfflineIndicator(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/OfflineIndicator/OfflineIndicator.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "OfflineIndicator" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!OpacitySlider:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function OpacitySlider(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "OpacitySlider" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!OvalToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function OvalToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "OvalToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!PageItemInput:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "PageItemInput: ({ name, id, isCurrentPage, }: " + }, + { + "kind": "Content", + "text": "{\n name: string;\n id: " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ";\n isCurrentPage: boolean;\n}" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/PageMenu/PageItemInput.tsx", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ name, id, isCurrentPage, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "PageItemInput" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!PageItemSubmenu:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "PageItemSubmenu: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "MemoExoticComponent", + "canonicalReference": "@types/react!React.MemoExoticComponent:type" + }, + { + "kind": "Content", + "text": "<({ index, listSize, item, onRename, }: " + }, + { + "kind": "Reference", + "text": "PageItemSubmenuProps", + "canonicalReference": "tldraw!~PageItemSubmenuProps:interface" + }, + { + "kind": "Content", + "text": ") => import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/PageMenu/PageItemSubmenu.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "PageItemSubmenu", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!parseTldrawJsonFile:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function parseTldrawJsonFile({ json, schema, }: " + }, + { + "kind": "Content", + "text": "{\n schema: " + }, + { + "kind": "Reference", + "text": "TLSchema", + "canonicalReference": "@tldraw/tlschema!TLSchema:type" + }, + { + "kind": "Content", + "text": ";\n json: string;\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Result", + "canonicalReference": "@tldraw/utils!Result:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": ", " + }, + { + "kind": "Reference", + "text": "TldrawFileParseError", + "canonicalReference": "tldraw!~TldrawFileParseError:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/tldr/file.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ json, schema, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "parseTldrawJsonFile" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!PasteMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function PasteMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "PasteMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!PreferencesGroup:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function PreferencesGroup(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "PreferencesGroup" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!preloadFont:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function preloadFont(id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", font: " + }, + { + "kind": "Reference", + "text": "TLTypeFace", + "canonicalReference": "tldraw!~TLTypeFace:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "FontFace", + "canonicalReference": "!FontFace:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/assets/preload-font.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "font", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "preloadFont" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!PrintItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function PrintItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "PrintItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!RectangleToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function RectangleToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "RectangleToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!removeFrame:function(1)", + "docComment": "/**\n * Remove a frame.\n *\n * @param editor - tlraw editor instance.\n *\n * @param ids - Ids of the frames you wish to remove.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function removeFrame(editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ", ids: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/frames/frames.ts", + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "editor", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "ids", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + } + ], + "name": "removeFrame" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!RemoveFrameMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function RemoveFrameMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "RemoveFrameMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ReorderMenuItems:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ReorderMenuItems(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ReorderMenuItems" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ReorderMenuSubmenu:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ReorderMenuSubmenu(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ReorderMenuSubmenu" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!RhombusToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function RhombusToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "RhombusToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!RotateCWMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function RotateCWMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "RotateCWMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!SelectAllMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function SelectAllMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "SelectAllMenuItem" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!SelectTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class SelectTool extends " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/tools/SelectTool/SelectTool.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "SelectTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!SelectTool.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children: " + }, + { + "kind": "Content", + "text": "() => (typeof " + }, + { + "kind": "Reference", + "text": "Brushing", + "canonicalReference": "tldraw!~Brushing:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Crop", + "canonicalReference": "tldraw!~Crop:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Cropping", + "canonicalReference": "tldraw!~Cropping:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "DraggingHandle", + "canonicalReference": "tldraw!~DraggingHandle:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "EditingShape", + "canonicalReference": "tldraw!~EditingShape:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Idle", + "canonicalReference": "tldraw!~Idle_11:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "PointingArrowLabel", + "canonicalReference": "tldraw!~PointingArrowLabel:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "PointingCanvas", + "canonicalReference": "tldraw!~PointingCanvas:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "PointingCropHandle", + "canonicalReference": "tldraw!~PointingCropHandle:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "PointingHandle", + "canonicalReference": "tldraw!~PointingHandle:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "PointingResizeHandle", + "canonicalReference": "tldraw!~PointingResizeHandle:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "PointingRotateHandle", + "canonicalReference": "tldraw!~PointingRotateHandle:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "PointingSelection", + "canonicalReference": "tldraw!~PointingSelection:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "PointingShape", + "canonicalReference": "tldraw!~PointingShape:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Resizing", + "canonicalReference": "tldraw!~Resizing:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Rotating", + "canonicalReference": "tldraw!~Rotating:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "ScribbleBrushing", + "canonicalReference": "tldraw!~ScribbleBrushing:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Translating", + "canonicalReference": "tldraw!~Translating:class" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 38 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!SelectTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!SelectTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!SelectTool#onEnter:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onEnter: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onEnter", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!SelectTool#onExit:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onExit: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onExit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!SelectTool#reactor:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "reactor: " + }, + { + "kind": "Content", + "text": "(() => void) | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "reactor", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!SelectToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function SelectToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "SelectToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!serializeTldrawJson:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function serializeTldrawJson(store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/tldr/file.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "store", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "serializeTldrawJson" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!serializeTldrawJsonBlob:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function serializeTldrawJsonBlob(store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Blob", + "canonicalReference": "!Blob:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/tldr/file.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "store", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "serializeTldrawJsonBlob" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!setDefaultEditorAssetUrls:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function setDefaultEditorAssetUrls(assetUrls: " + }, + { + "kind": "Reference", + "text": "TLEditorAssetUrls", + "canonicalReference": "tldraw!~TLEditorAssetUrls:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/static-assets/assetUrls.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "assetUrls", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "setDefaultEditorAssetUrls" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!SplineStylePickerSet:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function SplineStylePickerSet({ styles }: " + }, + { + "kind": "Content", + "text": "{\n styles: " + }, + { + "kind": "Reference", + "text": "ReadonlySharedStyleMap", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 8 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ styles }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "SplineStylePickerSet" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!StackMenuItems:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function StackMenuItems(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "StackMenuItems" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!StarToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function StarToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "StarToolbarItem" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!TEXT_PROPS:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TEXT_PROPS: " + }, + { + "kind": "Content", + "text": "{\n lineHeight: number;\n fontWeight: string;\n fontVariant: string;\n fontStyle: string;\n padding: string;\n}" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/default-shape-constants.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "TEXT_PROPS", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!TextLabel:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TextLabel: " + }, + { + "kind": "Reference", + "text": "React.NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TextLabelProps", + "canonicalReference": "tldraw!~TextLabelProps:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/TextLabel.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "TextLabel", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Class", + "canonicalReference": "tldraw!TextShapeTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class TextShapeTool extends " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/text/TextShapeTool.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "TextShapeTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeTool.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children: " + }, + { + "kind": "Content", + "text": "() => (typeof " + }, + { + "kind": "Reference", + "text": "Idle", + "canonicalReference": "tldraw!~Idle_6:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Pointing", + "canonicalReference": "tldraw!~Pointing_5:class" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeTool#shapeType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapeType: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "shapeType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "tldraw!TextShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class TextShapeUtil extends " + }, + { + "kind": "Reference", + "text": "ShapeUtil", + "canonicalReference": "@tldraw/editor!ShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/text/TextShapeUtil.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "TextShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeUtil#canEdit:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canEdit: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canEdit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!TextShapeUtil#component:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component(shape: " + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "component" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!TextShapeUtil#getDefaultProps:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDefaultProps(): " + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": "['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDefaultProps" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!TextShapeUtil#getGeometry:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getGeometry(shape: " + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Rectangle2d", + "canonicalReference": "@tldraw/editor!Rectangle2d:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getGeometry" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!TextShapeUtil#getMinDimensions:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getMinDimensions(shape: " + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n height: number;\n width: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getMinDimensions" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!TextShapeUtil#indicator:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "indicator(shape: " + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeUtil#isAspectRatioLocked:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isAspectRatioLocked: " + }, + { + "kind": "Reference", + "text": "TLShapeUtilFlag", + "canonicalReference": "@tldraw/editor!TLShapeUtilFlag:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isAspectRatioLocked", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeUtil#onBeforeCreate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBeforeCreate: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": ") => {\n x: number;\n y: number;\n type: \"text\";\n rotation: number;\n index: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n opacity: number;\n props: {\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n w: number;\n text: string;\n scale: number;\n autoSize: boolean;\n };\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n id: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n typeName: \"shape\";\n } | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onBeforeCreate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 12 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeUtil#onBeforeUpdate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBeforeUpdate: " + }, + { + "kind": "Content", + "text": "(prev: " + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": ", next: " + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": ") => {\n x: number;\n y: number;\n props: {\n w: number;\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n text: string;\n scale: number;\n autoSize: boolean;\n };\n type: \"text\";\n rotation: number;\n index: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n id: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n typeName: \"shape\";\n } | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onBeforeUpdate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 14 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeUtil#onDoubleClickEdge:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onDoubleClickEdge: " + }, + { + "kind": "Content", + "text": "(shape: " + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": ") => {\n id: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n type: \"text\";\n props: {\n autoSize: boolean;\n scale?: undefined;\n };\n } | {\n id: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n type: \"text\";\n props: {\n scale: number;\n autoSize?: undefined;\n };\n } | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onDoubleClickEdge", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeUtil#onEditEnd:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onEditEnd: " + }, + { + "kind": "Reference", + "text": "TLOnEditEndHandler", + "canonicalReference": "@tldraw/editor!TLOnEditEndHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onEditEnd", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeUtil#onResize:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onResize: " + }, + { + "kind": "Reference", + "text": "TLOnResizeHandler", + "canonicalReference": "@tldraw/editor!TLOnResizeHandler:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onResize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props: " + }, + { + "kind": "Content", + "text": "{\n color: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n w: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n text: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n scale: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n autoSize: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 18 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!TextShapeUtil#toSvg:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toSvg(shape: " + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": ", ctx: " + }, + { + "kind": "Reference", + "text": "SvgExportContext", + "canonicalReference": "@tldraw/editor!SvgExportContext:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "ctx", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toSvg" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!TextShapeUtil.type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "\"text\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TextStylePickerSet:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TextStylePickerSet({ theme, styles, }: " + }, + { + "kind": "Content", + "text": "{\n theme: " + }, + { + "kind": "Reference", + "text": "TLDefaultColorTheme", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type" + }, + { + "kind": "Content", + "text": ";\n styles: " + }, + { + "kind": "Reference", + "text": "ReadonlySharedStyleMap", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ theme, styles, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isOptional": false + } + ], + "name": "TextStylePickerSet" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TextToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TextToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "TextToolbarItem" + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLComponents:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLComponents = " + }, + { + "kind": "Reference", + "text": "Expand", + "canonicalReference": "@tldraw/utils!Expand:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLEditorComponents", + "canonicalReference": "@tldraw/editor!TLEditorComponents:type" + }, + { + "kind": "Content", + "text": " & " + }, + { + "kind": "Reference", + "text": "TLUiComponents", + "canonicalReference": "tldraw!TLUiComponents:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/Tldraw.tsx", + "releaseTag": "Public", + "name": "TLComponents", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!TLDRAW_FILE_EXTENSION:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TLDRAW_FILE_EXTENSION: " + }, + { + "kind": "Content", + "text": "\".tldr\"" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/tldr/file.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "TLDRAW_FILE_EXTENSION", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!Tldraw:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function Tldraw(props: " + }, + { + "kind": "Reference", + "text": "TldrawProps", + "canonicalReference": "tldraw!TldrawProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/Tldraw.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "props", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "Tldraw" + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TldrawFile:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TldrawFile " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/tldr/file.ts", + "releaseTag": "Public", + "name": "TldrawFile", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawFile#records:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "records: " + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "records", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawFile#schema:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "schema: " + }, + { + "kind": "Reference", + "text": "SerializedSchema", + "canonicalReference": "@tldraw/store!SerializedSchema:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "schema", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawFile#tldrawFileFormatVersion:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "tldrawFileFormatVersion: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "tldrawFileFormatVersion", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawHandles:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawHandles({ children }: " + }, + { + "kind": "Reference", + "text": "TLHandlesProps", + "canonicalReference": "@tldraw/editor!TLHandlesProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/canvas/TldrawHandles.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawHandles" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawHoveredShapeIndicator:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawHoveredShapeIndicator({ shapeId }: " + }, + { + "kind": "Reference", + "text": "TLHoveredShapeIndicatorProps", + "canonicalReference": "@tldraw/editor!TLHoveredShapeIndicatorProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/canvas/TldrawHoveredShapeIndicator.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ shapeId }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawHoveredShapeIndicator" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!TldrawImage:var", + "docComment": "/**\n * A renderered SVG image of a Tldraw snapshot.\n *\n * @example\n * ```tsx\n * \n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TldrawImage: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<{\n snapshot: " + }, + { + "kind": "Reference", + "text": "StoreSnapshot", + "canonicalReference": "@tldraw/store!StoreSnapshot:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ">;\n format?: \"png\" | \"svg\" | undefined;\n pageId?: " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": " | undefined;\n shapeUtils?: readonly " + }, + { + "kind": "Reference", + "text": "TLAnyShapeUtilConstructor", + "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" + }, + { + "kind": "Content", + "text": "[] | undefined;\n bounds?: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": " | undefined;\n scale?: number | undefined;\n background?: boolean | undefined;\n padding?: number | undefined;\n darkMode?: boolean | undefined;\n preserveAspectRatio?: string | undefined;\n}>" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/TldrawImage.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "TldrawImage", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 14 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TldrawImageProps:type", + "docComment": "/**\n * Props for the {@link tldraw#TldrawImage} component.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TldrawImageProps = " + }, + { + "kind": "Reference", + "text": "Expand", + "canonicalReference": "@tldraw/utils!Expand:type" + }, + { + "kind": "Content", + "text": "<{\n snapshot: " + }, + { + "kind": "Reference", + "text": "StoreSnapshot", + "canonicalReference": "@tldraw/store!StoreSnapshot:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ">;\n format?: 'png' | 'svg';\n pageId?: " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ";\n shapeUtils?: readonly " + }, + { + "kind": "Reference", + "text": "TLAnyShapeUtilConstructor", + "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" + }, + { + "kind": "Content", + "text": "[];\n} & " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLSvgOptions", + "canonicalReference": "@tldraw/editor!TLSvgOptions:type" + }, + { + "kind": "Content", + "text": ">>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/TldrawImage.tsx", + "releaseTag": "Public", + "name": "TldrawImageProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 15 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TldrawProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TldrawProps = " + }, + { + "kind": "Reference", + "text": "Expand", + "canonicalReference": "@tldraw/utils!Expand:type" + }, + { + "kind": "Content", + "text": "<(" + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TldrawUiProps", + "canonicalReference": "tldraw!TldrawUiProps:type" + }, + { + "kind": "Content", + "text": ", 'components'> & " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TldrawEditorBaseProps", + "canonicalReference": "@tldraw/editor!TldrawEditorBaseProps:interface" + }, + { + "kind": "Content", + "text": ", 'components'> & {\n components?: " + }, + { + "kind": "Reference", + "text": "TLComponents", + "canonicalReference": "tldraw!TLComponents:type" + }, + { + "kind": "Content", + "text": ";\n}) & " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLExternalContentProps", + "canonicalReference": "tldraw!~TLExternalContentProps:type" + }, + { + "kind": "Content", + "text": "> & ({\n store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLStoreWithStatus", + "canonicalReference": "@tldraw/editor!TLStoreWithStatus:type" + }, + { + "kind": "Content", + "text": ";\n} | {\n store?: undefined;\n persistenceKey?: string;\n sessionId?: string;\n defaultName?: string;\n snapshot?: " + }, + { + "kind": "Reference", + "text": "StoreSnapshot", + "canonicalReference": "@tldraw/store!StoreSnapshot:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ">;\n})>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/Tldraw.tsx", + "releaseTag": "Public", + "name": "TldrawProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 25 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawScribble:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawScribble({ scribble, zoom, color, opacity, className }: " + }, + { + "kind": "Reference", + "text": "TLScribbleProps", + "canonicalReference": "@tldraw/editor!TLScribbleProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/canvas/TldrawScribble.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ scribble, zoom, color, opacity, className }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawScribble" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawSelectionBackground:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TldrawSelectionBackground: ({ bounds, rotation }: " + }, + { + "kind": "Reference", + "text": "TLSelectionBackgroundProps", + "canonicalReference": "@tldraw/editor!TLSelectionBackgroundProps:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/canvas/TldrawSelectionBackground.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ bounds, rotation }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawSelectionBackground" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!TldrawSelectionForeground:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TldrawSelectionForeground: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "MemoExoticComponent", + "canonicalReference": "@types/react!React.MemoExoticComponent:type" + }, + { + "kind": "Content", + "text": "<({ bounds, rotation, }: " + }, + { + "kind": "Reference", + "text": "TLSelectionForegroundProps", + "canonicalReference": "@tldraw/editor!TLSelectionForegroundProps:type" + }, + { + "kind": "Content", + "text": ") => import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null>" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/canvas/TldrawSelectionForeground.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "TldrawSelectionForeground", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!TldrawUi:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TldrawUi: " + }, + { + "kind": "Reference", + "text": "React.NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<{\n children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n hideUi?: boolean | undefined;\n components?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n ContextMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n ActionsMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n HelpMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n ZoomMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n MainMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n Minimap: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n StylePanel: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n PageMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n NavigationPanel: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n Toolbar: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n KeyboardShortcutsDialog: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n QuickActions: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n HelperButtons: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n DebugPanel: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n DebugMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n MenuPanel: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n TopPanel: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n SharePanel: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n }> | undefined;\n renderDebugMenuItems?: (() => " + }, + { + "kind": "Reference", + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ") | undefined;\n assetUrls?: (import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "RecursivePartial", + "canonicalReference": "@tldraw/utils!RecursivePartial:type" + }, + { + "kind": "Content", + "text": " & import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "RecursivePartial", + "canonicalReference": "@tldraw/utils!RecursivePartial:type" + }, + { + "kind": "Content", + "text": ") | undefined;\n overrides?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n actions: import(\"./overrides\")." + }, + { + "kind": "Reference", + "text": "TLUiOverride", + "canonicalReference": "tldraw!~TLUiOverride:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": ") => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n tools: import(\"./overrides\")." + }, + { + "kind": "Reference", + "text": "TLUiOverride", + "canonicalReference": "tldraw!~TLUiOverride:type" + }, + { + "kind": "Content", + "text": " void;\n } & {\n addToast: (toast: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": ") => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n translations: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "> | undefined;\n }> | " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n actions: import(\"./overrides\")." + }, + { + "kind": "Reference", + "text": "TLUiOverride", + "canonicalReference": "tldraw!~TLUiOverride:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": ") => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n tools: import(\"./overrides\")." + }, + { + "kind": "Reference", + "text": "TLUiOverride", + "canonicalReference": "tldraw!~TLUiOverride:type" + }, + { + "kind": "Content", + "text": " void;\n } & {\n addToast: (toast: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": ") => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n translations: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "> | undefined;\n }>[] | undefined;\n onUiEvent?: import(\"./context/events\")." + }, + { + "kind": "Reference", + "text": "TLUiEventHandler", + "canonicalReference": "tldraw!TLUiEventHandler:type" + }, + { + "kind": "Content", + "text": " | undefined;\n forceMobile?: boolean | undefined;\n}>" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/TldrawUi.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "TldrawUi", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 149 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TldrawUiBaseProps:interface", + "docComment": "/**\n * Base props for the {@link tldraw#Tldraw} and {@link TldrawUi} components.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TldrawUiBaseProps " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/TldrawUi.tsx", + "releaseTag": "Public", + "name": "TldrawUiBaseProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawUiBaseProps#assetUrls:member", + "docComment": "/**\n * Asset URL override.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "assetUrls?: " + }, + { + "kind": "Reference", + "text": "TLUiAssetUrlOverrides", + "canonicalReference": "tldraw!TLUiAssetUrlOverrides:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "assetUrls", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawUiBaseProps#children:member", + "docComment": "/**\n * The component's children.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawUiBaseProps#components:member", + "docComment": "/**\n * Overrides for the UI components.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "components?: " + }, + { + "kind": "Reference", + "text": "TLUiComponents", + "canonicalReference": "tldraw!TLUiComponents:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "components", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawUiBaseProps#hideUi:member", + "docComment": "/**\n * Whether to hide the user interface and only display the canvas.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hideUi?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "hideUi", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawUiBaseProps#renderDebugMenuItems:member", + "docComment": "/**\n * Additional items to add to the debug menu (will be deprecated)\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderDebugMenuItems?: " + }, + { + "kind": "Content", + "text": "() => " + }, + { + "kind": "Reference", + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "renderDebugMenuItems", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!TldrawUiButton:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TldrawUiButton: " + }, + { + "kind": "Reference", + "text": "React.ForwardRefExoticComponent", + "canonicalReference": "@types/react!React.ForwardRefExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiButtonProps", + "canonicalReference": "tldraw!TLUiButtonProps:interface" + }, + { + "kind": "Content", + "text": " & " + }, + { + "kind": "Reference", + "text": "React.RefAttributes", + "canonicalReference": "@types/react!React.RefAttributes:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "HTMLButtonElement", + "canonicalReference": "!HTMLButtonElement:interface" + }, + { + "kind": "Content", + "text": ">>" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButton.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "TldrawUiButton", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 9 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiButtonCheck:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiButtonCheck({ checked }: " + }, + { + "kind": "Reference", + "text": "TLUiButtonCheckProps", + "canonicalReference": "tldraw!TLUiButtonCheckProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButtonCheck.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ checked }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiButtonCheck" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiButtonIcon:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiButtonIcon({ icon, small, invertIcon }: " + }, + { + "kind": "Reference", + "text": "TLUiButtonIconProps", + "canonicalReference": "tldraw!TLUiButtonIconProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButtonIcon.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ icon, small, invertIcon }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiButtonIcon" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiButtonLabel:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiButtonLabel({ children }: " + }, + { + "kind": "Reference", + "text": "TLUiButtonLabelProps", + "canonicalReference": "tldraw!TLUiButtonLabelProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButtonLabel.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiButtonLabel" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!TldrawUiButtonPicker:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TldrawUiButtonPicker: " + }, + { + "kind": "Content", + "text": "typeof " + }, + { + "kind": "Reference", + "text": "_TldrawUiButtonPicker", + "canonicalReference": "tldraw!~_TldrawUiButtonPicker:function" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiButtonPicker.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "TldrawUiButtonPicker", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiComponentsProvider:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiComponentsProvider({ overrides, children, }: " + }, + { + "kind": "Reference", + "text": "TLUiComponentsProviderProps", + "canonicalReference": "tldraw!TLUiComponentsProviderProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/components.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ overrides, children, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiComponentsProvider" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiContextProvider:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiContextProvider({ overrides, components, assetUrls, onUiEvent, forceMobile, children, }: " + }, + { + "kind": "Reference", + "text": "TldrawUiContextProviderProps", + "canonicalReference": "tldraw!TldrawUiContextProviderProps:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/TldrawUiContextProvider.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ overrides, components, assetUrls, onUiEvent, forceMobile, children, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiContextProvider" + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TldrawUiContextProviderProps:interface", + "docComment": "/**\n * Props for the {@link tldraw#Tldraw} and {@link TldrawUi} components.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TldrawUiContextProviderProps " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/TldrawUiContextProvider.tsx", + "releaseTag": "Public", + "name": "TldrawUiContextProviderProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawUiContextProviderProps#assetUrls:member", + "docComment": "/**\n * Urls for where to find fonts and other assets for the UI.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "assetUrls?: " + }, + { + "kind": "Reference", + "text": "RecursivePartial", + "canonicalReference": "@tldraw/utils!RecursivePartial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiAssetUrls", + "canonicalReference": "tldraw!~TLUiAssetUrls:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "assetUrls", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawUiContextProviderProps#children:member", + "docComment": "/**\n * The component's children.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawUiContextProviderProps#components:member", + "docComment": "/**\n * Overrides for the UI components.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "components?: " + }, + { + "kind": "Reference", + "text": "TLUiComponents", + "canonicalReference": "tldraw!TLUiComponents:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "components", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawUiContextProviderProps#forceMobile:member", + "docComment": "/**\n * Whether to always should the mobile breakpoints.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "forceMobile?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "forceMobile", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawUiContextProviderProps#onUiEvent:member", + "docComment": "/**\n * Callback for when an event occurs in the UI.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onUiEvent?: " + }, + { + "kind": "Reference", + "text": "TLUiEventHandler", + "canonicalReference": "tldraw!TLUiEventHandler:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onUiEvent", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TldrawUiContextProviderProps#overrides:member", + "docComment": "/**\n * Overrides for the UI.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "overrides?: " + }, + { + "kind": "Reference", + "text": "TLUiOverrides", + "canonicalReference": "tldraw!TLUiOverrides:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLUiOverrides", + "canonicalReference": "tldraw!TLUiOverrides:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "overrides", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDialogBody:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDialogBody({ className, children, style }: " + }, + { + "kind": "Reference", + "text": "TLUiDialogBodyProps", + "canonicalReference": "tldraw!TLUiDialogBodyProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ className, children, style }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiDialogBody" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDialogCloseButton:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDialogCloseButton(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "TldrawUiDialogCloseButton" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDialogFooter:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDialogFooter({ className, children }: " + }, + { + "kind": "Reference", + "text": "TLUiDialogFooterProps", + "canonicalReference": "tldraw!TLUiDialogFooterProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ className, children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiDialogFooter" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDialogHeader:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDialogHeader({ className, children }: " + }, + { + "kind": "Reference", + "text": "TLUiDialogHeaderProps", + "canonicalReference": "tldraw!TLUiDialogHeaderProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ className, children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiDialogHeader" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDialogTitle:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDialogTitle({ className, children }: " + }, + { + "kind": "Reference", + "text": "TLUiDialogTitleProps", + "canonicalReference": "tldraw!TLUiDialogTitleProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ className, children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiDialogTitle" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDropdownMenuCheckboxItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDropdownMenuCheckboxItem({ children, onSelect, ...rest }: " + }, + { + "kind": "Reference", + "text": "TLUiDropdownMenuCheckboxItemProps", + "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children, onSelect, ...rest }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiDropdownMenuCheckboxItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDropdownMenuContent:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDropdownMenuContent({ side, align, sideOffset, alignOffset, children, }: " + }, + { + "kind": "Reference", + "text": "TLUiDropdownMenuContentProps", + "canonicalReference": "tldraw!TLUiDropdownMenuContentProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ side, align, sideOffset, alignOffset, children, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiDropdownMenuContent" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDropdownMenuGroup:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDropdownMenuGroup({ children }: " + }, + { + "kind": "Reference", + "text": "TLUiDropdownMenuGroupProps", + "canonicalReference": "tldraw!TLUiDropdownMenuGroupProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiDropdownMenuGroup" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDropdownMenuIndicator:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDropdownMenuIndicator(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "TldrawUiDropdownMenuIndicator" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDropdownMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDropdownMenuItem({ noClose, children }: " + }, + { + "kind": "Reference", + "text": "TLUiDropdownMenuItemProps", + "canonicalReference": "tldraw!TLUiDropdownMenuItemProps:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ noClose, children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiDropdownMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDropdownMenuRoot:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDropdownMenuRoot({ id, children, modal, debugOpen, }: " + }, + { + "kind": "Reference", + "text": "TLUiDropdownMenuRootProps", + "canonicalReference": "tldraw!TLUiDropdownMenuRootProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ id, children, modal, debugOpen, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiDropdownMenuRoot" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDropdownMenuSub:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDropdownMenuSub({ id, children }: " + }, + { + "kind": "Reference", + "text": "TLUiDropdownMenuSubProps", + "canonicalReference": "tldraw!TLUiDropdownMenuSubProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ id, children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiDropdownMenuSub" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDropdownMenuSubTrigger:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDropdownMenuSubTrigger({ id, label, title, disabled, }: " + }, + { + "kind": "Reference", + "text": "TLUiDropdownMenuSubTriggerProps", + "canonicalReference": "tldraw!TLUiDropdownMenuSubTriggerProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ id, label, title, disabled, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiDropdownMenuSubTrigger" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiDropdownMenuTrigger:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiDropdownMenuTrigger({ children, ...rest }: " + }, + { + "kind": "Reference", + "text": "TLUiDropdownMenuTriggerProps", + "canonicalReference": "tldraw!TLUiDropdownMenuTriggerProps:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children, ...rest }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiDropdownMenuTrigger" + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!TldrawUiIcon:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TldrawUiIcon: " + }, + { + "kind": "Content", + "text": "import(\"react\")." + }, + { + "kind": "Reference", + "text": "NamedExoticComponent", + "canonicalReference": "@types/react!React.NamedExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiIconProps", + "canonicalReference": "tldraw!TLUiIconProps:interface" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiIcon.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "TldrawUiIcon", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Variable", + "canonicalReference": "tldraw!TldrawUiInput:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TldrawUiInput: " + }, + { + "kind": "Reference", + "text": "React.ForwardRefExoticComponent", + "canonicalReference": "@types/react!React.ForwardRefExoticComponent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiInputProps", + "canonicalReference": "tldraw!TLUiInputProps:interface" + }, + { + "kind": "Content", + "text": " & " + }, + { + "kind": "Reference", + "text": "React.RefAttributes", + "canonicalReference": "@types/react!React.RefAttributes:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "HTMLInputElement", + "canonicalReference": "!HTMLInputElement:interface" + }, + { + "kind": "Content", + "text": ">>" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiInput.tsx", + "isReadonly": true, + "releaseTag": "Public", + "name": "TldrawUiInput", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 9 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiKbd:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiKbd({ children, visibleOnMobileLayout }: " + }, + { + "kind": "Reference", + "text": "TLUiKbdProps", + "canonicalReference": "tldraw!TLUiKbdProps:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiKbd.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children, visibleOnMobileLayout }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiKbd" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiMenuCheckboxItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiMenuCheckboxItem({ id, kbd, label, readonlyOk, onSelect, disabled, checked, }: " + }, + { + "kind": "Reference", + "text": "TLUiMenuCheckboxItemProps", + "canonicalReference": "tldraw!TLUiMenuCheckboxItemProps:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.tsx", + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 15 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ id, kbd, label, readonlyOk, onSelect, disabled, checked, }", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 11 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "TranslationKey", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "typeParameterName": "IconType", + "constraintTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "defaultTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + } + } + ], + "name": "TldrawUiMenuCheckboxItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiMenuContextProvider:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiMenuContextProvider({ type, sourceId, children, }: " + }, + { + "kind": "Reference", + "text": "TLUiMenuContextProviderProps", + "canonicalReference": "tldraw!TLUiMenuContextProviderProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuContext.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ type, sourceId, children, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiMenuContextProvider" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiMenuGroup:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiMenuGroup({ id, label, children }: " + }, + { + "kind": "Reference", + "text": "TLUiMenuGroupProps", + "canonicalReference": "tldraw!TLUiMenuGroupProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean | import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "Iterable", + "canonicalReference": "!Iterable:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": "> | null | number | string | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuGroup.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ id, label, children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiMenuGroup" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiMenuItem({ disabled, spinner, readonlyOk, id, kbd, label, icon, onSelect, noClose, isSelected, }: " + }, + { + "kind": "Reference", + "text": "TLUiMenuItemProps", + "canonicalReference": "tldraw!TLUiMenuItemProps:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx", + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 15 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ disabled, spinner, readonlyOk, id, kbd, label, icon, onSelect, noClose, isSelected, }", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 11 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "TranslationKey", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "typeParameterName": "IconType", + "constraintTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "defaultTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + } + } + ], + "name": "TldrawUiMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiMenuSubmenu:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiMenuSubmenu({ id, disabled, label, size, children, }: " + }, + { + "kind": "Reference", + "text": "TLUiMenuSubmenuProps", + "canonicalReference": "tldraw!TLUiMenuSubmenuProps:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean | import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "Iterable", + "canonicalReference": "!Iterable:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": "> | null | number | string | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuSubmenu.tsx", + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 15 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ id, disabled, label, size, children, }", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "Translation", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "name": "TldrawUiMenuSubmenu" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiPopover:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiPopover({ id, children, onOpenChange, open }: " + }, + { + "kind": "Reference", + "text": "TLUiPopoverProps", + "canonicalReference": "tldraw!TLUiPopoverProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiPopover.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ id, children, onOpenChange, open }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiPopover" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiPopoverContent:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiPopoverContent({ side, children, align, sideOffset, alignOffset, }: " + }, + { + "kind": "Reference", + "text": "TLUiPopoverContentProps", + "canonicalReference": "tldraw!TLUiPopoverContentProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiPopover.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ side, children, align, sideOffset, alignOffset, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiPopoverContent" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TldrawUiPopoverTrigger:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TldrawUiPopoverTrigger({ children }: " + }, + { + "kind": "Reference", + "text": "TLUiPopoverTriggerProps", + "canonicalReference": "tldraw!TLUiPopoverTriggerProps:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiPopover.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "TldrawUiPopoverTrigger" + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TldrawUiProps:type", + "docComment": "/**\n * Props for the {@link tldraw#Tldraw} and {@link TldrawUi} components.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TldrawUiProps = " + }, + { + "kind": "Reference", + "text": "Expand", + "canonicalReference": "@tldraw/utils!Expand:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TldrawUiBaseProps", + "canonicalReference": "tldraw!TldrawUiBaseProps:interface" + }, + { + "kind": "Content", + "text": " & " + }, + { + "kind": "Reference", + "text": "TldrawUiContextProviderProps", + "canonicalReference": "tldraw!TldrawUiContextProviderProps:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/TldrawUi.tsx", + "releaseTag": "Public", + "name": "TldrawUiProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiActionItem:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiActionItem " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/actions.tsx", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TransationKey", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "typeParameterName": "IconType", + "constraintTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "defaultTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + } + } + ], + "name": "TLUiActionItem", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiActionItem#checkbox:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "checkbox?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "checkbox", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiActionItem#icon:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "icon?: " + }, + { + "kind": "Content", + "text": "IconType" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "icon", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiActionItem#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiActionItem#kbd:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "kbd?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "kbd", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiActionItem#label:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "label?: " + }, + { + "kind": "Content", + "text": "{\n [key: string]: TransationKey;\n } | TransationKey" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "label", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiActionItem#onSelect:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onSelect: " + }, + { + "kind": "Content", + "text": "(source: " + }, + { + "kind": "Reference", + "text": "TLUiEventSource", + "canonicalReference": "tldraw!TLUiEventSource:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": " | void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onSelect", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiActionItem#readonlyOk:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonlyOk?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "readonlyOk", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiActionsContextType:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiActionsContextType = " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/actions.tsx", + "releaseTag": "Public", + "name": "TLUiActionsContextType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiActionsMenuProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiActionsMenuProps = " + }, + { + "kind": "Content", + "text": "{\n children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx", + "releaseTag": "Public", + "name": "TLUiActionsMenuProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiAssetUrlOverrides:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiAssetUrlOverrides = " + }, + { + "kind": "Reference", + "text": "RecursivePartial", + "canonicalReference": "@tldraw/utils!RecursivePartial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiAssetUrls", + "canonicalReference": "tldraw!~TLUiAssetUrls:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/assetUrls.ts", + "releaseTag": "Public", + "name": "TLUiAssetUrlOverrides", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiButtonCheckProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiButtonCheckProps = " + }, + { + "kind": "Content", + "text": "{\n checked: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButtonCheck.tsx", + "releaseTag": "Public", + "name": "TLUiButtonCheckProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiButtonIconProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiButtonIconProps = " + }, + { + "kind": "Content", + "text": "{\n icon: string;\n small?: boolean;\n invertIcon?: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButtonIcon.tsx", + "releaseTag": "Public", + "name": "TLUiButtonIconProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiButtonLabelProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiButtonLabelProps = " + }, + { + "kind": "Content", + "text": "{\n children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButtonLabel.tsx", + "releaseTag": "Public", + "name": "TLUiButtonLabelProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiButtonPickerProps:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiButtonPickerProps " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiButtonPicker.tsx", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "TLUiButtonPickerProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiButtonPickerProps#items:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "items: " + }, + { + "kind": "Reference", + "text": "StyleValuesForUi", + "canonicalReference": "tldraw!~StyleValuesForUi:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "items", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiButtonPickerProps#onValueChange:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onValueChange: " + }, + { + "kind": "Content", + "text": "(style: " + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": ", value: T, squashing: boolean) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onValueChange", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiButtonPickerProps#style:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "style: " + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "style", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiButtonPickerProps#theme:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "theme: " + }, + { + "kind": "Reference", + "text": "TLDefaultColorTheme", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "theme", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiButtonPickerProps#title:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "title: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "title", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiButtonPickerProps#uiType:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "uiType: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "uiType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiButtonPickerProps#value:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "value: " + }, + { + "kind": "Reference", + "text": "SharedStyle", + "canonicalReference": "@tldraw/editor!SharedStyle:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "value", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiButtonProps:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiButtonProps extends " + }, + { + "kind": "Reference", + "text": "React.HTMLAttributes", + "canonicalReference": "@types/react!React.HTMLAttributes:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "HTMLButtonElement", + "canonicalReference": "!HTMLButtonElement:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/Button/TldrawUiButton.tsx", + "releaseTag": "Public", + "name": "TLUiButtonProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiButtonProps#disabled:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "disabled?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "disabled", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiButtonProps#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "'danger' | 'help' | 'icon' | 'low' | 'menu' | 'normal' | 'primary' | 'tool'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 5 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiComponents:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiComponents = " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n [K in keyof " + }, + { + "kind": "Reference", + "text": "BaseTLUiComponents", + "canonicalReference": "tldraw!~BaseTLUiComponents:interface" + }, + { + "kind": "Content", + "text": "]: " + }, + { + "kind": "Reference", + "text": "BaseTLUiComponents", + "canonicalReference": "tldraw!~BaseTLUiComponents:interface" + }, + { + "kind": "Content", + "text": "[K] | null;\n}>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/components.tsx", + "releaseTag": "Public", + "name": "TLUiComponents", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiComponentsProviderProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiComponentsProviderProps = " + }, + { + "kind": "Content", + "text": "{\n overrides?: " + }, + { + "kind": "Reference", + "text": "TLUiComponents", + "canonicalReference": "tldraw!TLUiComponents:type" + }, + { + "kind": "Content", + "text": ";\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/components.tsx", + "releaseTag": "Public", + "name": "TLUiComponentsProviderProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiContextMenuProps:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiContextMenuProps " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ContextMenu/DefaultContextMenu.tsx", + "releaseTag": "Public", + "name": "TLUiContextMenuProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiContextMenuProps#children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiDebugMenuProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiDebugMenuProps = " + }, + { + "kind": "Content", + "text": "{\n children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/DebugMenu/DefaultDebugMenu.tsx", + "releaseTag": "Public", + "name": "TLUiDebugMenuProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiDialog:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiDialog " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/dialogs.tsx", + "releaseTag": "Public", + "name": "TLUiDialog", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiDialog#component:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiDialogProps", + "canonicalReference": "tldraw!TLUiDialogProps:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "component", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiDialog#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiDialog#onClose:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onClose?: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onClose", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiDialogBodyProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiDialogBodyProps = " + }, + { + "kind": "Content", + "text": "{\n className?: string;\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n style?: " + }, + { + "kind": "Reference", + "text": "React.CSSProperties", + "canonicalReference": "@types/react!React.CSSProperties:interface" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", + "releaseTag": "Public", + "name": "TLUiDialogBodyProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiDialogFooterProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiDialogFooterProps = " + }, + { + "kind": "Content", + "text": "{\n className?: string;\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", + "releaseTag": "Public", + "name": "TLUiDialogFooterProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiDialogHeaderProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiDialogHeaderProps = " + }, + { + "kind": "Content", + "text": "{\n className?: string;\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", + "releaseTag": "Public", + "name": "TLUiDialogHeaderProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiDialogProps:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiDialogProps " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/dialogs.tsx", + "releaseTag": "Public", + "name": "TLUiDialogProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiDialogProps#onClose:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onClose: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onClose", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiDialogsContextType:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiDialogsContextType = " + }, + { + "kind": "Content", + "text": "{\n addDialog: (dialog: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiDialog", + "canonicalReference": "tldraw!TLUiDialog:interface" + }, + { + "kind": "Content", + "text": ", 'id'> & {\n id?: string;\n }) => string;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiDialog", + "canonicalReference": "tldraw!TLUiDialog:interface" + }, + { + "kind": "Content", + "text": ">) => string;\n clearDialogs: () => void;\n dialogs: " + }, + { + "kind": "Reference", + "text": "TLUiDialog", + "canonicalReference": "tldraw!TLUiDialog:interface" + }, + { + "kind": "Content", + "text": "[];\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/dialogs.tsx", + "releaseTag": "Public", + "name": "TLUiDialogsContextType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 12 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiDialogTitleProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiDialogTitleProps = " + }, + { + "kind": "Content", + "text": "{\n className?: string;\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDialog.tsx", + "releaseTag": "Public", + "name": "TLUiDialogTitleProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiDropdownMenuCheckboxItemProps " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "releaseTag": "Public", + "name": "TLUiDropdownMenuCheckboxItemProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps#checked:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "checked?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "checked", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps#children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps#disabled:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "disabled?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "disabled", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps#onSelect:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onSelect?: " + }, + { + "kind": "Content", + "text": "(e: " + }, + { + "kind": "Reference", + "text": "Event", + "canonicalReference": "!Event:interface" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onSelect", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiDropdownMenuCheckboxItemProps#title:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "title: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "title", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiDropdownMenuContentProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiDropdownMenuContentProps = " + }, + { + "kind": "Content", + "text": "{\n id?: string;\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n alignOffset?: number;\n sideOffset?: number;\n align?: 'center' | 'end' | 'start';\n side?: 'bottom' | 'left' | 'right' | 'top';\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "releaseTag": "Public", + "name": "TLUiDropdownMenuContentProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiDropdownMenuGroupProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiDropdownMenuGroupProps = " + }, + { + "kind": "Content", + "text": "{\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "releaseTag": "Public", + "name": "TLUiDropdownMenuGroupProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiDropdownMenuItemProps:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiDropdownMenuItemProps " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "releaseTag": "Public", + "name": "TLUiDropdownMenuItemProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiDropdownMenuItemProps#children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiDropdownMenuItemProps#noClose:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "noClose?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "noClose", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiDropdownMenuRootProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiDropdownMenuRootProps = " + }, + { + "kind": "Content", + "text": "{\n id: string;\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n modal?: boolean;\n debugOpen?: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "releaseTag": "Public", + "name": "TLUiDropdownMenuRootProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiDropdownMenuSubProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiDropdownMenuSubProps = " + }, + { + "kind": "Content", + "text": "{\n id: string;\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "releaseTag": "Public", + "name": "TLUiDropdownMenuSubProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiDropdownMenuSubTriggerProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiDropdownMenuSubTriggerProps = " + }, + { + "kind": "Content", + "text": "{\n label: string;\n id?: string;\n title?: string;\n disabled?: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "releaseTag": "Public", + "name": "TLUiDropdownMenuSubTriggerProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiDropdownMenuTriggerProps:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiDropdownMenuTriggerProps " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiDropdownMenu.tsx", + "releaseTag": "Public", + "name": "TLUiDropdownMenuTriggerProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiDropdownMenuTriggerProps#children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiEventContextType:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiEventContextType = " + }, + { + "kind": "Reference", + "text": "TLUiEventHandler", + "canonicalReference": "tldraw!TLUiEventHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", + "releaseTag": "Public", + "name": "TLUiEventContextType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiEventHandler:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiEventHandler = " + }, + { + "kind": "Content", + "text": "(name: T, data: " + }, + { + "kind": "Reference", + "text": "Join", + "canonicalReference": "tldraw!~Join:type" + }, + { + "kind": "Content", + "text": "<{\n source: " + }, + { + "kind": "Reference", + "text": "TLUiEventSource", + "canonicalReference": "tldraw!TLUiEventSource:type" + }, + { + "kind": "Content", + "text": ";\n}, " + }, + { + "kind": "Reference", + "text": "TLUiEventMap", + "canonicalReference": "tldraw!TLUiEventMap:interface" + }, + { + "kind": "Content", + "text": "[T]>) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", + "releaseTag": "Public", + "name": "TLUiEventHandler", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + } + } + ], + "typeTokenRange": { + "startIndex": 7, + "endIndex": 14 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiEventMap:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiEventMap " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", + "releaseTag": "Public", + "name": "TLUiEventMap", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"align-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'align-shapes': " + }, + { + "kind": "Content", + "text": "{\n operation: 'bottom' | 'center-horizontal' | 'center-vertical' | 'left' | 'right' | 'top';\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"align-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"change-language\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'change-language': " + }, + { + "kind": "Content", + "text": "{\n locale: string;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"change-language\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"close-menu\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'close-menu': " + }, + { + "kind": "Content", + "text": "{\n id: string;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"close-menu\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"convert-to-bookmark\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'convert-to-bookmark': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"convert-to-bookmark\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"convert-to-embed\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'convert-to-embed': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"convert-to-embed\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"copy-as\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'copy-as': " + }, + { + "kind": "Content", + "text": "{\n format: 'json' | 'png' | 'svg';\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"copy-as\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"create-new-project\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'create-new-project': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"create-new-project\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"delete-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'delete-shapes': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"delete-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"distribute-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'distribute-shapes': " + }, + { + "kind": "Content", + "text": "{\n operation: 'horizontal' | 'vertical';\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"distribute-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"duplicate-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'duplicate-shapes': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"duplicate-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"edit-link\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'edit-link': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"edit-link\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"exit-pen-mode\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'exit-pen-mode': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"exit-pen-mode\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"export-all-as\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'export-all-as': " + }, + { + "kind": "Content", + "text": "{\n format: 'json' | 'png' | 'svg';\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"export-all-as\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"export-as\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'export-as': " + }, + { + "kind": "Content", + "text": "{\n format: 'json' | 'png' | 'svg';\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"export-as\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"fit-frame-to-content\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'fit-frame-to-content': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"fit-frame-to-content\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"flip-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'flip-shapes': " + }, + { + "kind": "Content", + "text": "{\n operation: 'horizontal' | 'vertical';\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"flip-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"group-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'group-shapes': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"group-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"insert-embed\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'insert-embed': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"insert-embed\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"insert-media\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'insert-media': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"insert-media\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"move-to-page\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'move-to-page': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"move-to-page\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"new-page\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'new-page': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"new-page\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"open-cursor-chat\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'open-cursor-chat': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"open-cursor-chat\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"open-embed-link\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'open-embed-link': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"open-embed-link\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"open-file\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'open-file': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"open-file\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"open-menu\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'open-menu': " + }, + { + "kind": "Content", + "text": "{\n id: string;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"open-menu\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"pack-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'pack-shapes': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"pack-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"remove-frame\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'remove-frame': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"remove-frame\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"reorder-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'reorder-shapes': " + }, + { + "kind": "Content", + "text": "{\n operation: 'backward' | 'forward' | 'toBack' | 'toFront';\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"reorder-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"reset-zoom\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'reset-zoom': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"reset-zoom\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"rotate-ccw\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'rotate-ccw': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"rotate-ccw\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"rotate-cw\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'rotate-cw': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"rotate-cw\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"save-project-to-file\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'save-project-to-file': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"save-project-to-file\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"select-all-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'select-all-shapes': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"select-all-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"select-none-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'select-none-shapes': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"select-none-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"select-tool\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'select-tool': " + }, + { + "kind": "Content", + "text": "{\n id: string;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"select-tool\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"set-style\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'set-style': " + }, + { + "kind": "Content", + "text": "{\n id: string;\n value: number | string;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"set-style\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"stack-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'stack-shapes': " + }, + { + "kind": "Content", + "text": "{\n operation: 'horizontal' | 'vertical';\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"stack-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"stop-following\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'stop-following': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"stop-following\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"stretch-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'stretch-shapes': " + }, + { + "kind": "Content", + "text": "{\n operation: 'horizontal' | 'vertical';\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"stretch-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"toggle-auto-size\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'toggle-auto-size': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"toggle-auto-size\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"toggle-dark-mode\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'toggle-dark-mode': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"toggle-dark-mode\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"toggle-debug-mode\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'toggle-debug-mode': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"toggle-debug-mode\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"toggle-edge-scrolling\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'toggle-edge-scrolling': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"toggle-edge-scrolling\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"toggle-focus-mode\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'toggle-focus-mode': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"toggle-focus-mode\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"toggle-grid-mode\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'toggle-grid-mode': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"toggle-grid-mode\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"toggle-lock\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'toggle-lock': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"toggle-lock\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"toggle-reduce-motion\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'toggle-reduce-motion': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"toggle-reduce-motion\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"toggle-snap-mode\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'toggle-snap-mode': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"toggle-snap-mode\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"toggle-tool-lock\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'toggle-tool-lock': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"toggle-tool-lock\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"toggle-transparent\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'toggle-transparent': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"toggle-transparent\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"toggle-wrap-mode\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'toggle-wrap-mode': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"toggle-wrap-mode\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"ungroup-shapes\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'ungroup-shapes': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"ungroup-shapes\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"unlock-all\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'unlock-all': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"unlock-all\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"zoom-in\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'zoom-in': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"zoom-in\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"zoom-into-view\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'zoom-into-view': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"zoom-into-view\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"zoom-out\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'zoom-out': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"zoom-out\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"zoom-to-content\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'zoom-to-content': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"zoom-to-content\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"zoom-to-fit\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'zoom-to-fit': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"zoom-to-fit\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"zoom-to-selection\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'zoom-to-selection': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"zoom-to-selection\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#\"zoom-tool\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'zoom-tool': " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "\"zoom-tool\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#copy:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "copy: " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "copy", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#cut:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "cut: " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "cut", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#paste:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "paste: " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "paste", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#print:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "print: " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "print", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#redo:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "redo: " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "redo", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiEventMap#undo:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "undo: " + }, + { + "kind": "Content", + "text": "null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "undo", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiEventSource:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiEventSource = " + }, + { + "kind": "Content", + "text": "'actions-menu' | 'context-menu' | 'debug-panel' | 'dialog' | 'document-name' | 'export-menu' | 'help-menu' | 'helper-buttons' | 'kbd' | 'main-menu' | 'menu' | 'navigation-zone' | 'page-menu' | 'people-menu' | 'quick-actions' | 'share-menu' | 'style-panel' | 'toolbar' | 'unknown' | 'zoom-menu'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", + "releaseTag": "Public", + "name": "TLUiEventSource", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiHelperButtonsProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiHelperButtonsProps = " + }, + { + "kind": "Content", + "text": "{\n children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelperButtons/DefaultHelperButtons.tsx", + "releaseTag": "Public", + "name": "TLUiHelperButtonsProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiHelpMenuProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiHelpMenuProps = " + }, + { + "kind": "Content", + "text": "{\n children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/HelpMenu/DefaultHelpMenu.tsx", + "releaseTag": "Public", + "name": "TLUiHelpMenuProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiIconProps:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiIconProps extends " + }, + { + "kind": "Reference", + "text": "React.HTMLProps", + "canonicalReference": "@types/react!React.HTMLProps:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "HTMLDivElement", + "canonicalReference": "!HTMLDivElement:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiIcon.tsx", + "releaseTag": "Public", + "name": "TLUiIconProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiIconProps#children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "children?: " + }, + { + "kind": "Content", + "text": "undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiIconProps#color:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "color?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "color", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiIconProps#crossOrigin:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "crossOrigin?: " + }, + { + "kind": "Content", + "text": "'anonymous' | 'use-credentials'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "crossOrigin", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiIconProps#icon:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "icon: " + }, + { + "kind": "Reference", + "text": "Exclude", + "canonicalReference": "!Exclude:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLUiIconType", + "canonicalReference": "tldraw!TLUiIconType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "icon", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiIconProps#invertIcon:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "invertIcon?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "invertIcon", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiIconProps#small:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "small?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "small", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 5 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiIconType:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiIconType = " + }, + { + "kind": "Content", + "text": "'align-bottom-center' | 'align-bottom-left' | 'align-bottom-right' | 'align-bottom' | 'align-center-center' | 'align-center-horizontal' | 'align-center-left' | 'align-center-right' | 'align-center-vertical' | 'align-left' | 'align-right' | 'align-top-center' | 'align-top-left' | 'align-top-right' | 'align-top' | 'arrow-left' | 'arrowhead-arrow' | 'arrowhead-bar' | 'arrowhead-diamond' | 'arrowhead-dot' | 'arrowhead-none' | 'arrowhead-square' | 'arrowhead-triangle-inverted' | 'arrowhead-triangle' | 'aspect-ratio' | 'avatar' | 'blob' | 'bring-forward' | 'bring-to-front' | 'check-circle' | 'check' | 'checkbox-checked' | 'checkbox-empty' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chevrons-ne' | 'chevrons-sw' | 'clipboard-copied' | 'clipboard-copy' | 'code' | 'collab' | 'color' | 'comment' | 'cross-2' | 'cross-circle' | 'cross' | 'dash-dashed' | 'dash-dotted' | 'dash-draw' | 'dash-solid' | 'discord' | 'distribute-horizontal' | 'distribute-vertical' | 'dot' | 'dots-horizontal' | 'dots-vertical' | 'drag-handle-dots' | 'duplicate' | 'edit' | 'error' | 'external-link' | 'file' | 'fill-none' | 'fill-pattern' | 'fill-semi' | 'fill-solid' | 'follow' | 'following' | 'font-draw' | 'font-mono' | 'font-sans' | 'font-serif' | 'geo-arrow-down' | 'geo-arrow-left' | 'geo-arrow-right' | 'geo-arrow-up' | 'geo-check-box' | 'geo-cloud' | 'geo-diamond' | 'geo-ellipse' | 'geo-hexagon' | 'geo-octagon' | 'geo-oval' | 'geo-pentagon' | 'geo-rectangle' | 'geo-rhombus-2' | 'geo-rhombus' | 'geo-star' | 'geo-trapezoid' | 'geo-triangle' | 'geo-x-box' | 'github' | 'group' | 'hidden' | 'image' | 'info-circle' | 'leading' | 'link' | 'lock-small' | 'lock' | 'menu' | 'minus' | 'mixed' | 'pack' | 'page' | 'plus' | 'question-mark-circle' | 'question-mark' | 'redo' | 'reset-zoom' | 'rotate-ccw' | 'rotate-cw' | 'ruler' | 'search' | 'send-backward' | 'send-to-back' | 'settings-horizontal' | 'settings-vertical-1' | 'settings-vertical' | 'share-1' | 'share-2' | 'size-extra-large' | 'size-large' | 'size-medium' | 'size-small' | 'spline-cubic' | 'spline-line' | 'stack-horizontal' | 'stack-vertical' | 'status-offline' | 'status-online' | 'stretch-horizontal' | 'stretch-vertical' | 'text-align-center' | 'text-align-justify' | 'text-align-left' | 'text-align-right' | 'tool-arrow' | 'tool-embed' | 'tool-eraser' | 'tool-frame' | 'tool-hand' | 'tool-highlight' | 'tool-laser' | 'tool-line' | 'tool-media' | 'tool-note' | 'tool-pencil' | 'tool-pointer' | 'tool-text' | 'trash' | 'triangle-down' | 'triangle-up' | 'twitter' | 'undo' | 'ungroup' | 'unlock-small' | 'unlock' | 'vertical-align-center' | 'vertical-align-end' | 'vertical-align-start' | 'visible' | 'warning-triangle' | 'zoom-in' | 'zoom-out'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/icon-types.ts", + "releaseTag": "Public", + "name": "TLUiIconType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiInputProps:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiInputProps " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiInput.tsx", + "releaseTag": "Public", + "name": "TLUiInputProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#autofocus:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "autofocus?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "autofocus", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#autoselect:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "autoselect?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "autoselect", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "children?: " + }, + { + "kind": "Reference", + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#className:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "className?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "className", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#defaultValue:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultValue?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "defaultValue", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#disabled:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "disabled?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "disabled", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#icon:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "icon?: " + }, + { + "kind": "Reference", + "text": "Exclude", + "canonicalReference": "!Exclude:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLUiIconType", + "canonicalReference": "tldraw!TLUiIconType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "icon", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#iconLeft:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "iconLeft?: " + }, + { + "kind": "Reference", + "text": "Exclude", + "canonicalReference": "!Exclude:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLUiIconType", + "canonicalReference": "tldraw!TLUiIconType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "iconLeft", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#label:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "label?: " + }, + { + "kind": "Reference", + "text": "Exclude", + "canonicalReference": "!Exclude:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLUiTranslationKey", + "canonicalReference": "tldraw!TLUiTranslationKey:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "label", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#onBlur:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onBlur?: " + }, + { + "kind": "Content", + "text": "(value: string) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onBlur", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#onCancel:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onCancel?: " + }, + { + "kind": "Content", + "text": "(value: string) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onCancel", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#onComplete:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onComplete?: " + }, + { + "kind": "Content", + "text": "(value: string) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onComplete", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#onValueChange:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onValueChange?: " + }, + { + "kind": "Content", + "text": "(value: string) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onValueChange", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#placeholder:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "placeholder?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "placeholder", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#shouldManuallyMaintainScrollPositionWhenFocused:member", + "docComment": "/**\n * Usually on iOS when you focus an input, the browser will adjust the viewport to bring the input into view. Sometimes this doesn't work properly though - for example, if the input is newly created, iOS seems to have a hard time adjusting the viewport for it. This prop allows you to opt-in to some extra code to manually bring the input into view when the visual viewport of the browser changes, but we don't want to use it everywhere because generally the native behavior looks nicer in scenarios where it's sufficient.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "shouldManuallyMaintainScrollPositionWhenFocused?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "shouldManuallyMaintainScrollPositionWhenFocused", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#value:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "value?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "value", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiKbdProps:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiKbdProps " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiKbd.tsx", + "releaseTag": "Public", + "name": "TLUiKbdProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiKbdProps#children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "children: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiKbdProps#visibleOnMobileLayout:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "visibleOnMobileLayout?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "visibleOnMobileLayout", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiKeyboardShortcutsDialogProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiKeyboardShortcutsDialogProps = " + }, + { + "kind": "Reference", + "text": "TLUiDialogProps", + "canonicalReference": "tldraw!TLUiDialogProps:interface" + }, + { + "kind": "Content", + "text": " & {\n children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialog.tsx", + "releaseTag": "Public", + "name": "TLUiKeyboardShortcutsDialogProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiMainMenuProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiMainMenuProps = " + }, + { + "kind": "Content", + "text": "{\n children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenu.tsx", + "releaseTag": "Public", + "name": "TLUiMainMenuProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiMenuCheckboxItemProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiMenuCheckboxItemProps = " + }, + { + "kind": "Content", + "text": "{\n icon?: IconType;\n id: string;\n kbd?: string;\n title?: string;\n label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n readonlyOk?: boolean;\n onSelect: (source: " + }, + { + "kind": "Reference", + "text": "TLUiEventSource", + "canonicalReference": "tldraw!TLUiEventSource:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": " | void;\n checked?: boolean;\n disabled?: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.tsx", + "releaseTag": "Public", + "name": "TLUiMenuCheckboxItemProps", + "typeParameters": [ + { + "typeParameterName": "TranslationKey", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "typeParameterName": "IconType", + "constraintTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "defaultTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + } + } + ], + "typeTokenRange": { + "startIndex": 9, + "endIndex": 14 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiMenuContextProviderProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiMenuContextProviderProps = " + }, + { + "kind": "Content", + "text": "{\n type: " + }, + { + "kind": "Reference", + "text": "TldrawUiMenuContextType", + "canonicalReference": "tldraw!~TldrawUiMenuContextType:type" + }, + { + "kind": "Content", + "text": ";\n sourceId: " + }, + { + "kind": "Reference", + "text": "TLUiEventSource", + "canonicalReference": "tldraw!TLUiEventSource:type" + }, + { + "kind": "Content", + "text": ";\n children: " + }, + { + "kind": "Reference", + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuContext.tsx", + "releaseTag": "Public", + "name": "TLUiMenuContextProviderProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiMenuGroupProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiMenuGroupProps = " + }, + { + "kind": "Content", + "text": "{\n id: string;\n label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuGroup.tsx", + "releaseTag": "Public", + "name": "TLUiMenuGroupProps", + "typeParameters": [ + { + "typeParameterName": "TranslationKey", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "typeTokenRange": { + "startIndex": 5, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiMenuItemProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiMenuItemProps = " + }, + { + "kind": "Content", + "text": "{\n id: string;\n icon?: IconType;\n kbd?: string;\n label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n readonlyOk?: boolean;\n onSelect: (source: " + }, + { + "kind": "Reference", + "text": "TLUiEventSource", + "canonicalReference": "tldraw!TLUiEventSource:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": " | void;\n disabled?: boolean;\n noClose?: boolean;\n spinner?: boolean;\n isSelected?: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx", + "releaseTag": "Public", + "name": "TLUiMenuItemProps", + "typeParameters": [ + { + "typeParameterName": "TranslationKey", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "typeParameterName": "IconType", + "constraintTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "defaultTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + } + } + ], + "typeTokenRange": { + "startIndex": 9, + "endIndex": 14 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiMenuSubmenuProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiMenuSubmenuProps = " + }, + { + "kind": "Content", + "text": "{\n id: string;\n label?: {\n [key: string]: Translation;\n } | Translation;\n disabled?: boolean;\n children: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n size?: 'medium' | 'small' | 'tiny' | 'wide';\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuSubmenu.tsx", + "releaseTag": "Public", + "name": "TLUiMenuSubmenuProps", + "typeParameters": [ + { + "typeParameterName": "Translation", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "typeTokenRange": { + "startIndex": 5, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiOverrides:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiOverrides = " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n actions: " + }, + { + "kind": "Reference", + "text": "WithDefaultHelpers", + "canonicalReference": "tldraw!~WithDefaultHelpers:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "NonNullable", + "canonicalReference": "!NonNullable:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ActionsProviderProps", + "canonicalReference": "tldraw!~ActionsProviderProps:type" + }, + { + "kind": "Content", + "text": "['overrides']>>;\n tools: " + }, + { + "kind": "Reference", + "text": "WithDefaultHelpers", + "canonicalReference": "tldraw!~WithDefaultHelpers:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "NonNullable", + "canonicalReference": "!NonNullable:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiToolsProviderProps", + "canonicalReference": "tldraw!TLUiToolsProviderProps:type" + }, + { + "kind": "Content", + "text": "['overrides']>>;\n translations: " + }, + { + "kind": "Reference", + "text": "TLUiTranslationProviderProps", + "canonicalReference": "tldraw!~TLUiTranslationProviderProps:interface" + }, + { + "kind": "Content", + "text": "['overrides'];\n}>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/overrides.ts", + "releaseTag": "Public", + "name": "TLUiOverrides", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 17 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiPopoverContentProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiPopoverContentProps = " + }, + { + "kind": "Content", + "text": "{\n children: " + }, + { + "kind": "Reference", + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n side: 'bottom' | 'left' | 'right' | 'top';\n align?: 'center' | 'end' | 'start';\n alignOffset?: number;\n sideOffset?: number;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiPopover.tsx", + "releaseTag": "Public", + "name": "TLUiPopoverContentProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiPopoverProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiPopoverProps = " + }, + { + "kind": "Content", + "text": "{\n id: string;\n open?: boolean;\n children: " + }, + { + "kind": "Reference", + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n onOpenChange?: (isOpen: boolean) => void;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiPopover.tsx", + "releaseTag": "Public", + "name": "TLUiPopoverProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiPopoverTriggerProps:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiPopoverTriggerProps " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/primitives/TldrawUiPopover.tsx", + "releaseTag": "Public", + "name": "TLUiPopoverTriggerProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiPopoverTriggerProps#children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "children?: " + }, + { + "kind": "Reference", + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiQuickActionsProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiQuickActionsProps = " + }, + { + "kind": "Content", + "text": "{\n children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/QuickActions/DefaultQuickActions.tsx", + "releaseTag": "Public", + "name": "TLUiQuickActionsProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiStylePanelContentProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiStylePanelContentProps = " + }, + { + "kind": "Content", + "text": "{\n styles: " + }, + { + "kind": "Reference", + "text": "ReturnType", + "canonicalReference": "!ReturnType:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx", + "releaseTag": "Public", + "name": "TLUiStylePanelContentProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiStylePanelProps:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiStylePanelProps " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx", + "releaseTag": "Public", + "name": "TLUiStylePanelProps", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiStylePanelProps#children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiStylePanelProps#isMobile:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isMobile?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "isMobile", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiToast:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiToast " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/toasts.tsx", + "releaseTag": "Public", + "name": "TLUiToast", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToast#actions:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "actions?: " + }, + { + "kind": "Reference", + "text": "TLUiToastAction", + "canonicalReference": "tldraw!TLUiToastAction:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "actions", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToast#closeLabel:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "closeLabel?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "closeLabel", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToast#description:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "description?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "description", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToast#icon:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "icon?: " + }, + { + "kind": "Reference", + "text": "TLUiIconType", + "canonicalReference": "tldraw!TLUiIconType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "icon", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToast#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToast#keepOpen:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "keepOpen?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "keepOpen", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToast#severity:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "severity?: " + }, + { + "kind": "Reference", + "text": "AlertSeverity", + "canonicalReference": "tldraw!AlertSeverity:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "severity", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToast#title:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "title?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "title", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiToastAction:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiToastAction " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/toasts.tsx", + "releaseTag": "Public", + "name": "TLUiToastAction", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToastAction#label:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "label: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "label", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToastAction#onClick:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onClick: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onClick", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToastAction#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "'danger' | 'normal' | 'primary'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiToastsContextType:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiToastsContextType = " + }, + { + "kind": "Content", + "text": "{\n addToast: (toast: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiToast", + "canonicalReference": "tldraw!TLUiToast:interface" + }, + { + "kind": "Content", + "text": ", 'id'> & {\n id?: string;\n }) => string;\n removeToast: (id: " + }, + { + "kind": "Reference", + "text": "TLUiToast", + "canonicalReference": "tldraw!TLUiToast:interface" + }, + { + "kind": "Content", + "text": "['id']) => string;\n clearToasts: () => void;\n toasts: " + }, + { + "kind": "Reference", + "text": "TLUiToast", + "canonicalReference": "tldraw!TLUiToast:interface" + }, + { + "kind": "Content", + "text": "[];\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/toasts.tsx", + "releaseTag": "Public", + "name": "TLUiToastsContextType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 10 + } + }, + { + "kind": "Interface", + "canonicalReference": "tldraw!TLUiToolItem:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLUiToolItem " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTools.tsx", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TranslationKey", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "typeParameterName": "IconType", + "constraintTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "defaultTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + } + } + ], + "name": "TLUiToolItem", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToolItem#icon:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "icon: " + }, + { + "kind": "Content", + "text": "IconType" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "icon", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToolItem#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToolItem#kbd:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "kbd?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "kbd", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToolItem#label:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "label: " + }, + { + "kind": "Content", + "text": "TranslationKey" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "label", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToolItem#meta:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "meta?: " + }, + { + "kind": "Content", + "text": "{\n [key: string]: any;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "meta", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToolItem#onSelect:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onSelect: " + }, + { + "kind": "Content", + "text": "(source: " + }, + { + "kind": "Reference", + "text": "TLUiEventSource", + "canonicalReference": "tldraw!TLUiEventSource:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onSelect", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToolItem#readonlyOk:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonlyOk?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "readonlyOk", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiToolItem#shortcutsLabel:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "shortcutsLabel?: " + }, + { + "kind": "Content", + "text": "TranslationKey" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "shortcutsLabel", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiToolsContextType:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiToolsContextType = " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTools.tsx", + "releaseTag": "Public", + "name": "TLUiToolsContextType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiToolsProviderProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiToolsProviderProps = " + }, + { + "kind": "Content", + "text": "{\n overrides?: (editor: " + }, + { + "kind": "Reference", + "text": "Editor", + "canonicalReference": "@tldraw/editor!Editor:class" + }, + { + "kind": "Content", + "text": ", tools: " + }, + { + "kind": "Reference", + "text": "TLUiToolsContextType", + "canonicalReference": "tldraw!TLUiToolsContextType:type" + }, + { + "kind": "Content", + "text": ", helpers: {\n insertMedia: () => void;\n }) => " + }, + { + "kind": "Reference", + "text": "TLUiToolsContextType", + "canonicalReference": "tldraw!TLUiToolsContextType:type" + }, + { + "kind": "Content", + "text": ";\n children: " + }, + { + "kind": "Reference", + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTools.tsx", + "releaseTag": "Public", + "name": "TLUiToolsProviderProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 10 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiTranslation:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiTranslation = " + }, + { + "kind": "Content", + "text": "{\n readonly locale: string;\n readonly label: string;\n readonly messages: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiTranslationKey", + "canonicalReference": "tldraw!TLUiTranslationKey:type" + }, + { + "kind": "Content", + "text": ", string>;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTranslation/translations.ts", + "releaseTag": "Public", + "name": "TLUiTranslation", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiTranslationContextType:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiTranslationContextType = " + }, + { + "kind": "Reference", + "text": "TLUiTranslation", + "canonicalReference": "tldraw!TLUiTranslation:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTranslation/useTranslation.tsx", + "releaseTag": "Public", + "name": "TLUiTranslationContextType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiTranslationKey:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiTranslationKey = " + }, + { + "kind": "Content", + "text": "'action.align-bottom' | 'action.align-center-horizontal.short' | 'action.align-center-horizontal' | 'action.align-center-vertical.short' | 'action.align-center-vertical' | 'action.align-left' | 'action.align-right' | 'action.align-top' | 'action.back-to-content' | 'action.bring-forward' | 'action.bring-to-front' | 'action.convert-to-bookmark' | 'action.convert-to-embed' | 'action.copy-as-json.short' | 'action.copy-as-json' | 'action.copy-as-png.short' | 'action.copy-as-png' | 'action.copy-as-svg.short' | 'action.copy-as-svg' | 'action.copy' | 'action.cut' | 'action.delete' | 'action.distribute-horizontal.short' | 'action.distribute-horizontal' | 'action.distribute-vertical.short' | 'action.distribute-vertical' | 'action.duplicate' | 'action.edit-link' | 'action.exit-pen-mode' | 'action.export-all-as-json.short' | 'action.export-all-as-json' | 'action.export-all-as-png.short' | 'action.export-all-as-png' | 'action.export-all-as-svg.short' | 'action.export-all-as-svg' | 'action.export-as-json.short' | 'action.export-as-json' | 'action.export-as-png.short' | 'action.export-as-png' | 'action.export-as-svg.short' | 'action.export-as-svg' | 'action.fit-frame-to-content' | 'action.flip-horizontal.short' | 'action.flip-horizontal' | 'action.flip-vertical.short' | 'action.flip-vertical' | 'action.fork-project' | 'action.group' | 'action.insert-embed' | 'action.insert-media' | 'action.leave-shared-project' | 'action.new-project' | 'action.new-shared-project' | 'action.open-cursor-chat' | 'action.open-embed-link' | 'action.open-file' | 'action.pack' | 'action.paste' | 'action.print' | 'action.redo' | 'action.remove-frame' | 'action.rename' | 'action.rotate-ccw' | 'action.rotate-cw' | 'action.save-copy' | 'action.select-all' | 'action.select-none' | 'action.send-backward' | 'action.send-to-back' | 'action.share-project' | 'action.stack-horizontal.short' | 'action.stack-horizontal' | 'action.stack-vertical.short' | 'action.stack-vertical' | 'action.stop-following' | 'action.stretch-horizontal.short' | 'action.stretch-horizontal' | 'action.stretch-vertical.short' | 'action.stretch-vertical' | 'action.toggle-auto-size' | 'action.toggle-dark-mode.menu' | 'action.toggle-dark-mode' | 'action.toggle-debug-mode.menu' | 'action.toggle-debug-mode' | 'action.toggle-edge-scrolling.menu' | 'action.toggle-edge-scrolling' | 'action.toggle-focus-mode.menu' | 'action.toggle-focus-mode' | 'action.toggle-grid.menu' | 'action.toggle-grid' | 'action.toggle-lock' | 'action.toggle-reduce-motion.menu' | 'action.toggle-reduce-motion' | 'action.toggle-snap-mode.menu' | 'action.toggle-snap-mode' | 'action.toggle-tool-lock.menu' | 'action.toggle-tool-lock' | 'action.toggle-transparent.context-menu' | 'action.toggle-transparent.menu' | 'action.toggle-transparent' | 'action.toggle-wrap-mode.menu' | 'action.toggle-wrap-mode' | 'action.undo' | 'action.ungroup' | 'action.unlock-all' | 'action.zoom-in' | 'action.zoom-out' | 'action.zoom-to-100' | 'action.zoom-to-fit' | 'action.zoom-to-selection' | 'actions-menu.title' | 'align-style.end' | 'align-style.justify' | 'align-style.middle' | 'align-style.start' | 'arrowheadEnd-style.arrow' | 'arrowheadEnd-style.bar' | 'arrowheadEnd-style.diamond' | 'arrowheadEnd-style.dot' | 'arrowheadEnd-style.inverted' | 'arrowheadEnd-style.none' | 'arrowheadEnd-style.pipe' | 'arrowheadEnd-style.square' | 'arrowheadEnd-style.triangle' | 'arrowheadStart-style.arrow' | 'arrowheadStart-style.bar' | 'arrowheadStart-style.diamond' | 'arrowheadStart-style.dot' | 'arrowheadStart-style.inverted' | 'arrowheadStart-style.none' | 'arrowheadStart-style.pipe' | 'arrowheadStart-style.square' | 'arrowheadStart-style.triangle' | 'assets.files.upload-failed' | 'assets.url.failed' | 'color-style.black' | 'color-style.blue' | 'color-style.green' | 'color-style.grey' | 'color-style.light-blue' | 'color-style.light-green' | 'color-style.light-red' | 'color-style.light-violet' | 'color-style.orange' | 'color-style.red' | 'color-style.violet' | 'color-style.white' | 'color-style.yellow' | 'context-menu.arrange' | 'context-menu.copy-as' | 'context-menu.export-all-as' | 'context-menu.export-as' | 'context-menu.move-to-page' | 'context-menu.reorder' | 'context.pages.new-page' | 'cursor-chat.type-to-chat' | 'dash-style.dashed' | 'dash-style.dotted' | 'dash-style.draw' | 'dash-style.solid' | 'debug-panel.more' | 'document.default-name' | 'edit-link-dialog.cancel' | 'edit-link-dialog.clear' | 'edit-link-dialog.detail' | 'edit-link-dialog.invalid-url' | 'edit-link-dialog.save' | 'edit-link-dialog.title' | 'edit-link-dialog.url' | 'edit-pages-dialog.move-down' | 'edit-pages-dialog.move-up' | 'embed-dialog.back' | 'embed-dialog.cancel' | 'embed-dialog.create' | 'embed-dialog.instruction' | 'embed-dialog.invalid-url' | 'embed-dialog.title' | 'embed-dialog.url' | 'file-system.confirm-clear.cancel' | 'file-system.confirm-clear.continue' | 'file-system.confirm-clear.description' | 'file-system.confirm-clear.dont-show-again' | 'file-system.confirm-clear.title' | 'file-system.confirm-open.cancel' | 'file-system.confirm-open.description' | 'file-system.confirm-open.dont-show-again' | 'file-system.confirm-open.open' | 'file-system.confirm-open.title' | 'file-system.file-open-error.file-format-version-too-new' | 'file-system.file-open-error.generic-corrupted-file' | 'file-system.file-open-error.not-a-tldraw-file' | 'file-system.file-open-error.title' | 'file-system.shared-document-file-open-error.description' | 'file-system.shared-document-file-open-error.title' | 'fill-style.none' | 'fill-style.pattern' | 'fill-style.semi' | 'fill-style.solid' | 'focus-mode.toggle-focus-mode' | 'font-style.draw' | 'font-style.mono' | 'font-style.sans' | 'font-style.serif' | 'geo-style.arrow-down' | 'geo-style.arrow-left' | 'geo-style.arrow-right' | 'geo-style.arrow-up' | 'geo-style.check-box' | 'geo-style.cloud' | 'geo-style.diamond' | 'geo-style.ellipse' | 'geo-style.hexagon' | 'geo-style.octagon' | 'geo-style.oval' | 'geo-style.pentagon' | 'geo-style.rectangle' | 'geo-style.rhombus-2' | 'geo-style.rhombus' | 'geo-style.star' | 'geo-style.trapezoid' | 'geo-style.triangle' | 'geo-style.x-box' | 'help-menu.about' | 'help-menu.discord' | 'help-menu.github' | 'help-menu.keyboard-shortcuts' | 'help-menu.title' | 'help-menu.twitter' | 'home-project-dialog.description' | 'home-project-dialog.ok' | 'home-project-dialog.title' | 'menu.copy-as' | 'menu.edit' | 'menu.export-as' | 'menu.file' | 'menu.language' | 'menu.preferences' | 'menu.title' | 'menu.view' | 'navigation-zone.toggle-minimap' | 'navigation-zone.zoom' | 'opacity-style.0.1' | 'opacity-style.0.25' | 'opacity-style.0.5' | 'opacity-style.0.75' | 'opacity-style.1' | 'page-menu.create-new-page' | 'page-menu.edit-done' | 'page-menu.edit-start' | 'page-menu.go-to-page' | 'page-menu.max-page-count-reached' | 'page-menu.new-page-initial-name' | 'page-menu.submenu.delete' | 'page-menu.submenu.duplicate-page' | 'page-menu.submenu.move-down' | 'page-menu.submenu.move-up' | 'page-menu.submenu.rename' | 'page-menu.submenu.title' | 'page-menu.title' | 'people-menu.change-color' | 'people-menu.change-name' | 'people-menu.follow' | 'people-menu.following' | 'people-menu.invite' | 'people-menu.leading' | 'people-menu.title' | 'people-menu.user' | 'rename-project-dialog.cancel' | 'rename-project-dialog.rename' | 'rename-project-dialog.title' | 'share-menu.copy-link-note' | 'share-menu.copy-link' | 'share-menu.copy-readonly-link-note' | 'share-menu.copy-readonly-link' | 'share-menu.create-snapshot-link' | 'share-menu.default-project-name' | 'share-menu.fork-note' | 'share-menu.offline-note' | 'share-menu.project-too-large' | 'share-menu.readonly-link' | 'share-menu.save-note' | 'share-menu.share-project' | 'share-menu.snapshot-link-note' | 'share-menu.title' | 'share-menu.upload-failed' | 'sharing.confirm-leave.cancel' | 'sharing.confirm-leave.description' | 'sharing.confirm-leave.dont-show-again' | 'sharing.confirm-leave.leave' | 'sharing.confirm-leave.title' | 'shortcuts-dialog.collaboration' | 'shortcuts-dialog.edit' | 'shortcuts-dialog.file' | 'shortcuts-dialog.preferences' | 'shortcuts-dialog.title' | 'shortcuts-dialog.tools' | 'shortcuts-dialog.transform' | 'shortcuts-dialog.view' | 'size-style.l' | 'size-style.m' | 'size-style.s' | 'size-style.xl' | 'spline-style.cubic' | 'spline-style.line' | 'status.offline' | 'status.online' | 'style-panel.align' | 'style-panel.arrowhead-end' | 'style-panel.arrowhead-start' | 'style-panel.arrowheads' | 'style-panel.color' | 'style-panel.dash' | 'style-panel.fill' | 'style-panel.font' | 'style-panel.geo' | 'style-panel.mixed' | 'style-panel.opacity' | 'style-panel.position' | 'style-panel.size' | 'style-panel.spline' | 'style-panel.title' | 'style-panel.vertical-align' | 'toast.close' | 'toast.error.copy-fail.desc' | 'toast.error.copy-fail.title' | 'toast.error.export-fail.desc' | 'toast.error.export-fail.title' | 'tool-panel.drawing' | 'tool-panel.more' | 'tool-panel.shapes' | 'tool.arrow-down' | 'tool.arrow-left' | 'tool.arrow-right' | 'tool.arrow-up' | 'tool.arrow' | 'tool.asset' | 'tool.check-box' | 'tool.cloud' | 'tool.diamond' | 'tool.draw' | 'tool.ellipse' | 'tool.embed' | 'tool.eraser' | 'tool.frame' | 'tool.hand' | 'tool.hexagon' | 'tool.highlight' | 'tool.laser' | 'tool.line' | 'tool.note' | 'tool.octagon' | 'tool.oval' | 'tool.pentagon' | 'tool.rectangle' | 'tool.rhombus' | 'tool.select' | 'tool.star' | 'tool.text' | 'tool.trapezoid' | 'tool.triangle' | 'tool.x-box' | 'verticalAlign-style.end' | 'verticalAlign-style.middle' | 'verticalAlign-style.start' | 'vscode.file-open.backup-failed' | 'vscode.file-open.backup-saved' | 'vscode.file-open.backup' | 'vscode.file-open.desc' | 'vscode.file-open.dont-show-again' | 'vscode.file-open.open'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts", + "releaseTag": "Public", + "name": "TLUiTranslationKey", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLUiZoomMenuProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUiZoomMenuProps = " + }, + { + "kind": "Content", + "text": "{\n children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ZoomMenu/DefaultZoomMenu.tsx", + "releaseTag": "Public", + "name": "TLUiZoomMenuProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ToggleAutoSizeMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ToggleAutoSizeMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ToggleAutoSizeMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ToggleDarkModeItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ToggleDarkModeItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ToggleDarkModeItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ToggleDebugModeItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ToggleDebugModeItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ToggleDebugModeItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ToggleEdgeScrollingItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ToggleEdgeScrollingItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ToggleEdgeScrollingItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ToggleFocusModeItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ToggleFocusModeItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ToggleFocusModeItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ToggleGridItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ToggleGridItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ToggleGridItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ToggleLockMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ToggleLockMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ToggleLockMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ToggleReduceMotionItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ToggleReduceMotionItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ToggleReduceMotionItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ToggleSnapModeItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ToggleSnapModeItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ToggleSnapModeItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ToggleToolLockItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ToggleToolLockItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ToggleToolLockItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ToggleTransparentBgMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ToggleTransparentBgMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ToggleTransparentBgMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ToggleWrapModeItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ToggleWrapModeItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ToggleWrapModeItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TrapezoidToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TrapezoidToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "TrapezoidToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!TriangleToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function TriangleToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "TriangleToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!truncateStringWithEllipsis:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "truncateStringWithEllipsis: (str: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", maxLength: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Content", + "text": "string" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/text/text.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "str", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "maxLength", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "truncateStringWithEllipsis" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!UiEventsProvider:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function UiEventsProvider({ onEvent, children }: " + }, + { + "kind": "Reference", + "text": "EventsProviderProps", + "canonicalReference": "tldraw!EventsProviderProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ onEvent, children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "UiEventsProvider" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!UndoRedoGroup:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function UndoRedoGroup(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "UndoRedoGroup" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!UngroupMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function UngroupMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "UngroupMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!UnlockAllMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function UnlockAllMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "UnlockAllMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!unwrapLabel:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function unwrapLabel(label?: " + }, + { + "kind": "Reference", + "text": "TLUiActionItem", + "canonicalReference": "tldraw!TLUiActionItem:interface" + }, + { + "kind": "Content", + "text": "['label']" + }, + { + "kind": "Content", + "text": ", menuType?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/actions.tsx", + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "label", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": true + }, + { + "parameterName": "menuType", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": true + } + ], + "name": "unwrapLabel" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useActions:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useActions(): " + }, + { + "kind": "Reference", + "text": "TLUiActionsContextType", + "canonicalReference": "tldraw!TLUiActionsContextType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/actions.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useActions" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useBreakpoint:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useBreakpoint(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/breakpoints.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useBreakpoint" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useCanRedo:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useCanRedo(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/menu-hooks.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useCanRedo" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useCanUndo:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useCanUndo(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/menu-hooks.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useCanUndo" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useCopyAs:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useCopyAs(): " + }, + { + "kind": "Content", + "text": "(ids: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[], format?: " + }, + { + "kind": "Reference", + "text": "TLCopyType", + "canonicalReference": "tldraw!~TLCopyType:type" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useCopyAs.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useCopyAs" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useDefaultHelpers:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useDefaultHelpers(): " + }, + { + "kind": "Content", + "text": "{\n addToast: (toast: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": ") => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/overrides.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 14 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useDefaultHelpers" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useDialogs:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useDialogs(): " + }, + { + "kind": "Reference", + "text": "TLUiDialogsContextType", + "canonicalReference": "tldraw!TLUiDialogsContextType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/dialogs.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useDialogs" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useEditableText:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useEditableText(id: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ", type: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", text: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n rInput: " + }, + { + "kind": "Reference", + "text": "React.RefObject", + "canonicalReference": "@types/react!React.RefObject:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "HTMLTextAreaElement", + "canonicalReference": "!HTMLTextAreaElement:interface" + }, + { + "kind": "Content", + "text": ">;\n isEditing: boolean;\n handleFocus: () => void;\n handleBlur: () => void;\n handleKeyDown: (e: " + }, + { + "kind": "Reference", + "text": "React.KeyboardEvent", + "canonicalReference": "@types/react!React.KeyboardEvent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "HTMLTextAreaElement", + "canonicalReference": "!HTMLTextAreaElement:interface" + }, + { + "kind": "Content", + "text": ">) => void;\n handleChange: (e: " + }, + { + "kind": "Reference", + "text": "React.ChangeEvent", + "canonicalReference": "@types/react!React.ChangeEvent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "HTMLTextAreaElement", + "canonicalReference": "!HTMLTextAreaElement:interface" + }, + { + "kind": "Content", + "text": ">) => void;\n handleInputPointerDown: (e: " + }, + { + "kind": "Reference", + "text": "React.PointerEvent", + "canonicalReference": "@types/react!React.PointerEvent:interface" + }, + { + "kind": "Content", + "text": ") => void;\n handleDoubleClick: (e: any) => any;\n isEmpty: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/useEditableText.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 22 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "text", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "name": "useEditableText" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useExportAs:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useExportAs(): " + }, + { + "kind": "Content", + "text": "(ids: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[], format: " + }, + { + "kind": "Reference", + "text": "TLExportType", + "canonicalReference": "tldraw!~TLExportType:type" + }, + { + "kind": "Content", + "text": " | undefined, name: string | undefined) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useExportAs.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useExportAs" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useIsToolSelected:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useIsToolSelected(tool: " + }, + { + "kind": "Reference", + "text": "TLUiToolItem", + "canonicalReference": "tldraw!TLUiToolItem:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "tool", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "useIsToolSelected" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useKeyboardShortcuts:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useKeyboardShortcuts(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useKeyboardShortcuts.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useKeyboardShortcuts" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useLocalStorageState:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useLocalStorageState(key: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", defaultValue: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "readonly [T, (setter: ((value: T) => T) | T) => void]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useLocalStorageState.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "key", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "defaultValue", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "useLocalStorageState" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useMenuClipboardEvents:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useMenuClipboardEvents(): " + }, + { + "kind": "Content", + "text": "{\n copy: (source: " + }, + { + "kind": "Reference", + "text": "TLUiEventSource", + "canonicalReference": "tldraw!TLUiEventSource:type" + }, + { + "kind": "Content", + "text": ") => void;\n cut: (source: " + }, + { + "kind": "Reference", + "text": "TLUiEventSource", + "canonicalReference": "tldraw!TLUiEventSource:type" + }, + { + "kind": "Content", + "text": ") => void;\n paste: (data: " + }, + { + "kind": "Reference", + "text": "ClipboardItem", + "canonicalReference": "!ClipboardItem:interface" + }, + { + "kind": "Content", + "text": "[] | " + }, + { + "kind": "Reference", + "text": "DataTransfer", + "canonicalReference": "!DataTransfer:interface" + }, + { + "kind": "Content", + "text": ", source: " + }, + { + "kind": "Reference", + "text": "TLUiEventSource", + "canonicalReference": "tldraw!TLUiEventSource:type" + }, + { + "kind": "Content", + "text": ", point?: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useClipboardEvents.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 16 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useMenuClipboardEvents" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useMenuIsOpen:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useMenuIsOpen(id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", cb?: " + }, + { + "kind": "Content", + "text": "(isOpen: boolean) => void" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "readonly [boolean, (isOpen: boolean) => void]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useMenuIsOpen.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "cb", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "name": "useMenuIsOpen" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useNativeClipboardEvents:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useNativeClipboardEvents(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useClipboardEvents.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useNativeClipboardEvents" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useReadonly:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useReadonly(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useReadonly.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useReadonly" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useRelevantStyles:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useRelevantStyles(stylesToCheck?: " + }, + { + "kind": "Content", + "text": "readonly " + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "ReadonlySharedStyleMap", + "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useRelevantStyles.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "stylesToCheck", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": true + } + ], + "name": "useRelevantStyles" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useTldrawUiComponents:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useTldrawUiComponents(): " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n ContextMenu: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiContextMenuProps", + "canonicalReference": "tldraw!TLUiContextMenuProps:interface" + }, + { + "kind": "Content", + "text": "> | null;\n ActionsMenu: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiActionsMenuProps", + "canonicalReference": "tldraw!TLUiActionsMenuProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n HelpMenu: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiHelpMenuProps", + "canonicalReference": "tldraw!TLUiHelpMenuProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n ZoomMenu: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiZoomMenuProps", + "canonicalReference": "tldraw!TLUiZoomMenuProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n MainMenu: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiMainMenuProps", + "canonicalReference": "tldraw!TLUiMainMenuProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n Minimap: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n StylePanel: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiStylePanelProps", + "canonicalReference": "tldraw!TLUiStylePanelProps:interface" + }, + { + "kind": "Content", + "text": "> | null;\n PageMenu: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n NavigationPanel: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n Toolbar: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n KeyboardShortcutsDialog: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiKeyboardShortcutsDialogProps", + "canonicalReference": "tldraw!TLUiKeyboardShortcutsDialogProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n QuickActions: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiQuickActionsProps", + "canonicalReference": "tldraw!TLUiQuickActionsProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n HelperButtons: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiHelperButtonsProps", + "canonicalReference": "tldraw!TLUiHelperButtonsProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n DebugPanel: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n DebugMenu: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n MenuPanel: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n TopPanel: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n SharePanel: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n}>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/components.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 57 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useTldrawUiComponents" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useToasts:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useToasts(): " + }, + { + "kind": "Reference", + "text": "TLUiToastsContextType", + "canonicalReference": "tldraw!TLUiToastsContextType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/toasts.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useToasts" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useTools:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useTools(): " + }, + { + "kind": "Reference", + "text": "TLUiToolsContextType", + "canonicalReference": "tldraw!TLUiToolsContextType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTools.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useTools" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useTranslation:function(1)", + "docComment": "/**\n * Returns a function to translate a translation key into a string based on the current translation.\n *\n * @example\n * ```ts\n * const msg = useTranslation()\n * const label = msg('style-panel.styles')\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useTranslation(): " + }, + { + "kind": "Content", + "text": "(id?: " + }, + { + "kind": "Reference", + "text": "Exclude", + "canonicalReference": "!Exclude:type" + }, + { + "kind": "Content", + "text": " | string) => string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTranslation/useTranslation.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useTranslation" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!useUiEvents:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useUiEvents(): " + }, + { + "kind": "Reference", + "text": "TLUiEventContextType", + "canonicalReference": "tldraw!TLUiEventContextType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/context/events.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useUiEvents" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!VideoShapeUtil:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class VideoShapeUtil extends " + }, + { + "kind": "Reference", + "text": "BaseBoxShapeUtil", + "canonicalReference": "@tldraw/editor!BaseBoxShapeUtil:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLVideoShape", + "canonicalReference": "@tldraw/tlschema!TLVideoShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/video/VideoShapeUtil.tsx", + "releaseTag": "Public", + "isAbstract": false, + "name": "VideoShapeUtil", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!VideoShapeUtil#canEdit:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canEdit: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canEdit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!VideoShapeUtil#component:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "component(shape: " + }, + { + "kind": "Reference", + "text": "TLVideoShape", + "canonicalReference": "@tldraw/tlschema!TLVideoShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "component" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!VideoShapeUtil#getDefaultProps:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDefaultProps(): " + }, + { + "kind": "Reference", + "text": "TLVideoShape", + "canonicalReference": "@tldraw/tlschema!TLVideoShape:type" + }, + { + "kind": "Content", + "text": "['props']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "getDefaultProps" + }, + { + "kind": "Method", + "canonicalReference": "tldraw!VideoShapeUtil#indicator:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "indicator(shape: " + }, + { + "kind": "Reference", + "text": "TLVideoShape", + "canonicalReference": "@tldraw/tlschema!TLVideoShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "indicator" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!VideoShapeUtil#isAspectRatioLocked:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isAspectRatioLocked: " + }, + { + "kind": "Content", + "text": "() => boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isAspectRatioLocked", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!VideoShapeUtil.migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static migrations: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!VideoShapeUtil.props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static props: " + }, + { + "kind": "Content", + "text": "{\n w: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n h: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n time: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n playing: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n assetId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 16 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "tldraw!VideoShapeUtil#toSvg:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "toSvg(shape: " + }, + { + "kind": "Reference", + "text": "TLVideoShape", + "canonicalReference": "@tldraw/tlschema!TLVideoShape:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shape", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toSvg" + }, + { + "kind": "Property", + "canonicalReference": "tldraw!VideoShapeUtil.type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static type: " + }, + { + "kind": "Content", + "text": "\"video\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ViewSubmenu:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ViewSubmenu(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ViewSubmenu" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!XBoxToolbarItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function XBoxToolbarItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "XBoxToolbarItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ZoomOrRotateMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ZoomOrRotateMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ZoomOrRotateMenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ZoomTo100MenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ZoomTo100MenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ZoomTo100MenuItem" + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ZoomToFitMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ZoomToFitMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ZoomToFitMenuItem" + }, + { + "kind": "Class", + "canonicalReference": "tldraw!ZoomTool:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ZoomTool extends " + }, + { + "kind": "Reference", + "text": "StateNode", + "canonicalReference": "@tldraw/editor!StateNode:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/tools/ZoomTool/ZoomTool.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "ZoomTool", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "tldraw!ZoomTool.children:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static children: " + }, + { + "kind": "Content", + "text": "() => (typeof " + }, + { + "kind": "Reference", + "text": "Idle", + "canonicalReference": "tldraw!~Idle_12:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "Pointing", + "canonicalReference": "tldraw!~Pointing_8:class" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "ZoomBrushing", + "canonicalReference": "tldraw!~ZoomBrushing:class" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "children", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ZoomTool.id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ZoomTool#info:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "info: " + }, + { + "kind": "Reference", + "text": "TLPointerEventInfo", + "canonicalReference": "@tldraw/editor!TLPointerEventInfo:type" + }, + { + "kind": "Content", + "text": " & {\n onInteractionEnd?: string | undefined;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "info", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ZoomTool.initial:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static initial: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "initial", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ZoomTool#onEnter:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onEnter: " + }, + { + "kind": "Content", + "text": "(info: " + }, + { + "kind": "Reference", + "text": "TLPointerEventInfo", + "canonicalReference": "@tldraw/editor!TLPointerEventInfo:type" + }, + { + "kind": "Content", + "text": " & {\n onInteractionEnd: string;\n }) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onEnter", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ZoomTool#onExit:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onExit: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onExit", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ZoomTool#onInterrupt:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onInterrupt: " + }, + { + "kind": "Reference", + "text": "TLInterruptEvent", + "canonicalReference": "@tldraw/editor!TLInterruptEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onInterrupt", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ZoomTool#onKeyDown:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onKeyDown: " + }, + { + "kind": "Reference", + "text": "TLKeyboardEvent", + "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onKeyDown", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "tldraw!ZoomTool#onKeyUp:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onKeyUp: " + }, + { + "kind": "Reference", + "text": "TLKeyboardEvent", + "canonicalReference": "@tldraw/editor!TLKeyboardEvent:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "onKeyUp", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "tldraw!ZoomToSelectionMenuItem:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function ZoomToSelectionMenuItem(): " + }, + { + "kind": "Content", + "text": "import(\"react/jsx-runtime\")." + }, + { + "kind": "Reference", + "text": "JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/components/menu-items.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "ZoomToSelectionMenuItem" + } + ] + } + ] } diff --git a/apps/docs/api/tlschema.api.json b/apps/docs/api/tlschema.api.json index 7da188b99..3955240c3 100644 --- a/apps/docs/api/tlschema.api.json +++ b/apps/docs/api/tlschema.api.json @@ -1,9760 +1,9905 @@ { - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.41.0", - "schemaVersion": 1011, - "oldestForwardsCompatibleVersion": 1001, - "tsdocConfig": { - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "noStandardTags": true, - "tagDefinitions": [ - { - "tagName": "@alpha", - "syntaxKind": "modifier" - }, - { - "tagName": "@beta", - "syntaxKind": "modifier" - }, - { - "tagName": "@defaultValue", - "syntaxKind": "block" - }, - { - "tagName": "@decorator", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@deprecated", - "syntaxKind": "block" - }, - { - "tagName": "@eventProperty", - "syntaxKind": "modifier" - }, - { - "tagName": "@example", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@experimental", - "syntaxKind": "modifier" - }, - { - "tagName": "@inheritDoc", - "syntaxKind": "inline" - }, - { - "tagName": "@internal", - "syntaxKind": "modifier" - }, - { - "tagName": "@label", - "syntaxKind": "inline" - }, - { - "tagName": "@link", - "syntaxKind": "inline", - "allowMultiple": true - }, - { - "tagName": "@override", - "syntaxKind": "modifier" - }, - { - "tagName": "@packageDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@param", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@privateRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@public", - "syntaxKind": "modifier" - }, - { - "tagName": "@readonly", - "syntaxKind": "modifier" - }, - { - "tagName": "@remarks", - "syntaxKind": "block" - }, - { - "tagName": "@returns", - "syntaxKind": "block" - }, - { - "tagName": "@sealed", - "syntaxKind": "modifier" - }, - { - "tagName": "@see", - "syntaxKind": "block" - }, - { - "tagName": "@throws", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@typeParam", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@virtual", - "syntaxKind": "modifier" - }, - { - "tagName": "@betaDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@internalRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@preapproved", - "syntaxKind": "modifier" - } - ], - "supportForTags": { - "@alpha": true, - "@beta": true, - "@defaultValue": true, - "@decorator": true, - "@deprecated": true, - "@eventProperty": true, - "@example": true, - "@experimental": true, - "@inheritDoc": true, - "@internal": true, - "@label": true, - "@link": true, - "@override": true, - "@packageDocumentation": true, - "@param": true, - "@privateRemarks": true, - "@public": true, - "@readonly": true, - "@remarks": true, - "@returns": true, - "@sealed": true, - "@see": true, - "@throws": true, - "@typeParam": true, - "@virtual": true, - "@betaDocumentation": true, - "@internalRemarks": true, - "@preapproved": true - }, - "reportUnsupportedHtmlElements": false - } - }, - "kind": "Package", - "canonicalReference": "@tldraw/tlschema!", - "docComment": "", - "name": "@tldraw/tlschema", - "preserveMemberOrder": false, - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "@tldraw/tlschema!", - "name": "", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!ArrowShapeArrowheadEndStyle:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "ArrowShapeArrowheadEndStyle: " - }, - { - "kind": "Content", - "text": "import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "ArrowShapeArrowheadEndStyle", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!ArrowShapeArrowheadStartStyle:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "ArrowShapeArrowheadStartStyle: " - }, - { - "kind": "Content", - "text": "import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "ArrowShapeArrowheadStartStyle", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!arrowShapeProps:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "arrowShapeProps: " - }, - { - "kind": "Content", - "text": "{\n labelColor: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n color: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n fill: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n arrowheadStart: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n arrowheadEnd: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n font: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n start: " - }, - { - "kind": "Reference", - "text": "T.UnionValidator", - "canonicalReference": "@tldraw/validate!UnionValidator:class" - }, - { - "kind": "Content", - "text": "<\"type\", {\n binding: " - }, - { - "kind": "Reference", - "text": "T.ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"binding\";\n boundShapeId: import(\"..\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n normalizedAnchor: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n } & {}>;\n point: " - }, - { - "kind": "Reference", - "text": "T.ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{\n x: number;\n y: number;\n type: \"point\";\n } & {}>;\n }, never>;\n end: " - }, - { - "kind": "Reference", - "text": "T.UnionValidator", - "canonicalReference": "@tldraw/validate!UnionValidator:class" - }, - { - "kind": "Content", - "text": "<\"type\", {\n binding: " - }, - { - "kind": "Reference", - "text": "T.ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"binding\";\n boundShapeId: import(\"..\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n normalizedAnchor: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n } & {}>;\n point: " - }, - { - "kind": "Reference", - "text": "T.ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{\n x: number;\n y: number;\n type: \"point\";\n } & {}>;\n }, never>;\n bend: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n text: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n labelPosition: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "arrowShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 44 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!assetIdValidator:var", - "docComment": "/**\n * A validator for asset record type Ids.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "assetIdValidator: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLAssetId", - "canonicalReference": "@tldraw/tlschema!TLAssetId:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tlschema/src/assets/TLBaseAsset.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "assetIdValidator", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!AssetRecordType:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "AssetRecordType: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/store\")." - }, - { - "kind": "Reference", - "text": "RecordType", - "canonicalReference": "@tldraw/store!RecordType:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLAsset", - "canonicalReference": "@tldraw/tlschema!TLAsset:type" - }, - { - "kind": "Content", - "text": ", \"props\" | \"type\">" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLAsset.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "AssetRecordType", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!bookmarkShapeProps:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "bookmarkShapeProps: " - }, - { - "kind": "Content", - "text": "{\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n assetId: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLBookmarkShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "bookmarkShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 12 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface", - "docComment": "/**\n * A serializable model for 2D boxes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface BoxModel " - } - ], - "fileUrlPath": "packages/tlschema/src/misc/geometry-types.ts", - "releaseTag": "Public", - "name": "BoxModel", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!BoxModel#h:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "h: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "h", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!BoxModel#w:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "w: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "w", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!BoxModel#x:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "x", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!BoxModel#y:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "y", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!boxModelValidator:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "boxModelValidator: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tlschema/src/misc/geometry-types.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "boxModelValidator", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!CameraRecordType:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "CameraRecordType: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/store\")." - }, - { - "kind": "Reference", - "text": "RecordType", - "canonicalReference": "@tldraw/store!RecordType:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLCamera", - "canonicalReference": "@tldraw/tlschema!TLCamera:interface" - }, - { - "kind": "Content", - "text": ", never>" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLCamera.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "CameraRecordType", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!canvasUiColorTypeValidator:var", - "docComment": "/**\n * A validator for the colors used by tldraw's default shapes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "canvasUiColorTypeValidator: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<\"accent\" | \"black\" | \"laser\" | \"muted-1\" | \"selection-fill\" | \"selection-stroke\" | \"white\">" - } - ], - "fileUrlPath": "packages/tlschema/src/misc/TLColor.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "canvasUiColorTypeValidator", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/tlschema!createAssetValidator:function(1)", - "docComment": "/**\n * Create a validator for an asset record type.\n *\n * @param type - The type of the asset\n *\n * @param props - The validator for the asset's props\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function createAssetValidator(type: " - }, - { - "kind": "Content", - "text": "Type" - }, - { - "kind": "Content", - "text": ", props: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "T.ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{ [P in \"id\" | \"meta\" | \"typeName\" | (undefined extends Props ? never : \"props\") | (undefined extends Type ? never : \"type\")]: {\n id: " - }, - { - "kind": "Reference", - "text": "TLAssetId", - "canonicalReference": "@tldraw/tlschema!TLAssetId:type" - }, - { - "kind": "Content", - "text": ";\n typeName: 'asset';\n type: Type;\n props: Props;\n meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n}[P]; } & { [P_1 in (undefined extends Props ? \"props\" : never) | (undefined extends Type ? \"type\" : never)]?: {\n id: " - }, - { - "kind": "Reference", - "text": "TLAssetId", - "canonicalReference": "@tldraw/tlschema!TLAssetId:type" - }, - { - "kind": "Content", - "text": ";\n typeName: 'asset';\n type: Type;\n props: Props;\n meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n}[P_1] | undefined; }>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/assets/TLBaseAsset.ts", - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 20 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "props", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "Type", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Props", - "constraintTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "createAssetValidator" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/tlschema!createPresenceStateDerivation:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "createPresenceStateDerivation: ($user: " - }, - { - "kind": "Reference", - "text": "Signal", - "canonicalReference": "@tldraw/state!Signal:interface" - }, - { - "kind": "Content", - "text": "<{\n id: string;\n color: string;\n name: string;\n}>" - }, - { - "kind": "Content", - "text": ", instanceId?: " - }, - { - "kind": "Reference", - "text": "TLInstancePresence", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence:interface" - }, - { - "kind": "Content", - "text": "['id']" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Content", - "text": "(store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Signal", - "canonicalReference": "@tldraw/state!Signal:interface" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/tlschema/src/createPresenceStateDerivation.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 14 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "$user", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "instanceId", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "isOptional": true - } - ], - "name": "createPresenceStateDerivation" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/tlschema!createShapeId:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function createShapeId(id?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "name": "createShapeId" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/tlschema!createShapeValidator:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function createShapeValidator(type: " - }, - { - "kind": "Content", - "text": "Type" - }, - { - "kind": "Content", - "text": ", props?: " - }, - { - "kind": "Content", - "text": "{\n [K in keyof Props]: " - }, - { - "kind": "Reference", - "text": "T.Validatable", - "canonicalReference": "@tldraw/validate!Validatable:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ", meta?: " - }, - { - "kind": "Content", - "text": "{\n [K in keyof Meta]: " - }, - { - "kind": "Reference", - "text": "T.Validatable", - "canonicalReference": "@tldraw/validate!Validatable:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "T.ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{ [P in \"id\" | \"index\" | \"isLocked\" | \"meta\" | \"opacity\" | \"parentId\" | \"rotation\" | \"typeName\" | \"x\" | \"y\" | (undefined extends Props ? never : \"props\") | (undefined extends Type ? never : \"type\")]: " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "[P]; } & { [P_1 in (undefined extends Props ? \"props\" : never) | (undefined extends Type ? \"type\" : never)]?: " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "[P_1] | undefined; }>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLBaseShape.ts", - "returnTypeTokenRange": { - "startIndex": 17, - "endIndex": 23 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - }, - { - "parameterName": "props", - "parameterTypeTokenRange": { - "startIndex": 9, - "endIndex": 12 - }, - "isOptional": true - }, - { - "parameterName": "meta", - "parameterTypeTokenRange": { - "startIndex": 13, - "endIndex": 16 - }, - "isOptional": true - } - ], - "typeParameters": [ - { - "typeParameterName": "Type", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Props", - "constraintTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Meta", - "constraintTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "createShapeValidator" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/tlschema!createTLSchema:function(1)", - "docComment": "/**\n * Create a TLSchema with custom shapes. Custom shapes cannot override default shapes.\n *\n * @param opts - Options\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function createTLSchema({ shapes, }?: " - }, - { - "kind": "Content", - "text": "{\n shapes?: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLSchema", - "canonicalReference": "@tldraw/tlschema!TLSchema:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/createTLSchema.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ shapes, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - }, - "isOptional": true - } - ], - "name": "createTLSchema" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!DefaultColorStyle:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultColorStyle: " - }, - { - "kind": "Content", - "text": "import(\"./StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLColorStyle.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultColorStyle", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!DefaultColorThemePalette:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultColorThemePalette: " - }, - { - "kind": "Content", - "text": "{\n lightMode: " - }, - { - "kind": "Reference", - "text": "TLDefaultColorTheme", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type" - }, - { - "kind": "Content", - "text": ";\n darkMode: " - }, - { - "kind": "Reference", - "text": "TLDefaultColorTheme", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type" - }, - { - "kind": "Content", - "text": ";\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLColorStyle.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultColorThemePalette", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!DefaultDashStyle:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultDashStyle: " - }, - { - "kind": "Content", - "text": "import(\"./StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLDashStyle.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultDashStyle", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!DefaultFillStyle:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultFillStyle: " - }, - { - "kind": "Content", - "text": "import(\"./StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLFillStyle.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultFillStyle", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!DefaultFontFamilies:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultFontFamilies: " - }, - { - "kind": "Content", - "text": "{\n draw: string;\n sans: string;\n serif: string;\n mono: string;\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLFontStyle.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultFontFamilies", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!DefaultFontStyle:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultFontStyle: " - }, - { - "kind": "Content", - "text": "import(\"./StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLFontStyle.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultFontStyle", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!DefaultHorizontalAlignStyle:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultHorizontalAlignStyle: " - }, - { - "kind": "Content", - "text": "import(\"./StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLHorizontalAlignStyle.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultHorizontalAlignStyle", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!DefaultSizeStyle:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultSizeStyle: " - }, - { - "kind": "Content", - "text": "import(\"./StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLSizeStyle.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultSizeStyle", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!DefaultVerticalAlignStyle:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DefaultVerticalAlignStyle: " - }, - { - "kind": "Content", - "text": "import(\"./StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end\" | \"middle\" | \"start\">" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLVerticalAlignStyle.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "DefaultVerticalAlignStyle", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!DocumentRecordType:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "DocumentRecordType: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/store\")." - }, - { - "kind": "Reference", - "text": "RecordType", - "canonicalReference": "@tldraw/store!RecordType:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLDocument", - "canonicalReference": "@tldraw/tlschema!TLDocument:interface" - }, - { - "kind": "Content", - "text": ", never>" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLDocument.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "DocumentRecordType", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!drawShapeProps:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "drawShapeProps: " - }, - { - "kind": "Content", - "text": "{\n color: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n fill: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n segments: " - }, - { - "kind": "Reference", - "text": "T.ArrayOfValidator", - "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"free\" | \"straight\";\n points: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "[];\n } & {}>;\n isComplete: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n isClosed: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n isPen: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLDrawShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "drawShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 20 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!EMBED_DEFINITIONS:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "EMBED_DEFINITIONS: " - }, - { - "kind": "Content", - "text": "readonly [{\n readonly type: \"tldraw\";\n readonly title: \"tldraw\";\n readonly hostnames: readonly [\"beta.tldraw.com\", \"tldraw.com\", \"localhost:3000\"];\n readonly minWidth: 300;\n readonly minHeight: 300;\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly canUnmount: true;\n readonly overridePermissions: {\n readonly 'allow-top-navigation': true;\n };\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"figma\";\n readonly title: \"Figma\";\n readonly hostnames: readonly [\"figma.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly canUnmount: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"google_maps\";\n readonly title: \"Google Maps\";\n readonly hostnames: readonly [\"google.*\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly canUnmount: false;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"val_town\";\n readonly title: \"Val Town\";\n readonly hostnames: readonly [\"val.town\"];\n readonly minWidth: 260;\n readonly minHeight: 100;\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly canUnmount: false;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"codesandbox\";\n readonly title: \"CodeSandbox\";\n readonly hostnames: readonly [\"codesandbox.io\"];\n readonly minWidth: 300;\n readonly minHeight: 300;\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly canUnmount: false;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"codepen\";\n readonly title: \"Codepen\";\n readonly hostnames: readonly [\"codepen.io\"];\n readonly minWidth: 300;\n readonly minHeight: 300;\n readonly width: 520;\n readonly height: 400;\n readonly doesResize: true;\n readonly canUnmount: false;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"scratch\";\n readonly title: \"Scratch\";\n readonly hostnames: readonly [\"scratch.mit.edu\"];\n readonly width: 520;\n readonly height: 400;\n readonly doesResize: false;\n readonly canUnmount: false;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"youtube\";\n readonly title: \"YouTube\";\n readonly hostnames: readonly [\"*.youtube.com\", \"youtube.com\", \"youtu.be\"];\n readonly width: 800;\n readonly height: 450;\n readonly doesResize: true;\n readonly canUnmount: false;\n readonly overridePermissions: {\n readonly 'allow-presentation': true;\n };\n readonly isAspectRatioLocked: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"google_calendar\";\n readonly title: \"Google Calendar\";\n readonly hostnames: readonly [\"calendar.google.*\"];\n readonly width: 720;\n readonly height: 500;\n readonly minWidth: 460;\n readonly minHeight: 360;\n readonly doesResize: true;\n readonly canUnmount: false;\n readonly instructionLink: \"https://support.google.com/calendar/answer/41207?hl=en\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"google_slides\";\n readonly title: \"Google Slides\";\n readonly hostnames: readonly [\"docs.google.*\"];\n readonly width: 720;\n readonly height: 500;\n readonly minWidth: 460;\n readonly minHeight: 360;\n readonly doesResize: true;\n readonly canUnmount: false;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"github_gist\";\n readonly title: \"GitHub Gist\";\n readonly hostnames: readonly [\"gist.github.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly canUnmount: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"replit\";\n readonly title: \"Replit\";\n readonly hostnames: readonly [\"replit.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly canUnmount: false;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"felt\";\n readonly title: \"Felt\";\n readonly hostnames: readonly [\"felt.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly canUnmount: false;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"spotify\";\n readonly title: \"Spotify\";\n readonly hostnames: readonly [\"open.spotify.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly minHeight: 500;\n readonly overrideOutlineRadius: 12;\n readonly doesResize: true;\n readonly canUnmount: false;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"vimeo\";\n readonly title: \"Vimeo\";\n readonly hostnames: readonly [\"vimeo.com\", \"player.vimeo.com\"];\n readonly width: 640;\n readonly height: 360;\n readonly doesResize: true;\n readonly canUnmount: false;\n readonly isAspectRatioLocked: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"excalidraw\";\n readonly title: \"Excalidraw\";\n readonly hostnames: readonly [\"excalidraw.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly canUnmount: false;\n readonly isAspectRatioLocked: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"observable\";\n readonly title: \"Observable\";\n readonly hostnames: readonly [\"observablehq.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly canUnmount: false;\n readonly isAspectRatioLocked: false;\n readonly backgroundColor: \"#fff\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}]" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "EMBED_DEFINITIONS", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!EmbedDefinition:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type EmbedDefinition = " - }, - { - "kind": "Content", - "text": "{\n readonly type: string;\n readonly title: string;\n readonly hostnames: readonly string[];\n readonly minWidth?: number;\n readonly minHeight?: number;\n readonly width: number;\n readonly height: number;\n readonly doesResize: boolean;\n readonly canUnmount: boolean;\n readonly isAspectRatioLocked?: boolean;\n readonly overridePermissions?: " - }, - { - "kind": "Reference", - "text": "TLEmbedShapePermissions", - "canonicalReference": "@tldraw/tlschema!TLEmbedShapePermissions:type" - }, - { - "kind": "Content", - "text": ";\n readonly instructionLink?: string;\n readonly backgroundColor?: string;\n readonly overrideOutlineRadius?: number;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", - "releaseTag": "Public", - "name": "EmbedDefinition", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!embedShapePermissionDefaults:var", - "docComment": "/**\n * Permissions with note inline from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "embedShapePermissionDefaults: " - }, - { - "kind": "Content", - "text": "{\n readonly 'allow-downloads-without-user-activation': false;\n readonly 'allow-downloads': false;\n readonly 'allow-modals': false;\n readonly 'allow-orientation-lock': false;\n readonly 'allow-pointer-lock': false;\n readonly 'allow-popups': true;\n readonly 'allow-popups-to-escape-sandbox': false;\n readonly 'allow-presentation': false;\n readonly 'allow-storage-access-by-user-activation': false;\n readonly 'allow-top-navigation': false;\n readonly 'allow-top-navigation-by-user-activation': false;\n readonly 'allow-scripts': true;\n readonly 'allow-same-origin': true;\n readonly 'allow-forms': true;\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "embedShapePermissionDefaults", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!embedShapeProps:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "embedShapeProps: " - }, - { - "kind": "Content", - "text": "{\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "embedShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class", - "docComment": "/**\n * See {@link StyleProp} & {@link StyleProp.defineEnum}\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `EnumStyleProp` class.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class EnumStyleProp extends " - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tlschema/src/styles/StyleProp.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "EnumStyleProp", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp#values:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly values: " - }, - { - "kind": "Content", - "text": "readonly T[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "values", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!frameShapeProps:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "frameShapeProps: " - }, - { - "kind": "Content", - "text": "{\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n name: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLFrameShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "frameShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!GeoShapeGeoStyle:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "GeoShapeGeoStyle: " - }, - { - "kind": "Content", - "text": "import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\">" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLGeoShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "GeoShapeGeoStyle", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!geoShapeProps:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "geoShapeProps: " - }, - { - "kind": "Content", - "text": "{\n geo: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\">;\n labelColor: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n color: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n fill: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n verticalAlign: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end\" | \"middle\" | \"start\">;\n url: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n growY: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n text: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLGeoShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "geoShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 30 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/tlschema!getDefaultColorTheme:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getDefaultColorTheme(opts: " - }, - { - "kind": "Content", - "text": "{\n isDarkMode: boolean;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "TLDefaultColorTheme", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLColorStyle.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "getDefaultColorTheme" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/tlschema!getDefaultTranslationLocale:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getDefaultTranslationLocale(): " - }, - { - "kind": "Reference", - "text": "TLLanguage", - "canonicalReference": "@tldraw/tlschema!TLLanguage:type" - }, - { - "kind": "Content", - "text": "['locale']" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/translations/translations.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "getDefaultTranslationLocale" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!highlightShapeProps:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "highlightShapeProps: " - }, - { - "kind": "Content", - "text": "{\n color: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n size: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n segments: " - }, - { - "kind": "Reference", - "text": "T.ArrayOfValidator", - "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"free\" | \"straight\";\n points: import(\"..\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "[];\n } & {}>;\n isComplete: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n isPen: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLHighlightShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "highlightShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 14 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!imageShapeProps:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "imageShapeProps: " - }, - { - "kind": "Content", - "text": "{\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n playing: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n assetId: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n crop: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<({\n topLeft: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n bottomRight: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n } & {}) | null>;\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLImageShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "imageShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 20 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!InstancePageStateRecordType:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "InstancePageStateRecordType: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/store\")." - }, - { - "kind": "Reference", - "text": "RecordType", - "canonicalReference": "@tldraw/store!RecordType:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLInstancePageState", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState:interface" - }, - { - "kind": "Content", - "text": ", \"pageId\">" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLPageState.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "InstancePageStateRecordType", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!InstancePresenceRecordType:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "InstancePresenceRecordType: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/store\")." - }, - { - "kind": "Reference", - "text": "RecordType", - "canonicalReference": "@tldraw/store!RecordType:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLInstancePresence", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence:interface" - }, - { - "kind": "Content", - "text": ", \"currentPageId\" | \"userId\" | \"userName\">" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLPresence.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "InstancePresenceRecordType", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/tlschema!isPageId:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function isPageId(id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "id", - "canonicalReference": "@tldraw/tlschema!~id" - }, - { - "kind": "Content", - "text": " is " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLPage.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "isPageId" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/tlschema!isShape:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function isShape(record?: " - }, - { - "kind": "Reference", - "text": "UnknownRecord", - "canonicalReference": "@tldraw/store!UnknownRecord:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "record", - "canonicalReference": "@tldraw/tlschema!~record" - }, - { - "kind": "Content", - "text": " is " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "record", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "name": "isShape" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/tlschema!isShapeId:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function isShapeId(id?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "id", - "canonicalReference": "@tldraw/tlschema!~id" - }, - { - "kind": "Content", - "text": " is " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "id", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "name": "isShapeId" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!LANGUAGES:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "LANGUAGES: " - }, - { - "kind": "Content", - "text": "readonly [{\n readonly locale: \"ca\";\n readonly label: \"Català\";\n}, {\n readonly locale: \"cs\";\n readonly label: \"Čeština\";\n}, {\n readonly locale: \"da\";\n readonly label: \"Danish\";\n}, {\n readonly locale: \"de\";\n readonly label: \"Deutsch\";\n}, {\n readonly locale: \"en\";\n readonly label: \"English\";\n}, {\n readonly locale: \"es\";\n readonly label: \"Español\";\n}, {\n readonly locale: \"fr\";\n readonly label: \"Français\";\n}, {\n readonly locale: \"gl\";\n readonly label: \"Galego\";\n}, {\n readonly locale: \"hr\";\n readonly label: \"Hrvatski\";\n}, {\n readonly locale: \"it\";\n readonly label: \"Italiano\";\n}, {\n readonly locale: \"hu\";\n readonly label: \"Magyar\";\n}, {\n readonly locale: \"no\";\n readonly label: \"Norwegian\";\n}, {\n readonly locale: \"pl\";\n readonly label: \"Polski\";\n}, {\n readonly locale: \"pt-br\";\n readonly label: \"Português - Brasil\";\n}, {\n readonly locale: \"pt-pt\";\n readonly label: \"Português - Europeu\";\n}, {\n readonly locale: \"ro\";\n readonly label: \"Română\";\n}, {\n readonly locale: \"ru\";\n readonly label: \"Russian\";\n}, {\n readonly locale: \"sl\";\n readonly label: \"Slovenščina\";\n}, {\n readonly locale: \"fi\";\n readonly label: \"Suomi\";\n}, {\n readonly locale: \"sv\";\n readonly label: \"Svenska\";\n}, {\n readonly locale: \"vi\";\n readonly label: \"Tiếng Việt\";\n}, {\n readonly locale: \"tr\";\n readonly label: \"Türkçe\";\n}, {\n readonly locale: \"uk\";\n readonly label: \"Ukrainian\";\n}, {\n readonly locale: \"he\";\n readonly label: \"עברית\";\n}, {\n readonly locale: \"ar\";\n readonly label: \"عربي\";\n}, {\n readonly locale: \"fa\";\n readonly label: \"فارسی\";\n}, {\n readonly locale: \"ku\";\n readonly label: \"کوردی\";\n}, {\n readonly locale: \"ne\";\n readonly label: \"नेपाली\";\n}, {\n readonly locale: \"hi-in\";\n readonly label: \"हिन्दी\";\n}, {\n readonly locale: \"te\";\n readonly label: \"తెలుగు\";\n}, {\n readonly locale: \"th\";\n readonly label: \"ภาษาไทย\";\n}, {\n readonly locale: \"my\";\n readonly label: \"မြန်မာစာ\";\n}, {\n readonly locale: \"ko-kr\";\n readonly label: \"한국어\";\n}, {\n readonly locale: \"ja\";\n readonly label: \"日本語\";\n}, {\n readonly locale: \"zh-cn\";\n readonly label: \"简体中文\";\n}, {\n readonly locale: \"zh-tw\";\n readonly label: \"繁體中文 (台灣)\";\n}]" - } - ], - "fileUrlPath": "packages/tlschema/src/translations/languages.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "LANGUAGES", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!lineShapeProps:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "lineShapeProps: " - }, - { - "kind": "Content", - "text": "{\n color: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n dash: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n spline: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"cubic\" | \"line\">;\n points: " - }, - { - "kind": "Reference", - "text": "T.DictValidator", - "canonicalReference": "@tldraw/validate!DictValidator:class" - }, - { - "kind": "Content", - "text": ";\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLLineShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "lineShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 14 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!LineShapeSplineStyle:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "LineShapeSplineStyle: " - }, - { - "kind": "Content", - "text": "import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"cubic\" | \"line\">" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLLineShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "LineShapeSplineStyle", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!noteShapeProps:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "noteShapeProps: " - }, - { - "kind": "Content", - "text": "{\n color: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n size: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n verticalAlign: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end\" | \"middle\" | \"start\">;\n growY: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n text: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLNoteShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "noteShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 18 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!PageRecordType:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "PageRecordType: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/store\")." - }, - { - "kind": "Reference", - "text": "RecordType", - "canonicalReference": "@tldraw/store!RecordType:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": ", \"index\" | \"name\">" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLPage.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "PageRecordType", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!parentIdValidator:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "parentIdValidator: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLBaseShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "parentIdValidator", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!PointerRecordType:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "PointerRecordType: " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/store\")." - }, - { - "kind": "Reference", - "text": "RecordType", - "canonicalReference": "@tldraw/store!RecordType:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLPointer", - "canonicalReference": "@tldraw/tlschema!~TLPointer:interface" - }, - { - "kind": "Content", - "text": ", never>" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLPointer.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "PointerRecordType", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!SchemaShapeInfo:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type SchemaShapeInfo = " - }, - { - "kind": "Content", - "text": "{\n migrations?: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";\n props?: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ";\n meta?: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/createTLSchema.ts", - "releaseTag": "Public", - "name": "SchemaShapeInfo", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 12 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!shapeIdValidator:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "shapeIdValidator: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLBaseShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "shapeIdValidator", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!ShapeProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type ShapeProps" - }, - { - "kind": "Content", - "text": "> = " - }, - { - "kind": "Content", - "text": "{\n [K in keyof Shape['props']]: " - }, - { - "kind": "Reference", - "text": "T.Validatable", - "canonicalReference": "@tldraw/validate!Validatable:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLBaseShape.ts", - "releaseTag": "Public", - "name": "ShapeProps", - "typeParameters": [ - { - "typeParameterName": "Shape", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 4, - "endIndex": 7 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/tlschema!StyleProp:class", - "docComment": "/**\n * A `StyleProp` is a property of a shape that follows some special rules.\n *\n * 1. The same value can be set on lots of shapes at the same time.\n *\n * 2. The last used value is automatically saved and applied to new shapes.\n *\n * For example, {@link DefaultColorStyle} is a style prop used by tldraw's default shapes to set their color. If you try selecting several shapes on tldraw.com and changing their color, you'll see that the color is applied to all of them. Then, if you draw a new shape, it'll have the same color as the one you just set.\n *\n * You can use styles in your own shapes by either defining your own (see {@link StyleProp.define} and {@link StyleProp.defineEnum}) or using tldraw's default ones, like {@link DefaultColorStyle}. When you define a shape, pass a `props` object describing all of your shape's properties, using `StyleProp`s for the ones you want to be styles. See the {@link https://github.com/tldraw/tldraw/tree/main/apps/examples | custom styles example} for more.\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `StyleProp` class.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class StyleProp implements " - }, - { - "kind": "Reference", - "text": "T.Validatable", - "canonicalReference": "@tldraw/validate!Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tlschema/src/styles/StyleProp.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Type", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "StyleProp", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Property", - "canonicalReference": "@tldraw/tlschema!StyleProp#defaultValue:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly defaultValue: " - }, - { - "kind": "Content", - "text": "Type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "defaultValue", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/tlschema!StyleProp.define:member(1)", - "docComment": "/**\n * Define a new {@link StyleProp}.\n *\n * @param uniqueId - Each StyleProp must have a unique ID. We recommend you prefix this with your app/library name.\n *\n * @param options - - `defaultValue`: The default value for this style prop.\n *\n * - `type`: Optionally, describe what type of data you expect for this style prop.\n *\n * @example\n * ```ts\n * import {T} from '@tldraw/validate'\n * import {StyleProp} from '@tldraw/tlschema'\n *\n * const MyLineWidthProp = StyleProp.define('myApp:lineWidth', {\n * defaultValue: 1,\n * type: T.number,\n * })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static define(uniqueId: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", options: " - }, - { - "kind": "Content", - "text": "{\n defaultValue: Type;\n type?: " - }, - { - "kind": "Reference", - "text": "T.Validatable", - "canonicalReference": "@tldraw/validate!Validatable:type" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "Type", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "uniqueId", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "define" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/tlschema!StyleProp.defineEnum:member(1)", - "docComment": "/**\n * Define a new {@link StyleProp} as a list of possible values.\n *\n * @param uniqueId - Each StyleProp must have a unique ID. We recommend you prefix this with your app/library name.\n *\n * @param options - - `defaultValue`: The default value for this style prop.\n *\n * - `values`: An array of possible values of this style prop.\n *\n * @example\n * ```ts\n * import {StyleProp} from '@tldraw/tlschema'\n *\n * const MySizeProp = StyleProp.defineEnum('myApp:size', {\n * defaultValue: 'medium',\n * values: ['small', 'medium', 'large'],\n * })\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static defineEnum(uniqueId: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", options: " - }, - { - "kind": "Content", - "text": "{\n defaultValue: Values[number];\n values: Values;\n }" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "Values", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "uniqueId", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "defineEnum" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/tlschema!StyleProp#id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/tlschema!StyleProp#type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly type: " - }, - { - "kind": "Reference", - "text": "T.Validatable", - "canonicalReference": "@tldraw/validate!Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/tlschema!StyleProp#validate:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "validate(value: " - }, - { - "kind": "Content", - "text": "unknown" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "Type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "validate" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/tlschema!StyleProp#validateUsingKnownGoodVersion:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "validateUsingKnownGoodVersion(prevValue: " - }, - { - "kind": "Content", - "text": "Type" - }, - { - "kind": "Content", - "text": ", newValue: " - }, - { - "kind": "Content", - "text": "unknown" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "Type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "prevValue", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "newValue", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "validateUsingKnownGoodVersion" - } - ], - "implementsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 3 - } - ] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!StylePropValue:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type StylePropValue" - }, - { - "kind": "Content", - "text": "> = " - }, - { - "kind": "Content", - "text": "T extends " - }, - { - "kind": "Reference", - "text": "StyleProp", - "canonicalReference": "@tldraw/tlschema!StyleProp:class" - }, - { - "kind": "Content", - "text": " ? U : never" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/StyleProp.ts", - "releaseTag": "Public", - "name": "StylePropValue", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 4, - "endIndex": 7 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!textShapeProps:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "textShapeProps: " - }, - { - "kind": "Content", - "text": "{\n color: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"yellow\">;\n size: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n text: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n scale: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n autoSize: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLTextShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "textShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 18 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!TL_CANVAS_UI_COLOR_TYPES:var", - "docComment": "/**\n * The colors used by tldraw's default shapes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TL_CANVAS_UI_COLOR_TYPES: " - }, - { - "kind": "Reference", - "text": "Set", - "canonicalReference": "!Set:interface" - }, - { - "kind": "Content", - "text": "<\"accent\" | \"black\" | \"laser\" | \"muted-1\" | \"selection-fill\" | \"selection-stroke\" | \"white\">" - } - ], - "fileUrlPath": "packages/tlschema/src/misc/TLColor.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "TL_CANVAS_UI_COLOR_TYPES", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLArrowShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "<'arrow', " - }, - { - "kind": "Reference", - "text": "TLArrowShapeProps", - "canonicalReference": "@tldraw/tlschema!TLArrowShapeProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", - "releaseTag": "Public", - "name": "TLArrowShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLArrowShapeArrowheadStyle:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLArrowShapeArrowheadStyle = " - }, - { - "kind": "Reference", - "text": "T.TypeOf", - "canonicalReference": "@tldraw/validate!TypeOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", - "releaseTag": "Public", - "name": "TLArrowShapeArrowheadStyle", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLArrowShapeProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLArrowShapeProps = " - }, - { - "kind": "Reference", - "text": "ShapePropsType", - "canonicalReference": "@tldraw/tlschema!~ShapePropsType:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", - "releaseTag": "Public", - "name": "TLArrowShapeProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLArrowShapeTerminal:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLArrowShapeTerminal = " - }, - { - "kind": "Reference", - "text": "T.TypeOf", - "canonicalReference": "@tldraw/validate!TypeOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", - "releaseTag": "Public", - "name": "TLArrowShapeTerminal", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLAsset:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLAsset = " - }, - { - "kind": "Reference", - "text": "TLBookmarkAsset", - "canonicalReference": "@tldraw/tlschema!TLBookmarkAsset:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLImageAsset", - "canonicalReference": "@tldraw/tlschema!TLImageAsset:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLVideoAsset", - "canonicalReference": "@tldraw/tlschema!TLVideoAsset:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLAsset.ts", - "releaseTag": "Public", - "name": "TLAsset", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLAssetId:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLAssetId = " - }, - { - "kind": "Reference", - "text": "RecordId", - "canonicalReference": "@tldraw/store!RecordId:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLBaseAsset", - "canonicalReference": "@tldraw/tlschema!TLBaseAsset:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLAsset.ts", - "releaseTag": "Public", - "name": "TLAssetId", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLAssetPartial:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLAssetPartial = " - }, - { - "kind": "Content", - "text": "T extends T ? {\n id: " - }, - { - "kind": "Reference", - "text": "TLAssetId", - "canonicalReference": "@tldraw/tlschema!TLAssetId:type" - }, - { - "kind": "Content", - "text": ";\n type: T['type'];\n props?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ";\n meta?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ";\n} & " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "> : never" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLAsset.ts", - "releaseTag": "Public", - "name": "TLAssetPartial", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "typeTokenRange": { - "startIndex": 5, - "endIndex": 16 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLAssetShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLAssetShape = " - }, - { - "kind": "Reference", - "text": "Extract", - "canonicalReference": "!Extract:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ", {\n props: {\n assetId: " - }, - { - "kind": "Reference", - "text": "TLAssetId", - "canonicalReference": "@tldraw/tlschema!TLAssetId:type" - }, - { - "kind": "Content", - "text": ";\n };\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLAsset.ts", - "releaseTag": "Public", - "name": "TLAssetShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/tlschema!TLBaseAsset:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLBaseAsset extends " - }, - { - "kind": "Reference", - "text": "BaseRecord", - "canonicalReference": "@tldraw/store!BaseRecord:interface" - }, - { - "kind": "Content", - "text": "<'asset', " - }, - { - "kind": "Reference", - "text": "TLAssetId", - "canonicalReference": "@tldraw/tlschema!TLAssetId:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tlschema/src/assets/TLBaseAsset.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Type", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Props", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "TLBaseAsset", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLBaseAsset#meta:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "meta", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLBaseAsset#props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "props: " - }, - { - "kind": "Content", - "text": "Props" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLBaseAsset#type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Content", - "text": "Type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 3, - "endIndex": 7 - } - ] - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLBaseShape extends " - }, - { - "kind": "Reference", - "text": "BaseRecord", - "canonicalReference": "@tldraw/store!BaseRecord:interface" - }, - { - "kind": "Content", - "text": "<'shape', " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLBaseShape.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Type", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Props", - "constraintTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "TLBaseShape", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLBaseShape#index:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "index: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "index", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLBaseShape#isLocked:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isLocked: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isLocked", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLBaseShape#meta:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "meta", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLBaseShape#opacity:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "opacity: " - }, - { - "kind": "Reference", - "text": "TLOpacityType", - "canonicalReference": "@tldraw/tlschema!TLOpacityType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "opacity", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLBaseShape#parentId:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "parentId: " - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "parentId", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLBaseShape#props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "props: " - }, - { - "kind": "Content", - "text": "Props" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "props", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLBaseShape#rotation:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "rotation: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "rotation", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLBaseShape#type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Content", - "text": "Type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLBaseShape#x:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "x", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLBaseShape#y:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "y", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 5, - "endIndex": 9 - } - ] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLBookmarkAsset:type", - "docComment": "/**\n * An asset used for URL bookmarks, used by the TLBookmarkShape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLBookmarkAsset = " - }, - { - "kind": "Reference", - "text": "TLBaseAsset", - "canonicalReference": "@tldraw/tlschema!TLBaseAsset:interface" - }, - { - "kind": "Content", - "text": "<'bookmark', {\n title: string;\n description: string;\n image: string;\n src: null | string;\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/assets/TLBookmarkAsset.ts", - "releaseTag": "Public", - "name": "TLBookmarkAsset", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLBookmarkShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "<'bookmark', " - }, - { - "kind": "Reference", - "text": "TLBookmarkShapeProps", - "canonicalReference": "@tldraw/tlschema!~TLBookmarkShapeProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLBookmarkShape.ts", - "releaseTag": "Public", - "name": "TLBookmarkShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/tlschema!TLCamera:interface", - "docComment": "/**\n * A camera record.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLCamera extends " - }, - { - "kind": "Reference", - "text": "BaseRecord", - "canonicalReference": "@tldraw/store!BaseRecord:interface" - }, - { - "kind": "Content", - "text": "<'camera', " - }, - { - "kind": "Reference", - "text": "TLCameraId", - "canonicalReference": "@tldraw/tlschema!TLCameraId:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLCamera.ts", - "releaseTag": "Public", - "name": "TLCamera", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLCamera#meta:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "meta", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLCamera#x:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "x", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLCamera#y:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "y", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLCamera#z:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "z: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "z", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 5 - } - ] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLCameraId:type", - "docComment": "/**\n * The id of a camera record.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLCameraId = " - }, - { - "kind": "Reference", - "text": "RecordId", - "canonicalReference": "@tldraw/store!RecordId:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLCamera", - "canonicalReference": "@tldraw/tlschema!TLCamera:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLCamera.ts", - "releaseTag": "Public", - "name": "TLCameraId", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLCanvasUiColor:type", - "docComment": "/**\n * A type for the colors used by tldraw's default shapes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLCanvasUiColor = " - }, - { - "kind": "Reference", - "text": "SetValue", - "canonicalReference": "@tldraw/tlschema!~SetValue:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/misc/TLColor.ts", - "releaseTag": "Public", - "name": "TLCanvasUiColor", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/tlschema!TLCursor:interface", - "docComment": "/**\n * A cursor used by tldraw.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLCursor " - } - ], - "fileUrlPath": "packages/tlschema/src/misc/TLCursor.ts", - "releaseTag": "Public", - "name": "TLCursor", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLCursor#rotation:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "rotation: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "rotation", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLCursor#type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Reference", - "text": "TLCursorType", - "canonicalReference": "@tldraw/tlschema!TLCursorType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLCursorType:type", - "docComment": "/**\n * A type for the cursor types used by tldraw's default shapes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLCursorType = " - }, - { - "kind": "Reference", - "text": "SetValue", - "canonicalReference": "@tldraw/tlschema!~SetValue:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/misc/TLCursor.ts", - "releaseTag": "Public", - "name": "TLCursorType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorStyle:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLDefaultColorStyle = " - }, - { - "kind": "Reference", - "text": "T.TypeOf", - "canonicalReference": "@tldraw/validate!TypeOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLColorStyle.ts", - "releaseTag": "Public", - "name": "TLDefaultColorStyle", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLDefaultColorTheme = " - }, - { - "kind": "Reference", - "text": "Expand", - "canonicalReference": "@tldraw/utils!Expand:type" - }, - { - "kind": "Content", - "text": "<{\n id: 'dark' | 'light';\n text: string;\n background: string;\n solid: string;\n} & " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "<(typeof " - }, - { - "kind": "Reference", - "text": "colors", - "canonicalReference": "@tldraw/tlschema!~colors:var" - }, - { - "kind": "Content", - "text": ")[number], " - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ">>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLColorStyle.ts", - "releaseTag": "Public", - "name": "TLDefaultColorTheme", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 9 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLDefaultColorThemeColor = " - }, - { - "kind": "Content", - "text": "{\n solid: string;\n semi: string;\n pattern: string;\n highlight: {\n srgb: string;\n p3: string;\n };\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLColorStyle.ts", - "releaseTag": "Public", - "name": "TLDefaultColorThemeColor", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLDefaultDashStyle:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLDefaultDashStyle = " - }, - { - "kind": "Reference", - "text": "T.TypeOf", - "canonicalReference": "@tldraw/validate!TypeOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLDashStyle.ts", - "releaseTag": "Public", - "name": "TLDefaultDashStyle", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLDefaultFillStyle:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLDefaultFillStyle = " - }, - { - "kind": "Reference", - "text": "T.TypeOf", - "canonicalReference": "@tldraw/validate!TypeOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLFillStyle.ts", - "releaseTag": "Public", - "name": "TLDefaultFillStyle", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLDefaultFontStyle:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLDefaultFontStyle = " - }, - { - "kind": "Reference", - "text": "T.TypeOf", - "canonicalReference": "@tldraw/validate!TypeOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLFontStyle.ts", - "releaseTag": "Public", - "name": "TLDefaultFontStyle", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLDefaultHorizontalAlignStyle:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLDefaultHorizontalAlignStyle = " - }, - { - "kind": "Reference", - "text": "T.TypeOf", - "canonicalReference": "@tldraw/validate!TypeOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLHorizontalAlignStyle.ts", - "releaseTag": "Public", - "name": "TLDefaultHorizontalAlignStyle", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLDefaultShape:type", - "docComment": "/**\n * The default set of shapes that are available in the editor.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLDefaultShape = " - }, - { - "kind": "Reference", - "text": "TLArrowShape", - "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLBookmarkShape", - "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLDrawShape", - "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLEmbedShape", - "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLFrameShape", - "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLGeoShape", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLGroupShape", - "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLHighlightShape", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLImageShape", - "canonicalReference": "@tldraw/tlschema!TLImageShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLLineShape", - "canonicalReference": "@tldraw/tlschema!TLLineShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLTextShape", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLVideoShape", - "canonicalReference": "@tldraw/tlschema!TLVideoShape:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", - "releaseTag": "Public", - "name": "TLDefaultShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 26 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLDefaultSizeStyle:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLDefaultSizeStyle = " - }, - { - "kind": "Reference", - "text": "T.TypeOf", - "canonicalReference": "@tldraw/validate!TypeOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLSizeStyle.ts", - "releaseTag": "Public", - "name": "TLDefaultSizeStyle", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLDefaultVerticalAlignStyle:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLDefaultVerticalAlignStyle = " - }, - { - "kind": "Reference", - "text": "T.TypeOf", - "canonicalReference": "@tldraw/validate!TypeOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/styles/TLVerticalAlignStyle.ts", - "releaseTag": "Public", - "name": "TLDefaultVerticalAlignStyle", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!TLDOCUMENT_ID:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TLDOCUMENT_ID: " - }, - { - "kind": "Reference", - "text": "RecordId", - "canonicalReference": "@tldraw/store!RecordId:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLDocument", - "canonicalReference": "@tldraw/tlschema!TLDocument:interface" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLDocument.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "TLDOCUMENT_ID", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/tlschema!TLDocument:interface", - "docComment": "/**\n * TLDocument\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLDocument extends " - }, - { - "kind": "Reference", - "text": "BaseRecord", - "canonicalReference": "@tldraw/store!BaseRecord:interface" - }, - { - "kind": "Content", - "text": "<'document', " - }, - { - "kind": "Reference", - "text": "RecordId", - "canonicalReference": "@tldraw/store!RecordId:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLDocument", - "canonicalReference": "@tldraw/tlschema!TLDocument:interface" - }, - { - "kind": "Content", - "text": ">>" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLDocument.ts", - "releaseTag": "Public", - "name": "TLDocument", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLDocument#gridSize:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "gridSize: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "gridSize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLDocument#meta:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "meta", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLDocument#name:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "name", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 7 - } - ] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLDrawShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLDrawShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "<'draw', " - }, - { - "kind": "Reference", - "text": "TLDrawShapeProps", - "canonicalReference": "@tldraw/tlschema!~TLDrawShapeProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLDrawShape.ts", - "releaseTag": "Public", - "name": "TLDrawShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLDrawShapeSegment:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLDrawShapeSegment = " - }, - { - "kind": "Reference", - "text": "T.TypeOf", - "canonicalReference": "@tldraw/validate!TypeOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLDrawShape.ts", - "releaseTag": "Public", - "name": "TLDrawShapeSegment", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLEmbedShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "<'embed', " - }, - { - "kind": "Reference", - "text": "TLEmbedShapeProps", - "canonicalReference": "@tldraw/tlschema!~TLEmbedShapeProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", - "releaseTag": "Public", - "name": "TLEmbedShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLEmbedShapePermissions:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLEmbedShapePermissions = " - }, - { - "kind": "Content", - "text": "{\n [K in keyof typeof " - }, - { - "kind": "Reference", - "text": "embedShapePermissionDefaults", - "canonicalReference": "@tldraw/tlschema!embedShapePermissionDefaults:var" - }, - { - "kind": "Content", - "text": "]?: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", - "releaseTag": "Public", - "name": "TLEmbedShapePermissions", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLFrameShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLFrameShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "<'frame', " - }, - { - "kind": "Reference", - "text": "TLFrameShapeProps", - "canonicalReference": "@tldraw/tlschema!~TLFrameShapeProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLFrameShape.ts", - "releaseTag": "Public", - "name": "TLFrameShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLGeoShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLGeoShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "<'geo', " - }, - { - "kind": "Reference", - "text": "TLGeoShapeProps", - "canonicalReference": "@tldraw/tlschema!~TLGeoShapeProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLGeoShape.ts", - "releaseTag": "Public", - "name": "TLGeoShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLGroupShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLGroupShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "<'group', " - }, - { - "kind": "Reference", - "text": "TLGroupShapeProps", - "canonicalReference": "@tldraw/tlschema!~TLGroupShapeProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLGroupShape.ts", - "releaseTag": "Public", - "name": "TLGroupShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface", - "docComment": "/**\n * A base interface for a shape's handles.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLHandle " - } - ], - "fileUrlPath": "packages/tlschema/src/misc/TLHandle.ts", - "releaseTag": "Public", - "name": "TLHandle", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLHandle#canBind:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canBind?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "canBind", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLHandle#canSnap:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canSnap?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "canSnap", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLHandle#id:member", - "docComment": "/**\n * A unique identifier for the handle.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLHandle#index:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "index: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "index", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLHandle#type:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Reference", - "text": "TLHandleType", - "canonicalReference": "@tldraw/tlschema!TLHandleType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLHandle#x:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "x", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLHandle#y:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "y", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLHandleType:type", - "docComment": "/**\n * A type for the handle types used by tldraw's default shapes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLHandleType = " - }, - { - "kind": "Reference", - "text": "SetValue", - "canonicalReference": "@tldraw/tlschema!~SetValue:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/misc/TLHandle.ts", - "releaseTag": "Public", - "name": "TLHandleType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLHighlightShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "<'highlight', " - }, - { - "kind": "Reference", - "text": "TLHighlightShapeProps", - "canonicalReference": "@tldraw/tlschema!~TLHighlightShapeProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLHighlightShape.ts", - "releaseTag": "Public", - "name": "TLHighlightShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLImageAsset:type", - "docComment": "/**\n * An asset for images such as PNGs and JPEGs, used by the TLImageShape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLImageAsset = " - }, - { - "kind": "Reference", - "text": "TLBaseAsset", - "canonicalReference": "@tldraw/tlschema!TLBaseAsset:interface" - }, - { - "kind": "Content", - "text": "<'image', {\n w: number;\n h: number;\n name: string;\n isAnimated: boolean;\n mimeType: null | string;\n src: null | string;\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/assets/TLImageAsset.ts", - "releaseTag": "Public", - "name": "TLImageAsset", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLImageShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLImageShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "<'image', " - }, - { - "kind": "Reference", - "text": "TLImageShapeProps", - "canonicalReference": "@tldraw/tlschema!TLImageShapeProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLImageShape.ts", - "releaseTag": "Public", - "name": "TLImageShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLImageShapeCrop:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLImageShapeCrop = " - }, - { - "kind": "Reference", - "text": "T.TypeOf", - "canonicalReference": "@tldraw/validate!TypeOf:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLImageShape.ts", - "releaseTag": "Public", - "name": "TLImageShapeCrop", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLImageShapeProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLImageShapeProps = " - }, - { - "kind": "Reference", - "text": "ShapePropsType", - "canonicalReference": "@tldraw/tlschema!~ShapePropsType:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLImageShape.ts", - "releaseTag": "Public", - "name": "TLImageShapeProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!TLINSTANCE_ID:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TLINSTANCE_ID: " - }, - { - "kind": "Reference", - "text": "TLInstanceId", - "canonicalReference": "@tldraw/tlschema!TLInstanceId:type" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLInstance.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "TLINSTANCE_ID", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/tlschema!TLInstance:interface", - "docComment": "/**\n * TLInstance\n *\n * State that is particular to a single browser tab\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLInstance extends " - }, - { - "kind": "Reference", - "text": "BaseRecord", - "canonicalReference": "@tldraw/store!BaseRecord:interface" - }, - { - "kind": "Content", - "text": "<'instance', " - }, - { - "kind": "Reference", - "text": "TLInstanceId", - "canonicalReference": "@tldraw/tlschema!TLInstanceId:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLInstance.ts", - "releaseTag": "Public", - "name": "TLInstance", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#brush:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "brush: " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "brush", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#canMoveCamera:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "canMoveCamera: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "canMoveCamera", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#chatMessage:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "chatMessage: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "chatMessage", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#currentPageId:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "currentPageId: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "currentPageId", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#cursor:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "cursor: " - }, - { - "kind": "Reference", - "text": "TLCursor", - "canonicalReference": "@tldraw/tlschema!TLCursor:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "cursor", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#devicePixelRatio:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "devicePixelRatio: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "devicePixelRatio", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#duplicateProps:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "duplicateProps: " - }, - { - "kind": "Content", - "text": "{\n shapeIds: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[];\n offset: {\n x: number;\n y: number;\n };\n } | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "duplicateProps", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#exportBackground:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "exportBackground: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "exportBackground", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#followingUserId:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "followingUserId: " - }, - { - "kind": "Content", - "text": "null | string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "followingUserId", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#highlightedUserIds:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "highlightedUserIds: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "highlightedUserIds", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#insets:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "insets: " - }, - { - "kind": "Content", - "text": "boolean[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "insets", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#isChangingStyle:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isChangingStyle: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isChangingStyle", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#isChatting:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isChatting: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isChatting", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#isCoarsePointer:member", - "docComment": "/**\n * This is whether the primary input mechanism includes a pointing device of limited accuracy, such as a finger on a touchscreen. See: https://developer.mozilla.org/en-US/docs/Web/CSS/\\@media/pointer\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isCoarsePointer: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isCoarsePointer", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#isDebugMode:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isDebugMode: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isDebugMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#isFocused:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isFocused: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isFocused", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#isFocusMode:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isFocusMode: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isFocusMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#isGridMode:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isGridMode: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isGridMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#isHoveringCanvas:member", - "docComment": "/**\n * Will be null if the pointer doesn't support hovering (e.g. touch), but true or false otherwise\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isHoveringCanvas: " - }, - { - "kind": "Content", - "text": "boolean | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isHoveringCanvas", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#isPenMode:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isPenMode: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isPenMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#isReadonly:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isReadonly: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isReadonly", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#isToolLocked:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "isToolLocked: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "isToolLocked", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#meta:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "meta", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#opacityForNextShape:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "opacityForNextShape: " - }, - { - "kind": "Reference", - "text": "TLOpacityType", - "canonicalReference": "@tldraw/tlschema!TLOpacityType:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "opacityForNextShape", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#openMenus:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "openMenus: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "openMenus", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#screenBounds:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "screenBounds: " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "screenBounds", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#scribbles:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "scribbles: " - }, - { - "kind": "Reference", - "text": "TLScribble", - "canonicalReference": "@tldraw/tlschema!TLScribble:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "scribbles", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#stylesForNextShape:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "stylesForNextShape: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "stylesForNextShape", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstance#zoomBrush:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "zoomBrush: " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "zoomBrush", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 5 - } - ] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLInstanceId:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLInstanceId = " - }, - { - "kind": "Reference", - "text": "RecordId", - "canonicalReference": "@tldraw/store!RecordId:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLInstance", - "canonicalReference": "@tldraw/tlschema!TLInstance:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLInstance.ts", - "releaseTag": "Public", - "name": "TLInstanceId", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState:interface", - "docComment": "/**\n * TLInstancePageState\n *\n * State that is unique to a particular page of the document in a particular browser tab\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLInstancePageState extends " - }, - { - "kind": "Reference", - "text": "BaseRecord", - "canonicalReference": "@tldraw/store!BaseRecord:interface" - }, - { - "kind": "Content", - "text": "<'instance_page_state', " - }, - { - "kind": "Reference", - "text": "TLInstancePageStateId", - "canonicalReference": "@tldraw/tlschema!~TLInstancePageStateId:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLPageState.ts", - "releaseTag": "Public", - "name": "TLInstancePageState", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState#croppingShapeId:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "croppingShapeId: " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "croppingShapeId", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState#editingShapeId:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "editingShapeId: " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "editingShapeId", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState#erasingShapeIds:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "erasingShapeIds: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "erasingShapeIds", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState#focusedGroupId:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "focusedGroupId: " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "focusedGroupId", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState#hintingShapeIds:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hintingShapeIds: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hintingShapeIds", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState#hoveredShapeId:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "hoveredShapeId: " - }, - { - "kind": "Content", - "text": "null | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "hoveredShapeId", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState#meta:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "meta", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState#pageId:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "pageId: " - }, - { - "kind": "Reference", - "text": "RecordId", - "canonicalReference": "@tldraw/store!RecordId:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "pageId", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState#selectedShapeIds:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "selectedShapeIds: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "selectedShapeIds", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 5 - } - ] - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLInstancePresence extends " - }, - { - "kind": "Reference", - "text": "BaseRecord", - "canonicalReference": "@tldraw/store!BaseRecord:interface" - }, - { - "kind": "Content", - "text": "<'instance_presence', " - }, - { - "kind": "Reference", - "text": "TLInstancePresenceID", - "canonicalReference": "@tldraw/tlschema!~TLInstancePresenceID:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLPresence.ts", - "releaseTag": "Public", - "name": "TLInstancePresence", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#brush:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "brush: " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": " | null" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "brush", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#camera:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "camera: " - }, - { - "kind": "Content", - "text": "{\n x: number;\n y: number;\n z: number;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "camera", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#chatMessage:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "chatMessage: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "chatMessage", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#color:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "color: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "color", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#currentPageId:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "currentPageId: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "currentPageId", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#cursor:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "cursor: " - }, - { - "kind": "Content", - "text": "{\n x: number;\n y: number;\n type: " - }, - { - "kind": "Reference", - "text": "TLCursor", - "canonicalReference": "@tldraw/tlschema!TLCursor:interface" - }, - { - "kind": "Content", - "text": "['type'];\n rotation: number;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "cursor", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#followingUserId:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "followingUserId: " - }, - { - "kind": "Content", - "text": "null | string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "followingUserId", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#lastActivityTimestamp:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "lastActivityTimestamp: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "lastActivityTimestamp", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#meta:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "meta", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#screenBounds:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "screenBounds: " - }, - { - "kind": "Reference", - "text": "BoxModel", - "canonicalReference": "@tldraw/tlschema!BoxModel:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "screenBounds", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#scribbles:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "scribbles: " - }, - { - "kind": "Reference", - "text": "TLScribble", - "canonicalReference": "@tldraw/tlschema!TLScribble:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "scribbles", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#selectedShapeIds:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "selectedShapeIds: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "selectedShapeIds", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#userId:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "userId: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "userId", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence#userName:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "userName: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "userName", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 5 - } - ] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLLanguage:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLLanguage = " - }, - { - "kind": "Content", - "text": "(typeof " - }, - { - "kind": "Reference", - "text": "LANGUAGES", - "canonicalReference": "@tldraw/tlschema!LANGUAGES:var" - }, - { - "kind": "Content", - "text": ")[number]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/translations/translations.ts", - "releaseTag": "Public", - "name": "TLLanguage", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLLineShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLLineShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "<'line', " - }, - { - "kind": "Reference", - "text": "TLLineShapeProps", - "canonicalReference": "@tldraw/tlschema!~TLLineShapeProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLLineShape.ts", - "releaseTag": "Public", - "name": "TLLineShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLNoteShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLNoteShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "<'note', " - }, - { - "kind": "Reference", - "text": "TLNoteShapeProps", - "canonicalReference": "@tldraw/tlschema!~TLNoteShapeProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLNoteShape.ts", - "releaseTag": "Public", - "name": "TLNoteShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLOpacityType:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLOpacityType = " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/misc/TLOpacity.ts", - "releaseTag": "Public", - "name": "TLOpacityType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/tlschema!TLPage:interface", - "docComment": "/**\n * TLPage\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TLPage extends " - }, - { - "kind": "Reference", - "text": "BaseRecord", - "canonicalReference": "@tldraw/store!BaseRecord:interface" - }, - { - "kind": "Content", - "text": "<'page', " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLPage.ts", - "releaseTag": "Public", - "name": "TLPage", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLPage#index:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "index: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "index", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLPage#meta:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "meta", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!TLPage#name:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "name", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 5 - } - ] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLPageId:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLPageId = " - }, - { - "kind": "Reference", - "text": "RecordId", - "canonicalReference": "@tldraw/store!RecordId:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLPage.ts", - "releaseTag": "Public", - "name": "TLPageId", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLParentId:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLParentId = " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", - "releaseTag": "Public", - "name": "TLParentId", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!TLPOINTER_ID:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "TLPOINTER_ID: " - }, - { - "kind": "Reference", - "text": "TLPointerId", - "canonicalReference": "@tldraw/tlschema!~TLPointerId:type" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLPointer.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "TLPOINTER_ID", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLRecord:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLRecord = " - }, - { - "kind": "Reference", - "text": "TLAsset", - "canonicalReference": "@tldraw/tlschema!TLAsset:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLCamera", - "canonicalReference": "@tldraw/tlschema!TLCamera:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLDocument", - "canonicalReference": "@tldraw/tlschema!TLDocument:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLInstance", - "canonicalReference": "@tldraw/tlschema!TLInstance:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLInstancePageState", - "canonicalReference": "@tldraw/tlschema!TLInstancePageState:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLInstancePresence", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPage", - "canonicalReference": "@tldraw/tlschema!TLPage:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLPointer", - "canonicalReference": "@tldraw/tlschema!~TLPointer:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLRecord.ts", - "releaseTag": "Public", - "name": "TLRecord", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 18 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLSchema:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLSchema = " - }, - { - "kind": "Reference", - "text": "StoreSchema", - "canonicalReference": "@tldraw/store!StoreSchema:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "TLStoreProps", - "canonicalReference": "@tldraw/tlschema!TLStoreProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/createTLSchema.ts", - "releaseTag": "Public", - "name": "TLSchema", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLScribble:type", - "docComment": "/**\n * A type for the scribble used by tldraw.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLScribble = " - }, - { - "kind": "Content", - "text": "{\n id: string;\n points: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "[];\n size: number;\n color: " - }, - { - "kind": "Reference", - "text": "TLCanvasUiColor", - "canonicalReference": "@tldraw/tlschema!TLCanvasUiColor:type" - }, - { - "kind": "Content", - "text": ";\n opacity: number;\n state: " - }, - { - "kind": "Reference", - "text": "SetValue", - "canonicalReference": "@tldraw/tlschema!~SetValue:type" - }, - { - "kind": "Content", - "text": ";\n delay: number;\n shrink: number;\n taper: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/misc/TLScribble.ts", - "releaseTag": "Public", - "name": "TLScribble", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLSerializedStore:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLSerializedStore = " - }, - { - "kind": "Reference", - "text": "SerializedStore", - "canonicalReference": "@tldraw/store!SerializedStore:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/TLStore.ts", - "releaseTag": "Public", - "name": "TLSerializedStore", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLShape:type", - "docComment": "/**\n * The set of all shapes that are available in the editor, including unknown shapes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLShape = " - }, - { - "kind": "Reference", - "text": "TLDefaultShape", - "canonicalReference": "@tldraw/tlschema!TLDefaultShape:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLUnknownShape", - "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", - "releaseTag": "Public", - "name": "TLShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLShapeId = " - }, - { - "kind": "Reference", - "text": "RecordId", - "canonicalReference": "@tldraw/store!RecordId:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUnknownShape", - "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", - "releaseTag": "Public", - "name": "TLShapeId", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLShapePartial:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLShapePartial = " - }, - { - "kind": "Content", - "text": "T extends T ? {\n id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n type: T['type'];\n props?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ";\n meta?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ";\n} & " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": "> : never" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", - "releaseTag": "Public", - "name": "TLShapePartial", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "typeTokenRange": { - "startIndex": 5, - "endIndex": 16 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLShapeProp:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLShapeProp = " - }, - { - "kind": "Content", - "text": "keyof " - }, - { - "kind": "Reference", - "text": "TLShapeProps", - "canonicalReference": "@tldraw/tlschema!TLShapeProps:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", - "releaseTag": "Public", - "name": "TLShapeProp", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLShapeProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLShapeProps = " - }, - { - "kind": "Reference", - "text": "Identity", - "canonicalReference": "@tldraw/tlschema!~Identity:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "UnionToIntersection", - "canonicalReference": "@tldraw/tlschema!~UnionToIntersection:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLDefaultShape", - "canonicalReference": "@tldraw/tlschema!TLDefaultShape:type" - }, - { - "kind": "Content", - "text": "['props']>>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", - "releaseTag": "Public", - "name": "TLShapeProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLStore:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLStore = " - }, - { - "kind": "Reference", - "text": "Store", - "canonicalReference": "@tldraw/store!Store:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "TLStoreProps", - "canonicalReference": "@tldraw/tlschema!TLStoreProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/TLStore.ts", - "releaseTag": "Public", - "name": "TLStore", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLStoreProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLStoreProps = " - }, - { - "kind": "Content", - "text": "{\n defaultName: string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/TLStore.ts", - "releaseTag": "Public", - "name": "TLStoreProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLStoreSchema:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLStoreSchema = " - }, - { - "kind": "Reference", - "text": "StoreSchema", - "canonicalReference": "@tldraw/store!StoreSchema:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "TLStoreProps", - "canonicalReference": "@tldraw/tlschema!TLStoreProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/TLStore.ts", - "releaseTag": "Public", - "name": "TLStoreSchema", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLStoreSnapshot:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLStoreSnapshot = " - }, - { - "kind": "Reference", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/TLStore.ts", - "releaseTag": "Public", - "name": "TLStoreSnapshot", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLTextShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLTextShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "<'text', " - }, - { - "kind": "Reference", - "text": "TLTextShapeProps", - "canonicalReference": "@tldraw/tlschema!TLTextShapeProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLTextShape.ts", - "releaseTag": "Public", - "name": "TLTextShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLTextShapeProps:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLTextShapeProps = " - }, - { - "kind": "Reference", - "text": "ShapePropsType", - "canonicalReference": "@tldraw/tlschema!~ShapePropsType:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLTextShape.ts", - "releaseTag": "Public", - "name": "TLTextShapeProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type", - "docComment": "/**\n * A type for a shape that is available in the editor but whose type is unknown—either one of the editor's default shapes or else a custom shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLUnknownShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", - "releaseTag": "Public", - "name": "TLUnknownShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLVideoAsset:type", - "docComment": "/**\n * An asset used for videos, used by the TLVideoShape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLVideoAsset = " - }, - { - "kind": "Reference", - "text": "TLBaseAsset", - "canonicalReference": "@tldraw/tlschema!TLBaseAsset:interface" - }, - { - "kind": "Content", - "text": "<'video', {\n w: number;\n h: number;\n name: string;\n isAnimated: boolean;\n mimeType: null | string;\n src: null | string;\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/assets/TLVideoAsset.ts", - "releaseTag": "Public", - "name": "TLVideoAsset", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!TLVideoShape:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLVideoShape = " - }, - { - "kind": "Reference", - "text": "TLBaseShape", - "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" - }, - { - "kind": "Content", - "text": "<'video', " - }, - { - "kind": "Reference", - "text": "TLVideoShapeProps", - "canonicalReference": "@tldraw/tlschema!~TLVideoShapeProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLVideoShape.ts", - "releaseTag": "Public", - "name": "TLVideoShape", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/tlschema!VecModel:interface", - "docComment": "/**\n * A serializable model for 2D vectors.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface VecModel " - } - ], - "fileUrlPath": "packages/tlschema/src/misc/geometry-types.ts", - "releaseTag": "Public", - "name": "VecModel", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!VecModel#x:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "x: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "x", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!VecModel#y:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "y: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "y", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/tlschema!VecModel#z:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "z?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "z", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!vecModelValidator:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "vecModelValidator: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/tlschema/src/misc/geometry-types.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "vecModelValidator", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/tlschema!videoShapeProps:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "videoShapeProps: " - }, - { - "kind": "Content", - "text": "{\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n time: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n playing: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n assetId: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n}" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLVideoShape.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "videoShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 16 - } - } - ] - } - ] + "metadata": { + "toolPackage": "@microsoft/api-extractor", + "toolVersion": "7.41.0", + "schemaVersion": 1011, + "oldestForwardsCompatibleVersion": 1001, + "tsdocConfig": { + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "noStandardTags": true, + "tagDefinitions": [ + { + "tagName": "@alpha", + "syntaxKind": "modifier" + }, + { + "tagName": "@beta", + "syntaxKind": "modifier" + }, + { + "tagName": "@defaultValue", + "syntaxKind": "block" + }, + { + "tagName": "@decorator", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@deprecated", + "syntaxKind": "block" + }, + { + "tagName": "@eventProperty", + "syntaxKind": "modifier" + }, + { + "tagName": "@example", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@experimental", + "syntaxKind": "modifier" + }, + { + "tagName": "@inheritDoc", + "syntaxKind": "inline" + }, + { + "tagName": "@internal", + "syntaxKind": "modifier" + }, + { + "tagName": "@label", + "syntaxKind": "inline" + }, + { + "tagName": "@link", + "syntaxKind": "inline", + "allowMultiple": true + }, + { + "tagName": "@override", + "syntaxKind": "modifier" + }, + { + "tagName": "@packageDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@param", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@privateRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@public", + "syntaxKind": "modifier" + }, + { + "tagName": "@readonly", + "syntaxKind": "modifier" + }, + { + "tagName": "@remarks", + "syntaxKind": "block" + }, + { + "tagName": "@returns", + "syntaxKind": "block" + }, + { + "tagName": "@sealed", + "syntaxKind": "modifier" + }, + { + "tagName": "@see", + "syntaxKind": "block" + }, + { + "tagName": "@throws", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@typeParam", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@virtual", + "syntaxKind": "modifier" + }, + { + "tagName": "@betaDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@internalRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@preapproved", + "syntaxKind": "modifier" + } + ], + "supportForTags": { + "@alpha": true, + "@beta": true, + "@defaultValue": true, + "@decorator": true, + "@deprecated": true, + "@eventProperty": true, + "@example": true, + "@experimental": true, + "@inheritDoc": true, + "@internal": true, + "@label": true, + "@link": true, + "@override": true, + "@packageDocumentation": true, + "@param": true, + "@privateRemarks": true, + "@public": true, + "@readonly": true, + "@remarks": true, + "@returns": true, + "@sealed": true, + "@see": true, + "@throws": true, + "@typeParam": true, + "@virtual": true, + "@betaDocumentation": true, + "@internalRemarks": true, + "@preapproved": true + }, + "reportUnsupportedHtmlElements": false + } + }, + "kind": "Package", + "canonicalReference": "@tldraw/tlschema!", + "docComment": "", + "name": "@tldraw/tlschema", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EntryPoint", + "canonicalReference": "@tldraw/tlschema!", + "name": "", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!ArrowShapeArrowheadEndStyle:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "ArrowShapeArrowheadEndStyle: " + }, + { + "kind": "Content", + "text": "import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "ArrowShapeArrowheadEndStyle", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!ArrowShapeArrowheadStartStyle:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "ArrowShapeArrowheadStartStyle: " + }, + { + "kind": "Content", + "text": "import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "ArrowShapeArrowheadStartStyle", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!arrowShapeProps:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "arrowShapeProps: " + }, + { + "kind": "Content", + "text": "{\n labelColor: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n color: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n fill: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n arrowheadStart: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n arrowheadEnd: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n font: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n start: " + }, + { + "kind": "Reference", + "text": "T.UnionValidator", + "canonicalReference": "@tldraw/validate!UnionValidator:class" + }, + { + "kind": "Content", + "text": "<\"type\", {\n binding: " + }, + { + "kind": "Reference", + "text": "T.ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "<{\n type: \"binding\";\n boundShapeId: import(\"../records/TLShape\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n normalizedAnchor: import(\"../misc/geometry-types\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n isExact: boolean;\n isPrecise: boolean;\n } & {}>;\n point: " + }, + { + "kind": "Reference", + "text": "T.ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "<{\n x: number;\n y: number;\n type: \"point\";\n } & {}>;\n }, never>;\n end: " + }, + { + "kind": "Reference", + "text": "T.UnionValidator", + "canonicalReference": "@tldraw/validate!UnionValidator:class" + }, + { + "kind": "Content", + "text": "<\"type\", {\n binding: " + }, + { + "kind": "Reference", + "text": "T.ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "<{\n type: \"binding\";\n boundShapeId: import(\"../records/TLShape\")." + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n normalizedAnchor: import(\"../misc/geometry-types\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n isExact: boolean;\n isPrecise: boolean;\n } & {}>;\n point: " + }, + { + "kind": "Reference", + "text": "T.ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "<{\n x: number;\n y: number;\n type: \"point\";\n } & {}>;\n }, never>;\n bend: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n text: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n labelPosition: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "arrowShapeProps", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 44 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!assetIdValidator:var", + "docComment": "/**\n * A validator for asset record type Ids.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "assetIdValidator: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLAssetId", + "canonicalReference": "@tldraw/tlschema!TLAssetId:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tlschema/src/assets/TLBaseAsset.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "assetIdValidator", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!AssetRecordType:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "AssetRecordType: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/store\")." + }, + { + "kind": "Reference", + "text": "RecordType", + "canonicalReference": "@tldraw/store!RecordType:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLAsset", + "canonicalReference": "@tldraw/tlschema!TLAsset:type" + }, + { + "kind": "Content", + "text": ", \"props\" | \"type\">" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLAsset.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "AssetRecordType", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!bookmarkShapeProps:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "bookmarkShapeProps: " + }, + { + "kind": "Content", + "text": "{\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n h: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n assetId: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLBookmarkShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "bookmarkShapeProps", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 12 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface", + "docComment": "/**\n * A serializable model for 2D boxes.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BoxModel " + } + ], + "fileUrlPath": "packages/tlschema/src/misc/geometry-types.ts", + "releaseTag": "Public", + "name": "BoxModel", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!BoxModel#h:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "h: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "h", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!BoxModel#w:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "w: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "w", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!BoxModel#x:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "x", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!BoxModel#y:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "y", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!boxModelValidator:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "boxModelValidator: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tlschema/src/misc/geometry-types.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "boxModelValidator", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!CameraRecordType:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "CameraRecordType: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/store\")." + }, + { + "kind": "Reference", + "text": "RecordType", + "canonicalReference": "@tldraw/store!RecordType:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLCamera", + "canonicalReference": "@tldraw/tlschema!TLCamera:interface" + }, + { + "kind": "Content", + "text": ", never>" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLCamera.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "CameraRecordType", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!canvasUiColorTypeValidator:var", + "docComment": "/**\n * A validator for the colors used by tldraw's default shapes.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "canvasUiColorTypeValidator: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<\"accent\" | \"black\" | \"laser\" | \"muted-1\" | \"selection-fill\" | \"selection-stroke\" | \"white\">" + } + ], + "fileUrlPath": "packages/tlschema/src/misc/TLColor.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "canvasUiColorTypeValidator", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/tlschema!createAssetValidator:function(1)", + "docComment": "/**\n * Create a validator for an asset record type.\n *\n * @param type - The type of the asset\n *\n * @param props - The validator for the asset's props\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createAssetValidator(type: " + }, + { + "kind": "Content", + "text": "Type" + }, + { + "kind": "Content", + "text": ", props: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "T.ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "<{ [P in \"id\" | \"meta\" | \"typeName\" | (undefined extends Props ? never : \"props\") | (undefined extends Type ? never : \"type\")]: {\n id: " + }, + { + "kind": "Reference", + "text": "TLAssetId", + "canonicalReference": "@tldraw/tlschema!TLAssetId:type" + }, + { + "kind": "Content", + "text": ";\n typeName: 'asset';\n type: Type;\n props: Props;\n meta: " + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n}[P]; } & { [P_1 in (undefined extends Props ? \"props\" : never) | (undefined extends Type ? \"type\" : never)]?: {\n id: " + }, + { + "kind": "Reference", + "text": "TLAssetId", + "canonicalReference": "@tldraw/tlschema!TLAssetId:type" + }, + { + "kind": "Content", + "text": ";\n typeName: 'asset';\n type: Type;\n props: Props;\n meta: " + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n}[P_1] | undefined; }>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/assets/TLBaseAsset.ts", + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 20 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "props", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "Type", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Props", + "constraintTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "createAssetValidator" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/tlschema!createPresenceStateDerivation:function(1)", + "docComment": "/**\n * Creates a derivation that represents the current presence state of the current user.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createPresenceStateDerivation: ($user: " + }, + { + "kind": "Reference", + "text": "Signal", + "canonicalReference": "@tldraw/state!Signal:interface" + }, + { + "kind": "Content", + "text": "<{\n id: string;\n color: string;\n name: string;\n}>" + }, + { + "kind": "Content", + "text": ", instanceId?: " + }, + { + "kind": "Reference", + "text": "TLInstancePresence", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence:interface" + }, + { + "kind": "Content", + "text": "['id']" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Content", + "text": "(store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Signal", + "canonicalReference": "@tldraw/state!Signal:interface" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/tlschema/src/createPresenceStateDerivation.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 14 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "$user", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "instanceId", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "isOptional": true + } + ], + "name": "createPresenceStateDerivation" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/tlschema!createShapeId:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createShapeId(id?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "name": "createShapeId" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/tlschema!createShapePropsMigrationSequence:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createShapePropsMigrationSequence(migrations: " + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "migrations", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "createShapePropsMigrationSequence" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/tlschema!createShapeValidator:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createShapeValidator(type: " + }, + { + "kind": "Content", + "text": "Type" + }, + { + "kind": "Content", + "text": ", props?: " + }, + { + "kind": "Content", + "text": "{\n [K in keyof Props]: " + }, + { + "kind": "Reference", + "text": "T.Validatable", + "canonicalReference": "@tldraw/validate!Validatable:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ", meta?: " + }, + { + "kind": "Content", + "text": "{\n [K in keyof Meta]: " + }, + { + "kind": "Reference", + "text": "T.Validatable", + "canonicalReference": "@tldraw/validate!Validatable:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "T.ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "<{ [P in \"id\" | \"index\" | \"isLocked\" | \"meta\" | \"opacity\" | \"parentId\" | \"rotation\" | \"typeName\" | \"x\" | \"y\" | (undefined extends Props ? never : \"props\") | (undefined extends Type ? never : \"type\")]: " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "[P]; } & { [P_1 in (undefined extends Props ? \"props\" : never) | (undefined extends Type ? \"type\" : never)]?: " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "[P_1] | undefined; }>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLBaseShape.ts", + "returnTypeTokenRange": { + "startIndex": 17, + "endIndex": 23 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "props", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 12 + }, + "isOptional": true + }, + { + "parameterName": "meta", + "parameterTypeTokenRange": { + "startIndex": 13, + "endIndex": 16 + }, + "isOptional": true + } + ], + "typeParameters": [ + { + "typeParameterName": "Type", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Props", + "constraintTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Meta", + "constraintTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "createShapeValidator" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/tlschema!createTLSchema:function(1)", + "docComment": "/**\n * Create a TLSchema with custom shapes. Custom shapes cannot override default shapes.\n *\n * @param opts - Options\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createTLSchema({ shapes, migrations, }?: " + }, + { + "kind": "Content", + "text": "{\n shapes?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": ";\n migrations?: readonly " + }, + { + "kind": "Reference", + "text": "MigrationSequence", + "canonicalReference": "@tldraw/store!MigrationSequence:interface" + }, + { + "kind": "Content", + "text": "[];\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLSchema", + "canonicalReference": "@tldraw/tlschema!TLSchema:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/createTLSchema.ts", + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ shapes, migrations, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isOptional": true + } + ], + "name": "createTLSchema" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!DefaultColorStyle:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultColorStyle: " + }, + { + "kind": "Content", + "text": "import(\"./StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLColorStyle.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultColorStyle", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!DefaultColorThemePalette:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultColorThemePalette: " + }, + { + "kind": "Content", + "text": "{\n lightMode: " + }, + { + "kind": "Reference", + "text": "TLDefaultColorTheme", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type" + }, + { + "kind": "Content", + "text": ";\n darkMode: " + }, + { + "kind": "Reference", + "text": "TLDefaultColorTheme", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type" + }, + { + "kind": "Content", + "text": ";\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLColorStyle.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultColorThemePalette", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!DefaultDashStyle:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultDashStyle: " + }, + { + "kind": "Content", + "text": "import(\"./StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLDashStyle.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultDashStyle", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!DefaultFillStyle:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultFillStyle: " + }, + { + "kind": "Content", + "text": "import(\"./StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLFillStyle.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultFillStyle", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!DefaultFontFamilies:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultFontFamilies: " + }, + { + "kind": "Content", + "text": "{\n draw: string;\n sans: string;\n serif: string;\n mono: string;\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLFontStyle.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultFontFamilies", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!DefaultFontStyle:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultFontStyle: " + }, + { + "kind": "Content", + "text": "import(\"./StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLFontStyle.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultFontStyle", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!DefaultHorizontalAlignStyle:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultHorizontalAlignStyle: " + }, + { + "kind": "Content", + "text": "import(\"./StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLHorizontalAlignStyle.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultHorizontalAlignStyle", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!DefaultSizeStyle:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultSizeStyle: " + }, + { + "kind": "Content", + "text": "import(\"./StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLSizeStyle.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultSizeStyle", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!DefaultVerticalAlignStyle:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DefaultVerticalAlignStyle: " + }, + { + "kind": "Content", + "text": "import(\"./StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end\" | \"middle\" | \"start\">" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLVerticalAlignStyle.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "DefaultVerticalAlignStyle", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!DocumentRecordType:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DocumentRecordType: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/store\")." + }, + { + "kind": "Reference", + "text": "RecordType", + "canonicalReference": "@tldraw/store!RecordType:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLDocument", + "canonicalReference": "@tldraw/tlschema!TLDocument:interface" + }, + { + "kind": "Content", + "text": ", never>" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLDocument.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "DocumentRecordType", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!drawShapeProps:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "drawShapeProps: " + }, + { + "kind": "Content", + "text": "{\n color: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n fill: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n segments: " + }, + { + "kind": "Reference", + "text": "T.ArrayOfValidator", + "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" + }, + { + "kind": "Content", + "text": "<{\n type: \"free\" | \"straight\";\n points: import(\"../misc/geometry-types\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "[];\n } & {}>;\n isComplete: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n isClosed: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n isPen: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLDrawShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "drawShapeProps", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 20 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!EMBED_DEFINITIONS:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "EMBED_DEFINITIONS: " + }, + { + "kind": "Content", + "text": "readonly [{\n readonly type: \"tldraw\";\n readonly title: \"tldraw\";\n readonly hostnames: readonly [\"beta.tldraw.com\", \"tldraw.com\", \"localhost:3000\"];\n readonly minWidth: 300;\n readonly minHeight: 300;\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly overridePermissions: {\n readonly 'allow-top-navigation': true;\n };\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"figma\";\n readonly title: \"Figma\";\n readonly hostnames: readonly [\"figma.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"google_maps\";\n readonly title: \"Google Maps\";\n readonly hostnames: readonly [\"google.*\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"val_town\";\n readonly title: \"Val Town\";\n readonly hostnames: readonly [\"val.town\"];\n readonly minWidth: 260;\n readonly minHeight: 100;\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"codesandbox\";\n readonly title: \"CodeSandbox\";\n readonly hostnames: readonly [\"codesandbox.io\"];\n readonly minWidth: 300;\n readonly minHeight: 300;\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"codepen\";\n readonly title: \"Codepen\";\n readonly hostnames: readonly [\"codepen.io\"];\n readonly minWidth: 300;\n readonly minHeight: 300;\n readonly width: 520;\n readonly height: 400;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"scratch\";\n readonly title: \"Scratch\";\n readonly hostnames: readonly [\"scratch.mit.edu\"];\n readonly width: 520;\n readonly height: 400;\n readonly doesResize: false;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"youtube\";\n readonly title: \"YouTube\";\n readonly hostnames: readonly [\"*.youtube.com\", \"youtube.com\", \"youtu.be\"];\n readonly width: 800;\n readonly height: 450;\n readonly doesResize: true;\n readonly overridePermissions: {\n readonly 'allow-presentation': true;\n };\n readonly isAspectRatioLocked: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"google_calendar\";\n readonly title: \"Google Calendar\";\n readonly hostnames: readonly [\"calendar.google.*\"];\n readonly width: 720;\n readonly height: 500;\n readonly minWidth: 460;\n readonly minHeight: 360;\n readonly doesResize: true;\n readonly instructionLink: \"https://support.google.com/calendar/answer/41207?hl=en\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"google_slides\";\n readonly title: \"Google Slides\";\n readonly hostnames: readonly [\"docs.google.*\"];\n readonly width: 720;\n readonly height: 500;\n readonly minWidth: 460;\n readonly minHeight: 360;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"github_gist\";\n readonly title: \"GitHub Gist\";\n readonly hostnames: readonly [\"gist.github.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"replit\";\n readonly title: \"Replit\";\n readonly hostnames: readonly [\"replit.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"felt\";\n readonly title: \"Felt\";\n readonly hostnames: readonly [\"felt.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"spotify\";\n readonly title: \"Spotify\";\n readonly hostnames: readonly [\"open.spotify.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly minHeight: 500;\n readonly overrideOutlineRadius: 12;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"vimeo\";\n readonly title: \"Vimeo\";\n readonly hostnames: readonly [\"vimeo.com\", \"player.vimeo.com\"];\n readonly width: 640;\n readonly height: 360;\n readonly doesResize: true;\n readonly isAspectRatioLocked: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"excalidraw\";\n readonly title: \"Excalidraw\";\n readonly hostnames: readonly [\"excalidraw.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly isAspectRatioLocked: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"observable\";\n readonly title: \"Observable\";\n readonly hostnames: readonly [\"observablehq.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly isAspectRatioLocked: false;\n readonly backgroundColor: \"#fff\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}]" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "EMBED_DEFINITIONS", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!EmbedDefinition:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type EmbedDefinition = " + }, + { + "kind": "Content", + "text": "{\n readonly type: string;\n readonly title: string;\n readonly hostnames: readonly string[];\n readonly minWidth?: number;\n readonly minHeight?: number;\n readonly width: number;\n readonly height: number;\n readonly doesResize: boolean;\n readonly isAspectRatioLocked?: boolean;\n readonly overridePermissions?: " + }, + { + "kind": "Reference", + "text": "TLEmbedShapePermissions", + "canonicalReference": "@tldraw/tlschema!TLEmbedShapePermissions:type" + }, + { + "kind": "Content", + "text": ";\n readonly instructionLink?: string;\n readonly backgroundColor?: string;\n readonly overrideOutlineRadius?: number;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", + "releaseTag": "Public", + "name": "EmbedDefinition", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!embedShapePermissionDefaults:var", + "docComment": "/**\n * Permissions with note inline from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "embedShapePermissionDefaults: " + }, + { + "kind": "Content", + "text": "{\n readonly 'allow-downloads-without-user-activation': false;\n readonly 'allow-downloads': false;\n readonly 'allow-modals': false;\n readonly 'allow-orientation-lock': false;\n readonly 'allow-pointer-lock': false;\n readonly 'allow-popups': true;\n readonly 'allow-popups-to-escape-sandbox': false;\n readonly 'allow-presentation': false;\n readonly 'allow-storage-access-by-user-activation': false;\n readonly 'allow-top-navigation': false;\n readonly 'allow-top-navigation-by-user-activation': false;\n readonly 'allow-scripts': true;\n readonly 'allow-same-origin': true;\n readonly 'allow-forms': true;\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "embedShapePermissionDefaults", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!embedShapeProps:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "embedShapeProps: " + }, + { + "kind": "Content", + "text": "{\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n h: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "embedShapeProps", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class", + "docComment": "/**\n * See {@link StyleProp} & {@link StyleProp.defineEnum}\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `EnumStyleProp` class.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class EnumStyleProp extends " + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tlschema/src/styles/StyleProp.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "EnumStyleProp", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp#values:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly values: " + }, + { + "kind": "Content", + "text": "readonly T[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "values", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!frameShapeProps:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "frameShapeProps: " + }, + { + "kind": "Content", + "text": "{\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n h: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n name: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLFrameShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "frameShapeProps", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!GeoShapeGeoStyle:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "GeoShapeGeoStyle: " + }, + { + "kind": "Content", + "text": "import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\">" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLGeoShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "GeoShapeGeoStyle", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!geoShapeProps:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "geoShapeProps: " + }, + { + "kind": "Content", + "text": "{\n geo: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\">;\n labelColor: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n color: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n fill: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n verticalAlign: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end\" | \"middle\" | \"start\">;\n url: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n h: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n growY: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n text: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLGeoShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "geoShapeProps", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 30 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/tlschema!getDefaultColorTheme:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getDefaultColorTheme(opts: " + }, + { + "kind": "Content", + "text": "{\n isDarkMode: boolean;\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLDefaultColorTheme", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLColorStyle.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "getDefaultColorTheme" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/tlschema!getDefaultTranslationLocale:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getDefaultTranslationLocale(): " + }, + { + "kind": "Reference", + "text": "TLLanguage", + "canonicalReference": "@tldraw/tlschema!TLLanguage:type" + }, + { + "kind": "Content", + "text": "['locale']" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/translations/translations.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "getDefaultTranslationLocale" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!highlightShapeProps:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "highlightShapeProps: " + }, + { + "kind": "Content", + "text": "{\n color: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n segments: " + }, + { + "kind": "Reference", + "text": "T.ArrayOfValidator", + "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" + }, + { + "kind": "Content", + "text": "<{\n type: \"free\" | \"straight\";\n points: import(\"..\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "[];\n } & {}>;\n isComplete: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n isPen: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLHighlightShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "highlightShapeProps", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 14 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!imageShapeProps:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "imageShapeProps: " + }, + { + "kind": "Content", + "text": "{\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n h: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n playing: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n assetId: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n crop: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<({\n topLeft: import(\"../misc/geometry-types\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n bottomRight: import(\"../misc/geometry-types\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n } & {}) | null>;\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLImageShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "imageShapeProps", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 20 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!InstancePageStateRecordType:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "InstancePageStateRecordType: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/store\")." + }, + { + "kind": "Reference", + "text": "RecordType", + "canonicalReference": "@tldraw/store!RecordType:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLInstancePageState", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState:interface" + }, + { + "kind": "Content", + "text": ", \"pageId\">" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLPageState.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "InstancePageStateRecordType", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!InstancePresenceRecordType:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "InstancePresenceRecordType: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/store\")." + }, + { + "kind": "Reference", + "text": "RecordType", + "canonicalReference": "@tldraw/store!RecordType:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLInstancePresence", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence:interface" + }, + { + "kind": "Content", + "text": ", \"currentPageId\" | \"userId\" | \"userName\">" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLPresence.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "InstancePresenceRecordType", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/tlschema!isPageId:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function isPageId(id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "id", + "canonicalReference": "@tldraw/tlschema!~id" + }, + { + "kind": "Content", + "text": " is " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLPage.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "isPageId" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/tlschema!isShape:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function isShape(record?: " + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "record", + "canonicalReference": "@tldraw/tlschema!~record" + }, + { + "kind": "Content", + "text": " is " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "record", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "name": "isShape" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/tlschema!isShapeId:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function isShapeId(id?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "id", + "canonicalReference": "@tldraw/tlschema!~id" + }, + { + "kind": "Content", + "text": " is " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "name": "isShapeId" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!LANGUAGES:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "LANGUAGES: " + }, + { + "kind": "Content", + "text": "readonly [{\n readonly locale: \"ca\";\n readonly label: \"Català\";\n}, {\n readonly locale: \"cs\";\n readonly label: \"Čeština\";\n}, {\n readonly locale: \"da\";\n readonly label: \"Danish\";\n}, {\n readonly locale: \"de\";\n readonly label: \"Deutsch\";\n}, {\n readonly locale: \"en\";\n readonly label: \"English\";\n}, {\n readonly locale: \"es\";\n readonly label: \"Español\";\n}, {\n readonly locale: \"fr\";\n readonly label: \"Français\";\n}, {\n readonly locale: \"gl\";\n readonly label: \"Galego\";\n}, {\n readonly locale: \"hr\";\n readonly label: \"Hrvatski\";\n}, {\n readonly locale: \"it\";\n readonly label: \"Italiano\";\n}, {\n readonly locale: \"hu\";\n readonly label: \"Magyar\";\n}, {\n readonly locale: \"no\";\n readonly label: \"Norwegian\";\n}, {\n readonly locale: \"pl\";\n readonly label: \"Polski\";\n}, {\n readonly locale: \"pt-br\";\n readonly label: \"Português - Brasil\";\n}, {\n readonly locale: \"pt-pt\";\n readonly label: \"Português - Europeu\";\n}, {\n readonly locale: \"ro\";\n readonly label: \"Română\";\n}, {\n readonly locale: \"ru\";\n readonly label: \"Russian\";\n}, {\n readonly locale: \"sl\";\n readonly label: \"Slovenščina\";\n}, {\n readonly locale: \"fi\";\n readonly label: \"Suomi\";\n}, {\n readonly locale: \"sv\";\n readonly label: \"Svenska\";\n}, {\n readonly locale: \"vi\";\n readonly label: \"Tiếng Việt\";\n}, {\n readonly locale: \"tr\";\n readonly label: \"Türkçe\";\n}, {\n readonly locale: \"uk\";\n readonly label: \"Ukrainian\";\n}, {\n readonly locale: \"he\";\n readonly label: \"עברית\";\n}, {\n readonly locale: \"ar\";\n readonly label: \"عربي\";\n}, {\n readonly locale: \"fa\";\n readonly label: \"فارسی\";\n}, {\n readonly locale: \"ku\";\n readonly label: \"کوردی\";\n}, {\n readonly locale: \"ne\";\n readonly label: \"नेपाली\";\n}, {\n readonly locale: \"hi-in\";\n readonly label: \"हिन्दी\";\n}, {\n readonly locale: \"te\";\n readonly label: \"తెలుగు\";\n}, {\n readonly locale: \"th\";\n readonly label: \"ภาษาไทย\";\n}, {\n readonly locale: \"my\";\n readonly label: \"မြန်မာစာ\";\n}, {\n readonly locale: \"ko-kr\";\n readonly label: \"한국어\";\n}, {\n readonly locale: \"ja\";\n readonly label: \"日本語\";\n}, {\n readonly locale: \"zh-cn\";\n readonly label: \"简体中文\";\n}, {\n readonly locale: \"zh-tw\";\n readonly label: \"繁體中文 (台灣)\";\n}]" + } + ], + "fileUrlPath": "packages/tlschema/src/translations/languages.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "LANGUAGES", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!lineShapeProps:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "lineShapeProps: " + }, + { + "kind": "Content", + "text": "{\n color: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n dash: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n spline: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"cubic\" | \"line\">;\n points: " + }, + { + "kind": "Reference", + "text": "T.DictValidator", + "canonicalReference": "@tldraw/validate!DictValidator:class" + }, + { + "kind": "Content", + "text": ";\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLLineShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "lineShapeProps", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 14 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!LineShapeSplineStyle:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "LineShapeSplineStyle: " + }, + { + "kind": "Content", + "text": "import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"cubic\" | \"line\">" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLLineShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "LineShapeSplineStyle", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!noteShapeProps:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "noteShapeProps: " + }, + { + "kind": "Content", + "text": "{\n color: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n verticalAlign: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end\" | \"middle\" | \"start\">;\n growY: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n text: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLNoteShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "noteShapeProps", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 18 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!PageRecordType:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "PageRecordType: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/store\")." + }, + { + "kind": "Reference", + "text": "RecordType", + "canonicalReference": "@tldraw/store!RecordType:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": ", \"index\" | \"name\">" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLPage.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "PageRecordType", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!parentIdValidator:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "parentIdValidator: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLBaseShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "parentIdValidator", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!PointerRecordType:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "PointerRecordType: " + }, + { + "kind": "Content", + "text": "import(\"@tldraw/store\")." + }, + { + "kind": "Reference", + "text": "RecordType", + "canonicalReference": "@tldraw/store!RecordType:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLPointer", + "canonicalReference": "@tldraw/tlschema!~TLPointer:interface" + }, + { + "kind": "Content", + "text": ", never>" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLPointer.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "PointerRecordType", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!SchemaShapeInfo:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type SchemaShapeInfo = " + }, + { + "kind": "Content", + "text": "{\n migrations?: " + }, + { + "kind": "Reference", + "text": "LegacyMigrations", + "canonicalReference": "@tldraw/store!LegacyMigrations:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";\n props?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": ";\n meta?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/createTLSchema.ts", + "releaseTag": "Public", + "name": "SchemaShapeInfo", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 14 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!shapeIdValidator:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "shapeIdValidator: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLBaseShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "shapeIdValidator", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!ShapeProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type ShapeProps" + }, + { + "kind": "Content", + "text": "> = " + }, + { + "kind": "Content", + "text": "{\n [K in keyof Shape['props']]: " + }, + { + "kind": "Reference", + "text": "T.Validatable", + "canonicalReference": "@tldraw/validate!Validatable:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLBaseShape.ts", + "releaseTag": "Public", + "name": "ShapeProps", + "typeParameters": [ + { + "typeParameterName": "Shape", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 4, + "endIndex": 7 + } + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/tlschema!StyleProp:class", + "docComment": "/**\n * A `StyleProp` is a property of a shape that follows some special rules.\n *\n * 1. The same value can be set on lots of shapes at the same time.\n *\n * 2. The last used value is automatically saved and applied to new shapes.\n *\n * For example, {@link DefaultColorStyle} is a style prop used by tldraw's default shapes to set their color. If you try selecting several shapes on tldraw.com and changing their color, you'll see that the color is applied to all of them. Then, if you draw a new shape, it'll have the same color as the one you just set.\n *\n * You can use styles in your own shapes by either defining your own (see {@link StyleProp.define} and {@link StyleProp.defineEnum}) or using tldraw's default ones, like {@link DefaultColorStyle}. When you define a shape, pass a `props` object describing all of your shape's properties, using `StyleProp`s for the ones you want to be styles. See the {@link https://github.com/tldraw/tldraw/tree/main/apps/examples | custom styles example} for more.\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `StyleProp` class.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class StyleProp implements " + }, + { + "kind": "Reference", + "text": "T.Validatable", + "canonicalReference": "@tldraw/validate!Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tlschema/src/styles/StyleProp.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "Type", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "StyleProp", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "@tldraw/tlschema!StyleProp#defaultValue:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly defaultValue: " + }, + { + "kind": "Content", + "text": "Type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "defaultValue", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/tlschema!StyleProp.define:member(1)", + "docComment": "/**\n * Define a new {@link StyleProp}.\n *\n * @param uniqueId - Each StyleProp must have a unique ID. We recommend you prefix this with your app/library name.\n *\n * @param options - - `defaultValue`: The default value for this style prop.\n *\n * - `type`: Optionally, describe what type of data you expect for this style prop.\n *\n * @example\n * ```ts\n * import {T} from '@tldraw/validate'\n * import {StyleProp} from '@tldraw/tlschema'\n *\n * const MyLineWidthProp = StyleProp.define('myApp:lineWidth', {\n * defaultValue: 1,\n * type: T.number,\n * })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static define(uniqueId: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", options: " + }, + { + "kind": "Content", + "text": "{\n defaultValue: Type;\n type?: " + }, + { + "kind": "Reference", + "text": "T.Validatable", + "canonicalReference": "@tldraw/validate!Validatable:type" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "Type", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "uniqueId", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "define" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/tlschema!StyleProp.defineEnum:member(1)", + "docComment": "/**\n * Define a new {@link StyleProp} as a list of possible values.\n *\n * @param uniqueId - Each StyleProp must have a unique ID. We recommend you prefix this with your app/library name.\n *\n * @param options - - `defaultValue`: The default value for this style prop.\n *\n * - `values`: An array of possible values of this style prop.\n *\n * @example\n * ```ts\n * import {StyleProp} from '@tldraw/tlschema'\n *\n * const MySizeProp = StyleProp.defineEnum('myApp:size', {\n * defaultValue: 'medium',\n * values: ['small', 'medium', 'large'],\n * })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static defineEnum(uniqueId: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", options: " + }, + { + "kind": "Content", + "text": "{\n defaultValue: Values[number];\n values: Values;\n }" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "Values", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "uniqueId", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "defineEnum" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/tlschema!StyleProp#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/tlschema!StyleProp#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly type: " + }, + { + "kind": "Reference", + "text": "T.Validatable", + "canonicalReference": "@tldraw/validate!Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/tlschema!StyleProp#validate:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "validate(value: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "Type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validate" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/tlschema!StyleProp#validateUsingKnownGoodVersion:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "validateUsingKnownGoodVersion(prevValue: " + }, + { + "kind": "Content", + "text": "Type" + }, + { + "kind": "Content", + "text": ", newValue: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "Type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "prevValue", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "newValue", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validateUsingKnownGoodVersion" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 3 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!StylePropValue:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type StylePropValue" + }, + { + "kind": "Content", + "text": "> = " + }, + { + "kind": "Content", + "text": "T extends " + }, + { + "kind": "Reference", + "text": "StyleProp", + "canonicalReference": "@tldraw/tlschema!StyleProp:class" + }, + { + "kind": "Content", + "text": " ? U : never" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/StyleProp.ts", + "releaseTag": "Public", + "name": "StylePropValue", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 4, + "endIndex": 7 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!textShapeProps:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "textShapeProps: " + }, + { + "kind": "Content", + "text": "{\n color: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n text: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n scale: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n autoSize: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLTextShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "textShapeProps", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 18 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!TL_CANVAS_UI_COLOR_TYPES:var", + "docComment": "/**\n * The colors used by tldraw's default shapes.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TL_CANVAS_UI_COLOR_TYPES: " + }, + { + "kind": "Reference", + "text": "Set", + "canonicalReference": "!Set:interface" + }, + { + "kind": "Content", + "text": "<\"accent\" | \"black\" | \"laser\" | \"muted-1\" | \"selection-fill\" | \"selection-stroke\" | \"white\">" + } + ], + "fileUrlPath": "packages/tlschema/src/misc/TLColor.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "TL_CANVAS_UI_COLOR_TYPES", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLArrowShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "<'arrow', " + }, + { + "kind": "Reference", + "text": "TLArrowShapeProps", + "canonicalReference": "@tldraw/tlschema!TLArrowShapeProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", + "releaseTag": "Public", + "name": "TLArrowShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLArrowShapeArrowheadStyle:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLArrowShapeArrowheadStyle = " + }, + { + "kind": "Reference", + "text": "T.TypeOf", + "canonicalReference": "@tldraw/validate!TypeOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", + "releaseTag": "Public", + "name": "TLArrowShapeArrowheadStyle", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLArrowShapeProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLArrowShapeProps = " + }, + { + "kind": "Reference", + "text": "ShapePropsType", + "canonicalReference": "@tldraw/tlschema!~ShapePropsType:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", + "releaseTag": "Public", + "name": "TLArrowShapeProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLArrowShapeTerminal:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLArrowShapeTerminal = " + }, + { + "kind": "Reference", + "text": "T.TypeOf", + "canonicalReference": "@tldraw/validate!TypeOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", + "releaseTag": "Public", + "name": "TLArrowShapeTerminal", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLAsset:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLAsset = " + }, + { + "kind": "Reference", + "text": "TLBookmarkAsset", + "canonicalReference": "@tldraw/tlschema!TLBookmarkAsset:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLImageAsset", + "canonicalReference": "@tldraw/tlschema!TLImageAsset:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLVideoAsset", + "canonicalReference": "@tldraw/tlschema!TLVideoAsset:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLAsset.ts", + "releaseTag": "Public", + "name": "TLAsset", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLAssetId:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLAssetId = " + }, + { + "kind": "Reference", + "text": "RecordId", + "canonicalReference": "@tldraw/store!RecordId:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLBaseAsset", + "canonicalReference": "@tldraw/tlschema!TLBaseAsset:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLAsset.ts", + "releaseTag": "Public", + "name": "TLAssetId", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLAssetPartial:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLAssetPartial = " + }, + { + "kind": "Content", + "text": "T extends T ? {\n id: " + }, + { + "kind": "Reference", + "text": "TLAssetId", + "canonicalReference": "@tldraw/tlschema!TLAssetId:type" + }, + { + "kind": "Content", + "text": ";\n type: T['type'];\n props?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": ";\n meta?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": ";\n} & " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "> : never" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLAsset.ts", + "releaseTag": "Public", + "name": "TLAssetPartial", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "typeTokenRange": { + "startIndex": 5, + "endIndex": 16 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLAssetShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLAssetShape = " + }, + { + "kind": "Reference", + "text": "Extract", + "canonicalReference": "!Extract:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ", {\n props: {\n assetId: " + }, + { + "kind": "Reference", + "text": "TLAssetId", + "canonicalReference": "@tldraw/tlschema!TLAssetId:type" + }, + { + "kind": "Content", + "text": ";\n };\n}>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLAsset.ts", + "releaseTag": "Public", + "name": "TLAssetShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/tlschema!TLBaseAsset:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLBaseAsset extends " + }, + { + "kind": "Reference", + "text": "BaseRecord", + "canonicalReference": "@tldraw/store!BaseRecord:interface" + }, + { + "kind": "Content", + "text": "<'asset', " + }, + { + "kind": "Reference", + "text": "TLAssetId", + "canonicalReference": "@tldraw/tlschema!TLAssetId:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tlschema/src/assets/TLBaseAsset.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "Type", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Props", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "TLBaseAsset", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLBaseAsset#meta:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "meta: " + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "meta", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLBaseAsset#props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "props: " + }, + { + "kind": "Content", + "text": "Props" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLBaseAsset#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "Type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 3, + "endIndex": 7 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLBaseShape extends " + }, + { + "kind": "Reference", + "text": "BaseRecord", + "canonicalReference": "@tldraw/store!BaseRecord:interface" + }, + { + "kind": "Content", + "text": "<'shape', " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLBaseShape.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "Type", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Props", + "constraintTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "TLBaseShape", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLBaseShape#index:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "index: " + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "index", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLBaseShape#isLocked:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isLocked: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isLocked", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLBaseShape#meta:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "meta: " + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "meta", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLBaseShape#opacity:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "opacity: " + }, + { + "kind": "Reference", + "text": "TLOpacityType", + "canonicalReference": "@tldraw/tlschema!TLOpacityType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "opacity", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLBaseShape#parentId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "parentId: " + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "parentId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLBaseShape#props:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "props: " + }, + { + "kind": "Content", + "text": "Props" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "props", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLBaseShape#rotation:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "rotation: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "rotation", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLBaseShape#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "Type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLBaseShape#x:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "x", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLBaseShape#y:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "y", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 5, + "endIndex": 9 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLBookmarkAsset:type", + "docComment": "/**\n * An asset used for URL bookmarks, used by the TLBookmarkShape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLBookmarkAsset = " + }, + { + "kind": "Reference", + "text": "TLBaseAsset", + "canonicalReference": "@tldraw/tlschema!TLBaseAsset:interface" + }, + { + "kind": "Content", + "text": "<'bookmark', {\n title: string;\n description: string;\n image: string;\n src: null | string;\n}>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/assets/TLBookmarkAsset.ts", + "releaseTag": "Public", + "name": "TLBookmarkAsset", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLBookmarkShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "<'bookmark', " + }, + { + "kind": "Reference", + "text": "TLBookmarkShapeProps", + "canonicalReference": "@tldraw/tlschema!~TLBookmarkShapeProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLBookmarkShape.ts", + "releaseTag": "Public", + "name": "TLBookmarkShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/tlschema!TLCamera:interface", + "docComment": "/**\n * A camera record.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLCamera extends " + }, + { + "kind": "Reference", + "text": "BaseRecord", + "canonicalReference": "@tldraw/store!BaseRecord:interface" + }, + { + "kind": "Content", + "text": "<'camera', " + }, + { + "kind": "Reference", + "text": "TLCameraId", + "canonicalReference": "@tldraw/tlschema!TLCameraId:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLCamera.ts", + "releaseTag": "Public", + "name": "TLCamera", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLCamera#meta:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "meta: " + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "meta", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLCamera#x:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "x", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLCamera#y:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "y", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLCamera#z:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "z: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "z", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 5 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLCameraId:type", + "docComment": "/**\n * The id of a camera record.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLCameraId = " + }, + { + "kind": "Reference", + "text": "RecordId", + "canonicalReference": "@tldraw/store!RecordId:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLCamera", + "canonicalReference": "@tldraw/tlschema!TLCamera:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLCamera.ts", + "releaseTag": "Public", + "name": "TLCameraId", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLCanvasUiColor:type", + "docComment": "/**\n * A type for the colors used by tldraw's default shapes.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLCanvasUiColor = " + }, + { + "kind": "Reference", + "text": "SetValue", + "canonicalReference": "@tldraw/tlschema!~SetValue:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/misc/TLColor.ts", + "releaseTag": "Public", + "name": "TLCanvasUiColor", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/tlschema!TLCursor:interface", + "docComment": "/**\n * A cursor used by tldraw.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLCursor " + } + ], + "fileUrlPath": "packages/tlschema/src/misc/TLCursor.ts", + "releaseTag": "Public", + "name": "TLCursor", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLCursor#rotation:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "rotation: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "rotation", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLCursor#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Reference", + "text": "TLCursorType", + "canonicalReference": "@tldraw/tlschema!TLCursorType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLCursorType:type", + "docComment": "/**\n * A type for the cursor types used by tldraw's default shapes.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLCursorType = " + }, + { + "kind": "Reference", + "text": "SetValue", + "canonicalReference": "@tldraw/tlschema!~SetValue:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/misc/TLCursor.ts", + "releaseTag": "Public", + "name": "TLCursorType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorStyle:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLDefaultColorStyle = " + }, + { + "kind": "Reference", + "text": "T.TypeOf", + "canonicalReference": "@tldraw/validate!TypeOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLColorStyle.ts", + "releaseTag": "Public", + "name": "TLDefaultColorStyle", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLDefaultColorTheme = " + }, + { + "kind": "Reference", + "text": "Expand", + "canonicalReference": "@tldraw/utils!Expand:type" + }, + { + "kind": "Content", + "text": "<{\n id: 'dark' | 'light';\n text: string;\n background: string;\n solid: string;\n} & " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "<(typeof " + }, + { + "kind": "Reference", + "text": "colors", + "canonicalReference": "@tldraw/tlschema!~colors:var" + }, + { + "kind": "Content", + "text": ")[number], " + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ">>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLColorStyle.ts", + "releaseTag": "Public", + "name": "TLDefaultColorTheme", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 9 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLDefaultColorThemeColor = " + }, + { + "kind": "Content", + "text": "{\n solid: string;\n semi: string;\n pattern: string;\n highlight: {\n srgb: string;\n p3: string;\n };\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLColorStyle.ts", + "releaseTag": "Public", + "name": "TLDefaultColorThemeColor", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLDefaultDashStyle:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLDefaultDashStyle = " + }, + { + "kind": "Reference", + "text": "T.TypeOf", + "canonicalReference": "@tldraw/validate!TypeOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLDashStyle.ts", + "releaseTag": "Public", + "name": "TLDefaultDashStyle", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLDefaultFillStyle:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLDefaultFillStyle = " + }, + { + "kind": "Reference", + "text": "T.TypeOf", + "canonicalReference": "@tldraw/validate!TypeOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLFillStyle.ts", + "releaseTag": "Public", + "name": "TLDefaultFillStyle", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLDefaultFontStyle:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLDefaultFontStyle = " + }, + { + "kind": "Reference", + "text": "T.TypeOf", + "canonicalReference": "@tldraw/validate!TypeOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLFontStyle.ts", + "releaseTag": "Public", + "name": "TLDefaultFontStyle", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLDefaultHorizontalAlignStyle:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLDefaultHorizontalAlignStyle = " + }, + { + "kind": "Reference", + "text": "T.TypeOf", + "canonicalReference": "@tldraw/validate!TypeOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLHorizontalAlignStyle.ts", + "releaseTag": "Public", + "name": "TLDefaultHorizontalAlignStyle", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLDefaultShape:type", + "docComment": "/**\n * The default set of shapes that are available in the editor.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLDefaultShape = " + }, + { + "kind": "Reference", + "text": "TLArrowShape", + "canonicalReference": "@tldraw/tlschema!TLArrowShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLBookmarkShape", + "canonicalReference": "@tldraw/tlschema!TLBookmarkShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLDrawShape", + "canonicalReference": "@tldraw/tlschema!TLDrawShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLEmbedShape", + "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLFrameShape", + "canonicalReference": "@tldraw/tlschema!TLFrameShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLGeoShape", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLGroupShape", + "canonicalReference": "@tldraw/tlschema!TLGroupShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLHighlightShape", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLImageShape", + "canonicalReference": "@tldraw/tlschema!TLImageShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLLineShape", + "canonicalReference": "@tldraw/tlschema!TLLineShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLNoteShape", + "canonicalReference": "@tldraw/tlschema!TLNoteShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLTextShape", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLVideoShape", + "canonicalReference": "@tldraw/tlschema!TLVideoShape:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "releaseTag": "Public", + "name": "TLDefaultShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 26 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLDefaultSizeStyle:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLDefaultSizeStyle = " + }, + { + "kind": "Reference", + "text": "T.TypeOf", + "canonicalReference": "@tldraw/validate!TypeOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLSizeStyle.ts", + "releaseTag": "Public", + "name": "TLDefaultSizeStyle", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLDefaultVerticalAlignStyle:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLDefaultVerticalAlignStyle = " + }, + { + "kind": "Reference", + "text": "T.TypeOf", + "canonicalReference": "@tldraw/validate!TypeOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/styles/TLVerticalAlignStyle.ts", + "releaseTag": "Public", + "name": "TLDefaultVerticalAlignStyle", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!TLDOCUMENT_ID:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TLDOCUMENT_ID: " + }, + { + "kind": "Reference", + "text": "RecordId", + "canonicalReference": "@tldraw/store!RecordId:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLDocument", + "canonicalReference": "@tldraw/tlschema!TLDocument:interface" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLDocument.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "TLDOCUMENT_ID", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/tlschema!TLDocument:interface", + "docComment": "/**\n * TLDocument\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLDocument extends " + }, + { + "kind": "Reference", + "text": "BaseRecord", + "canonicalReference": "@tldraw/store!BaseRecord:interface" + }, + { + "kind": "Content", + "text": "<'document', " + }, + { + "kind": "Reference", + "text": "RecordId", + "canonicalReference": "@tldraw/store!RecordId:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLDocument", + "canonicalReference": "@tldraw/tlschema!TLDocument:interface" + }, + { + "kind": "Content", + "text": ">>" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLDocument.ts", + "releaseTag": "Public", + "name": "TLDocument", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLDocument#gridSize:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "gridSize: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "gridSize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLDocument#meta:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "meta: " + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "meta", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLDocument#name:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 7 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLDrawShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLDrawShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "<'draw', " + }, + { + "kind": "Reference", + "text": "TLDrawShapeProps", + "canonicalReference": "@tldraw/tlschema!~TLDrawShapeProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLDrawShape.ts", + "releaseTag": "Public", + "name": "TLDrawShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLDrawShapeSegment:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLDrawShapeSegment = " + }, + { + "kind": "Reference", + "text": "T.TypeOf", + "canonicalReference": "@tldraw/validate!TypeOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLDrawShape.ts", + "releaseTag": "Public", + "name": "TLDrawShapeSegment", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLEmbedShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLEmbedShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "<'embed', " + }, + { + "kind": "Reference", + "text": "TLEmbedShapeProps", + "canonicalReference": "@tldraw/tlschema!~TLEmbedShapeProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", + "releaseTag": "Public", + "name": "TLEmbedShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLEmbedShapePermissions:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLEmbedShapePermissions = " + }, + { + "kind": "Content", + "text": "{\n [K in keyof typeof " + }, + { + "kind": "Reference", + "text": "embedShapePermissionDefaults", + "canonicalReference": "@tldraw/tlschema!embedShapePermissionDefaults:var" + }, + { + "kind": "Content", + "text": "]?: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", + "releaseTag": "Public", + "name": "TLEmbedShapePermissions", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLFrameShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLFrameShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "<'frame', " + }, + { + "kind": "Reference", + "text": "TLFrameShapeProps", + "canonicalReference": "@tldraw/tlschema!~TLFrameShapeProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLFrameShape.ts", + "releaseTag": "Public", + "name": "TLFrameShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLGeoShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLGeoShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "<'geo', " + }, + { + "kind": "Reference", + "text": "TLGeoShapeProps", + "canonicalReference": "@tldraw/tlschema!~TLGeoShapeProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLGeoShape.ts", + "releaseTag": "Public", + "name": "TLGeoShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLGroupShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLGroupShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "<'group', " + }, + { + "kind": "Reference", + "text": "TLGroupShapeProps", + "canonicalReference": "@tldraw/tlschema!~TLGroupShapeProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLGroupShape.ts", + "releaseTag": "Public", + "name": "TLGroupShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/tlschema!TLHandle:interface", + "docComment": "/**\n * A base interface for a shape's handles.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLHandle " + } + ], + "fileUrlPath": "packages/tlschema/src/misc/TLHandle.ts", + "releaseTag": "Public", + "name": "TLHandle", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLHandle#canBind:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canBind?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "canBind", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLHandle#canSnap:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canSnap?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "canSnap", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLHandle#id:member", + "docComment": "/**\n * A unique identifier for the handle.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLHandle#index:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "index: " + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "index", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLHandle#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Reference", + "text": "TLHandleType", + "canonicalReference": "@tldraw/tlschema!TLHandleType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLHandle#x:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "x", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLHandle#y:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "y", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLHandleType:type", + "docComment": "/**\n * A type for the handle types used by tldraw's default shapes.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLHandleType = " + }, + { + "kind": "Reference", + "text": "SetValue", + "canonicalReference": "@tldraw/tlschema!~SetValue:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/misc/TLHandle.ts", + "releaseTag": "Public", + "name": "TLHandleType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLHighlightShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLHighlightShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "<'highlight', " + }, + { + "kind": "Reference", + "text": "TLHighlightShapeProps", + "canonicalReference": "@tldraw/tlschema!~TLHighlightShapeProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLHighlightShape.ts", + "releaseTag": "Public", + "name": "TLHighlightShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLImageAsset:type", + "docComment": "/**\n * An asset for images such as PNGs and JPEGs, used by the TLImageShape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLImageAsset = " + }, + { + "kind": "Reference", + "text": "TLBaseAsset", + "canonicalReference": "@tldraw/tlschema!TLBaseAsset:interface" + }, + { + "kind": "Content", + "text": "<'image', {\n w: number;\n h: number;\n name: string;\n isAnimated: boolean;\n mimeType: null | string;\n src: null | string;\n}>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/assets/TLImageAsset.ts", + "releaseTag": "Public", + "name": "TLImageAsset", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLImageShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLImageShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "<'image', " + }, + { + "kind": "Reference", + "text": "TLImageShapeProps", + "canonicalReference": "@tldraw/tlschema!TLImageShapeProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLImageShape.ts", + "releaseTag": "Public", + "name": "TLImageShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLImageShapeCrop:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLImageShapeCrop = " + }, + { + "kind": "Reference", + "text": "T.TypeOf", + "canonicalReference": "@tldraw/validate!TypeOf:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLImageShape.ts", + "releaseTag": "Public", + "name": "TLImageShapeCrop", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLImageShapeProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLImageShapeProps = " + }, + { + "kind": "Reference", + "text": "ShapePropsType", + "canonicalReference": "@tldraw/tlschema!~ShapePropsType:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLImageShape.ts", + "releaseTag": "Public", + "name": "TLImageShapeProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!TLINSTANCE_ID:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TLINSTANCE_ID: " + }, + { + "kind": "Reference", + "text": "TLInstanceId", + "canonicalReference": "@tldraw/tlschema!TLInstanceId:type" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLInstance.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "TLINSTANCE_ID", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/tlschema!TLInstance:interface", + "docComment": "/**\n * TLInstance\n *\n * State that is particular to a single browser tab\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLInstance extends " + }, + { + "kind": "Reference", + "text": "BaseRecord", + "canonicalReference": "@tldraw/store!BaseRecord:interface" + }, + { + "kind": "Content", + "text": "<'instance', " + }, + { + "kind": "Reference", + "text": "TLInstanceId", + "canonicalReference": "@tldraw/tlschema!TLInstanceId:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLInstance.ts", + "releaseTag": "Public", + "name": "TLInstance", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#brush:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "brush: " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "brush", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#canMoveCamera:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "canMoveCamera: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "canMoveCamera", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#chatMessage:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "chatMessage: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "chatMessage", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#currentPageId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "currentPageId: " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "currentPageId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#cursor:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "cursor: " + }, + { + "kind": "Reference", + "text": "TLCursor", + "canonicalReference": "@tldraw/tlschema!TLCursor:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "cursor", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#devicePixelRatio:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "devicePixelRatio: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "devicePixelRatio", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#duplicateProps:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "duplicateProps: " + }, + { + "kind": "Content", + "text": "{\n shapeIds: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[];\n offset: {\n x: number;\n y: number;\n };\n } | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "duplicateProps", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#exportBackground:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "exportBackground: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "exportBackground", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#followingUserId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "followingUserId: " + }, + { + "kind": "Content", + "text": "null | string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "followingUserId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#highlightedUserIds:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "highlightedUserIds: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "highlightedUserIds", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#insets:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "insets: " + }, + { + "kind": "Content", + "text": "boolean[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "insets", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#isChangingStyle:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isChangingStyle: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isChangingStyle", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#isChatting:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isChatting: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isChatting", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#isCoarsePointer:member", + "docComment": "/**\n * This is whether the primary input mechanism includes a pointing device of limited accuracy, such as a finger on a touchscreen. See: https://developer.mozilla.org/en-US/docs/Web/CSS/\\@media/pointer\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isCoarsePointer: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isCoarsePointer", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#isDebugMode:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isDebugMode: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isDebugMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#isFocused:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isFocused: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isFocused", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#isFocusMode:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isFocusMode: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isFocusMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#isGridMode:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isGridMode: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isGridMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#isHoveringCanvas:member", + "docComment": "/**\n * Will be null if the pointer doesn't support hovering (e.g. touch), but true or false otherwise\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isHoveringCanvas: " + }, + { + "kind": "Content", + "text": "boolean | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isHoveringCanvas", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#isPenMode:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isPenMode: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isPenMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#isReadonly:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isReadonly: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isReadonly", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#isToolLocked:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "isToolLocked: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "isToolLocked", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#meta:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "meta: " + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "meta", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#opacityForNextShape:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "opacityForNextShape: " + }, + { + "kind": "Reference", + "text": "TLOpacityType", + "canonicalReference": "@tldraw/tlschema!TLOpacityType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "opacityForNextShape", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#openMenus:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "openMenus: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "openMenus", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#screenBounds:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "screenBounds: " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "screenBounds", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#scribbles:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "scribbles: " + }, + { + "kind": "Reference", + "text": "TLScribble", + "canonicalReference": "@tldraw/tlschema!TLScribble:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "scribbles", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#stylesForNextShape:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "stylesForNextShape: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "stylesForNextShape", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstance#zoomBrush:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "zoomBrush: " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "zoomBrush", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 5 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLInstanceId:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLInstanceId = " + }, + { + "kind": "Reference", + "text": "RecordId", + "canonicalReference": "@tldraw/store!RecordId:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLInstance", + "canonicalReference": "@tldraw/tlschema!TLInstance:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLInstance.ts", + "releaseTag": "Public", + "name": "TLInstanceId", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState:interface", + "docComment": "/**\n * TLInstancePageState\n *\n * State that is unique to a particular page of the document in a particular browser tab\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLInstancePageState extends " + }, + { + "kind": "Reference", + "text": "BaseRecord", + "canonicalReference": "@tldraw/store!BaseRecord:interface" + }, + { + "kind": "Content", + "text": "<'instance_page_state', " + }, + { + "kind": "Reference", + "text": "TLInstancePageStateId", + "canonicalReference": "@tldraw/tlschema!~TLInstancePageStateId:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLPageState.ts", + "releaseTag": "Public", + "name": "TLInstancePageState", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState#croppingShapeId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "croppingShapeId: " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "croppingShapeId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState#editingShapeId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "editingShapeId: " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "editingShapeId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState#erasingShapeIds:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "erasingShapeIds: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "erasingShapeIds", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState#focusedGroupId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "focusedGroupId: " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "focusedGroupId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState#hintingShapeIds:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hintingShapeIds: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hintingShapeIds", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState#hoveredShapeId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "hoveredShapeId: " + }, + { + "kind": "Content", + "text": "null | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "hoveredShapeId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState#meta:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "meta: " + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "meta", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState#pageId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "pageId: " + }, + { + "kind": "Reference", + "text": "RecordId", + "canonicalReference": "@tldraw/store!RecordId:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "pageId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState#selectedShapeIds:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "selectedShapeIds: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "selectedShapeIds", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 5 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLInstancePresence extends " + }, + { + "kind": "Reference", + "text": "BaseRecord", + "canonicalReference": "@tldraw/store!BaseRecord:interface" + }, + { + "kind": "Content", + "text": "<'instance_presence', " + }, + { + "kind": "Reference", + "text": "TLInstancePresenceID", + "canonicalReference": "@tldraw/tlschema!~TLInstancePresenceID:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLPresence.ts", + "releaseTag": "Public", + "name": "TLInstancePresence", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#brush:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "brush: " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "brush", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#camera:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "camera: " + }, + { + "kind": "Content", + "text": "{\n x: number;\n y: number;\n z: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "camera", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#chatMessage:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "chatMessage: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "chatMessage", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#color:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "color: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "color", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#currentPageId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "currentPageId: " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "currentPageId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#cursor:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "cursor: " + }, + { + "kind": "Content", + "text": "{\n x: number;\n y: number;\n type: " + }, + { + "kind": "Reference", + "text": "TLCursor", + "canonicalReference": "@tldraw/tlschema!TLCursor:interface" + }, + { + "kind": "Content", + "text": "['type'];\n rotation: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "cursor", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#followingUserId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "followingUserId: " + }, + { + "kind": "Content", + "text": "null | string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "followingUserId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#lastActivityTimestamp:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "lastActivityTimestamp: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "lastActivityTimestamp", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#meta:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "meta: " + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "meta", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#screenBounds:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "screenBounds: " + }, + { + "kind": "Reference", + "text": "BoxModel", + "canonicalReference": "@tldraw/tlschema!BoxModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "screenBounds", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#scribbles:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "scribbles: " + }, + { + "kind": "Reference", + "text": "TLScribble", + "canonicalReference": "@tldraw/tlschema!TLScribble:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "scribbles", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#selectedShapeIds:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "selectedShapeIds: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "selectedShapeIds", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#userId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "userId: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "userId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence#userName:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "userName: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "userName", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 5 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLLanguage:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLLanguage = " + }, + { + "kind": "Content", + "text": "(typeof " + }, + { + "kind": "Reference", + "text": "LANGUAGES", + "canonicalReference": "@tldraw/tlschema!LANGUAGES:var" + }, + { + "kind": "Content", + "text": ")[number]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/translations/translations.ts", + "releaseTag": "Public", + "name": "TLLanguage", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLLineShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLLineShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "<'line', " + }, + { + "kind": "Reference", + "text": "TLLineShapeProps", + "canonicalReference": "@tldraw/tlschema!~TLLineShapeProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLLineShape.ts", + "releaseTag": "Public", + "name": "TLLineShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLNoteShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLNoteShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "<'note', " + }, + { + "kind": "Reference", + "text": "TLNoteShapeProps", + "canonicalReference": "@tldraw/tlschema!~TLNoteShapeProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLNoteShape.ts", + "releaseTag": "Public", + "name": "TLNoteShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLOpacityType:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLOpacityType = " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/misc/TLOpacity.ts", + "releaseTag": "Public", + "name": "TLOpacityType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/tlschema!TLPage:interface", + "docComment": "/**\n * TLPage\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TLPage extends " + }, + { + "kind": "Reference", + "text": "BaseRecord", + "canonicalReference": "@tldraw/store!BaseRecord:interface" + }, + { + "kind": "Content", + "text": "<'page', " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLPage.ts", + "releaseTag": "Public", + "name": "TLPage", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLPage#index:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "index: " + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "index", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLPage#meta:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "meta: " + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "meta", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!TLPage#name:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 5 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLPageId:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLPageId = " + }, + { + "kind": "Reference", + "text": "RecordId", + "canonicalReference": "@tldraw/store!RecordId:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLPage.ts", + "releaseTag": "Public", + "name": "TLPageId", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLParentId:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLParentId = " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "releaseTag": "Public", + "name": "TLParentId", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!TLPOINTER_ID:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TLPOINTER_ID: " + }, + { + "kind": "Reference", + "text": "TLPointerId", + "canonicalReference": "@tldraw/tlschema!~TLPointerId:type" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLPointer.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "TLPOINTER_ID", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLRecord:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLRecord = " + }, + { + "kind": "Reference", + "text": "TLAsset", + "canonicalReference": "@tldraw/tlschema!TLAsset:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLCamera", + "canonicalReference": "@tldraw/tlschema!TLCamera:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLDocument", + "canonicalReference": "@tldraw/tlschema!TLDocument:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLInstance", + "canonicalReference": "@tldraw/tlschema!TLInstance:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLInstancePageState", + "canonicalReference": "@tldraw/tlschema!TLInstancePageState:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLInstancePresence", + "canonicalReference": "@tldraw/tlschema!TLInstancePresence:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPage", + "canonicalReference": "@tldraw/tlschema!TLPage:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLPointer", + "canonicalReference": "@tldraw/tlschema!~TLPointer:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLRecord.ts", + "releaseTag": "Public", + "name": "TLRecord", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 18 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLSchema:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLSchema = " + }, + { + "kind": "Reference", + "text": "StoreSchema", + "canonicalReference": "@tldraw/store!StoreSchema:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ", " + }, + { + "kind": "Reference", + "text": "TLStoreProps", + "canonicalReference": "@tldraw/tlschema!TLStoreProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/createTLSchema.ts", + "releaseTag": "Public", + "name": "TLSchema", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLScribble:type", + "docComment": "/**\n * A type for the scribble used by tldraw.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLScribble = " + }, + { + "kind": "Content", + "text": "{\n id: string;\n points: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "[];\n size: number;\n color: " + }, + { + "kind": "Reference", + "text": "TLCanvasUiColor", + "canonicalReference": "@tldraw/tlschema!TLCanvasUiColor:type" + }, + { + "kind": "Content", + "text": ";\n opacity: number;\n state: " + }, + { + "kind": "Reference", + "text": "SetValue", + "canonicalReference": "@tldraw/tlschema!~SetValue:type" + }, + { + "kind": "Content", + "text": ";\n delay: number;\n shrink: number;\n taper: boolean;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/misc/TLScribble.ts", + "releaseTag": "Public", + "name": "TLScribble", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 10 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLSerializedStore:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLSerializedStore = " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/TLStore.ts", + "releaseTag": "Public", + "name": "TLSerializedStore", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLShape:type", + "docComment": "/**\n * The set of all shapes that are available in the editor, including unknown shapes.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLShape = " + }, + { + "kind": "Reference", + "text": "TLDefaultShape", + "canonicalReference": "@tldraw/tlschema!TLDefaultShape:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLUnknownShape", + "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "releaseTag": "Public", + "name": "TLShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLShapeId = " + }, + { + "kind": "Reference", + "text": "RecordId", + "canonicalReference": "@tldraw/store!RecordId:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUnknownShape", + "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "releaseTag": "Public", + "name": "TLShapeId", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLShapePartial:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLShapePartial = " + }, + { + "kind": "Content", + "text": "T extends T ? {\n id: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n type: T['type'];\n props?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": ";\n meta?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": ";\n} & " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "> : never" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "releaseTag": "Public", + "name": "TLShapePartial", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "typeTokenRange": { + "startIndex": 5, + "endIndex": 16 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLShapeProp:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLShapeProp = " + }, + { + "kind": "Content", + "text": "keyof " + }, + { + "kind": "Reference", + "text": "TLShapeProps", + "canonicalReference": "@tldraw/tlschema!TLShapeProps:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "releaseTag": "Public", + "name": "TLShapeProp", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLShapeProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLShapeProps = " + }, + { + "kind": "Reference", + "text": "Identity", + "canonicalReference": "@tldraw/tlschema!~Identity:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "UnionToIntersection", + "canonicalReference": "@tldraw/tlschema!~UnionToIntersection:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLDefaultShape", + "canonicalReference": "@tldraw/tlschema!TLDefaultShape:type" + }, + { + "kind": "Content", + "text": "['props']>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "releaseTag": "Public", + "name": "TLShapeProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLShapePropsMigrations = " + }, + { + "kind": "Content", + "text": "{\n sequence: " + }, + { + "kind": "Reference", + "text": "Array", + "canonicalReference": "!Array:interface" + }, + { + "kind": "Content", + "text": "<{\n readonly dependsOn: readonly " + }, + { + "kind": "Reference", + "text": "MigrationId", + "canonicalReference": "@tldraw/store!MigrationId:type" + }, + { + "kind": "Content", + "text": "[];\n } | {\n readonly id: " + }, + { + "kind": "Reference", + "text": "MigrationId", + "canonicalReference": "@tldraw/store!MigrationId:type" + }, + { + "kind": "Content", + "text": ";\n readonly dependsOn?: " + }, + { + "kind": "Reference", + "text": "MigrationId", + "canonicalReference": "@tldraw/store!MigrationId:type" + }, + { + "kind": "Content", + "text": "[];\n readonly up: (props: any) => any;\n readonly down?: ((props: any) => any) | typeof " + }, + { + "kind": "Reference", + "text": "NO_DOWN_MIGRATION", + "canonicalReference": "@tldraw/tlschema!~NO_DOWN_MIGRATION:var" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "RETIRED_DOWN_MIGRATION", + "canonicalReference": "@tldraw/tlschema!~RETIRED_DOWN_MIGRATION:var" + }, + { + "kind": "Content", + "text": ";\n }>;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "releaseTag": "Public", + "name": "TLShapePropsMigrations", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 14 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLStore:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLStore = " + }, + { + "kind": "Reference", + "text": "Store", + "canonicalReference": "@tldraw/store!Store:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ", " + }, + { + "kind": "Reference", + "text": "TLStoreProps", + "canonicalReference": "@tldraw/tlschema!TLStoreProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/TLStore.ts", + "releaseTag": "Public", + "name": "TLStore", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLStoreProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLStoreProps = " + }, + { + "kind": "Content", + "text": "{\n defaultName: string;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/TLStore.ts", + "releaseTag": "Public", + "name": "TLStoreProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLStoreSchema:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLStoreSchema = " + }, + { + "kind": "Reference", + "text": "StoreSchema", + "canonicalReference": "@tldraw/store!StoreSchema:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ", " + }, + { + "kind": "Reference", + "text": "TLStoreProps", + "canonicalReference": "@tldraw/tlschema!TLStoreProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/TLStore.ts", + "releaseTag": "Public", + "name": "TLStoreSchema", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLStoreSnapshot:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLStoreSnapshot = " + }, + { + "kind": "Reference", + "text": "StoreSnapshot", + "canonicalReference": "@tldraw/store!StoreSnapshot:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/TLStore.ts", + "releaseTag": "Public", + "name": "TLStoreSnapshot", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLTextShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLTextShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "<'text', " + }, + { + "kind": "Reference", + "text": "TLTextShapeProps", + "canonicalReference": "@tldraw/tlschema!TLTextShapeProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLTextShape.ts", + "releaseTag": "Public", + "name": "TLTextShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLTextShapeProps:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLTextShapeProps = " + }, + { + "kind": "Reference", + "text": "ShapePropsType", + "canonicalReference": "@tldraw/tlschema!~ShapePropsType:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLTextShape.ts", + "releaseTag": "Public", + "name": "TLTextShapeProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLUnknownShape:type", + "docComment": "/**\n * A type for a shape that is available in the editor but whose type is unknown—either one of the editor's default shapes or else a custom shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLUnknownShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "releaseTag": "Public", + "name": "TLUnknownShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLVideoAsset:type", + "docComment": "/**\n * An asset used for videos, used by the TLVideoShape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLVideoAsset = " + }, + { + "kind": "Reference", + "text": "TLBaseAsset", + "canonicalReference": "@tldraw/tlschema!TLBaseAsset:interface" + }, + { + "kind": "Content", + "text": "<'video', {\n w: number;\n h: number;\n name: string;\n isAnimated: boolean;\n mimeType: null | string;\n src: null | string;\n}>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/assets/TLVideoAsset.ts", + "releaseTag": "Public", + "name": "TLVideoAsset", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLVideoShape:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLVideoShape = " + }, + { + "kind": "Reference", + "text": "TLBaseShape", + "canonicalReference": "@tldraw/tlschema!TLBaseShape:interface" + }, + { + "kind": "Content", + "text": "<'video', " + }, + { + "kind": "Reference", + "text": "TLVideoShapeProps", + "canonicalReference": "@tldraw/tlschema!~TLVideoShapeProps:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLVideoShape.ts", + "releaseTag": "Public", + "name": "TLVideoShape", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/tlschema!VecModel:interface", + "docComment": "/**\n * A serializable model for 2D vectors.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface VecModel " + } + ], + "fileUrlPath": "packages/tlschema/src/misc/geometry-types.ts", + "releaseTag": "Public", + "name": "VecModel", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!VecModel#x:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "x: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "x", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!VecModel#y:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "y: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "y", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/tlschema!VecModel#z:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "z?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "z", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!vecModelValidator:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "vecModelValidator: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/tlschema/src/misc/geometry-types.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "vecModelValidator", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/tlschema!videoShapeProps:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "videoShapeProps: " + }, + { + "kind": "Content", + "text": "{\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n h: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n time: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n playing: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n assetId: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" + } + ], + "fileUrlPath": "packages/tlschema/src/shapes/TLVideoShape.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "videoShapeProps", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 16 + } + } + ] + } + ] } diff --git a/apps/docs/api/validate.api.json b/apps/docs/api/validate.api.json index 72d4ada9f..e74978d0e 100644 --- a/apps/docs/api/validate.api.json +++ b/apps/docs/api/validate.api.json @@ -1,4985 +1,4985 @@ { - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.41.0", - "schemaVersion": 1011, - "oldestForwardsCompatibleVersion": 1001, - "tsdocConfig": { - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "noStandardTags": true, - "tagDefinitions": [ - { - "tagName": "@alpha", - "syntaxKind": "modifier" - }, - { - "tagName": "@beta", - "syntaxKind": "modifier" - }, - { - "tagName": "@defaultValue", - "syntaxKind": "block" - }, - { - "tagName": "@decorator", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@deprecated", - "syntaxKind": "block" - }, - { - "tagName": "@eventProperty", - "syntaxKind": "modifier" - }, - { - "tagName": "@example", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@experimental", - "syntaxKind": "modifier" - }, - { - "tagName": "@inheritDoc", - "syntaxKind": "inline" - }, - { - "tagName": "@internal", - "syntaxKind": "modifier" - }, - { - "tagName": "@label", - "syntaxKind": "inline" - }, - { - "tagName": "@link", - "syntaxKind": "inline", - "allowMultiple": true - }, - { - "tagName": "@override", - "syntaxKind": "modifier" - }, - { - "tagName": "@packageDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@param", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@privateRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@public", - "syntaxKind": "modifier" - }, - { - "tagName": "@readonly", - "syntaxKind": "modifier" - }, - { - "tagName": "@remarks", - "syntaxKind": "block" - }, - { - "tagName": "@returns", - "syntaxKind": "block" - }, - { - "tagName": "@sealed", - "syntaxKind": "modifier" - }, - { - "tagName": "@see", - "syntaxKind": "block" - }, - { - "tagName": "@throws", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@typeParam", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@virtual", - "syntaxKind": "modifier" - }, - { - "tagName": "@betaDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@internalRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@preapproved", - "syntaxKind": "modifier" - } - ], - "supportForTags": { - "@alpha": true, - "@beta": true, - "@defaultValue": true, - "@decorator": true, - "@deprecated": true, - "@eventProperty": true, - "@example": true, - "@experimental": true, - "@inheritDoc": true, - "@internal": true, - "@label": true, - "@link": true, - "@override": true, - "@packageDocumentation": true, - "@param": true, - "@privateRemarks": true, - "@public": true, - "@readonly": true, - "@remarks": true, - "@returns": true, - "@sealed": true, - "@see": true, - "@throws": true, - "@typeParam": true, - "@virtual": true, - "@betaDocumentation": true, - "@internalRemarks": true, - "@preapproved": true - }, - "reportUnsupportedHtmlElements": false - } - }, - "kind": "Package", - "canonicalReference": "@tldraw/validate!", - "docComment": "", - "name": "@tldraw/validate", - "preserveMemberOrder": false, - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "@tldraw/validate!", - "name": "", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Class", - "canonicalReference": "@tldraw/validate!ArrayOfValidator:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ArrayOfValidator extends " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "ArrayOfValidator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/validate!ArrayOfValidator:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `ArrayOfValidator` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(itemValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "itemValidator", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!ArrayOfValidator#itemValidator:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly itemValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "itemValidator", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!ArrayOfValidator#lengthGreaterThan1:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "lengthGreaterThan1(): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "lengthGreaterThan1" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!ArrayOfValidator#nonEmpty:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "nonEmpty(): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "nonEmpty" - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/validate!DictValidator:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class DictValidator extends " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Key", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "DictValidator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/validate!DictValidator:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `DictValidator` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(keyValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", valueValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "keyValidator", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "valueValidator", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!DictValidator#keyValidator:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly keyValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "keyValidator", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!DictValidator#valueValidator:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly valueValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "valueValidator", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/validate!ObjectValidator:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ObjectValidator extends " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Shape", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "ObjectValidator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/validate!ObjectValidator:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `ObjectValidator` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Content", - "text": "{\n readonly [K in keyof Shape]: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ", shouldAllowUnknownProperties?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "shouldAllowUnknownProperties", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!ObjectValidator#allowUnknownProperties:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "allowUnknownProperties(): " - }, - { - "kind": "Reference", - "text": "ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "allowUnknownProperties" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!ObjectValidator#config:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly config: " - }, - { - "kind": "Content", - "text": "{\n readonly [K in keyof Shape]: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "config", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!ObjectValidator#extend:member(1)", - "docComment": "/**\n * Extend an object validator by adding additional properties.\n *\n * @example\n * ```ts\n * const animalValidator = T.object({\n * \tname: T.string,\n * })\n * const catValidator = animalValidator.extend({\n * \tmeowVolume: T.number,\n * })\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "extend" - }, - { - "kind": "Content", - "text": ">(extension: " - }, - { - "kind": "Content", - "text": "{\n readonly [K in keyof Extension]: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "Extension", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "extension", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "extend" - } - ], - "extendsTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Namespace", - "canonicalReference": "@tldraw/validate!T:namespace", - "docComment": "", - "excerptTokens": [], - "fileUrlPath": "packages/validate/src/index.ts", - "releaseTag": "None", - "name": "T", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.any:var", - "docComment": "/**\n * Validation that accepts any value. Generally this should be avoided, but you can use it as an escape hatch if you want to work without validations for e.g. a prototype.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "any: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "any", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.array:var", - "docComment": "/**\n * Validates that a value is an array. To check the contents of the array, use T.arrayOf.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "array: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "array", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/validate!T.arrayOf:function(1)", - "docComment": "/**\n * Validates that a value is an array whose contents matches the passed-in validator.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function arrayOf(itemValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "ArrayOfValidator", - "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "itemValidator", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "arrayOf" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/validate!T.ArrayOfValidator:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ArrayOfValidator extends " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "ArrayOfValidator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/validate!T.ArrayOfValidator:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `ArrayOfValidator` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(itemValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "itemValidator", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!T.ArrayOfValidator#itemValidator:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly itemValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "itemValidator", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!T.ArrayOfValidator#lengthGreaterThan1:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "lengthGreaterThan1(): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "lengthGreaterThan1" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!T.ArrayOfValidator#nonEmpty:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "nonEmpty(): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "nonEmpty" - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.bigint:var", - "docComment": "/**\n * Validates that a value is a bigint.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "bigint: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "bigint", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.boolean:var", - "docComment": "/**\n * Validates that a value is boolean.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "boolean: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "boolean", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/validate!T.dict:function(1)", - "docComment": "/**\n * Validation that an option is a dict with particular keys and values.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function dict(keyValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", valueValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "DictValidator", - "canonicalReference": "@tldraw/validate!DictValidator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "keyValidator", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "valueValidator", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 8 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "Key", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "dict" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/validate!T.DictValidator:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class DictValidator extends " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Key", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "DictValidator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/validate!T.DictValidator:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `DictValidator` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(keyValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", valueValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "keyValidator", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "valueValidator", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!T.DictValidator#keyValidator:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly keyValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "keyValidator", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!T.DictValidator#valueValidator:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly valueValidator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "valueValidator", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.indexKey:var", - "docComment": "/**\n * Validates that a value is an IndexKey.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "indexKey: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "indexKey", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.integer:var", - "docComment": "/**\n * Fails if number is not an integer\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "integer: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "integer", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/validate!T.jsonDict:function(1)", - "docComment": "/**\n * Validate an object has a particular shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function jsonDict(): " - }, - { - "kind": "Reference", - "text": "DictValidator", - "canonicalReference": "@tldraw/validate!DictValidator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "jsonDict" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.jsonValue:var", - "docComment": "/**\n * Validate that a value is valid JSON.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "jsonValue: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "JsonValue", - "canonicalReference": "@tldraw/utils!JsonValue:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "jsonValue", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.linkUrl:var", - "docComment": "/**\n * Validates that a value is a url safe to use as a link.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "linkUrl: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "linkUrl", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/validate!T.literal:function(1)", - "docComment": "/**\n * Validates that a value matches another that was passed in.\n *\n * @example\n * ```ts\n * const trueValidator = T.literal(true)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function literal(expectedValue: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "expectedValue", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "literal" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/validate!T.literalEnum:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function literalEnum(...values: " - }, - { - "kind": "Content", - "text": "Values" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "values", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "Values", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "literalEnum" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/validate!T.model:function(1)", - "docComment": "/**\n * A named object with an ID. Errors will be reported as being part of the object with the given name.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function model(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", validator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "validator", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "model" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.nonZeroInteger:var", - "docComment": "/**\n * Fails if value \\<= 0 and is not an integer\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "nonZeroInteger: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "nonZeroInteger", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.nonZeroNumber:var", - "docComment": "/**\n * Fails if value \\<= 0\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "nonZeroNumber: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "nonZeroNumber", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/validate!T.nullable:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function nullable(validator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "validator", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "nullable" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.number:var", - "docComment": "/**\n * Validates that a value is a finite non-NaN number.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "number: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "number", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/validate!T.object:function(1)", - "docComment": "/**\n * Validate an object has a particular shape.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function object(config: " - }, - { - "kind": "Content", - "text": "{\n readonly [K in keyof Shape]: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{\n [P in " - }, - { - "kind": "Reference", - "text": "ExtractRequiredKeys", - "canonicalReference": "@tldraw/validate!~ExtractRequiredKeys:type" - }, - { - "kind": "Content", - "text": "]: Shape[P];\n} & {\n [P in " - }, - { - "kind": "Reference", - "text": "ExtractOptionalKeys", - "canonicalReference": "@tldraw/validate!~ExtractOptionalKeys:type" - }, - { - "kind": "Content", - "text": "]?: Shape[P];\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 13 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "Shape", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "object" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/validate!T.ObjectValidator:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ObjectValidator extends " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Shape", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "ObjectValidator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/validate!T.ObjectValidator:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `ObjectValidator` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config: " - }, - { - "kind": "Content", - "text": "{\n readonly [K in keyof Shape]: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ", shouldAllowUnknownProperties?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "shouldAllowUnknownProperties", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!T.ObjectValidator#allowUnknownProperties:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "allowUnknownProperties(): " - }, - { - "kind": "Reference", - "text": "ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "allowUnknownProperties" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!T.ObjectValidator#config:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly config: " - }, - { - "kind": "Content", - "text": "{\n readonly [K in keyof Shape]: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "config", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!T.ObjectValidator#extend:member(1)", - "docComment": "/**\n * Extend an object validator by adding additional properties.\n *\n * @example\n * ```ts\n * const animalValidator = T.object({\n * \tname: T.string,\n * })\n * const catValidator = animalValidator.extend({\n * \tmeowVolume: T.number,\n * })\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "extend" - }, - { - "kind": "Content", - "text": ">(extension: " - }, - { - "kind": "Content", - "text": "{\n readonly [K in keyof Extension]: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": ";\n }" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "Extension", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "extension", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "extend" - } - ], - "extendsTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/validate!T.optional:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function optional(validator: " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "validator", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "optional" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.positiveInteger:var", - "docComment": "/**\n * Fails if value \\< 0 and is not an integer\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "positiveInteger: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "positiveInteger", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.positiveNumber:var", - "docComment": "/**\n * Fails if value \\< 0\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "positiveNumber: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "positiveNumber", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/validate!T.setEnum:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function setEnum(values: " - }, - { - "kind": "Reference", - "text": "ReadonlySet", - "canonicalReference": "!ReadonlySet:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "values", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "setEnum" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.srcUrl:var", - "docComment": "/**\n * Validates that a valid is a url safe to load as an asset.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "srcUrl: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "srcUrl", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.string:var", - "docComment": "/**\n * Validates that a value is a string.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "string: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "string", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/validate!T.TypeOf:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TypeOf" - }, - { - "kind": "Content", - "text": "> = " - }, - { - "kind": "Content", - "text": "V extends " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": " ? T : never" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "name": "TypeOf", - "typeParameters": [ - { - "typeParameterName": "V", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 4, - "endIndex": 7 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/validate!T.union:function(1)", - "docComment": "/**\n * Validate a union of several object types. Each object must have a property matching `key` which should be a unique string.\n *\n * @example\n * ```ts\n * const catValidator = T.object({ kind: T.value('cat'), meow: T.boolean })\n * const dogValidator = T.object({ kind: T.value('dog'), bark: T.boolean })\n * const animalValidator = T.union('kind', { cat: catValidator, dog: dogValidator })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function union" - }, - { - "kind": "Content", - "text": ">(key: " - }, - { - "kind": "Content", - "text": "Key" - }, - { - "kind": "Content", - "text": ", config: " - }, - { - "kind": "Content", - "text": "Config" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "UnionValidator", - "canonicalReference": "@tldraw/validate!UnionValidator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 12 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "key", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - }, - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "Key", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Config", - "constraintTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "union" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/validate!T.UnionValidator:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class UnionValidator" - }, - { - "kind": "Content", - "text": ", UnknownValue = " - }, - { - "kind": "Content", - "text": "never" - }, - { - "kind": "Content", - "text": "> extends " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TypeOf", - "canonicalReference": "@tldraw/validate!T.TypeOf:type" - }, - { - "kind": "Content", - "text": " | UnknownValue>" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Key", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Config", - "constraintTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "UnknownValue", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - } - } - ], - "isAbstract": false, - "name": "UnionValidator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/validate!T.UnionValidator:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `UnionValidator` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(key: " - }, - { - "kind": "Content", - "text": "Key" - }, - { - "kind": "Content", - "text": ", config: " - }, - { - "kind": "Content", - "text": "Config" - }, - { - "kind": "Content", - "text": ", unknownValueValidation: " - }, - { - "kind": "Content", - "text": "(value: object, variant: string) => UnknownValue" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "key", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "unknownValueValidation", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!T.UnionValidator#validateUnknownVariants:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "validateUnknownVariants(unknownValueValidation: " - }, - { - "kind": "Content", - "text": "(value: object, variant: string) => Unknown" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "UnionValidator", - "canonicalReference": "@tldraw/validate!UnionValidator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "Unknown", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "unknownValueValidation", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "validateUnknownVariants" - } - ], - "extendsTokenRange": { - "startIndex": 8, - "endIndex": 12 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.unknown:var", - "docComment": "/**\n * Validation that accepts any value. Useful as a starting point for building your own custom validations.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "unknown: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "unknown", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/validate!T.unknownObject:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "unknownObject: " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ">" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "unknownObject", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/validate!T.Validatable:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type Validatable = " - }, - { - "kind": "Content", - "text": "{\n validate: (value: unknown) => T;\n validateUsingKnownGoodVersion?: (knownGoodValue: T, newValue: unknown) => T;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "name": "Validatable", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/validate!T.ValidationError:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ValidationError extends " - }, - { - "kind": "Reference", - "text": "Error", - "canonicalReference": "!Error:interface" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "ValidationError", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/validate!T.ValidationError:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `ValidationError` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(rawMessage: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", path?: " - }, - { - "kind": "Reference", - "text": "ReadonlyArray", - "canonicalReference": "!ReadonlyArray:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "rawMessage", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "path", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": true - } - ] - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!T.ValidationError#name:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "name", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!T.ValidationError#path:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly path: " - }, - { - "kind": "Reference", - "text": "ReadonlyArray", - "canonicalReference": "!ReadonlyArray:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "path", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!T.ValidationError#rawMessage:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly rawMessage: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "rawMessage", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/validate!T.Validator:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Validator implements " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "Validator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/validate!T.Validator:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Validator` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(validationFn: " - }, - { - "kind": "Reference", - "text": "ValidatorFn", - "canonicalReference": "@tldraw/validate!T.ValidatorFn:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", validateUsingKnownGoodVersionFn?: " - }, - { - "kind": "Content", - "text": "undefined | " - }, - { - "kind": "Reference", - "text": "ValidatorUsingKnownGoodVersionFn", - "canonicalReference": "@tldraw/validate!T.ValidatorUsingKnownGoodVersionFn:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "validationFn", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "validateUsingKnownGoodVersionFn", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 7 - }, - "isOptional": true - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!T.Validator#check:member(1)", - "docComment": "/**\n * Refine this validation with an additional check that doesn't change the resulting value.\n *\n * @example\n * ```ts\n * const numberLessThan10Validator = T.number.check((value) => {\n * \tif (value >= 10) {\n * \t\tthrow new ValidationError(`Expected number less than 10, got ${value}`)\n * \t}\n * })\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "check(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", checkFn: " - }, - { - "kind": "Content", - "text": "(value: T) => void" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "checkFn", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "check" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!T.Validator#check:member(2)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "check(checkFn: " - }, - { - "kind": "Content", - "text": "(value: T) => void" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "checkFn", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "check" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!T.Validator#isValid:member(1)", - "docComment": "/**\n * Checks that the passed value is of the correct type.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isValid(value: " - }, - { - "kind": "Content", - "text": "unknown" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "value", - "canonicalReference": "@tldraw/validate!~value" - }, - { - "kind": "Content", - "text": " is T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isValid" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!T.Validator#nullable:member(1)", - "docComment": "/**\n * Returns a new validator that also accepts null or undefined. The resulting value will always be null.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "nullable(): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "nullable" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!T.Validator#optional:member(1)", - "docComment": "/**\n * Returns a new validator that also accepts null or undefined. The resulting value will always be null.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "optional(): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "optional" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!T.Validator#refine:member(1)", - "docComment": "/**\n * Refine this validation to a new type. The passed-in validation function should throw an error if the value can't be converted to the new type, or return the new type otherwise.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "refine(otherValidationFn: " - }, - { - "kind": "Content", - "text": "(value: T) => U" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "U", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "otherValidationFn", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "refine" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!T.Validator#validate:member(1)", - "docComment": "/**\n * Asserts that the passed value is of the correct type and returns it. The returned value is guaranteed to be referentially equal to the passed value.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "validate(value: " - }, - { - "kind": "Content", - "text": "unknown" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "validate" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!T.Validator#validateUsingKnownGoodVersion:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "validateUsingKnownGoodVersion(knownGoodValue: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ", newValue: " - }, - { - "kind": "Content", - "text": "unknown" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "knownGoodValue", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "newValue", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "validateUsingKnownGoodVersion" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!T.Validator#validateUsingKnownGoodVersionFn:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly validateUsingKnownGoodVersionFn?: " - }, - { - "kind": "Content", - "text": "undefined | " - }, - { - "kind": "Reference", - "text": "ValidatorUsingKnownGoodVersionFn", - "canonicalReference": "@tldraw/validate!T.ValidatorUsingKnownGoodVersionFn:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": true, - "releaseTag": "Public", - "name": "validateUsingKnownGoodVersionFn", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!T.Validator#validationFn:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly validationFn: " - }, - { - "kind": "Reference", - "text": "ValidatorFn", - "canonicalReference": "@tldraw/validate!T.ValidatorFn:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "validationFn", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "implementsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 3 - } - ] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/validate!T.ValidatorFn:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type ValidatorFn = " - }, - { - "kind": "Content", - "text": "(value: unknown) => T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "name": "ValidatorFn", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/validate!T.ValidatorUsingKnownGoodVersionFn:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type ValidatorUsingKnownGoodVersionFn = " - }, - { - "kind": "Content", - "text": "(knownGoodValue: In, value: unknown) => Out" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "name": "ValidatorUsingKnownGoodVersionFn", - "typeParameters": [ - { - "typeParameterName": "In", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Out", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/validate!UnionValidator:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class UnionValidator" - }, - { - "kind": "Content", - "text": ", UnknownValue = " - }, - { - "kind": "Content", - "text": "never" - }, - { - "kind": "Content", - "text": "> extends " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TypeOf", - "canonicalReference": "@tldraw/validate!T.TypeOf:type" - }, - { - "kind": "Content", - "text": " | UnknownValue>" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Key", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Config", - "constraintTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "UnknownValue", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - } - } - ], - "isAbstract": false, - "name": "UnionValidator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/validate!UnionValidator:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `UnionValidator` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(key: " - }, - { - "kind": "Content", - "text": "Key" - }, - { - "kind": "Content", - "text": ", config: " - }, - { - "kind": "Content", - "text": "Config" - }, - { - "kind": "Content", - "text": ", unknownValueValidation: " - }, - { - "kind": "Content", - "text": "(value: object, variant: string) => UnknownValue" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "key", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "unknownValueValidation", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!UnionValidator#validateUnknownVariants:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "validateUnknownVariants(unknownValueValidation: " - }, - { - "kind": "Content", - "text": "(value: object, variant: string) => Unknown" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "UnionValidator", - "canonicalReference": "@tldraw/validate!UnionValidator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "Unknown", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "unknownValueValidation", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "validateUnknownVariants" - } - ], - "extendsTokenRange": { - "startIndex": 8, - "endIndex": 12 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/validate!Validator:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Validator implements " - }, - { - "kind": "Reference", - "text": "Validatable", - "canonicalReference": "@tldraw/validate!T.Validatable:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/validate/src/lib/validation.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "Validator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@tldraw/validate!Validator:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Validator` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(validationFn: " - }, - { - "kind": "Reference", - "text": "ValidatorFn", - "canonicalReference": "@tldraw/validate!T.ValidatorFn:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", validateUsingKnownGoodVersionFn?: " - }, - { - "kind": "Content", - "text": "undefined | " - }, - { - "kind": "Reference", - "text": "ValidatorUsingKnownGoodVersionFn", - "canonicalReference": "@tldraw/validate!T.ValidatorUsingKnownGoodVersionFn:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "validationFn", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "validateUsingKnownGoodVersionFn", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 7 - }, - "isOptional": true - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!Validator#check:member(1)", - "docComment": "/**\n * Refine this validation with an additional check that doesn't change the resulting value.\n *\n * @example\n * ```ts\n * const numberLessThan10Validator = T.number.check((value) => {\n * \tif (value >= 10) {\n * \t\tthrow new ValidationError(`Expected number less than 10, got ${value}`)\n * \t}\n * })\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "check(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", checkFn: " - }, - { - "kind": "Content", - "text": "(value: T) => void" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "checkFn", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "check" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!Validator#check:member(2)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "check(checkFn: " - }, - { - "kind": "Content", - "text": "(value: T) => void" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "checkFn", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "check" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!Validator#isValid:member(1)", - "docComment": "/**\n * Checks that the passed value is of the correct type.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isValid(value: " - }, - { - "kind": "Content", - "text": "unknown" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "value", - "canonicalReference": "@tldraw/validate!~value" - }, - { - "kind": "Content", - "text": " is T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isValid" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!Validator#nullable:member(1)", - "docComment": "/**\n * Returns a new validator that also accepts null or undefined. The resulting value will always be null.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "nullable(): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "nullable" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!Validator#optional:member(1)", - "docComment": "/**\n * Returns a new validator that also accepts null or undefined. The resulting value will always be null.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "optional(): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "optional" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!Validator#refine:member(1)", - "docComment": "/**\n * Refine this validation to a new type. The passed-in validation function should throw an error if the value can't be converted to the new type, or return the new type otherwise.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "refine(otherValidationFn: " - }, - { - "kind": "Content", - "text": "(value: T) => U" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "U", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "otherValidationFn", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "refine" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!Validator#validate:member(1)", - "docComment": "/**\n * Asserts that the passed value is of the correct type and returns it. The returned value is guaranteed to be referentially equal to the passed value.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "validate(value: " - }, - { - "kind": "Content", - "text": "unknown" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "validate" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/validate!Validator#validateUsingKnownGoodVersion:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "validateUsingKnownGoodVersion(knownGoodValue: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ", newValue: " - }, - { - "kind": "Content", - "text": "unknown" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "knownGoodValue", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "newValue", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "validateUsingKnownGoodVersion" - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!Validator#validateUsingKnownGoodVersionFn:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly validateUsingKnownGoodVersionFn?: " - }, - { - "kind": "Content", - "text": "undefined | " - }, - { - "kind": "Reference", - "text": "ValidatorUsingKnownGoodVersionFn", - "canonicalReference": "@tldraw/validate!T.ValidatorUsingKnownGoodVersionFn:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": true, - "releaseTag": "Public", - "name": "validateUsingKnownGoodVersionFn", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@tldraw/validate!Validator#validationFn:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly validationFn: " - }, - { - "kind": "Reference", - "text": "ValidatorFn", - "canonicalReference": "@tldraw/validate!T.ValidatorFn:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "validationFn", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "implementsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 3 - } - ] - } - ] - } - ] + "metadata": { + "toolPackage": "@microsoft/api-extractor", + "toolVersion": "7.41.0", + "schemaVersion": 1011, + "oldestForwardsCompatibleVersion": 1001, + "tsdocConfig": { + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "noStandardTags": true, + "tagDefinitions": [ + { + "tagName": "@alpha", + "syntaxKind": "modifier" + }, + { + "tagName": "@beta", + "syntaxKind": "modifier" + }, + { + "tagName": "@defaultValue", + "syntaxKind": "block" + }, + { + "tagName": "@decorator", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@deprecated", + "syntaxKind": "block" + }, + { + "tagName": "@eventProperty", + "syntaxKind": "modifier" + }, + { + "tagName": "@example", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@experimental", + "syntaxKind": "modifier" + }, + { + "tagName": "@inheritDoc", + "syntaxKind": "inline" + }, + { + "tagName": "@internal", + "syntaxKind": "modifier" + }, + { + "tagName": "@label", + "syntaxKind": "inline" + }, + { + "tagName": "@link", + "syntaxKind": "inline", + "allowMultiple": true + }, + { + "tagName": "@override", + "syntaxKind": "modifier" + }, + { + "tagName": "@packageDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@param", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@privateRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@public", + "syntaxKind": "modifier" + }, + { + "tagName": "@readonly", + "syntaxKind": "modifier" + }, + { + "tagName": "@remarks", + "syntaxKind": "block" + }, + { + "tagName": "@returns", + "syntaxKind": "block" + }, + { + "tagName": "@sealed", + "syntaxKind": "modifier" + }, + { + "tagName": "@see", + "syntaxKind": "block" + }, + { + "tagName": "@throws", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@typeParam", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@virtual", + "syntaxKind": "modifier" + }, + { + "tagName": "@betaDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@internalRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@preapproved", + "syntaxKind": "modifier" + } + ], + "supportForTags": { + "@alpha": true, + "@beta": true, + "@defaultValue": true, + "@decorator": true, + "@deprecated": true, + "@eventProperty": true, + "@example": true, + "@experimental": true, + "@inheritDoc": true, + "@internal": true, + "@label": true, + "@link": true, + "@override": true, + "@packageDocumentation": true, + "@param": true, + "@privateRemarks": true, + "@public": true, + "@readonly": true, + "@remarks": true, + "@returns": true, + "@sealed": true, + "@see": true, + "@throws": true, + "@typeParam": true, + "@virtual": true, + "@betaDocumentation": true, + "@internalRemarks": true, + "@preapproved": true + }, + "reportUnsupportedHtmlElements": false + } + }, + "kind": "Package", + "canonicalReference": "@tldraw/validate!", + "docComment": "", + "name": "@tldraw/validate", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EntryPoint", + "canonicalReference": "@tldraw/validate!", + "name": "", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Class", + "canonicalReference": "@tldraw/validate!ArrayOfValidator:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ArrayOfValidator extends " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "ArrayOfValidator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/validate!ArrayOfValidator:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `ArrayOfValidator` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(itemValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "itemValidator", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!ArrayOfValidator#itemValidator:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly itemValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "itemValidator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!ArrayOfValidator#lengthGreaterThan1:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "lengthGreaterThan1(): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "lengthGreaterThan1" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!ArrayOfValidator#nonEmpty:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "nonEmpty(): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "nonEmpty" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/validate!DictValidator:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class DictValidator extends " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "Key", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Value", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "DictValidator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/validate!DictValidator:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `DictValidator` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(keyValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", valueValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "keyValidator", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "valueValidator", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!DictValidator#keyValidator:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly keyValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "keyValidator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!DictValidator#valueValidator:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly valueValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "valueValidator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/validate!ObjectValidator:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ObjectValidator extends " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "Shape", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "ObjectValidator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/validate!ObjectValidator:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `ObjectValidator` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Content", + "text": "{\n readonly [K in keyof Shape]: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ", shouldAllowUnknownProperties?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "shouldAllowUnknownProperties", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!ObjectValidator#allowUnknownProperties:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "allowUnknownProperties(): " + }, + { + "kind": "Reference", + "text": "ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "allowUnknownProperties" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!ObjectValidator#config:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly config: " + }, + { + "kind": "Content", + "text": "{\n readonly [K in keyof Shape]: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "config", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!ObjectValidator#extend:member(1)", + "docComment": "/**\n * Extend an object validator by adding additional properties.\n *\n * @example\n * ```ts\n * const animalValidator = T.object({\n * \tname: T.string,\n * })\n * const catValidator = animalValidator.extend({\n * \tmeowVolume: T.number,\n * })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "extend" + }, + { + "kind": "Content", + "text": ">(extension: " + }, + { + "kind": "Content", + "text": "{\n readonly [K in keyof Extension]: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "Extension", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "extension", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "extend" + } + ], + "extendsTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Namespace", + "canonicalReference": "@tldraw/validate!T:namespace", + "docComment": "", + "excerptTokens": [], + "fileUrlPath": "packages/validate/src/index.ts", + "releaseTag": "None", + "name": "T", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.any:var", + "docComment": "/**\n * Validation that accepts any value. Generally this should be avoided, but you can use it as an escape hatch if you want to work without validations for e.g. a prototype.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "any: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "any", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.array:var", + "docComment": "/**\n * Validates that a value is an array. To check the contents of the array, use T.arrayOf.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "array: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "array", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/validate!T.arrayOf:function(1)", + "docComment": "/**\n * Validates that a value is an array whose contents matches the passed-in validator.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function arrayOf(itemValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "ArrayOfValidator", + "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "itemValidator", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "arrayOf" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/validate!T.ArrayOfValidator:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ArrayOfValidator extends " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "ArrayOfValidator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/validate!T.ArrayOfValidator:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `ArrayOfValidator` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(itemValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "itemValidator", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!T.ArrayOfValidator#itemValidator:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly itemValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "itemValidator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!T.ArrayOfValidator#lengthGreaterThan1:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "lengthGreaterThan1(): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "lengthGreaterThan1" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!T.ArrayOfValidator#nonEmpty:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "nonEmpty(): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "nonEmpty" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.bigint:var", + "docComment": "/**\n * Validates that a value is a bigint.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "bigint: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "bigint", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.boolean:var", + "docComment": "/**\n * Validates that a value is boolean.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "boolean: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "boolean", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/validate!T.dict:function(1)", + "docComment": "/**\n * Validation that an option is a dict with particular keys and values.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function dict(keyValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", valueValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "DictValidator", + "canonicalReference": "@tldraw/validate!DictValidator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "keyValidator", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "valueValidator", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "Key", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Value", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "dict" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/validate!T.DictValidator:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class DictValidator extends " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "Key", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Value", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "DictValidator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/validate!T.DictValidator:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `DictValidator` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(keyValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", valueValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "keyValidator", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "valueValidator", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!T.DictValidator#keyValidator:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly keyValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "keyValidator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!T.DictValidator#valueValidator:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly valueValidator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "valueValidator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.indexKey:var", + "docComment": "/**\n * Validates that a value is an IndexKey.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "indexKey: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "indexKey", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.integer:var", + "docComment": "/**\n * Fails if number is not an integer\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "integer: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "integer", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/validate!T.jsonDict:function(1)", + "docComment": "/**\n * Validate an object has a particular shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function jsonDict(): " + }, + { + "kind": "Reference", + "text": "DictValidator", + "canonicalReference": "@tldraw/validate!DictValidator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "jsonDict" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.jsonValue:var", + "docComment": "/**\n * Validate that a value is valid JSON.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "jsonValue: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "JsonValue", + "canonicalReference": "@tldraw/utils!JsonValue:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "jsonValue", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.linkUrl:var", + "docComment": "/**\n * Validates that a value is a url safe to use as a link.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "linkUrl: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "linkUrl", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/validate!T.literal:function(1)", + "docComment": "/**\n * Validates that a value matches another that was passed in.\n *\n * @example\n * ```ts\n * const trueValidator = T.literal(true)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function literal(expectedValue: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "expectedValue", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "literal" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/validate!T.literalEnum:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function literalEnum(...values: " + }, + { + "kind": "Content", + "text": "Values" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "values", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "Values", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "literalEnum" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/validate!T.model:function(1)", + "docComment": "/**\n * A named object with an ID. Errors will be reported as being part of the object with the given name.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function model(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", validator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "validator", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "model" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.nonZeroInteger:var", + "docComment": "/**\n * Fails if value \\<= 0 and is not an integer\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "nonZeroInteger: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "nonZeroInteger", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.nonZeroNumber:var", + "docComment": "/**\n * Fails if value \\<= 0\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "nonZeroNumber: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "nonZeroNumber", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/validate!T.nullable:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function nullable(validator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "validator", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "nullable" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.number:var", + "docComment": "/**\n * Validates that a value is a finite non-NaN number.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "number: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "number", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/validate!T.object:function(1)", + "docComment": "/**\n * Validate an object has a particular shape.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function object(config: " + }, + { + "kind": "Content", + "text": "{\n readonly [K in keyof Shape]: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "<{\n [P in " + }, + { + "kind": "Reference", + "text": "ExtractRequiredKeys", + "canonicalReference": "@tldraw/validate!~ExtractRequiredKeys:type" + }, + { + "kind": "Content", + "text": "]: Shape[P];\n} & {\n [P in " + }, + { + "kind": "Reference", + "text": "ExtractOptionalKeys", + "canonicalReference": "@tldraw/validate!~ExtractOptionalKeys:type" + }, + { + "kind": "Content", + "text": "]?: Shape[P];\n}>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 13 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 6 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "Shape", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "object" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/validate!T.ObjectValidator:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ObjectValidator extends " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "Shape", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "ObjectValidator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/validate!T.ObjectValidator:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `ObjectValidator` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config: " + }, + { + "kind": "Content", + "text": "{\n readonly [K in keyof Shape]: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ", shouldAllowUnknownProperties?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "shouldAllowUnknownProperties", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!T.ObjectValidator#allowUnknownProperties:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "allowUnknownProperties(): " + }, + { + "kind": "Reference", + "text": "ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "allowUnknownProperties" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!T.ObjectValidator#config:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly config: " + }, + { + "kind": "Content", + "text": "{\n readonly [K in keyof Shape]: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "config", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!T.ObjectValidator#extend:member(1)", + "docComment": "/**\n * Extend an object validator by adding additional properties.\n *\n * @example\n * ```ts\n * const animalValidator = T.object({\n * \tname: T.string,\n * })\n * const catValidator = animalValidator.extend({\n * \tmeowVolume: T.number,\n * })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "extend" + }, + { + "kind": "Content", + "text": ">(extension: " + }, + { + "kind": "Content", + "text": "{\n readonly [K in keyof Extension]: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "ObjectValidator", + "canonicalReference": "@tldraw/validate!ObjectValidator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "Extension", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "extension", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "extend" + } + ], + "extendsTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/validate!T.optional:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function optional(validator: " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "validator", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "optional" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.positiveInteger:var", + "docComment": "/**\n * Fails if value \\< 0 and is not an integer\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "positiveInteger: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "positiveInteger", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.positiveNumber:var", + "docComment": "/**\n * Fails if value \\< 0\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "positiveNumber: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "positiveNumber", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/validate!T.setEnum:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function setEnum(values: " + }, + { + "kind": "Reference", + "text": "ReadonlySet", + "canonicalReference": "!ReadonlySet:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "values", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "setEnum" + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.srcUrl:var", + "docComment": "/**\n * Validates that a valid is a url safe to load as an asset.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "srcUrl: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "srcUrl", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.string:var", + "docComment": "/**\n * Validates that a value is a string.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "string: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "string", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/validate!T.TypeOf:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TypeOf" + }, + { + "kind": "Content", + "text": "> = " + }, + { + "kind": "Content", + "text": "V extends " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": " ? T : never" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "name": "TypeOf", + "typeParameters": [ + { + "typeParameterName": "V", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 4, + "endIndex": 7 + } + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/validate!T.union:function(1)", + "docComment": "/**\n * Validate a union of several object types. Each object must have a property matching `key` which should be a unique string.\n *\n * @example\n * ```ts\n * const catValidator = T.object({ kind: T.value('cat'), meow: T.boolean })\n * const dogValidator = T.object({ kind: T.value('dog'), bark: T.boolean })\n * const animalValidator = T.union('kind', { cat: catValidator, dog: dogValidator })\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function union" + }, + { + "kind": "Content", + "text": ">(key: " + }, + { + "kind": "Content", + "text": "Key" + }, + { + "kind": "Content", + "text": ", config: " + }, + { + "kind": "Content", + "text": "Config" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "UnionValidator", + "canonicalReference": "@tldraw/validate!UnionValidator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 12 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "key", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "Key", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Config", + "constraintTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "union" + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/validate!T.UnionValidator:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class UnionValidator" + }, + { + "kind": "Content", + "text": ", UnknownValue = " + }, + { + "kind": "Content", + "text": "never" + }, + { + "kind": "Content", + "text": "> extends " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TypeOf", + "canonicalReference": "@tldraw/validate!T.TypeOf:type" + }, + { + "kind": "Content", + "text": " | UnknownValue>" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "Key", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Config", + "constraintTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "UnknownValue", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + } + } + ], + "isAbstract": false, + "name": "UnionValidator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/validate!T.UnionValidator:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `UnionValidator` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(key: " + }, + { + "kind": "Content", + "text": "Key" + }, + { + "kind": "Content", + "text": ", config: " + }, + { + "kind": "Content", + "text": "Config" + }, + { + "kind": "Content", + "text": ", unknownValueValidation: " + }, + { + "kind": "Content", + "text": "(value: object, variant: string) => UnknownValue" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "key", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "unknownValueValidation", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!T.UnionValidator#validateUnknownVariants:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "validateUnknownVariants(unknownValueValidation: " + }, + { + "kind": "Content", + "text": "(value: object, variant: string) => Unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "UnionValidator", + "canonicalReference": "@tldraw/validate!UnionValidator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "Unknown", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "unknownValueValidation", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validateUnknownVariants" + } + ], + "extendsTokenRange": { + "startIndex": 8, + "endIndex": 12 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.unknown:var", + "docComment": "/**\n * Validation that accepts any value. Useful as a starting point for building your own custom validations.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "unknown: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "unknown", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Variable", + "canonicalReference": "@tldraw/validate!T.unknownObject:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "unknownObject: " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": ">" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "unknownObject", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/validate!T.Validatable:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type Validatable = " + }, + { + "kind": "Content", + "text": "{\n validate: (value: unknown) => T;\n validateUsingKnownGoodVersion?: (knownGoodValue: T, newValue: unknown) => T;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "name": "Validatable", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/validate!T.ValidationError:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ValidationError extends " + }, + { + "kind": "Reference", + "text": "Error", + "canonicalReference": "!Error:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "ValidationError", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/validate!T.ValidationError:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `ValidationError` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(rawMessage: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", path?: " + }, + { + "kind": "Reference", + "text": "ReadonlyArray", + "canonicalReference": "!ReadonlyArray:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "rawMessage", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": true + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!T.ValidationError#name:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!T.ValidationError#path:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly path: " + }, + { + "kind": "Reference", + "text": "ReadonlyArray", + "canonicalReference": "!ReadonlyArray:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "path", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!T.ValidationError#rawMessage:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly rawMessage: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "rawMessage", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/validate!T.Validator:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Validator implements " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "Validator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/validate!T.Validator:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Validator` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(validationFn: " + }, + { + "kind": "Reference", + "text": "ValidatorFn", + "canonicalReference": "@tldraw/validate!T.ValidatorFn:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", validateUsingKnownGoodVersionFn?: " + }, + { + "kind": "Content", + "text": "undefined | " + }, + { + "kind": "Reference", + "text": "ValidatorUsingKnownGoodVersionFn", + "canonicalReference": "@tldraw/validate!T.ValidatorUsingKnownGoodVersionFn:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "validationFn", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "validateUsingKnownGoodVersionFn", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 7 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!T.Validator#check:member(1)", + "docComment": "/**\n * Refine this validation with an additional check that doesn't change the resulting value.\n *\n * @example\n * ```ts\n * const numberLessThan10Validator = T.number.check((value) => {\n * \tif (value >= 10) {\n * \t\tthrow new ValidationError(`Expected number less than 10, got ${value}`)\n * \t}\n * })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "check(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", checkFn: " + }, + { + "kind": "Content", + "text": "(value: T) => void" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "checkFn", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "check" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!T.Validator#check:member(2)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "check(checkFn: " + }, + { + "kind": "Content", + "text": "(value: T) => void" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 2, + "parameters": [ + { + "parameterName": "checkFn", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "check" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!T.Validator#isValid:member(1)", + "docComment": "/**\n * Checks that the passed value is of the correct type.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isValid(value: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "value", + "canonicalReference": "@tldraw/validate!~value" + }, + { + "kind": "Content", + "text": " is T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isValid" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!T.Validator#nullable:member(1)", + "docComment": "/**\n * Returns a new validator that also accepts null or undefined. The resulting value will always be null.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "nullable(): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "nullable" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!T.Validator#optional:member(1)", + "docComment": "/**\n * Returns a new validator that also accepts null or undefined. The resulting value will always be null.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "optional(): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "optional" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!T.Validator#refine:member(1)", + "docComment": "/**\n * Refine this validation to a new type. The passed-in validation function should throw an error if the value can't be converted to the new type, or return the new type otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "refine(otherValidationFn: " + }, + { + "kind": "Content", + "text": "(value: T) => U" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "U", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "otherValidationFn", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "refine" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!T.Validator#validate:member(1)", + "docComment": "/**\n * Asserts that the passed value is of the correct type and returns it. The returned value is guaranteed to be referentially equal to the passed value.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "validate(value: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validate" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!T.Validator#validateUsingKnownGoodVersion:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "validateUsingKnownGoodVersion(knownGoodValue: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", newValue: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "knownGoodValue", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "newValue", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validateUsingKnownGoodVersion" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!T.Validator#validateUsingKnownGoodVersionFn:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly validateUsingKnownGoodVersionFn?: " + }, + { + "kind": "Content", + "text": "undefined | " + }, + { + "kind": "Reference", + "text": "ValidatorUsingKnownGoodVersionFn", + "canonicalReference": "@tldraw/validate!T.ValidatorUsingKnownGoodVersionFn:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": true, + "releaseTag": "Public", + "name": "validateUsingKnownGoodVersionFn", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!T.Validator#validationFn:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly validationFn: " + }, + { + "kind": "Reference", + "text": "ValidatorFn", + "canonicalReference": "@tldraw/validate!T.ValidatorFn:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "validationFn", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 3 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/validate!T.ValidatorFn:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type ValidatorFn = " + }, + { + "kind": "Content", + "text": "(value: unknown) => T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "name": "ValidatorFn", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/validate!T.ValidatorUsingKnownGoodVersionFn:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type ValidatorUsingKnownGoodVersionFn = " + }, + { + "kind": "Content", + "text": "(knownGoodValue: In, value: unknown) => Out" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "name": "ValidatorUsingKnownGoodVersionFn", + "typeParameters": [ + { + "typeParameterName": "In", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Out", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/validate!UnionValidator:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class UnionValidator" + }, + { + "kind": "Content", + "text": ", UnknownValue = " + }, + { + "kind": "Content", + "text": "never" + }, + { + "kind": "Content", + "text": "> extends " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TypeOf", + "canonicalReference": "@tldraw/validate!T.TypeOf:type" + }, + { + "kind": "Content", + "text": " | UnknownValue>" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "Key", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Config", + "constraintTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "UnknownValue", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + } + } + ], + "isAbstract": false, + "name": "UnionValidator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/validate!UnionValidator:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `UnionValidator` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(key: " + }, + { + "kind": "Content", + "text": "Key" + }, + { + "kind": "Content", + "text": ", config: " + }, + { + "kind": "Content", + "text": "Config" + }, + { + "kind": "Content", + "text": ", unknownValueValidation: " + }, + { + "kind": "Content", + "text": "(value: object, variant: string) => UnknownValue" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "key", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "unknownValueValidation", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!UnionValidator#validateUnknownVariants:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "validateUnknownVariants(unknownValueValidation: " + }, + { + "kind": "Content", + "text": "(value: object, variant: string) => Unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "UnionValidator", + "canonicalReference": "@tldraw/validate!UnionValidator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "Unknown", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "unknownValueValidation", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validateUnknownVariants" + } + ], + "extendsTokenRange": { + "startIndex": 8, + "endIndex": 12 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@tldraw/validate!Validator:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Validator implements " + }, + { + "kind": "Reference", + "text": "Validatable", + "canonicalReference": "@tldraw/validate!T.Validatable:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/validate/src/lib/validation.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "Validator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tldraw/validate!Validator:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Validator` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(validationFn: " + }, + { + "kind": "Reference", + "text": "ValidatorFn", + "canonicalReference": "@tldraw/validate!T.ValidatorFn:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", validateUsingKnownGoodVersionFn?: " + }, + { + "kind": "Content", + "text": "undefined | " + }, + { + "kind": "Reference", + "text": "ValidatorUsingKnownGoodVersionFn", + "canonicalReference": "@tldraw/validate!T.ValidatorUsingKnownGoodVersionFn:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "validationFn", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "validateUsingKnownGoodVersionFn", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 7 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!Validator#check:member(1)", + "docComment": "/**\n * Refine this validation with an additional check that doesn't change the resulting value.\n *\n * @example\n * ```ts\n * const numberLessThan10Validator = T.number.check((value) => {\n * \tif (value >= 10) {\n * \t\tthrow new ValidationError(`Expected number less than 10, got ${value}`)\n * \t}\n * })\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "check(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", checkFn: " + }, + { + "kind": "Content", + "text": "(value: T) => void" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "checkFn", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "check" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!Validator#check:member(2)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "check(checkFn: " + }, + { + "kind": "Content", + "text": "(value: T) => void" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 2, + "parameters": [ + { + "parameterName": "checkFn", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "check" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!Validator#isValid:member(1)", + "docComment": "/**\n * Checks that the passed value is of the correct type.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isValid(value: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "value", + "canonicalReference": "@tldraw/validate!~value" + }, + { + "kind": "Content", + "text": " is T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isValid" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!Validator#nullable:member(1)", + "docComment": "/**\n * Returns a new validator that also accepts null or undefined. The resulting value will always be null.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "nullable(): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "nullable" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!Validator#optional:member(1)", + "docComment": "/**\n * Returns a new validator that also accepts null or undefined. The resulting value will always be null.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "optional(): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "optional" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!Validator#refine:member(1)", + "docComment": "/**\n * Refine this validation to a new type. The passed-in validation function should throw an error if the value can't be converted to the new type, or return the new type otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "refine(otherValidationFn: " + }, + { + "kind": "Content", + "text": "(value: T) => U" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "U", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "otherValidationFn", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "refine" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!Validator#validate:member(1)", + "docComment": "/**\n * Asserts that the passed value is of the correct type and returns it. The returned value is guaranteed to be referentially equal to the passed value.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "validate(value: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validate" + }, + { + "kind": "Method", + "canonicalReference": "@tldraw/validate!Validator#validateUsingKnownGoodVersion:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "validateUsingKnownGoodVersion(knownGoodValue: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", newValue: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "knownGoodValue", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "newValue", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validateUsingKnownGoodVersion" + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!Validator#validateUsingKnownGoodVersionFn:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly validateUsingKnownGoodVersionFn?: " + }, + { + "kind": "Content", + "text": "undefined | " + }, + { + "kind": "Reference", + "text": "ValidatorUsingKnownGoodVersionFn", + "canonicalReference": "@tldraw/validate!T.ValidatorUsingKnownGoodVersionFn:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": true, + "releaseTag": "Public", + "name": "validateUsingKnownGoodVersionFn", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@tldraw/validate!Validator#validationFn:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly validationFn: " + }, + { + "kind": "Reference", + "text": "ValidatorFn", + "canonicalReference": "@tldraw/validate!T.ValidatorFn:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "validationFn", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 3 + } + ] + } + ] + } + ] } diff --git a/apps/docs/content/docs/collaboration.mdx b/apps/docs/content/docs/collaboration.mdx index 89b5cb37f..854999d64 100644 --- a/apps/docs/content/docs/collaboration.mdx +++ b/apps/docs/content/docs/collaboration.mdx @@ -1,9 +1,75 @@ --- title: Collaboration status: published -author: steveruizok +author: ds300 date: 3/22/2023 order: 8 --- -See the [tldraw-yjs example](https://github.com/tldraw/tldraw-yjs-example) for an example of how to use yjs with the `tldraw` library. +We've designed the tldraw SDK to work with any collaboration backend. Depending on which backend you choose, you will need an interface that pipes changes coming from the editor to the backend and then merge changes from the backend back to the editor. + +The best way to get started is by adapting one of our examples. + +### Yjs sync example + +We created a [tldraw-yjs example](https://github.com/tldraw/tldraw-yjs-example) to illustrate a way of using the [yjs](https://yjs.dev) library with the tldraw SDK. If you need a "drop in solution" for prototyping multiplayer experiences with tldraw, start here. + +### Sockets example + +We have a [sockets example](https://github.com/tldraw/tldraw-sockets-example) that uses [PartyKit](https://www.partykit.io/) as a backend. Unlike the yjs example, this example does not use any special data structures to handle conflicts. It should be a good starting point if you needed to write your own conflict-resolution logic. + +### Our own sync engine + +We developed our own sync engine for use on tldraw.com based on a push/pull/rebase-style algorithm. It powers our "shared projects", such as [this one](https://tldraw.com/r). The engine's source code can be found [here](https://github.com/tldraw/tldraw/tree/main/packages/tlsync). It was designed to be hosted on Cloudflare workers with [DurableObjects](https://developers.cloudflare.com/durable-objects/). + +We don't suggest using this code directly. However, like our other examples, it may serve as a good reference for your own sync engine. + +## Store data + +For information about how to synchronize the store with other processes, i.e. how to get data out and put data in, including from remote sources, see the (Persistence)[/docs/persistence] page. + +## User presence + +Tldraw has support for displaying the 'presence' of other users. Presence information consists of: + +- The user's pointer position +- The user's set of selected shapes +- The user's viewport bounds (the part of the canvas they are currently viewing) +- The user's name, id, and a color to represent them + +This information will usually come from two sources: + +- The tldraw editor state (e.g. pointer position, selected shapes) +- The data layer of whichever app tldraw has been embedded in (e.g. user name, user id) + +Tldraw is agnostic about how this data is shared among users. However, in order for tldraw to use the presence data it needs to be put into the editor's store as `instance_presence` records. + +We provide a helper for constructing a reactive signal for an `instance_presence` record locally, which can then be sent to other clients somehow. It is called [createPresenceStateDerivation](?). + +```ts +import { createPresenceStateDerivation, react, atom } from 'tldraw' + +// First you need to create a Signal containing the basic user details: id, name, and color +const user = atom<{ id: string; color: string; name: string }>('user', { + id: myUser.id, + color: myUser.color, + name: myUser.name, +}) + +// if you don't have your own user data backend, you can use our localStorage-only user preferences store +// import { getUserPreferences, computed } from 'tldraw' +// const user = computed('user', getUserPreferences) + +// Then, with access to your store instance, you can create a presence signal +const userPresence = createPresenceStateDerivation(user)(store) + +// Then you can listen for changes to the presence signal and send them to other clients +const unsub = react('update presence', () => { + const presence = userPresence.get() + broadcastPresence(presence) +}) +``` + +The other clients would then call `store.put([presence])` to add the presence information to their store. + +Any such `instance_presence` records tldraw finds in the store that have a different user `id` than the editor's configured user id will cause the presence information to be rendered on the canvas. diff --git a/apps/docs/content/docs/editor.mdx b/apps/docs/content/docs/editor.mdx index 8b1222357..3ff0e268f 100644 --- a/apps/docs/content/docs/editor.mdx +++ b/apps/docs/content/docs/editor.mdx @@ -50,21 +50,9 @@ editor.getSelectedShapeIds() // [myShapeId, myOtherShapeId] Each change to the state happens within a transaction. You can batch changes into a single transaction using the [Editor#batch](?) method. It's a good idea to batch wherever possible, as this reduces the overhead for persisting or distributing those changes. -### Listening for changes +### Listening for changes, and merging changes from other sources -You can subscribe to changes using the [Store#listen](?) method on [Editor#store](?). Each time a transaction completes, the editor will call the callback with a history entry. This entry contains information about the records that were added, changed, or deleted, as well as whether the change was caused by the user or from a remote change. - -```ts -editor.store.listen((entry) => { - entry // { changes, source } -}) -``` - -### Remote changes - -By default, changes to the editor's store are assumed to have come from the editor itself. You can use the [Store#mergeRemoteChanges](?) method of the editor's [Editor#store](?) to make changes in the store that will be emitted via [Store#listen](?) with the `source` property as `'remote'`. - -If you're setting up some kind of multiplayer backend, you would want to send only the `'user'` changes to the server and merge the changes from the server using [Store#mergeRemoteChanges](?) (`editor.store.mergeRemoteChanges`). +For information about how to synchronize the store with other processes, i.e. how to get data out and put data in, see the (Persistence)[/docs/persistence] page. ### Undo and redo diff --git a/apps/docs/content/docs/persistence.mdx b/apps/docs/content/docs/persistence.mdx index f5908bf97..95f66929d 100644 --- a/apps/docs/content/docs/persistence.mdx +++ b/apps/docs/content/docs/persistence.mdx @@ -17,7 +17,7 @@ Persistence in tldraw means storing information about the editor's state to a da ## The `"persistenceKey"` prop -Both the `` or `` components support local persitence and cross-tab synchronization via the `persistenceKey` prop. Passing a value to this prop will persist the contents of the editor locally to the browser's IndexedDb. +Both the `` or `` components support local persistence and cross-tab synchronization via the `persistenceKey` prop. Passing a value to this prop will persist the contents of the editor locally to the browser's IndexedDb. ```tsx import { Tldraw } from 'tldraw' @@ -54,7 +54,7 @@ export default function () { In the example above, both editors would synchronize their document locally. They would still have two independent instance states (e.g. selections) but the document would be kept in sync and persisted under the same key. -## Snapshots +## Document Snapshots You can get a JSON snapshot of the editor's content using the [Editor#store](?)'s [Store#getSnapshot](?) method. @@ -96,7 +96,7 @@ function LoadButton() { A [snapshot](/reference/store/StoreSnapshot) includes both the store's [serialized records](/reference/store/SerializedStore) and its [serialized schema](/reference/store/SerializedSchema), which is used for migrations. -> By default, the `getSnapshot` method returns only the editor's document data. If you want to get records from a different scope, You can pass in `session`, `document`, `presence`, or else `all` for all scopes. +> By default, the `getSnapshot` method returns only the editor's document data. If you want to get records from a different scope, you can pass in `session`, `document`, `presence`, or else `all` for all scopes. Note that loading a snapshot does not reset the editor's in memory state or UI state. For example, loading a snapshot during a resizing operation may lead to a crash. This is because the resizing state maintains its own cache of information about which shapes it is resizing, and its possible that those shapes may no longer exist! @@ -170,3 +170,242 @@ export default function () { ``` For a good example of this pattern, see the [yjs-example](https://github.com/tldraw/tldraw-yjs-example). + +## Listening for changes + +You can listen for incremental updates to the document state by calling `editor.store.listen`, e.g. + +```ts +const unlisten = editor.store.listen( + (update) => { + console.log('update', update) + }, + { scope: 'document', source: 'user' } +) +``` + +These updates contain information about which records were added, removed, and updated. See [HistoryEntry](?) + +The `scope` filter can be used to listen for changes to a specific record scope, e.g. `document`, `session`, `presence`, or `all`. + +The `source` filter can be used to listen for changes from a specific source, e.g. `user`, `remote`, or `all`. (See [Store#mergeRemoteChanges](?) for more information on remote changes.) + +Note that these incremental updates do not include the schema version. You should make sure that you keep a record of the latest schema version for your snapshots. + +You can get the schema version by calling `editor.store.schema.serialize()` and the returned value can replace the `schema` property in the snapshot next time you need to load a snapshot. The schema does not change at runtime so you only need to do this once per session. + +## Handling remote changes + +If you need to synchronize changes from a remote source, e.g. a multiplayer backend, you can use the `editor.store.mergeRemoteChanges` method. This will 'tag' the changes with the `source` property as `'remote'` so you can filter them out when listening for changes. + +```ts +myRemoteSource.on('change', (changes) => { + editor.store.mergeRemoteChanges(() => { + changes.forEach((change) => { + // Apply the changes to the store + editor.store.put(/* ... */) + }) + }) +}) +``` + +## Migrations + +Tldraw uses migrations to bring data from old snapshots up to date. These run automatically when calling `editor.store.loadSnapshot`. + +### Running migrations manually + +If you need to run migrations on a snapshot without loading it into the store, you can call [StoreSchema#migrateStoreSnapshot](?) directly. + +```ts +import { createTLSchema } from 'tldraw' + +const snapshot = await getSnapshotFromSomewhere() +const migrationResult = createTLSchema().migrateStoreSnapshot(snapshot) +if (migrationResult.type === 'success') { + console.log('Migrated snapshot', migrationResult.value) +} else { + console.error('Migration failed', migrationResult.reason) +} +``` + +### Custom migrations + +Tldraw supports a couple of ways of adding custom data types to the tldraw store: + +- [Custom shape types](/docs/shapes#Custom-shapes-1) +- [`meta` properties](/docs/shapes#Meta-information) on all of our built-in record types. + +You might wish to migrate your custom data types over time as you make changes to them. + +To enable this, tldraw provides two ways to add custom migrations: + +1. **Shape props migrations**, specifically for migrating the shape.props objects on your custom shape types. +2. **The `migrations` config option**, which is more general purpose but much less commonly needed. This will allow you to migrate any data in the store. + +#### Shape props migrations + +If you have a custom shape type, you can define a `migrations` property on the shape util class. Use the `createShapePropsMigrationSequence` helper to define this property. + +```ts +import { createShapePropsMigrationSequence, createShapePropsMigrationIds, ShapeUtil } from 'tldraw' + +// Migrations must start a 1 and be sequential integers. +const Versions = createShapePropMigrationIds('custom-shape', { + AddColor: 1, +}) + +class MyCustomShapeUtil extends ShapeUtil { + static type = 'custom-shape' + static migrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: Versions.AddColor, + up(props) { + // set the default color + props.color = 'black' + }, + }, + ], + }) + + // ... +} +``` + +#### The `migrations` config option + +First create a set of migration ids. + +```ts +import { createMigrationIds } from 'tldraw' + +// The first argument is a unique namespace for your migration sequence. +// We recommend using a reverse domain name, e.g. we use 'com.tldraw.foo.bar' +const SEQUENCE_ID = 'com.example.my-app' + +const Versions = createMigrationIds(SEQUENCE_ID, { + // Migrations must start at 1 and be sequential integers. + AddColor: 1, +}) +``` + +Then create a migration sequence. + +```ts +import { createMigrationSequence, isShape } from 'tldraw' + +const myMigrations = createMigrationSequence({ + sequenceId: SEQUENCE_ID, + sequence: [ + { + id: Versions.AddColor, + // Scope can be one of + // - 'store' to have the up function called on the whole snapshot at once + // - 'record' to have the up function called on each record individually + scope: 'record', + // if scope is 'record', you can filter which records the migration runs on + filter: (record) => isShape(record) && record.type === 'custom-shape', + up(record) { + record.props.color = 'black' + }, + }, + ], +}) +``` + +And finally pass your migrations in to tldraw via the `migrations` config option. There are a few places where you might need to do this, depending on how specialized your usage of Tldraw is: + +```tsx +// When rendering the Tldraw component + + +// or when creating the store +store = createTLStore({ + ... + migrations: [myMigrations], +}) + +// or when creating the schema +schema = createTLSchema({ + ... + migrations: [myMigrations], +}) +``` + +### Updating legacy shape migrations (defineMigrations) + +You can convert your legacy migrations to the new migrations format by the following process: + +1. Wrap your version numbers in `createShapePropsMigrationIds` + +```diff +- const Versions = { ++ const Versions = createShapePropMigrationIds('custom-shape', { + AddColor: 1 +- } ++ }) +``` + +2. Replace your `defineMigrations` call with `createShapePropsMigrationSequence` + +```ts +const migrations = defineMigrations({ + currentVersion: Versions.AddColor, + migrators: { + [Versions.AddColor]: { + up: (shape: any) => ({ ...shape, props: { ...shape.props, color: 'black' } }), + down: ({ props: { color, ...props }, ...shape }: any) => ({ ...shape, props }), + }, + }, +}) +``` + +Becomes + +```ts +const migrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: Versions.AddColor, + // [!!!] You no longer have access to the top-level shape object. + // Only the shape.props object is passed in to the migrator function. + up(props) { + // [!!!] You no longer need to return a new copy of the shape object. + // Instead, you can modify the props object in place. + props.color = 'black' + }, + // [!!!] You no longer need to specify a down migration. + }, + ], +}) +``` + +## Examples + +### Local persistence + +Tldraw ships with a local-only sync engine based on `IndexedDb` and `BroadcastChannel` called [`TLLocalSyncClient`](https://github.com/tldraw/tldraw/blob/main/packages/editor/src/lib/utils/sync/TLLocalSyncClient.ts). + +### Tldraw.com sync engine + +[tldraw.com/r](https://tldraw.com/r) currently uses a simple custom sync engine based on a push/pull/rebase-style algorithm. +It can be found [here](https://github.com/tldraw/tldraw/tree/main/packages/tlsync). +It was optimized for Cloudflare workers with [DurableObjects](https://developers.cloudflare.com/durable-objects/) + +We don't suggest using our code directly yet, but it may serve as a good reference for your own sync engine. + +### Yjs sync example + +We created a [tldraw-yjs example](https://github.com/tldraw/tldraw-yjs-example) to illustrate a way of using yjs with the tldraw SDK. + +### Shape props migrations example + +Our [custom-config example](/examples/shapes/tools/custom-config) shows how to add custom shape props migrations to the tldraw store. + +### Meta properties migrations example + +Our [custom-config example](/examples/shapes/tools/custom-config) shows how to add custom migrations to the tldraw store. diff --git a/apps/docs/content/docs/shapes.mdx b/apps/docs/content/docs/shapes.mdx index 7b191b734..018198981 100644 --- a/apps/docs/content/docs/shapes.mdx +++ b/apps/docs/content/docs/shapes.mdx @@ -239,4 +239,6 @@ You can turn on `pointer-events` to allow users to interact inside of the shape. You can make shapes "editable" to help decide when they're interactive or not. -...and more! +### Migrations + +You can add migrations for your shape props by adding a `migrations` property to your shape's util class. See [the persistence docs](/docs/persistence#Shape-props-migrations) for more information. diff --git a/apps/dotcom/src/utils/remote-sync/ClientWebSocketAdapter.test.ts b/apps/dotcom/src/utils/remote-sync/ClientWebSocketAdapter.test.ts index 833aeb6a9..92e10fd0b 100644 --- a/apps/dotcom/src/utils/remote-sync/ClientWebSocketAdapter.test.ts +++ b/apps/dotcom/src/utils/remote-sync/ClientWebSocketAdapter.test.ts @@ -140,7 +140,7 @@ describe(ClientWebSocketAdapter, () => { const message: TLSocketClientSentEvent = { type: 'connect', connectRequestId: 'test', - schema: { schemaVersion: 0, storeVersion: 0, recordVersions: {} }, + schema: { schemaVersion: 1, storeVersion: 0, recordVersions: {} }, protocolVersion: TLSYNC_PROTOCOL_VERSION, lastServerClock: 0, } diff --git a/apps/examples/src/examples/bounds-snapping-shape/BoundsSnappingShape.tsx b/apps/examples/src/examples/bounds-snapping-shape/BoundsSnappingShape.tsx index c74fb427f..152f8576c 100644 --- a/apps/examples/src/examples/bounds-snapping-shape/BoundsSnappingShape.tsx +++ b/apps/examples/src/examples/bounds-snapping-shape/BoundsSnappingShape.tsx @@ -1,4 +1,4 @@ -import { Editor, Tldraw } from 'tldraw' +import { Editor, TLStoreSnapshot, Tldraw } from 'tldraw' import { PlayingCardTool } from './PlayingCardShape/playing-card-tool' import { PlayingCardUtil } from './PlayingCardShape/playing-card-util' import snapshot from './snapshot.json' @@ -27,7 +27,7 @@ export default function BoundsSnappingShapeExample() { // [c] onMount={handleMount} // [d] - snapshot={snapshot} + snapshot={snapshot as TLStoreSnapshot} /> ) diff --git a/apps/examples/src/examples/custom-config/CardShape/card-shape-migrations.ts b/apps/examples/src/examples/custom-config/CardShape/card-shape-migrations.ts index 65331d8e3..9fa1186c0 100644 --- a/apps/examples/src/examples/custom-config/CardShape/card-shape-migrations.ts +++ b/apps/examples/src/examples/custom-config/CardShape/card-shape-migrations.ts @@ -1,21 +1,26 @@ -import { defineMigrations } from 'tldraw' +import { createShapePropsMigrationIds } from '@tldraw/tlschema/src/records/TLShape' +import { createShapePropsMigrationSequence } from 'tldraw' + +const versions = createShapePropsMigrationIds( + // this must match the shape type in the shape definition + 'card', + { + AddSomeProperty: 1, + } +) // Migrations for the custom card shape (optional but very helpful) -export const cardShapeMigrations = defineMigrations({ - currentVersion: 1, - migrators: { - 1: { - // for example, removing a property from the shape - up(shape) { - const migratedUpShape = { ...shape } - delete migratedUpShape._somePropertyToRemove - return migratedUpShape +export const cardShapeMigrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: versions.AddSomeProperty, + up(props) { + // it is safe to mutate the props object here + props.someProperty = 'some value' }, - down(shape) { - const migratedDownShape = { ...shape } - migratedDownShape._somePropertyToRemove = 'some value' - return migratedDownShape + down(props) { + delete props.someProperty }, }, - }, + ], }) diff --git a/apps/examples/src/examples/image-component/TldrawImageExample.tsx b/apps/examples/src/examples/image-component/TldrawImageExample.tsx index c55be3abe..b024beec1 100644 --- a/apps/examples/src/examples/image-component/TldrawImageExample.tsx +++ b/apps/examples/src/examples/image-component/TldrawImageExample.tsx @@ -1,5 +1,14 @@ import { useState } from 'react' -import { Box, Editor, StoreSnapshot, TLPageId, TLRecord, Tldraw, TldrawImage } from 'tldraw' +import { + Box, + Editor, + StoreSnapshot, + TLPageId, + TLRecord, + TLStoreSnapshot, + Tldraw, + TldrawImage, +} from 'tldraw' import 'tldraw/tldraw.css' import initialSnapshot from './snapshot.json' @@ -7,7 +16,9 @@ import initialSnapshot from './snapshot.json' export default function TldrawImageExample() { const [editor, setEditor] = useState() - const [snapshot, setSnapshot] = useState>(initialSnapshot) + const [snapshot, setSnapshot] = useState>( + initialSnapshot as TLStoreSnapshot + ) const [currentPageId, setCurrentPageId] = useState() const [showBackground, setShowBackground] = useState(true) const [isDarkMode, setIsDarkMode] = useState(false) diff --git a/apps/examples/src/examples/meta-migrations/MetaMigrations.tsx b/apps/examples/src/examples/meta-migrations/MetaMigrations.tsx new file mode 100644 index 000000000..9e7c34b25 --- /dev/null +++ b/apps/examples/src/examples/meta-migrations/MetaMigrations.tsx @@ -0,0 +1,74 @@ +import { Tldraw, createMigrationIds, createMigrationSequence } from 'tldraw' +import 'tldraw/tldraw.css' +import { snapshot } from './snapshot' +import { components } from './ui-overrides' + +/** + * This example demonstrates how to add custom migrations for `meta` properties, or any other + * data in your store snapshots. + * + * If you have a custom shape type and you want to add migrations for its `props` object, + * there is a simpler dedicated API for that. Check out [the docs](https://tldraw.dev/docs/persistence#Shape-props-migrations) for more info. + */ + +/** + * Let's say you added some page metadata, e.g. to allow setting the background color of a page independently. + */ +interface _PageMetaV1 { + backgroundTheme?: 'red' | 'blue' | 'green' | 'purple' +} + +/** + * And then perhaps later on you decided to remove support for 'purple' because it's an ugly color. + * So all purple pages will become blue. + */ +export interface PageMetaV2 { + backgroundTheme?: 'red' | 'blue' | 'green' +} + +/** + * You would then create a migration to update the metadata from v1 to v2. + */ + +// First pick a 'sequence id' that is unique to your app +const sequenceId = 'com.example.my-app' +// Then create a 'migration id' for each version of your metadata +const versions = createMigrationIds(sequenceId, { + // the numbers must start at 1 and increment by 1 + RemovePurple: 1, +}) +const migrations = createMigrationSequence({ + sequenceId, + sequence: [ + { + id: versions.RemovePurple, + // `scope: 'record` tells the schema to call this migration on individual records. + // `scope: 'store'` would call it on the entire snapshot, to allow for actions like deleting/creating records. + scope: 'record', + // When `scope` is 'record', you can specify a filter function to only apply the migration to records that match the filter. + filter: (record) => record.typeName === 'page', + // This up function will be called on all records that match the filter + up(page: any) { + if (page.meta.backgroundTheme === 'purple') { + page.meta.backgroundTheme = 'blue' + page.name += ' (was purple)' + } + }, + }, + ], +}) + +export default function MetaMigrationsExample() { + return ( +
+ +
+ ) +} diff --git a/apps/examples/src/examples/meta-migrations/README.md b/apps/examples/src/examples/meta-migrations/README.md new file mode 100644 index 000000000..559c22dfb --- /dev/null +++ b/apps/examples/src/examples/meta-migrations/README.md @@ -0,0 +1,12 @@ +--- +title: Meta Migrations +component: ./MetaMigrations.tsx +category: data/assets +priority: 6 +--- + +Create custom migrations for `meta` properties. + +--- + +You can add arbitrary data migrations for tldraw snapshot data. This is mainly useful for updating the `meta` property of a record as your data types evolve. diff --git a/apps/examples/src/examples/meta-migrations/snapshot.ts b/apps/examples/src/examples/meta-migrations/snapshot.ts new file mode 100644 index 000000000..151fc73dd --- /dev/null +++ b/apps/examples/src/examples/meta-migrations/snapshot.ts @@ -0,0 +1,57 @@ +import { TLStoreSnapshot } from 'tldraw' + +export const snapshot = { + store: { + 'document:document': { + gridSize: 10, + name: '', + meta: {}, + id: 'document:document', + typeName: 'document', + }, + 'page:red': { + meta: { + backgroundTheme: 'red', + }, + id: 'page:red', + name: 'Red', + index: 'a1', + typeName: 'page', + }, + 'page:green': { + meta: { + backgroundTheme: 'green', + }, + id: 'page:green', + name: 'Green', + index: 'a2', + typeName: 'page', + }, + 'page:blue': { + meta: { + backgroundTheme: 'blue', + }, + id: 'page:blue', + name: 'Blue', + index: 'a3', + typeName: 'page', + }, + 'page:purple': { + meta: { + backgroundTheme: 'purple', + }, + id: 'page:purple', + name: 'Purple', + index: 'a0', + typeName: 'page', + }, + }, + schema: { + schemaVersion: 2, + sequences: { + 'com.tldraw.store': 4, + 'com.tldraw.document': 2, + 'com.tldraw.page': 1, + }, + }, +} as TLStoreSnapshot diff --git a/apps/examples/src/examples/meta-migrations/ui-overrides.tsx b/apps/examples/src/examples/meta-migrations/ui-overrides.tsx new file mode 100644 index 000000000..d5dea1ac3 --- /dev/null +++ b/apps/examples/src/examples/meta-migrations/ui-overrides.tsx @@ -0,0 +1,41 @@ +import { useLayoutEffect } from 'react' +import { TLComponents, track, useEditor } from 'tldraw' +import { PageMetaV2 } from './MetaMigrations' + +export const components: TLComponents = { + TopPanel: track(() => { + const editor = useEditor() + const currentPage = editor.getCurrentPage() + const meta: PageMetaV2 = currentPage.meta + + useLayoutEffect(() => { + const elem = document.querySelector('.tl-background') as HTMLElement + if (!elem) return + elem.style.backgroundColor = meta.backgroundTheme ?? 'unset' + }, [meta.backgroundTheme]) + + return ( + + bg:   + + + ) + }), +} diff --git a/apps/examples/src/examples/only-editor/MicroSelectTool.ts b/apps/examples/src/examples/only-editor/MicroSelectTool.ts index 74d0600c6..5de546c22 100644 --- a/apps/examples/src/examples/only-editor/MicroSelectTool.ts +++ b/apps/examples/src/examples/only-editor/MicroSelectTool.ts @@ -84,7 +84,7 @@ deletes that shape. [1] This is where we define our state node by extending the StateNode class. Since -there are no children states We can simply give it an id and define methods we +there are no children states We can give it an id and define methods we want to override to handle events. diff --git a/apps/examples/src/examples/shape-with-migrations/ShapeWithMigrationsExample.tsx b/apps/examples/src/examples/shape-with-migrations/ShapeWithMigrationsExample.tsx index 65d1c77b8..42d72fac5 100644 --- a/apps/examples/src/examples/shape-with-migrations/ShapeWithMigrationsExample.tsx +++ b/apps/examples/src/examples/shape-with-migrations/ShapeWithMigrationsExample.tsx @@ -4,6 +4,7 @@ import { T, TLBaseShape, TLOnResizeHandler, + TLStoreSnapshot, Tldraw, resizeBox, } from 'tldraw' @@ -94,7 +95,7 @@ export default function ShapeWithMigrationsExample() { // Pass in the array of custom shape classes shapeUtils={customShapeUtils} // Use a snapshot to load an old version of the shape - snapshot={snapshot} + snapshot={snapshot as TLStoreSnapshot} /> ) diff --git a/apps/examples/src/examples/snapshots/SnapshotExample.tsx b/apps/examples/src/examples/snapshots/SnapshotExample.tsx index b3ef720b5..5bb8c01d3 100644 --- a/apps/examples/src/examples/snapshots/SnapshotExample.tsx +++ b/apps/examples/src/examples/snapshots/SnapshotExample.tsx @@ -1,6 +1,8 @@ -import { Tldraw } from 'tldraw' +import { TLStoreSnapshot, Tldraw } from 'tldraw' import 'tldraw/tldraw.css' -import jsonSnapshot from './snapshot.json' +import _jsonSnapshot from './snapshot.json' + +const jsonSnapshot = _jsonSnapshot as TLStoreSnapshot // There's a guide at the bottom of this file! diff --git a/config/jest/node/jest-preset.js b/config/jest/node/jest-preset.js index 27b1cc561..08c56185f 100644 --- a/config/jest/node/jest-preset.js +++ b/config/jest/node/jest-preset.js @@ -21,7 +21,7 @@ module.exports = { }, ], }, - testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$', + testRegex: '.+\\.(test|spec)\\.(jsx?|tsx?)$', moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], modulePathIgnorePatterns: [ '/test/__fixtures__', diff --git a/package.json b/package.json index 9225c51e0..ff5c3910d 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ ] }, "devDependencies": { - "@microsoft/api-extractor": "^7.41.0", + "@microsoft/api-extractor": "^7.43.1", "@next/eslint-plugin-next": "^13.3.0", "@swc/core": "^1.3.55", "@swc/jest": "^0.2.34", diff --git a/packages/editor/api-report.md b/packages/editor/api-report.md index de6d4b2ca..1aa6fda13 100644 --- a/packages/editor/api-report.md +++ b/packages/editor/api-report.md @@ -20,7 +20,8 @@ import { HistoryEntry } from '@tldraw/store'; import { IndexKey } from '@tldraw/utils'; import { JsonObject } from '@tldraw/utils'; import { JSX as JSX_2 } from 'react/jsx-runtime'; -import { Migrations } from '@tldraw/store'; +import { LegacyMigrations } from '@tldraw/store'; +import { MigrationSequence } from '@tldraw/store'; import { NamedExoticComponent } from 'react'; import { PointerEventHandler } from 'react'; import { react } from '@tldraw/state'; @@ -62,6 +63,7 @@ import { TLScribble } from '@tldraw/tlschema'; import { TLShape } from '@tldraw/tlschema'; import { TLShapeId } from '@tldraw/tlschema'; import { TLShapePartial } from '@tldraw/tlschema'; +import { TLShapePropsMigrations } from '@tldraw/tlschema'; import { TLStore } from '@tldraw/tlschema'; import { TLStoreProps } from '@tldraw/tlschema'; import { TLUnknownShape } from '@tldraw/tlschema'; @@ -89,8 +91,8 @@ export const ANIMATION_SHORT_MS = 80; // @internal (undocumented) export function applyRotationToSnapshotShapes({ delta, editor, snapshot, stage, }: { delta: number; - snapshot: TLRotationSnapshot; editor: Editor; + snapshot: TLRotationSnapshot; stage: 'end' | 'one-off' | 'start' | 'update'; }): void; @@ -101,11 +103,11 @@ export function approximately(a: number, b: number, precision?: number): boolean export class Arc2d extends Geometry2d { constructor(config: Omit & { center: Vec; + end: Vec; + largeArcFlag: number; radius: number; start: Vec; - end: Vec; sweepFlag: number; - largeArcFlag: number; }); // (undocumented) angleEnd: number; @@ -313,19 +315,19 @@ export function canonicalizeRotation(a: number): number; // @public (undocumented) export class Circle2d extends Geometry2d { constructor(config: Omit & { + isFilled: boolean; + radius: number; x?: number; y?: number; - radius: number; - isFilled: boolean; }); // (undocumented) _center: Vec; // (undocumented) config: Omit & { + isFilled: boolean; + radius: number; x?: number; y?: number; - radius: number; - isFilled: boolean; }; // (undocumented) getBounds(): Box; @@ -359,8 +361,8 @@ export { computed } // @internal (undocumented) export function ContainerProvider({ container, children, }: { - container: HTMLDivElement; children: React.ReactNode; + container: HTMLDivElement; }): JSX_2.Element; // @public (undocumented) @@ -378,17 +380,17 @@ export function createTLStore({ initialData, defaultName, ...rest }: TLStoreOpti // @public (undocumented) export function createTLUser(opts?: { derivePresenceState?: ((store: TLStore) => Signal) | undefined; - userPreferences?: Signal | undefined; setUserPreferences?: ((userPreferences: TLUserPreferences) => void) | undefined; + userPreferences?: Signal | undefined; }): TLUser; // @public (undocumented) export class CubicBezier2d extends Polyline2d { constructor(config: Omit & { - start: Vec; cp1: Vec; cp2: Vec; end: Vec; + start: Vec; }); // (undocumented) a: Vec; @@ -437,18 +439,18 @@ export type DebugFlag = DebugFlagDef & Atom; // @internal (undocumented) export const debugFlags: { - readonly logPreventDefaults: DebugFlag; - readonly logPointerCaptures: DebugFlag; - readonly logElementRemoves: DebugFlag; + readonly debugCursors: DebugFlag; + readonly debugGeometry: DebugFlag; readonly debugSvg: DebugFlag; + readonly editOnType: DebugFlag; + readonly forceSrgb: DebugFlag; + readonly hideShapes: DebugFlag; + readonly logElementRemoves: DebugFlag; + readonly logPointerCaptures: DebugFlag; + readonly logPreventDefaults: DebugFlag; + readonly reconnectOnPing: DebugFlag; readonly showFps: DebugFlag; readonly throwToBlob: DebugFlag; - readonly reconnectOnPing: DebugFlag; - readonly debugCursors: DebugFlag; - readonly forceSrgb: DebugFlag; - readonly debugGeometry: DebugFlag; - readonly hideShapes: DebugFlag; - readonly editOnType: DebugFlag; }; // @internal (undocumented) @@ -507,14 +509,14 @@ export const DefaultSvgDefs: () => null; // @public (undocumented) export const defaultUserPreferences: Readonly<{ - name: "New User"; - locale: "ar" | "ca" | "cs" | "da" | "de" | "en" | "es" | "fa" | "fi" | "fr" | "gl" | "he" | "hi-in" | "hr" | "hu" | "it" | "ja" | "ko-kr" | "ku" | "my" | "ne" | "no" | "pl" | "pt-br" | "pt-pt" | "ro" | "ru" | "sl" | "sv" | "te" | "th" | "tr" | "uk" | "vi" | "zh-cn" | "zh-tw"; - color: "#02B1CC" | "#11B3A3" | "#39B178" | "#55B467" | "#7B66DC" | "#9D5BD2" | "#BD54C6" | "#E34BA9" | "#EC5E41" | "#F04F88" | "#F2555A" | "#FF802B"; - isDarkMode: false; - edgeScrollSpeed: 1; animationSpeed: 0 | 1; + color: "#02B1CC" | "#11B3A3" | "#39B178" | "#55B467" | "#7B66DC" | "#9D5BD2" | "#BD54C6" | "#E34BA9" | "#EC5E41" | "#F04F88" | "#F2555A" | "#FF802B"; + edgeScrollSpeed: 1; + isDarkMode: false; isSnapMode: false; isWrapMode: false; + locale: "ar" | "ca" | "cs" | "da" | "de" | "en" | "es" | "fa" | "fi" | "fr" | "gl" | "he" | "hi-in" | "hr" | "hu" | "it" | "ja" | "ko-kr" | "ku" | "my" | "ne" | "no" | "pl" | "pt-br" | "pt-pt" | "ro" | "ru" | "sl" | "sv" | "te" | "th" | "tr" | "uk" | "vi" | "zh-cn" | "zh-tw"; + name: "New User"; }>; // @public @@ -528,32 +530,32 @@ export const DRAG_DISTANCE = 16; // @public (undocumented) export const EASINGS: { - readonly linear: (t: number) => number; - readonly easeInQuad: (t: number) => number; - readonly easeOutQuad: (t: number) => number; - readonly easeInOutQuad: (t: number) => number; readonly easeInCubic: (t: number) => number; - readonly easeOutCubic: (t: number) => number; - readonly easeInOutCubic: (t: number) => number; - readonly easeInQuart: (t: number) => number; - readonly easeOutQuart: (t: number) => number; - readonly easeInOutQuart: (t: number) => number; - readonly easeInQuint: (t: number) => number; - readonly easeOutQuint: (t: number) => number; - readonly easeInOutQuint: (t: number) => number; - readonly easeInSine: (t: number) => number; - readonly easeOutSine: (t: number) => number; - readonly easeInOutSine: (t: number) => number; readonly easeInExpo: (t: number) => number; - readonly easeOutExpo: (t: number) => number; + readonly easeInOutCubic: (t: number) => number; readonly easeInOutExpo: (t: number) => number; + readonly easeInOutQuad: (t: number) => number; + readonly easeInOutQuart: (t: number) => number; + readonly easeInOutQuint: (t: number) => number; + readonly easeInOutSine: (t: number) => number; + readonly easeInQuad: (t: number) => number; + readonly easeInQuart: (t: number) => number; + readonly easeInQuint: (t: number) => number; + readonly easeInSine: (t: number) => number; + readonly easeOutCubic: (t: number) => number; + readonly easeOutExpo: (t: number) => number; + readonly easeOutQuad: (t: number) => number; + readonly easeOutQuart: (t: number) => number; + readonly easeOutQuint: (t: number) => number; + readonly easeOutSine: (t: number) => number; + readonly linear: (t: number) => number; }; // @public (undocumented) export class Edge2d extends Geometry2d { constructor(config: { - start: Vec; end: Vec; + start: Vec; }); // (undocumented) d: Vec; @@ -593,10 +595,10 @@ export class Editor extends EventEmitter { animateToUser(userId: string): this; // @internal (undocumented) annotateError(error: unknown, { origin, willCrashApp, tags, extras, }: { - origin: string; - willCrashApp: boolean; - tags?: Record; extras?: Record; + origin: string; + tags?: Record; + willCrashApp: boolean; }): this; bail(): this; bailToMark(id: string): this; @@ -617,16 +619,16 @@ export class Editor extends EventEmitter { createAssets(assets: TLAsset[]): this; // @internal (undocumented) createErrorAnnotations(origin: string, willCrashApp: 'unknown' | boolean): { + extras: { + activeStateNode?: string; + editingShape?: TLUnknownShape; + inputs?: Record; + selectedShapes?: TLUnknownShape[]; + }; tags: { origin: string; willCrashApp: 'unknown' | boolean; }; - extras: { - activeStateNode?: string; - selectedShapes?: TLUnknownShape[]; - editingShape?: TLUnknownShape; - inputs?: Record; - }; }; createPage(page: Partial): this; createShape(shape: OptionalKeys, 'id'>): this; @@ -725,12 +727,12 @@ export class Editor extends EventEmitter { getPointInShapeSpace(shape: TLShape | TLShapeId, point: VecLike): Vec; getRenderingBounds(): Box; getRenderingShapes(): { + backgroundIndex: number; id: TLShapeId; + index: number; + opacity: number; shape: TLShape; util: ShapeUtil; - index: number; - backgroundIndex: number; - opacity: number; }[]; getSelectedShapeAtPoint(point: VecLike): TLShape | undefined; getSelectedShapeIds(): TLShapeId[]; @@ -743,12 +745,12 @@ export class Editor extends EventEmitter { getShapeAncestors(shape: TLShape | TLShapeId, acc?: TLShape[]): TLShape[]; getShapeAndDescendantIds(ids: TLShapeId[]): Set; getShapeAtPoint(point: VecLike, opts?: { - renderingOnly?: boolean | undefined; - margin?: number | undefined; + filter?: ((shape: TLShape) => boolean) | undefined; + hitFrameInside?: boolean | undefined; hitInside?: boolean | undefined; hitLabels?: boolean | undefined; - hitFrameInside?: boolean | undefined; - filter?: ((shape: TLShape) => boolean) | undefined; + margin?: number | undefined; + renderingOnly?: boolean | undefined; }): TLShape | undefined; getShapeClipPath(shape: TLShape | TLShapeId): string | undefined; getShapeGeometry(shape: TLShape | TLShapeId): T; @@ -761,8 +763,8 @@ export class Editor extends EventEmitter { getShapeParent(shape?: TLShape | TLShapeId): TLShape | undefined; getShapeParentTransform(shape: TLShape | TLShapeId): Mat; getShapesAtPoint(point: VecLike, opts?: { - margin?: number | undefined; hitInside?: boolean | undefined; + margin?: number | undefined; }): TLShape[]; // (undocumented) getShapeStyleIfExists(shape: TLShape, style: StyleProp): T | undefined; @@ -779,23 +781,23 @@ export class Editor extends EventEmitter { // @deprecated (undocumented) getSvg(shapes: TLShape[] | TLShapeId[], opts?: Partial): Promise; getSvgElement(shapes: TLShape[] | TLShapeId[], opts?: Partial): Promise<{ + height: number; svg: SVGSVGElement; width: number; - height: number; } | undefined>; getSvgString(shapes: TLShape[] | TLShapeId[], opts?: Partial): Promise<{ + height: number; svg: string; width: number; - height: number; } | undefined>; // @internal (undocumented) getUnorderedRenderingShapes(useEditorState: boolean): { + backgroundIndex: number; id: TLShapeId; + index: number; + opacity: number; shape: TLShape; util: ShapeUtil; - index: number; - backgroundIndex: number; - opacity: number; }[]; getViewportPageBounds(): Box; getViewportPageCenter(): Vec; @@ -806,31 +808,31 @@ export class Editor extends EventEmitter { hasAncestor(shape: TLShape | TLShapeId | undefined, ancestorId: TLShapeId): boolean; readonly history: HistoryManager; inputs: { - originPagePoint: Vec; - originScreenPoint: Vec; - previousPagePoint: Vec; - previousScreenPoint: Vec; - currentPagePoint: Vec; - currentScreenPoint: Vec; - keys: Set; buttons: Set; + keys: Set; + originScreenPoint: Vec; + originPagePoint: Vec; + currentScreenPoint: Vec; + currentPagePoint: Vec; + previousScreenPoint: Vec; + previousPagePoint: Vec; + pointerVelocity: Vec; + altKey: boolean; + ctrlKey: boolean; isPen: boolean; shiftKey: boolean; - ctrlKey: boolean; - altKey: boolean; isDragging: boolean; - isPointing: boolean; - isPinching: boolean; isEditing: boolean; isPanning: boolean; - pointerVelocity: Vec; + isPinching: boolean; + isPointing: boolean; }; interrupt(): this; isIn(path: string): boolean; isInAny(...paths: string[]): boolean; isPointInShape(shape: TLShape | TLShapeId, point: VecLike, opts?: { - margin?: number | undefined; hitInside?: boolean | undefined; + margin?: number | undefined; }): boolean; isShapeInPage(shape: TLShape | TLShapeId, pageId?: TLPageId): boolean; isShapeOfType(shape: TLUnknownShape, type: T['type']): shape is T; @@ -858,9 +860,9 @@ export class Editor extends EventEmitter { popFocusedGroupId(): this; putContentOntoCurrentPage(content: TLContent, options?: { point?: VecLike; - select?: boolean; - preservePosition?: boolean; preserveIds?: boolean; + preservePosition?: boolean; + select?: boolean; }): this; putExternalContent(info: TLExternalContent): Promise; redo(): this; @@ -908,9 +910,9 @@ export class Editor extends EventEmitter { }; readonly sideEffects: SideEffectManager; slideCamera(opts?: { - speed: number; direction: VecLike; friction: number; + speed: number; speedThreshold?: number | undefined; }): this; readonly snaps: SnapManager; @@ -945,8 +947,8 @@ export class Editor extends EventEmitter { zoomIn(point?: Vec, animation?: TLAnimationOptions): this; zoomOut(point?: Vec, animation?: TLAnimationOptions): this; zoomToBounds(bounds: Box, opts?: { - targetZoom?: number; inset?: number; + targetZoom?: number; } & TLAnimationOptions): this; zoomToContent(opts?: TLAnimationOptions): this; zoomToFit(animation?: TLAnimationOptions): this; @@ -959,13 +961,13 @@ export const EditorContext: React_2.Context; // @public (undocumented) export class Ellipse2d extends Geometry2d { constructor(config: Omit & { - width: number; height: number; + width: number; }); // (undocumented) config: Omit & { - width: number; height: number; + width: number; }; // (undocumented) get edges(): Edge2d[]; @@ -1017,13 +1019,13 @@ export const featureFlags: Record>; // @public (undocumented) export type GapsSnapIndicator = { - id: string; - type: 'gaps'; direction: 'horizontal' | 'vertical'; gaps: Array<{ - startEdge: [VecLike, VecLike]; endEdge: [VecLike, VecLike]; + startEdge: [VecLike, VecLike]; }>; + id: string; + type: 'gaps'; }; // @public (undocumented) @@ -1076,8 +1078,8 @@ export function getArcMeasure(A: number, B: number, sweepFlag: number, largeArcF // @public (undocumented) export function getArrowTerminalsInArrowSpace(editor: Editor, shape: TLArrowShape): { - start: Vec; end: Vec; + start: Vec; }; // @public (undocumented) @@ -1091,17 +1093,17 @@ export function getIncrementedName(name: string, others: string[]): string; // @public (undocumented) export function getPointerInfo(e: PointerEvent | React.PointerEvent): { + altKey: boolean; + button: number; + ctrlKey: boolean; + isPen: boolean; point: { x: number; y: number; z: number; }; - shiftKey: boolean; - altKey: boolean; - ctrlKey: boolean; pointerId: number; - button: number; - isPen: boolean; + shiftKey: boolean; }; // @public @@ -1126,8 +1128,8 @@ export function getUserPreferences(): TLUserPreferences; // @public (undocumented) export const GRID_STEPS: { - min: number; mid: number; + min: number; step: number; }[]; @@ -1171,7 +1173,7 @@ export class GroupShapeUtil extends ShapeUtil { // (undocumented) indicator(shape: TLGroupShape): JSX_2.Element; // (undocumented) - static migrations: Migrations; + static migrations: TLShapePropsMigrations; // (undocumented) onChildrenChange: TLOnChildrenChangeHandler; // (undocumented) @@ -1288,27 +1290,27 @@ export class Mat { d: number; // (undocumented) static Decompose(m: MatLike): { - x: number; - y: number; + rotation: number; scaleX: number; scaleY: number; - rotation: number; + x: number; + y: number; }; // (undocumented) decompose(): { - x: number; - y: number; + rotation: number; scaleX: number; scaleY: number; - rotation: number; + x: number; + y: number; }; // (undocumented) decomposed(): { - x: number; - y: number; + rotation: number; scaleX: number; scaleY: number; - rotation: number; + x: number; + y: number; }; // (undocumented) e: number; @@ -1344,8 +1346,8 @@ export class Mat { rotation(): number; // (undocumented) static Scale: { - (x: number, y: number): MatModel; (x: number, y: number, cx: number, cy: number): MatModel; + (x: number, y: number): MatModel; }; // (undocumented) scale(x: number, y: number): this; @@ -1446,8 +1448,8 @@ export function pointInPolygon(A: VecLike, points: VecLike[]): boolean; // @public (undocumented) export type PointsSnapIndicator = { id: string; - type: 'points'; points: VecLike[]; + type: 'points'; }; // @public (undocumented) @@ -1526,10 +1528,10 @@ export class ReadonlySharedStyleMap { // @public (undocumented) export class Rectangle2d extends Polygon2d { constructor(config: Omit & { + height: number; + width: number; x?: number; y?: number; - width: number; - height: number; }); // (undocumented) getBounds(): Box; @@ -1554,42 +1556,42 @@ export type RequiredKeys = Partial> & Pick): { + props: { + h: number; + w: number; + }; x: number; y: number; - props: { - w: number; - h: number; - }; }; // @public (undocumented) export type ResizeBoxOptions = Partial<{ - minWidth: number; + maxHeight: number; maxWidth: number; minHeight: number; - maxHeight: number; + minWidth: number; }>; // @public (undocumented) export const ROTATE_CORNER_TO_SELECTION_CORNER: { + readonly bottom_left_rotate: "bottom_left"; + readonly bottom_right_rotate: "bottom_right"; + readonly mobile_rotate: "top_left"; readonly top_left_rotate: "top_left"; readonly top_right_rotate: "top_right"; - readonly bottom_right_rotate: "bottom_right"; - readonly bottom_left_rotate: "bottom_left"; - readonly mobile_rotate: "top_left"; }; // @public (undocumented) @@ -1600,9 +1602,9 @@ export function rotateSelectionHandle(handle: SelectionHandle, rotation: number) // @public (undocumented) export const runtime: { + hardReset: () => void; openWindow: (url: string, target: string) => void; refreshPage: () => void; - hardReset: () => void; }; // @public (undocumented) @@ -1628,7 +1630,7 @@ export abstract class ShapeUtil { constructor(editor: Editor); // @internal backgroundComponent?(shape: Shape): any; - canBind: (_shape: Shape, _otherShape?: K | undefined) => boolean; + canBind: (_shape: Shape, _otherShape?: K) => boolean; canCrop: TLShapeUtilFlag; canDropShapes(shape: Shape, shapes: TLShape[]): boolean; canEdit: TLShapeUtilFlag; @@ -1655,7 +1657,7 @@ export abstract class ShapeUtil { abstract indicator(shape: Shape): any; isAspectRatioLocked: TLShapeUtilFlag; // (undocumented) - static migrations?: Migrations; + static migrations?: LegacyMigrations | TLShapePropsMigrations; onBeforeCreate?: TLOnBeforeCreateHandler; onBeforeUpdate?: TLOnBeforeUpdateHandler; // @internal @@ -1709,10 +1711,10 @@ export function shortAngleDist(a0: number, a1: number): number; // @public export class SideEffectManager void; }; + store: TLStore; }> { constructor(editor: CTX); // (undocumented) @@ -1778,13 +1780,13 @@ export class SnapManager { // @public (undocumented) export class Stadium2d extends Ellipse2d { constructor(config: Omit & { - width: number; height: number; + width: number; }); // (undocumented) config: Omit & { - width: number; height: number; + width: number; }; // (undocumented) getVertices(): Vec[]; @@ -1935,33 +1937,33 @@ export interface TLArcInfo { // @public (undocumented) export type TLArrowInfo = { - isStraight: false; - start: TLArrowPoint; - end: TLArrowPoint; - middle: VecLike; - handleArc: TLArcInfo; bodyArc: TLArcInfo; - isValid: boolean; -} | { - isStraight: true; - start: TLArrowPoint; end: TLArrowPoint; + handleArc: TLArcInfo; + isStraight: false; + isValid: boolean; middle: VecLike; + start: TLArrowPoint; +} | { + end: TLArrowPoint; + isStraight: true; isValid: boolean; length: number; + middle: VecLike; + start: TLArrowPoint; }; // @public (undocumented) export type TLArrowPoint = { + arrowhead: TLArrowShapeArrowheadStyle; handle: VecLike; point: VecLike; - arrowhead: TLArrowShapeArrowheadStyle; }; // @public (undocumented) export type TLBaseBoxShape = TLBaseShape; // @public (undocumented) @@ -1991,9 +1993,9 @@ export type TLBeforeDeleteHandler = (record: R, source: 'rem // @public (undocumented) export type TLBrushProps = { brush: BoxModel; + className?: string; color?: string; opacity?: number; - className?: string; }; // @public (undocumented) @@ -2001,8 +2003,8 @@ export type TLCancelEvent = (info: TLCancelEventInfo) => void; // @public (undocumented) export type TLCancelEventInfo = { - type: 'misc'; name: 'cancel'; + type: 'misc'; }; // @public (undocumented) @@ -2010,12 +2012,12 @@ export type TLClickEvent = (info: TLClickEventInfo) => void; // @public (undocumented) export type TLClickEventInfo = TLBaseEventInfo & { - type: 'click'; + button: number; name: TLCLickEventName; + phase: 'down' | 'settle' | 'up'; point: VecLike; pointerId: number; - button: number; - phase: 'down' | 'settle' | 'up'; + type: 'click'; } & TLPointerEventTarget; // @public (undocumented) @@ -2024,34 +2026,34 @@ export type TLCLickEventName = 'double_click' | 'quadruple_click' | 'triple_clic // @public (undocumented) export type TLCollaboratorHintProps = { className?: string; + color: string; + opacity?: number; point: VecModel; viewport: Box; zoom: number; - opacity?: number; - color: string; }; // @public (undocumented) export type TLCommand = { - type: 'command'; + preservesRedoStack?: boolean; data: Data; name: Name; - preservesRedoStack?: boolean; + type: 'command'; }; // @public (undocumented) export type TLCommandHandler = { - do: (data: Data) => void; - undo: (data: Data) => void; - redo?: (data: Data) => void; squash?: (prevData: Data, nextData: Data) => Data; + do: (data: Data) => void; + redo?: (data: Data) => void; + undo: (data: Data) => void; }; // @public (undocumented) export type TLCommandHistoryOptions = Partial<{ + preservesRedoStack: boolean; squashing: boolean; ephemeral: boolean; - preservesRedoStack: boolean; }>; // @public (undocumented) @@ -2059,8 +2061,8 @@ export type TLCompleteEvent = (info: TLCompleteEventInfo) => void; // @public (undocumented) export type TLCompleteEventInfo = { - type: 'misc'; name: 'complete'; + type: 'misc'; }; // @public (undocumented) @@ -2077,12 +2079,12 @@ export interface TLContent { // @public (undocumented) export type TLCursorProps = { + chatMessage: string; className?: string; - point: null | VecModel; - zoom: number; color?: string; name: null | string; - chatMessage: string; + point: null | VecModel; + zoom: number; }; // @public (undocumented) @@ -2104,14 +2106,15 @@ export interface TldrawEditorBaseProps { // @public export type TldrawEditorProps = Expand; + defaultName?: string; initialData?: SerializedStore; + migrations?: readonly MigrationSequence[]; persistenceKey?: string; sessionId?: string; - defaultName?: string; + snapshot?: StoreSnapshot; + store?: undefined; +} | { + store: TLStore | TLStoreWithStatus; })>; // @public (undocumented) @@ -2188,8 +2191,8 @@ export type TLEventInfo = TLCancelEventInfo | TLClickEventInfo | TLCompleteEvent export interface TLEventMap { // (undocumented) 'change-history': [{ - reason: 'bail'; markId?: string; + reason: 'bail'; } | { reason: 'push' | 'redo' | 'undo'; }]; @@ -2199,9 +2202,9 @@ export interface TLEventMap { }]; // (undocumented) 'max-shapes': [{ + count: number; name: string; pageId: TLPageId; - count: number; }]; // (undocumented) 'select-all-text': [{ @@ -2240,8 +2243,8 @@ export type TLExitEventHandler = (info: any, to: string) => void; // @public (undocumented) export type TLExternalAssetContent = { - type: 'file'; file: File; + type: 'file'; } | { type: 'url'; url: string; @@ -2249,22 +2252,22 @@ export type TLExternalAssetContent = { // @public (undocumented) export type TLExternalContent = { - sources?: TLExternalContentSource[]; point?: VecLike; + sources?: TLExternalContentSource[]; } & ({ + embed: EmbedDefinition; type: 'embed'; url: string; - embed: EmbedDefinition; } | { - type: 'files'; files: File[]; ignoreParent: boolean; + type: 'files'; } | { + text: string; type: 'svg-text'; - text: string; } | { - type: 'text'; text: string; + type: 'text'; } | { type: 'url'; url: string; @@ -2272,36 +2275,36 @@ export type TLExternalContent = { // @public (undocumented) export type TLExternalContentSource = { - type: 'error'; + data: any; + type: 'excalidraw'; +} | { data: null | string; reason: string; + type: 'error'; } | { - type: 'excalidraw'; - data: any; -} | { - type: 'text'; data: string; subtype: 'html' | 'json' | 'text' | 'url'; + type: 'text'; } | { - type: 'tldraw'; data: TLContent; + type: 'tldraw'; }; // @public (undocumented) export type TLGridProps = { + size: number; x: number; y: number; z: number; - size: number; }; // @public (undocumented) export type TLHandleProps = { - shapeId: TLShapeId; - handle: TLHandle; - zoom: number; - isCoarse: boolean; className?: string; + handle: TLHandle; + isCoarse: boolean; + shapeId: TLShapeId; + zoom: number; }; // @public (undocumented) @@ -2314,10 +2317,10 @@ export type TLHistoryEntry = TLCommand | TLHistoryMark; // @public (undocumented) export type TLHistoryMark = { - type: 'STOP'; id: string; - onUndo: boolean; onRedo: boolean; + onUndo: boolean; + type: 'STOP'; }; // @public (undocumented) @@ -2325,8 +2328,8 @@ export type TLInterruptEvent = (info: TLInterruptEventInfo) => void; // @public (undocumented) export type TLInterruptEventInfo = { - type: 'misc'; name: 'interrupt'; + type: 'misc'; }; // @public (undocumented) @@ -2334,10 +2337,10 @@ export type TLKeyboardEvent = (info: TLKeyboardEventInfo) => void; // @public (undocumented) export type TLKeyboardEventInfo = TLBaseEventInfo & { - type: 'keyboard'; - name: TLKeyboardEventName; - key: string; code: string; + key: string; + name: TLKeyboardEventName; + type: 'keyboard'; }; // @public (undocumented) @@ -2373,8 +2376,8 @@ export type TLOnEditEndHandler = (shape: T) => void; // @public (undocumented) export type TLOnHandleDragHandler = (shape: T, info: { handle: TLHandle; - isPrecise: boolean; initial?: T | undefined; + isPrecise: boolean; }) => TLShapePartial | void; // @public @@ -2412,10 +2415,10 @@ export type TLPinchEvent = (info: TLPinchEventInfo) => void; // @public (undocumented) export type TLPinchEventInfo = TLBaseEventInfo & { - type: 'pinch'; + delta: VecModel; name: TLPinchEventName; point: VecModel; - delta: VecModel; + type: 'pinch'; }; // @public (undocumented) @@ -2426,12 +2429,12 @@ export type TLPointerEvent = (info: TLPointerEventInfo) => void; // @public (undocumented) export type TLPointerEventInfo = TLBaseEventInfo & { - type: 'pointer'; + button: number; + isPen: boolean; name: TLPointerEventName; point: VecLike; pointerId: number; - button: number; - isPen: boolean; + type: 'pointer'; } & TLPointerEventTarget; // @public (undocumented) @@ -2439,19 +2442,19 @@ export type TLPointerEventName = 'long_press' | 'middle_click' | 'pointer_down' // @public (undocumented) export type TLPointerEventTarget = { - target: 'canvas'; - shape?: undefined; -} | { - target: 'handle'; - shape: TLShape; handle: TLHandle; + shape: TLShape; + target: 'handle'; } | { - target: 'selection'; handle?: TLSelectionHandle; shape?: undefined; + target: 'selection'; } | { - target: 'shape'; shape: TLShape; + target: 'shape'; +} | { + shape?: undefined; + target: 'canvas'; }; // @public (undocumented) @@ -2459,13 +2462,13 @@ export type TLResizeHandle = SelectionCorner | SelectionEdge; // @public export type TLResizeInfo = { - newPoint: Vec; handle: TLResizeHandle; - mode: TLResizeMode; - scaleX: number; - scaleY: number; initialBounds: Box; initialShape: T; + mode: TLResizeMode; + newPoint: Vec; + scaleX: number; + scaleY: number; }; // @public @@ -2473,33 +2476,33 @@ export type TLResizeMode = 'resize_bounds' | 'scale_shape'; // @public (undocumented) export type TLResizeShapeOptions = Partial<{ - initialBounds: Box; - scaleOrigin: VecLike; - scaleAxisRotation: number; - initialShape: TLShape; - initialPageTransform: MatLike; dragHandle: TLResizeHandle; + initialBounds: Box; + initialPageTransform: MatLike; + initialShape: TLShape; mode: TLResizeMode; + scaleAxisRotation: number; + scaleOrigin: VecLike; }>; // @public export type TLRotationSnapshot = { - selectionPageCenter: Vec; initialCursorAngle: number; initialSelectionRotation: number; + selectionPageCenter: Vec; shapeSnapshots: { - shape: TLShape; initialPagePoint: Vec; + shape: TLShape; }[]; }; // @public (undocumented) export type TLScribbleProps = { - scribble: TLScribble; - zoom: number; + className?: string; color?: string; opacity?: number; - className?: string; + scribble: TLScribble; + zoom: number; }; // @public (undocumented) @@ -2533,14 +2536,14 @@ export interface TLSessionStateSnapshot { isToolLocked: boolean; // (undocumented) pageStates: Array<{ - pageId: TLPageId; camera: { x: number; y: number; z: number; }; - selectedShapeIds: TLShapeId[]; focusedGroupId: null | TLShapeId; + pageId: TLPageId; + selectedShapeIds: TLShapeId[]; }>; // (undocumented) version: number; @@ -2548,11 +2551,11 @@ export interface TLSessionStateSnapshot { // @public (undocumented) export type TLShapeIndicatorProps = { - shapeId: TLShapeId; - color?: string | undefined; - opacity?: number; className?: string; + color?: string | undefined; hidden?: boolean; + opacity?: number; + shapeId: TLShapeId; }; // @public (undocumented) @@ -2568,7 +2571,7 @@ export interface TLShapeUtilConstructor; // (undocumented) @@ -2602,46 +2605,47 @@ export type TLStoreEventInfo = HistoryEntry; // @public (undocumented) export type TLStoreOptions = { - initialData?: SerializedStore; defaultName?: string; + initialData?: SerializedStore; } & ({ - schema?: StoreSchema; -} | { + migrations?: readonly MigrationSequence[]; shapeUtils?: readonly TLAnyShapeUtilConstructor[]; +} | { + schema?: StoreSchema; }); // @public (undocumented) export type TLStoreWithStatus = { + readonly connectionStatus: 'offline' | 'online'; + readonly error?: undefined; + readonly status: 'synced-remote'; + readonly store: TLStore; +} | { + readonly error: Error; readonly status: 'error'; readonly store?: undefined; - readonly error: Error; } | { + readonly error?: undefined; readonly status: 'loading'; readonly store?: undefined; - readonly error?: undefined; } | { + readonly error?: undefined; readonly status: 'not-synced'; readonly store: TLStore; - readonly error?: undefined; } | { + readonly error?: undefined; readonly status: 'synced-local'; readonly store: TLStore; - readonly error?: undefined; -} | { - readonly status: 'synced-remote'; - readonly connectionStatus: 'offline' | 'online'; - readonly store: TLStore; - readonly error?: undefined; }; // @public (undocumented) export type TLSvgOptions = { - bounds: Box; - scale: number; background: boolean; - padding: number; + bounds: Box; darkMode?: boolean; + padding: number; preserveAspectRatio: React.SVGAttributes['preserveAspectRatio']; + scale: number; }; // @public (undocumented) @@ -2674,10 +2678,10 @@ export type TLWheelEvent = (info: TLWheelEventInfo) => void; // @public (undocumented) export type TLWheelEventInfo = TLBaseEventInfo & { - type: 'wheel'; - name: 'wheel'; delta: VecModel; + name: 'wheel'; point: VecModel; + type: 'wheel'; }; // @public @@ -2703,8 +2707,8 @@ export type UiEventType = 'click' | 'keyboard' | 'pinch' | 'pointer' | 'wheel' | // @public (undocumented) export function uniq(array: { - readonly length: number; readonly [n: number]: T; + readonly length: number; } | null | undefined): T[]; // @public @@ -2721,28 +2725,28 @@ export function useEditor(): Editor; // @public (undocumented) export function useEditorComponents(): Partial<{ Background: ComponentType | null; - SvgDefs: ComponentType | null; Brush: ComponentType | null; - ZoomBrush: ComponentType | null; - ShapeIndicator: ComponentType | null; - Cursor: ComponentType | null; Canvas: ComponentType | null; CollaboratorBrush: ComponentType | null; CollaboratorCursor: ComponentType | null; CollaboratorHint: ComponentType | null; - CollaboratorShapeIndicator: ComponentType | null; - Grid: ComponentType | null; - Scribble: ComponentType | null; CollaboratorScribble: ComponentType | null; - SnapIndicator: ComponentType | null; - Handles: ComponentType | null; + CollaboratorShapeIndicator: ComponentType | null; + Cursor: ComponentType | null; + Grid: ComponentType | null; Handle: ComponentType | null; - Spinner: ComponentType | null; - SelectionForeground: ComponentType | null; - SelectionBackground: ComponentType | null; - OnTheCanvas: ComponentType | null; + Handles: ComponentType | null; InFrontOfTheCanvas: ComponentType | null; LoadingScreen: ComponentType | null; + OnTheCanvas: ComponentType | null; + Scribble: ComponentType | null; + SelectionBackground: ComponentType | null; + SelectionForeground: ComponentType | null; + ShapeIndicator: ComponentType | null; + SnapIndicator: ComponentType | null; + Spinner: ComponentType | null; + SvgDefs: ComponentType | null; + ZoomBrush: ComponentType | null; } & ErrorComponents> & ErrorComponents; // @internal diff --git a/packages/editor/api/api.json b/packages/editor/api/api.json index 5e218a260..a8272a9ed 100644 --- a/packages/editor/api/api.json +++ b/packages/editor/api/api.json @@ -1,7 +1,7 @@ { "metadata": { "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.41.0", + "toolVersion": "7.43.1", "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { @@ -414,15 +414,6 @@ "text": "Vec", "canonicalReference": "@tldraw/editor!Vec:class" }, - { - "kind": "Content", - "text": ";\n radius: number;\n start: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, { "kind": "Content", "text": ";\n end: " @@ -434,7 +425,16 @@ }, { "kind": "Content", - "text": ";\n sweepFlag: number;\n largeArcFlag: number;\n }" + "text": ";\n largeArcFlag: number;\n radius: number;\n start: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n sweepFlag: number;\n }" }, { "kind": "Content", @@ -4264,7 +4264,7 @@ }, { "kind": "Content", - "text": ", 'isClosed'> & {\n x?: number;\n y?: number;\n radius: number;\n isFilled: boolean;\n }" + "text": ", 'isClosed'> & {\n isFilled: boolean;\n radius: number;\n x?: number;\n y?: number;\n }" }, { "kind": "Content", @@ -4310,7 +4310,7 @@ }, { "kind": "Content", - "text": ", 'isClosed'> & {\n x?: number;\n y?: number;\n radius: number;\n isFilled: boolean;\n }" + "text": ", 'isClosed'> & {\n isFilled: boolean;\n radius: number;\n x?: number;\n y?: number;\n }" }, { "kind": "Content", @@ -5108,7 +5108,16 @@ }, { "kind": "Content", - "text": ">) | undefined;\n userPreferences?: " + "text": ">) | undefined;\n setUserPreferences?: ((userPreferences: " + }, + { + "kind": "Reference", + "text": "TLUserPreferences", + "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" + }, + { + "kind": "Content", + "text": ") => void) | undefined;\n userPreferences?: " }, { "kind": "Reference", @@ -5126,16 +5135,7 @@ }, { "kind": "Content", - "text": ", unknown> | undefined;\n setUserPreferences?: ((userPreferences: " - }, - { - "kind": "Reference", - "text": "TLUserPreferences", - "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" - }, - { - "kind": "Content", - "text": ") => void) | undefined;\n}" + "text": ", unknown> | undefined;\n}" }, { "kind": "Content", @@ -5220,16 +5220,7 @@ }, { "kind": "Content", - "text": ", 'isClosed' | 'isFilled'> & {\n start: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n cp1: " + "text": ", 'isClosed' | 'isFilled'> & {\n cp1: " }, { "kind": "Reference", @@ -5254,6 +5245,15 @@ "text": "Vec", "canonicalReference": "@tldraw/editor!Vec:class" }, + { + "kind": "Content", + "text": ";\n start: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, { "kind": "Content", "text": ";\n }" @@ -6739,7 +6739,7 @@ }, { "kind": "Content", - "text": "<{\n name: \"New User\";\n locale: \"ar\" | \"ca\" | \"cs\" | \"da\" | \"de\" | \"en\" | \"es\" | \"fa\" | \"fi\" | \"fr\" | \"gl\" | \"he\" | \"hi-in\" | \"hr\" | \"hu\" | \"it\" | \"ja\" | \"ko-kr\" | \"ku\" | \"my\" | \"ne\" | \"no\" | \"pl\" | \"pt-br\" | \"pt-pt\" | \"ro\" | \"ru\" | \"sl\" | \"sv\" | \"te\" | \"th\" | \"tr\" | \"uk\" | \"vi\" | \"zh-cn\" | \"zh-tw\";\n color: \"#02B1CC\" | \"#11B3A3\" | \"#39B178\" | \"#55B467\" | \"#7B66DC\" | \"#9D5BD2\" | \"#BD54C6\" | \"#E34BA9\" | \"#EC5E41\" | \"#F04F88\" | \"#F2555A\" | \"#FF802B\";\n isDarkMode: false;\n edgeScrollSpeed: 1;\n animationSpeed: 0 | 1;\n isSnapMode: false;\n isWrapMode: false;\n}>" + "text": "<{\n animationSpeed: 0 | 1;\n color: \"#02B1CC\" | \"#11B3A3\" | \"#39B178\" | \"#55B467\" | \"#7B66DC\" | \"#9D5BD2\" | \"#BD54C6\" | \"#E34BA9\" | \"#EC5E41\" | \"#F04F88\" | \"#F2555A\" | \"#FF802B\";\n edgeScrollSpeed: 1;\n isDarkMode: false;\n isSnapMode: false;\n isWrapMode: false;\n locale: \"ar\" | \"ca\" | \"cs\" | \"da\" | \"de\" | \"en\" | \"es\" | \"fa\" | \"fi\" | \"fr\" | \"gl\" | \"he\" | \"hi-in\" | \"hr\" | \"hu\" | \"it\" | \"ja\" | \"ko-kr\" | \"ku\" | \"my\" | \"ne\" | \"no\" | \"pl\" | \"pt-br\" | \"pt-pt\" | \"ro\" | \"ru\" | \"sl\" | \"sv\" | \"te\" | \"th\" | \"tr\" | \"uk\" | \"vi\" | \"zh-cn\" | \"zh-tw\";\n name: \"New User\";\n}>" } ], "fileUrlPath": "packages/editor/src/lib/config/TLUserPreferences.ts", @@ -6807,7 +6807,7 @@ }, { "kind": "Content", - "text": "{\n readonly linear: (t: number) => number;\n readonly easeInQuad: (t: number) => number;\n readonly easeOutQuad: (t: number) => number;\n readonly easeInOutQuad: (t: number) => number;\n readonly easeInCubic: (t: number) => number;\n readonly easeOutCubic: (t: number) => number;\n readonly easeInOutCubic: (t: number) => number;\n readonly easeInQuart: (t: number) => number;\n readonly easeOutQuart: (t: number) => number;\n readonly easeInOutQuart: (t: number) => number;\n readonly easeInQuint: (t: number) => number;\n readonly easeOutQuint: (t: number) => number;\n readonly easeInOutQuint: (t: number) => number;\n readonly easeInSine: (t: number) => number;\n readonly easeOutSine: (t: number) => number;\n readonly easeInOutSine: (t: number) => number;\n readonly easeInExpo: (t: number) => number;\n readonly easeOutExpo: (t: number) => number;\n readonly easeInOutExpo: (t: number) => number;\n}" + "text": "{\n readonly easeInCubic: (t: number) => number;\n readonly easeInExpo: (t: number) => number;\n readonly easeInOutCubic: (t: number) => number;\n readonly easeInOutExpo: (t: number) => number;\n readonly easeInOutQuad: (t: number) => number;\n readonly easeInOutQuart: (t: number) => number;\n readonly easeInOutQuint: (t: number) => number;\n readonly easeInOutSine: (t: number) => number;\n readonly easeInQuad: (t: number) => number;\n readonly easeInQuart: (t: number) => number;\n readonly easeInQuint: (t: number) => number;\n readonly easeInSine: (t: number) => number;\n readonly easeOutCubic: (t: number) => number;\n readonly easeOutExpo: (t: number) => number;\n readonly easeOutQuad: (t: number) => number;\n readonly easeOutQuart: (t: number) => number;\n readonly easeOutQuint: (t: number) => number;\n readonly easeOutSine: (t: number) => number;\n readonly linear: (t: number) => number;\n}" } ], "fileUrlPath": "packages/editor/src/lib/primitives/easings.ts", @@ -6885,7 +6885,7 @@ }, { "kind": "Content", - "text": "{\n start: " + "text": "{\n end: " }, { "kind": "Reference", @@ -6894,7 +6894,7 @@ }, { "kind": "Content", - "text": ";\n end: " + "text": ";\n start: " }, { "kind": "Reference", @@ -11881,7 +11881,7 @@ }, { "kind": "Content", - "text": "{\n id: " + "text": "{\n backgroundIndex: number;\n id: " }, { "kind": "Reference", @@ -11890,7 +11890,7 @@ }, { "kind": "Content", - "text": ";\n shape: " + "text": ";\n index: number;\n opacity: number;\n shape: " }, { "kind": "Reference", @@ -11917,7 +11917,7 @@ }, { "kind": "Content", - "text": ">;\n index: number;\n backgroundIndex: number;\n opacity: number;\n }[]" + "text": ">;\n }[]" }, { "kind": "Content", @@ -12462,7 +12462,7 @@ }, { "kind": "Content", - "text": "{\n renderingOnly?: boolean | undefined;\n margin?: number | undefined;\n hitInside?: boolean | undefined;\n hitLabels?: boolean | undefined;\n hitFrameInside?: boolean | undefined;\n filter?: ((shape: " + "text": "{\n filter?: ((shape: " }, { "kind": "Reference", @@ -12471,7 +12471,7 @@ }, { "kind": "Content", - "text": ") => boolean) | undefined;\n }" + "text": ") => boolean) | undefined;\n hitFrameInside?: boolean | undefined;\n hitInside?: boolean | undefined;\n hitLabels?: boolean | undefined;\n margin?: number | undefined;\n renderingOnly?: boolean | undefined;\n }" }, { "kind": "Content", @@ -13187,7 +13187,7 @@ }, { "kind": "Content", - "text": "{\n margin?: number | undefined;\n hitInside?: boolean | undefined;\n }" + "text": "{\n hitInside?: boolean | undefined;\n margin?: number | undefined;\n }" }, { "kind": "Content", @@ -14000,7 +14000,7 @@ }, { "kind": "Content", - "text": "<{\n svg: " + "text": "<{\n height: number;\n svg: " }, { "kind": "Reference", @@ -14009,7 +14009,7 @@ }, { "kind": "Content", - "text": ";\n width: number;\n height: number;\n } | undefined>" + "text": ";\n width: number;\n } | undefined>" }, { "kind": "Content", @@ -14106,7 +14106,7 @@ }, { "kind": "Content", - "text": "<{\n svg: string;\n width: number;\n height: number;\n } | undefined>" + "text": "<{\n height: number;\n svg: string;\n width: number;\n } | undefined>" }, { "kind": "Content", @@ -14506,7 +14506,25 @@ }, { "kind": "Content", - "text": "{\n originPagePoint: " + "text": "{\n buttons: " + }, + { + "kind": "Reference", + "text": "Set", + "canonicalReference": "!Set:interface" + }, + { + "kind": "Content", + "text": ";\n keys: " + }, + { + "kind": "Reference", + "text": "Set", + "canonicalReference": "!Set:interface" + }, + { + "kind": "Content", + "text": ";\n originScreenPoint: " }, { "kind": "Reference", @@ -14515,34 +14533,7 @@ }, { "kind": "Content", - "text": ";\n originScreenPoint: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n previousPagePoint: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n previousScreenPoint: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n currentPagePoint: " + "text": ";\n originPagePoint: " }, { "kind": "Reference", @@ -14560,25 +14551,7 @@ }, { "kind": "Content", - "text": ";\n keys: " - }, - { - "kind": "Reference", - "text": "Set", - "canonicalReference": "!Set:interface" - }, - { - "kind": "Content", - "text": ";\n buttons: " - }, - { - "kind": "Reference", - "text": "Set", - "canonicalReference": "!Set:interface" - }, - { - "kind": "Content", - "text": ";\n isPen: boolean;\n shiftKey: boolean;\n ctrlKey: boolean;\n altKey: boolean;\n isDragging: boolean;\n isPointing: boolean;\n isPinching: boolean;\n isEditing: boolean;\n isPanning: boolean;\n pointerVelocity: " + "text": ";\n currentPagePoint: " }, { "kind": "Reference", @@ -14587,7 +14560,34 @@ }, { "kind": "Content", - "text": ";\n }" + "text": ";\n previousScreenPoint: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n previousPagePoint: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n pointerVelocity: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n altKey: boolean;\n ctrlKey: boolean;\n isPen: boolean;\n shiftKey: boolean;\n isDragging: boolean;\n isEditing: boolean;\n isPanning: boolean;\n isPinching: boolean;\n isPointing: boolean;\n }" }, { "kind": "Content", @@ -14771,7 +14771,7 @@ }, { "kind": "Content", - "text": "{\n margin?: number | undefined;\n hitInside?: boolean | undefined;\n }" + "text": "{\n hitInside?: boolean | undefined;\n margin?: number | undefined;\n }" }, { "kind": "Content", @@ -15812,7 +15812,7 @@ }, { "kind": "Content", - "text": ";\n select?: boolean;\n preservePosition?: boolean;\n preserveIds?: boolean;\n }" + "text": ";\n preserveIds?: boolean;\n preservePosition?: boolean;\n select?: boolean;\n }" }, { "kind": "Content", @@ -18127,7 +18127,7 @@ }, { "kind": "Content", - "text": "{\n speed: number;\n direction: " + "text": "{\n direction: " }, { "kind": "Reference", @@ -18136,7 +18136,7 @@ }, { "kind": "Content", - "text": ";\n friction: number;\n speedThreshold?: number | undefined;\n }" + "text": ";\n friction: number;\n speed: number;\n speedThreshold?: number | undefined;\n }" }, { "kind": "Content", @@ -19697,7 +19697,7 @@ }, { "kind": "Content", - "text": "{\n targetZoom?: number;\n inset?: number;\n } & " + "text": "{\n inset?: number;\n targetZoom?: number;\n } & " }, { "kind": "Reference", @@ -19986,7 +19986,7 @@ }, { "kind": "Content", - "text": ", 'isClosed'> & {\n width: number;\n height: number;\n }" + "text": ", 'isClosed'> & {\n height: number;\n width: number;\n }" }, { "kind": "Content", @@ -20032,7 +20032,7 @@ }, { "kind": "Content", - "text": ", 'isClosed'> & {\n width: number;\n height: number;\n }" + "text": ", 'isClosed'> & {\n height: number;\n width: number;\n }" }, { "kind": "Content", @@ -20733,7 +20733,7 @@ }, { "kind": "Content", - "text": "{\n id: string;\n type: 'gaps';\n direction: 'horizontal' | 'vertical';\n gaps: " + "text": "{\n direction: 'horizontal' | 'vertical';\n gaps: " }, { "kind": "Reference", @@ -20742,7 +20742,7 @@ }, { "kind": "Content", - "text": "<{\n startEdge: [" + "text": "<{\n endEdge: [" }, { "kind": "Reference", @@ -20760,7 +20760,7 @@ }, { "kind": "Content", - "text": "];\n endEdge: [" + "text": "];\n startEdge: [" }, { "kind": "Reference", @@ -20778,7 +20778,7 @@ }, { "kind": "Content", - "text": "];\n }>;\n}" + "text": "];\n }>;\n id: string;\n type: 'gaps';\n}" }, { "kind": "Content", @@ -21850,7 +21850,7 @@ }, { "kind": "Content", - "text": "{\n start: " + "text": "{\n end: " }, { "kind": "Reference", @@ -21859,7 +21859,7 @@ }, { "kind": "Content", - "text": ";\n end: " + "text": ";\n start: " }, { "kind": "Reference", @@ -22099,7 +22099,7 @@ }, { "kind": "Content", - "text": "{\n point: {\n x: number;\n y: number;\n z: number;\n };\n shiftKey: boolean;\n altKey: boolean;\n ctrlKey: boolean;\n pointerId: number;\n button: number;\n isPen: boolean;\n}" + "text": "{\n altKey: boolean;\n button: number;\n ctrlKey: boolean;\n isPen: boolean;\n point: {\n x: number;\n y: number;\n z: number;\n };\n pointerId: number;\n shiftKey: boolean;\n}" }, { "kind": "Content", @@ -22485,7 +22485,7 @@ }, { "kind": "Content", - "text": "{\n min: number;\n mid: number;\n step: number;\n}[]" + "text": "{\n mid: number;\n min: number;\n step: number;\n}[]" } ], "fileUrlPath": "packages/editor/src/lib/constants.ts", @@ -23337,12 +23337,12 @@ }, { "kind": "Content", - "text": "import(\"@tldraw/store\")." + "text": "import(\"@tldraw/tlschema\")." }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -25876,7 +25876,7 @@ }, { "kind": "Content", - "text": "{\n x: number;\n y: number;\n scaleX: number;\n scaleY: number;\n rotation: number;\n }" + "text": "{\n rotation: number;\n scaleX: number;\n scaleY: number;\n x: number;\n y: number;\n }" }, { "kind": "Content", @@ -25916,7 +25916,7 @@ }, { "kind": "Content", - "text": "{\n x: number;\n y: number;\n scaleX: number;\n scaleY: number;\n rotation: number;\n }" + "text": "{\n rotation: number;\n scaleX: number;\n scaleY: number;\n x: number;\n y: number;\n }" }, { "kind": "Content", @@ -25956,7 +25956,7 @@ }, { "kind": "Content", - "text": "{\n x: number;\n y: number;\n scaleX: number;\n scaleY: number;\n rotation: number;\n }" + "text": "{\n rotation: number;\n scaleX: number;\n scaleY: number;\n x: number;\n y: number;\n }" }, { "kind": "Content", @@ -26812,7 +26812,7 @@ }, { "kind": "Content", - "text": "{\n (x: number, y: number): " + "text": "{\n (x: number, y: number, cx: number, cy: number): " }, { "kind": "Reference", @@ -26821,7 +26821,7 @@ }, { "kind": "Content", - "text": ";\n (x: number, y: number, cx: number, cy: number): " + "text": ";\n (x: number, y: number): " }, { "kind": "Reference", @@ -27953,7 +27953,7 @@ }, { "kind": "Content", - "text": "{\n id: string;\n type: 'points';\n points: " + "text": "{\n id: string;\n points: " }, { "kind": "Reference", @@ -27962,7 +27962,7 @@ }, { "kind": "Content", - "text": "[];\n}" + "text": "[];\n type: 'points';\n}" }, { "kind": "Content", @@ -29412,7 +29412,7 @@ }, { "kind": "Content", - "text": ", 'isClosed'> & {\n x?: number;\n y?: number;\n width: number;\n height: number;\n }" + "text": ", 'isClosed'> & {\n height: number;\n width: number;\n x?: number;\n y?: number;\n }" }, { "kind": "Content", @@ -29806,16 +29806,7 @@ }, { "kind": "Content", - "text": "{\n newPoint: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n handle: " + "text": "{\n handle: " }, { "kind": "Reference", @@ -29824,16 +29815,7 @@ }, { "kind": "Content", - "text": ";\n mode: " - }, - { - "kind": "Reference", - "text": "TLResizeMode", - "canonicalReference": "@tldraw/editor!TLResizeMode:type" - }, - { - "kind": "Content", - "text": ";\n scaleX: number;\n scaleY: number;\n initialBounds: " + "text": ";\n initialBounds: " }, { "kind": "Reference", @@ -29851,7 +29833,25 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n mode: " + }, + { + "kind": "Reference", + "text": "TLResizeMode", + "canonicalReference": "@tldraw/editor!TLResizeMode:type" + }, + { + "kind": "Content", + "text": ";\n newPoint: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n scaleX: number;\n scaleY: number;\n}" }, { "kind": "Content", @@ -29864,7 +29864,7 @@ }, { "kind": "Content", - "text": "<{\n minWidth: number;\n maxWidth: number;\n minHeight: number;\n maxHeight: number;\n}>" + "text": "<{\n maxHeight: number;\n maxWidth: number;\n minHeight: number;\n minWidth: number;\n}>" }, { "kind": "Content", @@ -29872,7 +29872,7 @@ }, { "kind": "Content", - "text": "{\n x: number;\n y: number;\n props: {\n w: number;\n h: number;\n };\n}" + "text": "{\n props: {\n h: number;\n w: number;\n };\n x: number;\n y: number;\n}" }, { "kind": "Content", @@ -29930,7 +29930,7 @@ }, { "kind": "Content", - "text": "<{\n minWidth: number;\n maxWidth: number;\n minHeight: number;\n maxHeight: number;\n}>" + "text": "<{\n maxHeight: number;\n maxWidth: number;\n minHeight: number;\n minWidth: number;\n}>" }, { "kind": "Content", @@ -29956,7 +29956,7 @@ }, { "kind": "Content", - "text": "{\n readonly top_left_rotate: \"top_left\";\n readonly top_right_rotate: \"top_right\";\n readonly bottom_right_rotate: \"bottom_right\";\n readonly bottom_left_rotate: \"bottom_left\";\n readonly mobile_rotate: \"top_left\";\n}" + "text": "{\n readonly bottom_left_rotate: \"bottom_left\";\n readonly bottom_right_rotate: \"bottom_right\";\n readonly mobile_rotate: \"top_left\";\n readonly top_left_rotate: \"top_left\";\n readonly top_right_rotate: \"top_right\";\n}" } ], "fileUrlPath": "packages/editor/src/lib/primitives/Box.ts", @@ -30068,7 +30068,7 @@ }, { "kind": "Content", - "text": "{\n openWindow: (url: string, target: string) => void;\n refreshPage: () => void;\n hardReset: () => void;\n}" + "text": "{\n hardReset: () => void;\n openWindow: (url: string, target: string) => void;\n refreshPage: () => void;\n}" } ], "fileUrlPath": "packages/editor/src/lib/utils/runtime.ts", @@ -30449,7 +30449,7 @@ }, { "kind": "Content", - "text": "(_shape: Shape, _otherShape?: K | undefined) => boolean" + "text": "(_shape: Shape, _otherShape?: K) => boolean" }, { "kind": "Content", @@ -31396,8 +31396,17 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "LegacyMigrations", + "canonicalReference": "@tldraw/store!LegacyMigrations:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -31410,7 +31419,7 @@ "name": "migrations", "propertyTypeTokenRange": { "startIndex": 1, - "endIndex": 2 + "endIndex": 4 }, "isStatic": true, "isProtected": false, @@ -32515,7 +32524,7 @@ }, { "kind": "Content", - "text": "{\n store: " + "text": "{\n history: {\n onBatchComplete: () => void;\n };\n store: " }, { "kind": "Reference", @@ -32524,7 +32533,7 @@ }, { "kind": "Content", - "text": ";\n history: {\n onBatchComplete: () => void;\n };\n}" + "text": ";\n}" }, { "kind": "Content", @@ -33931,7 +33940,7 @@ }, { "kind": "Content", - "text": ", 'isClosed'> & {\n width: number;\n height: number;\n }" + "text": ", 'isClosed'> & {\n height: number;\n width: number;\n }" }, { "kind": "Content", @@ -33977,7 +33986,7 @@ }, { "kind": "Content", - "text": ", 'isClosed'> & {\n width: number;\n height: number;\n }" + "text": ", 'isClosed'> & {\n height: number;\n width: number;\n }" }, { "kind": "Content", @@ -36251,12 +36260,12 @@ }, { "kind": "Content", - "text": "{\n isStraight: false;\n start: " + "text": "{\n bodyArc: " }, { "kind": "Reference", - "text": "TLArrowPoint", - "canonicalReference": "@tldraw/editor!TLArrowPoint:type" + "text": "TLArcInfo", + "canonicalReference": "@tldraw/editor!TLArcInfo:interface" }, { "kind": "Content", @@ -36267,15 +36276,6 @@ "text": "TLArrowPoint", "canonicalReference": "@tldraw/editor!TLArrowPoint:type" }, - { - "kind": "Content", - "text": ";\n middle: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, { "kind": "Content", "text": ";\n handleArc: " @@ -36287,34 +36287,7 @@ }, { "kind": "Content", - "text": ";\n bodyArc: " - }, - { - "kind": "Reference", - "text": "TLArcInfo", - "canonicalReference": "@tldraw/editor!TLArcInfo:interface" - }, - { - "kind": "Content", - "text": ";\n isValid: boolean;\n} | {\n isStraight: true;\n start: " - }, - { - "kind": "Reference", - "text": "TLArrowPoint", - "canonicalReference": "@tldraw/editor!TLArrowPoint:type" - }, - { - "kind": "Content", - "text": ";\n end: " - }, - { - "kind": "Reference", - "text": "TLArrowPoint", - "canonicalReference": "@tldraw/editor!TLArrowPoint:type" - }, - { - "kind": "Content", - "text": ";\n middle: " + "text": ";\n isStraight: false;\n isValid: boolean;\n middle: " }, { "kind": "Reference", @@ -36323,7 +36296,43 @@ }, { "kind": "Content", - "text": ";\n isValid: boolean;\n length: number;\n}" + "text": ";\n start: " + }, + { + "kind": "Reference", + "text": "TLArrowPoint", + "canonicalReference": "@tldraw/editor!TLArrowPoint:type" + }, + { + "kind": "Content", + "text": ";\n} | {\n end: " + }, + { + "kind": "Reference", + "text": "TLArrowPoint", + "canonicalReference": "@tldraw/editor!TLArrowPoint:type" + }, + { + "kind": "Content", + "text": ";\n isStraight: true;\n isValid: boolean;\n length: number;\n middle: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, + { + "kind": "Content", + "text": ";\n start: " + }, + { + "kind": "Reference", + "text": "TLArrowPoint", + "canonicalReference": "@tldraw/editor!TLArrowPoint:type" + }, + { + "kind": "Content", + "text": ";\n}" }, { "kind": "Content", @@ -36349,7 +36358,16 @@ }, { "kind": "Content", - "text": "{\n handle: " + "text": "{\n arrowhead: " + }, + { + "kind": "Reference", + "text": "TLArrowShapeArrowheadStyle", + "canonicalReference": "@tldraw/tlschema!TLArrowShapeArrowheadStyle:type" + }, + { + "kind": "Content", + "text": ";\n handle: " }, { "kind": "Reference", @@ -36365,15 +36383,6 @@ "text": "VecLike", "canonicalReference": "@tldraw/editor!VecLike:type" }, - { - "kind": "Content", - "text": ";\n arrowhead: " - }, - { - "kind": "Reference", - "text": "TLArrowShapeArrowheadStyle", - "canonicalReference": "@tldraw/tlschema!TLArrowShapeArrowheadStyle:type" - }, { "kind": "Content", "text": ";\n}" @@ -36407,7 +36416,7 @@ }, { "kind": "Content", - "text": "" + "text": "" }, { "kind": "Content", @@ -36739,7 +36748,7 @@ }, { "kind": "Content", - "text": ";\n color?: string;\n opacity?: number;\n className?: string;\n}" + "text": ";\n className?: string;\n color?: string;\n opacity?: number;\n}" }, { "kind": "Content", @@ -36800,7 +36809,7 @@ }, { "kind": "Content", - "text": "{\n type: 'misc';\n name: 'cancel';\n}" + "text": "{\n name: 'cancel';\n type: 'misc';\n}" }, { "kind": "Content", @@ -36866,7 +36875,7 @@ }, { "kind": "Content", - "text": " & {\n type: 'click';\n name: " + "text": " & {\n button: number;\n name: " }, { "kind": "Reference", @@ -36875,7 +36884,7 @@ }, { "kind": "Content", - "text": ";\n point: " + "text": ";\n phase: 'down' | 'settle' | 'up';\n point: " }, { "kind": "Reference", @@ -36884,7 +36893,7 @@ }, { "kind": "Content", - "text": ";\n pointerId: number;\n button: number;\n phase: 'down' | 'settle' | 'up';\n} & " + "text": ";\n pointerId: number;\n type: 'click';\n} & " }, { "kind": "Reference", @@ -36941,7 +36950,7 @@ }, { "kind": "Content", - "text": "{\n className?: string;\n point: " + "text": "{\n className?: string;\n color: string;\n opacity?: number;\n point: " }, { "kind": "Reference", @@ -36959,7 +36968,7 @@ }, { "kind": "Content", - "text": ";\n zoom: number;\n opacity?: number;\n color: string;\n}" + "text": ";\n zoom: number;\n}" }, { "kind": "Content", @@ -37009,7 +37018,7 @@ }, { "kind": "Content", - "text": "{\n type: 'command';\n data: Data;\n name: Name;\n preservesRedoStack?: boolean;\n}" + "text": "{\n preservesRedoStack?: boolean;\n data: Data;\n name: Name;\n type: 'command';\n}" }, { "kind": "Content", @@ -37059,7 +37068,7 @@ }, { "kind": "Content", - "text": "{\n do: (data: Data) => void;\n undo: (data: Data) => void;\n redo?: (data: Data) => void;\n squash?: (prevData: Data, nextData: Data) => Data;\n}" + "text": "{\n squash?: (prevData: Data, nextData: Data) => Data;\n do: (data: Data) => void;\n redo?: (data: Data) => void;\n undo: (data: Data) => void;\n}" }, { "kind": "Content", @@ -37103,7 +37112,7 @@ }, { "kind": "Content", - "text": "<{\n squashing: boolean;\n ephemeral: boolean;\n preservesRedoStack: boolean;\n}>" + "text": "<{\n preservesRedoStack: boolean;\n squashing: boolean;\n ephemeral: boolean;\n}>" }, { "kind": "Content", @@ -37164,7 +37173,7 @@ }, { "kind": "Content", - "text": "{\n type: 'misc';\n name: 'complete';\n}" + "text": "{\n name: 'complete';\n type: 'misc';\n}" }, { "kind": "Content", @@ -37270,7 +37279,7 @@ { "kind": "Reference", "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" + "canonicalReference": "@tldraw/store!SerializedSchema:type" }, { "kind": "Content", @@ -37332,7 +37341,7 @@ }, { "kind": "Content", - "text": "{\n className?: string;\n point: null | " + "text": "{\n chatMessage: string;\n className?: string;\n color?: string;\n name: null | string;\n point: null | " }, { "kind": "Reference", @@ -37341,7 +37350,7 @@ }, { "kind": "Content", - "text": ";\n zoom: number;\n color?: string;\n name: null | string;\n chatMessage: string;\n}" + "text": ";\n zoom: number;\n}" }, { "kind": "Content", @@ -37728,43 +37737,7 @@ }, { "kind": "Content", - "text": " & ({\n store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLStoreWithStatus", - "canonicalReference": "@tldraw/editor!TLStoreWithStatus:type" - }, - { - "kind": "Content", - "text": ";\n} | {\n store?: undefined;\n snapshot?: " - }, - { - "kind": "Reference", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">;\n initialData?: " + "text": " & ({\n defaultName?: string;\n initialData?: " }, { "kind": "Reference", @@ -37782,7 +37755,52 @@ }, { "kind": "Content", - "text": ">;\n persistenceKey?: string;\n sessionId?: string;\n defaultName?: string;\n})>" + "text": ">;\n migrations?: readonly " + }, + { + "kind": "Reference", + "text": "MigrationSequence", + "canonicalReference": "@tldraw/store!MigrationSequence:interface" + }, + { + "kind": "Content", + "text": "[];\n persistenceKey?: string;\n sessionId?: string;\n snapshot?: " + }, + { + "kind": "Reference", + "text": "StoreSnapshot", + "canonicalReference": "@tldraw/store!StoreSnapshot:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLRecord", + "canonicalReference": "@tldraw/tlschema!TLRecord:type" + }, + { + "kind": "Content", + "text": ">;\n store?: undefined;\n} | {\n store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLStoreWithStatus", + "canonicalReference": "@tldraw/editor!TLStoreWithStatus:type" + }, + { + "kind": "Content", + "text": ";\n})>" }, { "kind": "Content", @@ -37794,7 +37812,7 @@ "name": "TldrawEditorProps", "typeTokenRange": { "startIndex": 1, - "endIndex": 17 + "endIndex": 19 } }, { @@ -38842,7 +38860,7 @@ }, { "kind": "Content", - "text": "[{\n reason: 'bail';\n markId?: string;\n } | {\n reason: 'push' | 'redo' | 'undo';\n }]" + "text": "[{\n markId?: string;\n reason: 'bail';\n } | {\n reason: 'push' | 'redo' | 'undo';\n }]" }, { "kind": "Content", @@ -38896,7 +38914,7 @@ }, { "kind": "Content", - "text": "[{\n name: string;\n pageId: " + "text": "[{\n count: number;\n name: string;\n pageId: " }, { "kind": "Reference", @@ -38905,7 +38923,7 @@ }, { "kind": "Content", - "text": ";\n count: number;\n }]" + "text": ";\n }]" }, { "kind": "Content", @@ -39386,7 +39404,7 @@ }, { "kind": "Content", - "text": "{\n type: 'file';\n file: " + "text": "{\n file: " }, { "kind": "Reference", @@ -39395,7 +39413,7 @@ }, { "kind": "Content", - "text": ";\n} | {\n type: 'url';\n url: string;\n}" + "text": ";\n type: 'file';\n} | {\n type: 'url';\n url: string;\n}" }, { "kind": "Content", @@ -39421,16 +39439,7 @@ }, { "kind": "Content", - "text": "{\n sources?: " - }, - { - "kind": "Reference", - "text": "TLExternalContentSource", - "canonicalReference": "@tldraw/editor!TLExternalContentSource:type" - }, - { - "kind": "Content", - "text": "[];\n point?: " + "text": "{\n point?: " }, { "kind": "Reference", @@ -39439,7 +39448,16 @@ }, { "kind": "Content", - "text": ";\n} & ({\n type: 'embed';\n url: string;\n embed: " + "text": ";\n sources?: " + }, + { + "kind": "Reference", + "text": "TLExternalContentSource", + "canonicalReference": "@tldraw/editor!TLExternalContentSource:type" + }, + { + "kind": "Content", + "text": "[];\n} & ({\n embed: " }, { "kind": "Reference", @@ -39448,7 +39466,7 @@ }, { "kind": "Content", - "text": ";\n} | {\n type: 'files';\n files: " + "text": ";\n type: 'embed';\n url: string;\n} | {\n files: " }, { "kind": "Reference", @@ -39457,7 +39475,7 @@ }, { "kind": "Content", - "text": "[];\n ignoreParent: boolean;\n} | {\n type: 'svg-text';\n text: string;\n} | {\n type: 'text';\n text: string;\n} | {\n type: 'url';\n url: string;\n})" + "text": "[];\n ignoreParent: boolean;\n type: 'files';\n} | {\n text: string;\n type: 'svg-text';\n} | {\n text: string;\n type: 'text';\n} | {\n type: 'url';\n url: string;\n})" }, { "kind": "Content", @@ -39483,7 +39501,7 @@ }, { "kind": "Content", - "text": "{\n type: 'error';\n data: null | string;\n reason: string;\n} | {\n type: 'excalidraw';\n data: any;\n} | {\n type: 'text';\n data: string;\n subtype: 'html' | 'json' | 'text' | 'url';\n} | {\n type: 'tldraw';\n data: " + "text": "{\n data: any;\n type: 'excalidraw';\n} | {\n data: null | string;\n reason: string;\n type: 'error';\n} | {\n data: string;\n subtype: 'html' | 'json' | 'text' | 'url';\n type: 'text';\n} | {\n data: " }, { "kind": "Reference", @@ -39492,7 +39510,7 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n type: 'tldraw';\n}" }, { "kind": "Content", @@ -39518,7 +39536,7 @@ }, { "kind": "Content", - "text": "{\n x: number;\n y: number;\n z: number;\n size: number;\n}" + "text": "{\n size: number;\n x: number;\n y: number;\n z: number;\n}" }, { "kind": "Content", @@ -39544,16 +39562,7 @@ }, { "kind": "Content", - "text": "{\n shapeId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n handle: " + "text": "{\n className?: string;\n handle: " }, { "kind": "Reference", @@ -39562,7 +39571,16 @@ }, { "kind": "Content", - "text": ";\n zoom: number;\n isCoarse: boolean;\n className?: string;\n}" + "text": ";\n isCoarse: boolean;\n shapeId: " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n zoom: number;\n}" }, { "kind": "Content", @@ -39659,7 +39677,7 @@ }, { "kind": "Content", - "text": "{\n type: 'STOP';\n id: string;\n onUndo: boolean;\n onRedo: boolean;\n}" + "text": "{\n id: string;\n onRedo: boolean;\n onUndo: boolean;\n type: 'STOP';\n}" }, { "kind": "Content", @@ -39720,7 +39738,7 @@ }, { "kind": "Content", - "text": "{\n type: 'misc';\n name: 'interrupt';\n}" + "text": "{\n name: 'interrupt';\n type: 'misc';\n}" }, { "kind": "Content", @@ -39786,7 +39804,7 @@ }, { "kind": "Content", - "text": " & {\n type: 'keyboard';\n name: " + "text": " & {\n code: string;\n key: string;\n name: " }, { "kind": "Reference", @@ -39795,7 +39813,7 @@ }, { "kind": "Content", - "text": ";\n key: string;\n code: string;\n}" + "text": ";\n type: 'keyboard';\n}" }, { "kind": "Content", @@ -40322,7 +40340,7 @@ }, { "kind": "Content", - "text": ";\n isPrecise: boolean;\n initial?: T | undefined;\n}) => " + "text": ";\n initial?: T | undefined;\n isPrecise: boolean;\n}) => " }, { "kind": "Reference", @@ -40944,7 +40962,16 @@ }, { "kind": "Content", - "text": " & {\n type: 'pinch';\n name: " + "text": " & {\n delta: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": ";\n name: " }, { "kind": "Reference", @@ -40962,16 +40989,7 @@ }, { "kind": "Content", - "text": ";\n delta: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n}" + "text": ";\n type: 'pinch';\n}" }, { "kind": "Content", @@ -41063,7 +41081,7 @@ }, { "kind": "Content", - "text": " & {\n type: 'pointer';\n name: " + "text": " & {\n button: number;\n isPen: boolean;\n name: " }, { "kind": "Reference", @@ -41081,7 +41099,7 @@ }, { "kind": "Content", - "text": ";\n pointerId: number;\n button: number;\n isPen: boolean;\n} & " + "text": ";\n pointerId: number;\n type: 'pointer';\n} & " }, { "kind": "Reference", @@ -41138,16 +41156,7 @@ }, { "kind": "Content", - "text": "{\n target: 'canvas';\n shape?: undefined;\n} | {\n target: 'handle';\n shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ";\n handle: " + "text": "{\n handle: " }, { "kind": "Reference", @@ -41156,16 +41165,7 @@ }, { "kind": "Content", - "text": ";\n} | {\n target: 'selection';\n handle?: " - }, - { - "kind": "Reference", - "text": "TLSelectionHandle", - "canonicalReference": "@tldraw/editor!TLSelectionHandle:type" - }, - { - "kind": "Content", - "text": ";\n shape?: undefined;\n} | {\n target: 'shape';\n shape: " + "text": ";\n shape: " }, { "kind": "Reference", @@ -41174,7 +41174,25 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n target: 'handle';\n} | {\n handle?: " + }, + { + "kind": "Reference", + "text": "TLSelectionHandle", + "canonicalReference": "@tldraw/editor!TLSelectionHandle:type" + }, + { + "kind": "Content", + "text": ";\n shape?: undefined;\n target: 'selection';\n} | {\n shape: " + }, + { + "kind": "Reference", + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" + }, + { + "kind": "Content", + "text": ";\n target: 'shape';\n} | {\n shape?: undefined;\n target: 'canvas';\n}" }, { "kind": "Content", @@ -41245,16 +41263,7 @@ }, { "kind": "Content", - "text": "{\n newPoint: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n handle: " + "text": "{\n handle: " }, { "kind": "Reference", @@ -41263,16 +41272,7 @@ }, { "kind": "Content", - "text": ";\n mode: " - }, - { - "kind": "Reference", - "text": "TLResizeMode", - "canonicalReference": "@tldraw/editor!TLResizeMode:type" - }, - { - "kind": "Content", - "text": ";\n scaleX: number;\n scaleY: number;\n initialBounds: " + "text": ";\n initialBounds: " }, { "kind": "Reference", @@ -41281,7 +41281,25 @@ }, { "kind": "Content", - "text": ";\n initialShape: T;\n}" + "text": ";\n initialShape: T;\n mode: " + }, + { + "kind": "Reference", + "text": "TLResizeMode", + "canonicalReference": "@tldraw/editor!TLResizeMode:type" + }, + { + "kind": "Content", + "text": ";\n newPoint: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n scaleX: number;\n scaleY: number;\n}" }, { "kind": "Content", @@ -41351,31 +41369,22 @@ }, { "kind": "Content", - "text": "<{\n initialBounds: " + "text": "<{\n dragHandle: " + }, + { + "kind": "Reference", + "text": "TLResizeHandle", + "canonicalReference": "@tldraw/editor!TLResizeHandle:type" + }, + { + "kind": "Content", + "text": ";\n initialBounds: " }, { "kind": "Reference", "text": "Box", "canonicalReference": "@tldraw/editor!Box:class" }, - { - "kind": "Content", - "text": ";\n scaleOrigin: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n scaleAxisRotation: number;\n initialShape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, { "kind": "Content", "text": ";\n initialPageTransform: " @@ -41387,12 +41396,12 @@ }, { "kind": "Content", - "text": ";\n dragHandle: " + "text": ";\n initialShape: " }, { "kind": "Reference", - "text": "TLResizeHandle", - "canonicalReference": "@tldraw/editor!TLResizeHandle:type" + "text": "TLShape", + "canonicalReference": "@tldraw/tlschema!TLShape:type" }, { "kind": "Content", @@ -41403,6 +41412,15 @@ "text": "TLResizeMode", "canonicalReference": "@tldraw/editor!TLResizeMode:type" }, + { + "kind": "Content", + "text": ";\n scaleAxisRotation: number;\n scaleOrigin: " + }, + { + "kind": "Reference", + "text": "VecLike", + "canonicalReference": "@tldraw/editor!VecLike:type" + }, { "kind": "Content", "text": ";\n}>" @@ -41431,7 +41449,7 @@ }, { "kind": "Content", - "text": "{\n selectionPageCenter: " + "text": "{\n initialCursorAngle: number;\n initialSelectionRotation: number;\n selectionPageCenter: " }, { "kind": "Reference", @@ -41440,22 +41458,22 @@ }, { "kind": "Content", - "text": ";\n initialCursorAngle: number;\n initialSelectionRotation: number;\n shapeSnapshots: {\n shape: " + "text": ";\n shapeSnapshots: {\n initialPagePoint: " + }, + { + "kind": "Reference", + "text": "Vec", + "canonicalReference": "@tldraw/editor!Vec:class" + }, + { + "kind": "Content", + "text": ";\n shape: " }, { "kind": "Reference", "text": "TLShape", "canonicalReference": "@tldraw/tlschema!TLShape:type" }, - { - "kind": "Content", - "text": ";\n initialPagePoint: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, { "kind": "Content", "text": ";\n }[];\n}" @@ -41484,7 +41502,7 @@ }, { "kind": "Content", - "text": "{\n scribble: " + "text": "{\n className?: string;\n color?: string;\n opacity?: number;\n scribble: " }, { "kind": "Reference", @@ -41493,7 +41511,7 @@ }, { "kind": "Content", - "text": ";\n zoom: number;\n color?: string;\n opacity?: number;\n className?: string;\n}" + "text": ";\n zoom: number;\n}" }, { "kind": "Content", @@ -41817,7 +41835,16 @@ }, { "kind": "Content", - "text": "<{\n pageId: " + "text": "<{\n camera: {\n x: number;\n y: number;\n z: number;\n };\n focusedGroupId: null | " + }, + { + "kind": "Reference", + "text": "TLShapeId", + "canonicalReference": "@tldraw/tlschema!TLShapeId:type" + }, + { + "kind": "Content", + "text": ";\n pageId: " }, { "kind": "Reference", @@ -41826,7 +41853,7 @@ }, { "kind": "Content", - "text": ";\n camera: {\n x: number;\n y: number;\n z: number;\n };\n selectedShapeIds: " + "text": ";\n selectedShapeIds: " }, { "kind": "Reference", @@ -41835,16 +41862,7 @@ }, { "kind": "Content", - "text": "[];\n focusedGroupId: null | " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n }>" + "text": "[];\n }>" }, { "kind": "Content", @@ -41901,7 +41919,7 @@ }, { "kind": "Content", - "text": "{\n shapeId: " + "text": "{\n className?: string;\n color?: string | undefined;\n hidden?: boolean;\n opacity?: number;\n shapeId: " }, { "kind": "Reference", @@ -41910,7 +41928,7 @@ }, { "kind": "Content", - "text": ";\n color?: string | undefined;\n opacity?: number;\n className?: string;\n hidden?: boolean;\n}" + "text": ";\n}" }, { "kind": "Content", @@ -42127,8 +42145,26 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "LegacyMigrations", + "canonicalReference": "@tldraw/store!LegacyMigrations:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "MigrationSequence", + "canonicalReference": "@tldraw/store!MigrationSequence:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -42141,7 +42177,7 @@ "name": "migrations", "propertyTypeTokenRange": { "startIndex": 1, - "endIndex": 2 + "endIndex": 6 } }, { @@ -42501,7 +42537,7 @@ }, { "kind": "Content", - "text": "{\n initialData?: " + "text": "{\n defaultName?: string;\n initialData?: " }, { "kind": "Reference", @@ -42519,7 +42555,25 @@ }, { "kind": "Content", - "text": ">;\n defaultName?: string;\n} & ({\n schema?: " + "text": ">;\n} & ({\n migrations?: readonly " + }, + { + "kind": "Reference", + "text": "MigrationSequence", + "canonicalReference": "@tldraw/store!MigrationSequence:interface" + }, + { + "kind": "Content", + "text": "[];\n shapeUtils?: readonly " + }, + { + "kind": "Reference", + "text": "TLAnyShapeUtilConstructor", + "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" + }, + { + "kind": "Content", + "text": "[];\n} | {\n schema?: " }, { "kind": "Reference", @@ -42546,16 +42600,7 @@ }, { "kind": "Content", - "text": ">;\n} | {\n shapeUtils?: readonly " - }, - { - "kind": "Reference", - "text": "TLAnyShapeUtilConstructor", - "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" - }, - { - "kind": "Content", - "text": "[];\n})" + "text": ">;\n})" }, { "kind": "Content", @@ -42567,7 +42612,7 @@ "name": "TLStoreOptions", "typeTokenRange": { "startIndex": 1, - "endIndex": 14 + "endIndex": 16 } }, { @@ -42581,7 +42626,16 @@ }, { "kind": "Content", - "text": "{\n readonly status: 'error';\n readonly store?: undefined;\n readonly error: " + "text": "{\n readonly connectionStatus: 'offline' | 'online';\n readonly error?: undefined;\n readonly status: 'synced-remote';\n readonly store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": ";\n} | {\n readonly error: " }, { "kind": "Reference", @@ -42590,7 +42644,7 @@ }, { "kind": "Content", - "text": ";\n} | {\n readonly status: 'loading';\n readonly store?: undefined;\n readonly error?: undefined;\n} | {\n readonly status: 'not-synced';\n readonly store: " + "text": ";\n readonly status: 'error';\n readonly store?: undefined;\n} | {\n readonly error?: undefined;\n readonly status: 'loading';\n readonly store?: undefined;\n} | {\n readonly error?: undefined;\n readonly status: 'not-synced';\n readonly store: " }, { "kind": "Reference", @@ -42599,7 +42653,7 @@ }, { "kind": "Content", - "text": ";\n readonly error?: undefined;\n} | {\n readonly status: 'synced-local';\n readonly store: " + "text": ";\n} | {\n readonly error?: undefined;\n readonly status: 'synced-local';\n readonly store: " }, { "kind": "Reference", @@ -42608,16 +42662,7 @@ }, { "kind": "Content", - "text": ";\n readonly error?: undefined;\n} | {\n readonly status: 'synced-remote';\n readonly connectionStatus: 'offline' | 'online';\n readonly store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";\n readonly error?: undefined;\n}" + "text": ";\n}" }, { "kind": "Content", @@ -42643,7 +42688,7 @@ }, { "kind": "Content", - "text": "{\n bounds: " + "text": "{\n background: boolean;\n bounds: " }, { "kind": "Reference", @@ -42652,7 +42697,7 @@ }, { "kind": "Content", - "text": ";\n scale: number;\n background: boolean;\n padding: number;\n darkMode?: boolean;\n preserveAspectRatio: " + "text": ";\n darkMode?: boolean;\n padding: number;\n preserveAspectRatio: " }, { "kind": "Reference", @@ -42670,7 +42715,7 @@ }, { "kind": "Content", - "text": ">['preserveAspectRatio'];\n}" + "text": ">['preserveAspectRatio'];\n scale: number;\n}" }, { "kind": "Content", @@ -43032,7 +43077,7 @@ }, { "kind": "Content", - "text": " & {\n type: 'wheel';\n name: 'wheel';\n delta: " + "text": " & {\n delta: " }, { "kind": "Reference", @@ -43041,7 +43086,7 @@ }, { "kind": "Content", - "text": ";\n point: " + "text": ";\n name: 'wheel';\n point: " }, { "kind": "Reference", @@ -43050,7 +43095,7 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n type: 'wheel';\n}" }, { "kind": "Content", @@ -43325,7 +43370,7 @@ }, { "kind": "Content", - "text": "{\n readonly length: number;\n readonly [n: number]: T;\n} | null | undefined" + "text": "{\n readonly [n: number]: T;\n readonly length: number;\n} | null | undefined" }, { "kind": "Content", @@ -43481,15 +43526,6 @@ "text": "ComponentType", "canonicalReference": "@types/react!React.ComponentType:type" }, - { - "kind": "Content", - "text": " | null;\n SvgDefs: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, { "kind": "Content", "text": " | null;\n Brush: " @@ -43508,60 +43544,6 @@ "text": "TLBrushProps", "canonicalReference": "@tldraw/editor!TLBrushProps:type" }, - { - "kind": "Content", - "text": "> | null;\n ZoomBrush: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLBrushProps", - "canonicalReference": "@tldraw/editor!TLBrushProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n ShapeIndicator: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLShapeIndicatorProps", - "canonicalReference": "@tldraw/editor!TLShapeIndicatorProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n Cursor: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLCursorProps", - "canonicalReference": "@tldraw/editor!TLCursorProps:type" - }, { "kind": "Content", "text": "> | null;\n Canvas: " @@ -43634,6 +43616,24 @@ "text": "TLCollaboratorHintProps", "canonicalReference": "@tldraw/editor!TLCollaboratorHintProps:type" }, + { + "kind": "Content", + "text": "> | null;\n CollaboratorScribble: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLScribbleProps", + "canonicalReference": "@tldraw/editor!TLScribbleProps:type" + }, { "kind": "Content", "text": "> | null;\n CollaboratorShapeIndicator: " @@ -43652,6 +43652,24 @@ "text": "TLShapeIndicatorProps", "canonicalReference": "@tldraw/editor!TLShapeIndicatorProps:type" }, + { + "kind": "Content", + "text": "> | null;\n Cursor: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLCursorProps", + "canonicalReference": "@tldraw/editor!TLCursorProps:type" + }, { "kind": "Content", "text": "> | null;\n Grid: " @@ -43672,7 +43690,7 @@ }, { "kind": "Content", - "text": "> | null;\n Scribble: " + "text": "> | null;\n Handle: " }, { "kind": "Reference", @@ -43685,44 +43703,8 @@ }, { "kind": "Reference", - "text": "TLScribbleProps", - "canonicalReference": "@tldraw/editor!TLScribbleProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n CollaboratorScribble: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLScribbleProps", - "canonicalReference": "@tldraw/editor!TLScribbleProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n SnapIndicator: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLSnapIndicatorProps", - "canonicalReference": "@tldraw/editor!TLSnapIndicatorProps:type" + "text": "TLHandleProps", + "canonicalReference": "@tldraw/editor!TLHandleProps:type" }, { "kind": "Content", @@ -43744,7 +43726,34 @@ }, { "kind": "Content", - "text": "> | null;\n Handle: " + "text": "> | null;\n InFrontOfTheCanvas: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n LoadingScreen: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n OnTheCanvas: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n Scribble: " }, { "kind": "Reference", @@ -43757,35 +43766,8 @@ }, { "kind": "Reference", - "text": "TLHandleProps", - "canonicalReference": "@tldraw/editor!TLHandleProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n Spinner: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n SelectionForeground: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLSelectionForegroundProps", - "canonicalReference": "@tldraw/editor!TLSelectionForegroundProps:type" + "text": "TLScribbleProps", + "canonicalReference": "@tldraw/editor!TLScribbleProps:type" }, { "kind": "Content", @@ -43807,7 +43789,7 @@ }, { "kind": "Content", - "text": "> | null;\n OnTheCanvas: " + "text": "> | null;\n SelectionForeground: " }, { "kind": "Reference", @@ -43816,7 +43798,16 @@ }, { "kind": "Content", - "text": " | null;\n InFrontOfTheCanvas: " + "text": "<" + }, + { + "kind": "Reference", + "text": "TLSelectionForegroundProps", + "canonicalReference": "@tldraw/editor!TLSelectionForegroundProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n ShapeIndicator: " }, { "kind": "Reference", @@ -43825,7 +43816,16 @@ }, { "kind": "Content", - "text": " | null;\n LoadingScreen: " + "text": "<" + }, + { + "kind": "Reference", + "text": "TLShapeIndicatorProps", + "canonicalReference": "@tldraw/editor!TLShapeIndicatorProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n SnapIndicator: " }, { "kind": "Reference", @@ -43834,7 +43834,52 @@ }, { "kind": "Content", - "text": " | null;\n} & " + "text": "<" + }, + { + "kind": "Reference", + "text": "TLSnapIndicatorProps", + "canonicalReference": "@tldraw/editor!TLSnapIndicatorProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n Spinner: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n SvgDefs: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n ZoomBrush: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLBrushProps", + "canonicalReference": "@tldraw/editor!TLBrushProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n} & " }, { "kind": "Reference", diff --git a/packages/editor/src/lib/TldrawEditor.tsx b/packages/editor/src/lib/TldrawEditor.tsx index 976415fa5..32e47764d 100644 --- a/packages/editor/src/lib/TldrawEditor.tsx +++ b/packages/editor/src/lib/TldrawEditor.tsx @@ -1,4 +1,4 @@ -import { SerializedStore, Store, StoreSnapshot } from '@tldraw/store' +import { MigrationSequence, SerializedStore, Store, StoreSnapshot } from '@tldraw/store' import { TLRecord, TLStore } from '@tldraw/tlschema' import { Expand, Required, annotateError } from '@tldraw/utils' import React, { @@ -49,6 +49,7 @@ export type TldrawEditorProps = Expand< } | { store?: undefined + migrations?: readonly MigrationSequence[] snapshot?: StoreSnapshot initialData?: SerializedStore persistenceKey?: string diff --git a/packages/editor/src/lib/config/TLSessionStateSnapshot.ts b/packages/editor/src/lib/config/TLSessionStateSnapshot.ts index d98d87668..32479c1b9 100644 --- a/packages/editor/src/lib/config/TLSessionStateSnapshot.ts +++ b/packages/editor/src/lib/config/TLSessionStateSnapshot.ts @@ -1,11 +1,5 @@ import { Signal, computed, transact } from '@tldraw/state' -import { - RecordsDiff, - UnknownRecord, - defineMigrations, - migrate, - squashRecordDiffs, -} from '@tldraw/store' +import { RecordsDiff, UnknownRecord, squashRecordDiffs } from '@tldraw/store' import { CameraRecordType, InstancePageStateRecordType, @@ -22,6 +16,7 @@ import { getFromSessionStorage, objectMapFromEntries, setInSessionStorage, + structuredClone, } from '@tldraw/utils' import { T } from '@tldraw/validate' import { uniqueId } from '../utils/uniqueId' @@ -79,7 +74,18 @@ const Versions = { Initial: 0, } as const -const CURRENT_SESSION_STATE_SNAPSHOT_VERSION = Versions.Initial +const CURRENT_SESSION_STATE_SNAPSHOT_VERSION = Math.max(...Object.values(Versions)) + +function migrate(snapshot: any) { + if (snapshot.version < Versions.Initial) { + // initial version + // noop + } + // add further migrations down here. see TLUserPreferences.ts for an example. + + // finally + snapshot.version = CURRENT_SESSION_STATE_SNAPSHOT_VERSION +} /** * The state of the editor instance, not including any document state. @@ -124,10 +130,6 @@ const sessionStateSnapshotValidator: T.Validator = T.obj ), }) -const sessionStateSnapshotMigrations = defineMigrations({ - currentVersion: CURRENT_SESSION_STATE_SNAPSHOT_VERSION, -}) - function migrateAndValidateSessionStateSnapshot(state: unknown): TLSessionStateSnapshot | null { if (!state || typeof state !== 'object') { console.warn('Invalid instance state') @@ -137,27 +139,17 @@ function migrateAndValidateSessionStateSnapshot(state: unknown): TLSessionStateS console.warn('No version in instance state') return null } - const result = migrate({ - value: state, - fromVersion: state.version, - toVersion: CURRENT_SESSION_STATE_SNAPSHOT_VERSION, - migrations: sessionStateSnapshotMigrations, - }) - if (result.type === 'error') { - console.warn(result.reason) - return null + if (state.version !== CURRENT_SESSION_STATE_SNAPSHOT_VERSION) { + state = structuredClone(state) + migrate(state) } - const value = { ...result.value, version: CURRENT_SESSION_STATE_SNAPSHOT_VERSION } - try { - sessionStateSnapshotValidator.validate(value) + return sessionStateSnapshotValidator.validate(state) } catch (e) { console.warn(e) return null } - - return value } /** diff --git a/packages/editor/src/lib/config/TLUserPreferences.ts b/packages/editor/src/lib/config/TLUserPreferences.ts index 76bef8f49..5ee4cdce5 100644 --- a/packages/editor/src/lib/config/TLUserPreferences.ts +++ b/packages/editor/src/lib/config/TLUserPreferences.ts @@ -1,7 +1,6 @@ import { atom } from '@tldraw/state' -import { defineMigrations, migrate } from '@tldraw/store' import { getDefaultTranslationLocale } from '@tldraw/tlschema' -import { getFromLocalStorage, setInLocalStorage } from '@tldraw/utils' +import { getFromLocalStorage, setInLocalStorage, structuredClone } from '@tldraw/utils' import { T } from '@tldraw/validate' import { uniqueId } from '../utils/uniqueId' @@ -55,66 +54,28 @@ const Versions = { AddExcalidrawSelectMode: 5, } as const -const userMigrations = defineMigrations({ - currentVersion: Versions.AddExcalidrawSelectMode, - migrators: { - [Versions.AddAnimationSpeed]: { - up: (user) => { - return { - ...user, - animationSpeed: 1, - } - }, - down: ({ animationSpeed: _, ...user }) => { - return user - }, - }, - [Versions.AddIsSnapMode]: { - up: (user: TLUserPreferences) => { - return { ...user, isSnapMode: false } - }, - down: ({ isSnapMode: _, ...user }: TLUserPreferences) => { - return user - }, - }, - [Versions.MakeFieldsNullable]: { - up: (user: TLUserPreferences) => { - return user - }, - down: (user: TLUserPreferences) => { - return { - id: user.id, - name: user.name ?? defaultUserPreferences.name, - locale: user.locale ?? defaultUserPreferences.locale, - color: user.color ?? defaultUserPreferences.color, - animationSpeed: user.animationSpeed ?? defaultUserPreferences.animationSpeed, - isDarkMode: user.isDarkMode ?? defaultUserPreferences.isDarkMode, - isSnapMode: user.isSnapMode ?? defaultUserPreferences.isSnapMode, - isWrapMode: user.isWrapMode ?? defaultUserPreferences.isWrapMode, - } - }, - }, - [Versions.AddEdgeScrollSpeed]: { - up: (user: TLUserPreferences) => { - return { - ...user, - edgeScrollSpeed: 1, - } - }, - down: ({ edgeScrollSpeed: _, ...user }: TLUserPreferences) => { - return user - }, - }, - [Versions.AddExcalidrawSelectMode]: { - up: (user: TLUserPreferences) => { - return { ...user, isWrapMode: false } - }, - down: ({ isWrapMode: _, ...user }: TLUserPreferences) => { - return user - }, - }, - }, -}) +const CURRENT_VERSION = Math.max(...Object.values(Versions)) + +function migrateSnapshot(data: { version: number; user: any }) { + if (data.version < Versions.AddAnimationSpeed) { + data.user.animationSpeed = 1 + } + if (data.version < Versions.AddIsSnapMode) { + data.user.isSnapMode = false + } + if (data.version < Versions.MakeFieldsNullable) { + // noop + } + if (data.version < Versions.AddEdgeScrollSpeed) { + data.user.edgeScrollSpeed = 1 + } + if (data.version < Versions.AddExcalidrawSelectMode) { + data.user.isWrapMode = false + } + + // finally + data.version = CURRENT_VERSION +} /** @internal */ export const USER_COLORS = [ @@ -171,7 +132,7 @@ export function getFreshUserPreferences(): TLUserPreferences { } } -function migrateUserPreferences(userData: unknown) { +function migrateUserPreferences(userData: unknown): TLUserPreferences { if (userData === null || typeof userData !== 'object') { return getFreshUserPreferences() } @@ -180,24 +141,15 @@ function migrateUserPreferences(userData: unknown) { return getFreshUserPreferences() } - const migrationResult = migrate({ - value: userData.user, - fromVersion: userData.version, - toVersion: userMigrations.currentVersion ?? 0, - migrations: userMigrations, - }) + const snapshot = structuredClone(userData) as any - if (migrationResult.type === 'error') { - return getFreshUserPreferences() - } + migrateSnapshot(snapshot) try { - userTypeValidator.validate(migrationResult.value) + return userTypeValidator.validate(snapshot.user) } catch (e) { return getFreshUserPreferences() } - - return migrationResult.value } function loadUserPreferences(): TLUserPreferences { @@ -212,7 +164,10 @@ const globalUserPreferences = atom('globalUserData', n function storeUserPreferences() { setInLocalStorage( USER_DATA_KEY, - JSON.stringify({ version: userMigrations.currentVersion, user: globalUserPreferences.get() }) + JSON.stringify({ + version: CURRENT_VERSION, + user: globalUserPreferences.get(), + }) ) } @@ -253,7 +208,7 @@ function broadcastUserPreferencesChange() { origin: getBroadcastOrigin(), data: { user: getUserPreferences(), - version: userMigrations.currentVersion, + version: CURRENT_VERSION, }, } satisfies UserChangeBroadcastMessage) } diff --git a/packages/editor/src/lib/config/createTLStore.ts b/packages/editor/src/lib/config/createTLStore.ts index a46923eec..b910b6561 100644 --- a/packages/editor/src/lib/config/createTLStore.ts +++ b/packages/editor/src/lib/config/createTLStore.ts @@ -1,4 +1,4 @@ -import { HistoryEntry, SerializedStore, Store, StoreSchema } from '@tldraw/store' +import { HistoryEntry, MigrationSequence, SerializedStore, Store, StoreSchema } from '@tldraw/store' import { SchemaShapeInfo, TLRecord, @@ -15,7 +15,7 @@ export type TLStoreOptions = { initialData?: SerializedStore defaultName?: string } & ( - | { shapeUtils?: readonly TLAnyShapeUtilConstructor[] } + | { shapeUtils?: readonly TLAnyShapeUtilConstructor[]; migrations?: readonly MigrationSequence[] } | { schema?: StoreSchema } ) @@ -38,6 +38,7 @@ export function createTLStore({ initialData, defaultName = '', ...rest }: TLStor shapes: currentPageShapesToShapeMap( checkShapesAndAddCore('shapeUtils' in rest && rest.shapeUtils ? rest.shapeUtils : []) ), + migrations: 'migrations' in rest ? rest.migrations : [], }) return new Store({ diff --git a/packages/editor/src/lib/editor/Editor.ts b/packages/editor/src/lib/editor/Editor.ts index 36f231093..2dcc3f2f8 100644 --- a/packages/editor/src/lib/editor/Editor.ts +++ b/packages/editor/src/lib/editor/Editor.ts @@ -217,24 +217,6 @@ export class Editor extends EventEmitter { const allShapeUtils = checkShapesAndAddCore(shapeUtils) - const shapeTypesInSchema = new Set( - Object.keys(store.schema.types.shape.migrations.subTypeMigrations!) - ) - for (const shapeUtil of allShapeUtils) { - if (!shapeTypesInSchema.has(shapeUtil.type)) { - throw Error( - `Editor and store have different shapes: "${shapeUtil.type}" was passed into the editor but not the schema` - ) - } - shapeTypesInSchema.delete(shapeUtil.type) - } - if (shapeTypesInSchema.size > 0) { - throw Error( - `Editor and store have different shapes: "${ - [...shapeTypesInSchema][0] - }" is present in the store schema but not provided to the editor` - ) - } const _shapeUtils = {} as Record> const _styleProps = {} as Record, string>> const allStylesById = new Map>() diff --git a/packages/editor/src/lib/editor/shapes/ShapeUtil.ts b/packages/editor/src/lib/editor/shapes/ShapeUtil.ts index 7cf297a5f..e596d90f5 100644 --- a/packages/editor/src/lib/editor/shapes/ShapeUtil.ts +++ b/packages/editor/src/lib/editor/shapes/ShapeUtil.ts @@ -1,6 +1,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { Migrations } from '@tldraw/store' -import { ShapeProps, TLHandle, TLShape, TLShapePartial, TLUnknownShape } from '@tldraw/tlschema' +import { LegacyMigrations, MigrationSequence } from '@tldraw/store' +import { + ShapeProps, + TLHandle, + TLShape, + TLShapePartial, + TLShapePropsMigrations, + TLUnknownShape, +} from '@tldraw/tlschema' import { ReactElement } from 'react' import { Box } from '../../primitives/Box' import { Vec } from '../../primitives/Vec' @@ -19,7 +26,7 @@ export interface TLShapeUtilConstructor< new (editor: Editor): U type: T['type'] props?: ShapeProps - migrations?: Migrations + migrations?: LegacyMigrations | TLShapePropsMigrations | MigrationSequence } /** @public */ @@ -35,7 +42,7 @@ export interface TLShapeUtilCanvasSvgDef { export abstract class ShapeUtil { constructor(public editor: Editor) {} static props?: ShapeProps - static migrations?: Migrations + static migrations?: LegacyMigrations | TLShapePropsMigrations /** * The type of the shape util, which should match the shape's type. diff --git a/packages/editor/src/lib/utils/sync/TLLocalSyncClient.test.ts b/packages/editor/src/lib/utils/sync/TLLocalSyncClient.test.ts index 591bf9f18..482d051e0 100644 --- a/packages/editor/src/lib/utils/sync/TLLocalSyncClient.test.ts +++ b/packages/editor/src/lib/utils/sync/TLLocalSyncClient.test.ts @@ -69,7 +69,7 @@ test('the client connects on instantiation, announcing its schema', async () => expect(channel.postMessage).toHaveBeenCalledTimes(1) const [msg] = channel.postMessage.mock.calls[0] - expect(msg).toMatchObject({ type: 'announce', schema: { recordVersions: {} } }) + expect(msg).toMatchObject({ type: 'announce', schema: {} }) }) test('when a client receives an announce with a newer schema version it reloads itself', async () => { diff --git a/packages/editor/src/lib/utils/sync/TLLocalSyncClient.ts b/packages/editor/src/lib/utils/sync/TLLocalSyncClient.ts index e6e66bf99..3ea350969 100644 --- a/packages/editor/src/lib/utils/sync/TLLocalSyncClient.ts +++ b/packages/editor/src/lib/utils/sync/TLLocalSyncClient.ts @@ -1,11 +1,5 @@ import { Signal, transact } from '@tldraw/state' -import { - RecordsDiff, - SerializedSchema, - UnknownRecord, - compareSchemas, - squashRecordDiffs, -} from '@tldraw/store' +import { RecordsDiff, SerializedSchema, UnknownRecord, squashRecordDiffs } from '@tldraw/store' import { TLStore } from '@tldraw/tlschema' import { assert } from '@tldraw/utils' import { @@ -183,6 +177,7 @@ export class TLLocalSyncClient { data.sessionStateSnapshot ?? extractSessionStateFromLegacySnapshot(documentSnapshot) const migrationResult = this.store.schema.migrateStoreSnapshot({ store: documentSnapshot, + // eslint-disable-next-line deprecation/deprecation schema: data.schema ?? this.store.schema.serializeEarliestVersion(), }) @@ -211,11 +206,9 @@ export class TLLocalSyncClient { const msg = data as Message // if their schema is earlier than ours, we need to tell them so they can refresh // if their schema is later than ours, we need to refresh - const comparison = compareSchemas( - this.serializedSchema, - msg.schema ?? this.store.schema.serializeEarliestVersion() - ) - if (comparison === -1) { + const res = this.store.schema.getMigrationsSince(msg.schema) + + if (!res.ok) { // we are older, refresh // but add a safety check to make sure we don't get in an infinite loop const timeSinceInit = Date.now() - this.initTime @@ -232,7 +225,7 @@ export class TLLocalSyncClient { this.isReloading = true window?.location?.reload?.() return - } else if (comparison === 1) { + } else if (res.value.length > 0) { // they are older, tell them to refresh and not write any more data this.debug('telling them to reload') this.channel.postMessage({ type: 'announce', schema: this.serializedSchema }) diff --git a/packages/namespaced-tldraw/api/api.json b/packages/namespaced-tldraw/api/api.json index 8704c9722..b648fcf70 100644 --- a/packages/namespaced-tldraw/api/api.json +++ b/packages/namespaced-tldraw/api/api.json @@ -1,7 +1,7 @@ { "metadata": { "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.41.0", + "toolVersion": "7.43.1", "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { diff --git a/packages/state/api/api.json b/packages/state/api/api.json index 6b0f0291a..d6a63c578 100644 --- a/packages/state/api/api.json +++ b/packages/state/api/api.json @@ -1,7 +1,7 @@ { "metadata": { "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.41.0", + "toolVersion": "7.43.1", "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { diff --git a/packages/state/src/lib/core/warnings.ts b/packages/state/src/lib/core/warnings.ts index 6bf432ab4..205acb30f 100644 --- a/packages/state/src/lib/core/warnings.ts +++ b/packages/state/src/lib/core/warnings.ts @@ -1,15 +1,3 @@ -let didWarnDotValue = false - -// remove this once we've removed all getters from our app - -export function logDotValueWarning() { - if (didWarnDotValue) return - didWarnDotValue = true - console.warn( - 'Using Signal.value is deprecated and will be removed in the near future. Please use Signal.get() instead.' - ) -} - let didWarnComputedGetter = false export function logComputedGetterWarning() { diff --git a/packages/store/api-report.md b/packages/store/api-report.md index 0e4dffd1d..3d125a866 100644 --- a/packages/store/api-report.md +++ b/packages/store/api-report.md @@ -6,6 +6,7 @@ import { Atom } from '@tldraw/state'; import { Computed } from '@tldraw/state'; +import { Result } from '@tldraw/utils'; // @public export type AllRecords> = ExtractR>; @@ -27,45 +28,52 @@ export type CollectionDiff = { removed?: Set; }; -// @public (undocumented) -export function compareRecordVersions(a: RecordVersion, b: RecordVersion): -1 | 0 | 1; - -// @public (undocumented) -export const compareSchemas: (a: SerializedSchema, b: SerializedSchema) => -1 | 0 | 1; - // @public export type ComputedCache = { get(id: IdOf): Data | undefined; }; +// @public +export function createMigrationIds>(sequenceId: ID, versions: Versions): { + [K in keyof Versions]: `${ID}/${Versions[K]}`; +}; + +// @public +export function createMigrationSequence({ sequence, sequenceId, retroactive, }: { + retroactive?: boolean; + sequence: Array; + sequenceId: string; +}): MigrationSequence; + +// @internal (undocumented) +export function createRecordMigrationSequence(opts: { + filter?: (record: UnknownRecord) => boolean; + recordType: string; + retroactive?: boolean; + sequence: Omit, 'scope'>[]; + sequenceId: string; +}): MigrationSequence; + // @public export function createRecordType(typeName: R['typeName'], config: { - migrations?: Migrations; - validator?: StoreValidator; scope: RecordScope; + validator?: StoreValidator; }): RecordType>; -// @public (undocumented) -export function defineMigrations = EMPTY_SYMBOL>(opts: { - firstVersion?: CurrentVersion extends number ? FirstVersion : never; - currentVersion?: CurrentVersion; - migrators?: CurrentVersion extends number ? FirstVersion extends number ? CurrentVersion extends FirstVersion ? { - [version in Exclude, 0>]: Migration; - } : { - [version in Exclude, FirstVersion>]: Migration; - } : { - [version in Exclude, 0>]: Migration; - } : never; +// @public @deprecated (undocumented) +export function defineMigrations(opts: { + currentVersion?: number; + firstVersion?: number; + migrators?: Record; subTypeKey?: string; - subTypeMigrations?: Record; -}): Migrations; + subTypeMigrations?: Record; +}): LegacyMigrations; // @public export function devFreeze(object: T): T; -// @public (undocumented) -export function getRecordVersion(record: UnknownRecord, serializedSchema: SerializedSchema): RecordVersion; - // @public export type HistoryEntry = { changes: RecordsDiff; @@ -83,35 +91,42 @@ export class IncrementalSetConstructor { add(item: T): void; // @public get(): { - value: Set; diff: CollectionDiff; + value: Set; } | undefined; // @public remove(item: T): void; } // @public (undocumented) -export function migrate({ value, migrations, fromVersion, toVersion, }: { - value: unknown; - migrations: Migrations; - fromVersion: number; - toVersion: number; -}): MigrationResult; - -// @public (undocumented) -export function migrateRecord({ record, migrations, fromVersion, toVersion, }: { - record: unknown; - migrations: Migrations; - fromVersion: number; - toVersion: number; -}): MigrationResult; - -// @public (undocumented) -export type Migration = { - up: (oldState: Before) => After; +export type LegacyMigration = { down: (newState: After) => Before; + up: (oldState: Before) => After; }; +// @public (undocumented) +export interface LegacyMigrations extends LegacyBaseMigrationsInfo { + // (undocumented) + subTypeKey?: string; + // (undocumented) + subTypeMigrations?: Record; +} + +// @public (undocumented) +export type Migration = { + readonly dependsOn?: readonly MigrationId[] | undefined; + readonly id: MigrationId; +} & ({ + readonly down?: (newState: SerializedStore) => SerializedStore | void; + readonly scope: 'store'; + readonly up: (oldState: SerializedStore) => SerializedStore | void; +} | { + readonly down?: (newState: UnknownRecord) => UnknownRecord | void; + readonly filter?: (record: UnknownRecord) => boolean; + readonly scope: 'record'; + readonly up: (oldState: UnknownRecord) => UnknownRecord | void; +}); + // @public (undocumented) export enum MigrationFailureReason { // (undocumented) @@ -128,23 +143,33 @@ export enum MigrationFailureReason { UnrecognizedSubtype = "unrecognized-subtype" } +// @public (undocumented) +export type MigrationId = `${string}/${number}`; + // @public (undocumented) export type MigrationResult = { - type: 'error'; reason: MigrationFailureReason; + type: 'error'; } | { type: 'success'; value: T; }; // @public (undocumented) -export interface Migrations extends BaseMigrationsInfo { +export interface MigrationSequence { + retroactive: boolean; // (undocumented) - subTypeKey?: string; + sequence: Migration[]; // (undocumented) - subTypeMigrations?: Record; + sequenceId: string; } +// @internal (undocumented) +export function parseMigrationId(id: MigrationId): { + sequenceId: string; + version: number; +}; + // @public (undocumented) export type RecordId = string & { __type__: R; @@ -153,8 +178,8 @@ export type RecordId = string & { // @public export type RecordsDiff = { added: Record, R>; - updated: Record, [from: R, to: R]>; removed: Record, R>; + updated: Record, [from: R, to: R]>; }; // @public @@ -162,9 +187,8 @@ export class RecordType Exclude, RequiredProperties>; - readonly migrations: Migrations; - readonly validator?: StoreValidator; readonly scope?: RecordScope; + readonly validator?: StoreValidator; }); clone(record: R): R; create(properties: Pick & Omit, RequiredProperties>): R; @@ -175,8 +199,6 @@ export class RecordType; isId(id?: string): id is IdOf; isInstance: (record?: UnknownRecord) => record is R; - // (undocumented) - readonly migrations: Migrations; parseId(id: IdOf): string; // (undocumented) readonly scope: RecordScope; @@ -187,28 +209,35 @@ export class RecordType, 'id' | 'typeName'>>(createDefaultProperties: () => DefaultProps): RecordType>; } -// @public (undocumented) -export type RecordVersion = { - rootVersion: number; - subTypeVersion?: number; -}; - // @public (undocumented) export function reverseRecordsDiff(diff: RecordsDiff): RecordsDiff; // @public (undocumented) -export interface SerializedSchema { +export type SerializedSchema = SerializedSchemaV1 | SerializedSchemaV2; + +// @public (undocumented) +export interface SerializedSchemaV1 { recordVersions: Record; subTypeKey: string; + subTypeVersions: Record; + version: number; } | { version: number; }>; - schemaVersion: number; + schemaVersion: 1; storeVersion: number; } +// @public (undocumented) +export interface SerializedSchemaV2 { + // (undocumented) + schemaVersion: 2; + // (undocumented) + sequences: { + [sequenceId: string]: number; + }; +} + // @public export type SerializedStore = Record, R>; @@ -218,8 +247,8 @@ export function squashRecordDiffs(diffs: RecordsDiff // @public export class Store { constructor(config: { - initialData?: SerializedStore; schema: StoreSchema; + initialData?: SerializedStore; props: Props; }); allRecords: () => R[]; @@ -234,8 +263,8 @@ export class Store { extractingChanges(fn: () => void): RecordsDiff; filterChangesByScope(change: RecordsDiff, scope: RecordScope): { added: { [K in IdOf]: R; }; - updated: { [K_1 in IdOf]: [from: R, to: R]; }; removed: { [K in IdOf]: R; }; + updated: { [K_1 in IdOf]: [from: R, to: R]; }; } | null; // (undocumented) _flushHistory(): void; @@ -281,10 +310,10 @@ export class Store { // @public (undocumented) export type StoreError = { error: Error; - phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord'; - recordBefore?: unknown; - recordAfter: unknown; isExistingValidationIssue: boolean; + phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord'; + recordAfter: unknown; + recordBefore?: unknown; }; // @public @@ -301,16 +330,20 @@ export class StoreSchema { // @internal (undocumented) createIntegrityChecker(store: Store): (() => void) | undefined; // (undocumented) - get currentStoreVersion(): number; + getMigrationsSince(persistedSchema: SerializedSchema): Result; // (undocumented) migratePersistedRecord(record: R, persistedSchema: SerializedSchema, direction?: 'down' | 'up'): MigrationResult; // (undocumented) migrateStoreSnapshot(snapshot: StoreSnapshot): MigrationResult>; // (undocumented) - serialize(): SerializedSchema; + readonly migrations: Record; // (undocumented) + serialize(): SerializedSchemaV2; + // @deprecated (undocumented) serializeEarliestVersion(): SerializedSchema; // (undocumented) + readonly sortedMigrations: readonly Migration[]; + // (undocumented) readonly types: { [Record in R as Record['typeName']]: RecordType; }; @@ -320,21 +353,21 @@ export class StoreSchema { // @public (undocumented) export type StoreSchemaOptions = { - snapshotMigrations?: Migrations; + createIntegrityChecker?: (store: Store) => void; onValidationFailure?: (data: { error: unknown; - store: Store; - record: R; phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord'; + record: R; recordBefore: null | R; + store: Store; }) => R; - createIntegrityChecker?: (store: Store) => void; + migrations?: MigrationSequence[]; }; // @public (undocumented) export type StoreSnapshot = { - store: SerializedStore; schema: SerializedSchema; + store: SerializedStore; }; // @public (undocumented) diff --git a/packages/store/api/api.json b/packages/store/api/api.json index cb4e90c11..40acd8982 100644 --- a/packages/store/api/api.json +++ b/packages/store/api/api.json @@ -1,7 +1,7 @@ { "metadata": { "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.41.0", + "toolVersion": "7.43.1", "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { @@ -527,128 +527,6 @@ "endIndex": 6 } }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!compareRecordVersions:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function compareRecordVersions(a: " - }, - { - "kind": "Reference", - "text": "RecordVersion", - "canonicalReference": "@tldraw/store!RecordVersion:type" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Reference", - "text": "RecordVersion", - "canonicalReference": "@tldraw/store!RecordVersion:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "-1 | 0 | 1" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "compareRecordVersions" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!compareSchemas:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "compareSchemas: (a: " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Content", - "text": "-1 | 0 | 1" - } - ], - "fileUrlPath": "packages/store/src/lib/compareSchemas.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "compareSchemas" - }, { "kind": "TypeAlias", "canonicalReference": "@tldraw/store!ComputedCache:type", @@ -717,6 +595,185 @@ "endIndex": 6 } }, + { + "kind": "Function", + "canonicalReference": "@tldraw/store!createMigrationIds:function(1)", + "docComment": "/**\n * Creates a named set of migration ids given a named set of version numbers and a sequence id.\n *\n * See the [migration guide](https://tldraw.dev/docs/persistence#Migrations) for more info on how to use this API.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createMigrationIds" + }, + { + "kind": "Content", + "text": ">(sequenceId: " + }, + { + "kind": "Content", + "text": "ID" + }, + { + "kind": "Content", + "text": ", versions: " + }, + { + "kind": "Content", + "text": "Versions" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n [K in keyof Versions]: `${ID}/${Versions[K]}`;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "sequenceId", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "versions", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "ID", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "Versions", + "constraintTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "createMigrationIds" + }, + { + "kind": "Function", + "canonicalReference": "@tldraw/store!createMigrationSequence:function(1)", + "docComment": "/**\n * Creates a migration sequence. See the [migration guide](https://tldraw.dev/docs/persistence#Migrations) for more info on how to use this API.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createMigrationSequence({ sequence, sequenceId, retroactive, }: " + }, + { + "kind": "Content", + "text": "{\n retroactive?: boolean;\n sequence: " + }, + { + "kind": "Reference", + "text": "Array", + "canonicalReference": "!Array:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Migration", + "canonicalReference": "@tldraw/store!Migration:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "StandaloneDependsOn", + "canonicalReference": "@tldraw/store!~StandaloneDependsOn:type" + }, + { + "kind": "Content", + "text": ">;\n sequenceId: string;\n}" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "MigrationSequence", + "canonicalReference": "@tldraw/store!MigrationSequence:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "{ sequence, sequenceId, retroactive, }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isOptional": false + } + ], + "name": "createMigrationSequence" + }, { "kind": "Function", "canonicalReference": "@tldraw/store!createRecordType:function(1)", @@ -745,12 +802,12 @@ }, { "kind": "Content", - "text": "{\n migrations?: " + "text": "{\n scope: " }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "RecordScope", + "canonicalReference": "@tldraw/store!~RecordScope:type" }, { "kind": "Content", @@ -763,16 +820,7 @@ }, { "kind": "Content", - "text": ";\n scope: " - }, - { - "kind": "Reference", - "text": "RecordScope", - "canonicalReference": "@tldraw/store!~RecordScope:type" - }, - { - "kind": "Content", - "text": ";\n}" + "text": ";\n}" }, { "kind": "Content", @@ -803,8 +851,8 @@ ], "fileUrlPath": "packages/store/src/lib/RecordType.ts", "returnTypeTokenRange": { - "startIndex": 13, - "endIndex": 17 + "startIndex": 11, + "endIndex": 15 }, "releaseTag": "Public", "overloadIndex": 1, @@ -821,7 +869,7 @@ "parameterName": "config", "parameterTypeTokenRange": { "startIndex": 5, - "endIndex": 12 + "endIndex": 10 }, "isOptional": false } @@ -844,149 +892,33 @@ { "kind": "Function", "canonicalReference": "@tldraw/store!defineMigrations:function(1)", - "docComment": "/**\n * @public\n */\n", + "docComment": "/**\n * @deprecated\n *\n * use `createShapePropsMigrationSequence` instead. See [the docs](https://tldraw.dev/docs/persistence#Updating-legacy-shape-migrations-defineMigrations) for how to migrate.\n *\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "export declare function defineMigrations" - }, - { - "kind": "Content", - "text": " = " - }, - { - "kind": "Reference", - "text": "EMPTY_SYMBOL", - "canonicalReference": "@tldraw/store!~EMPTY_SYMBOL:type" - }, - { - "kind": "Content", - "text": ">(opts: " - }, - { - "kind": "Content", - "text": "{\n firstVersion?: CurrentVersion extends number ? FirstVersion : never;\n currentVersion?: CurrentVersion;\n migrators?: CurrentVersion extends number ? FirstVersion extends number ? CurrentVersion extends FirstVersion ? {\n [version in " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Range", - "canonicalReference": "@tldraw/store!~Range_2:type" - }, - { - "kind": "Content", - "text": "<1, CurrentVersion>, 0>]: " - }, - { - "kind": "Reference", - "text": "Migration", - "canonicalReference": "@tldraw/store!Migration:type" - }, - { - "kind": "Content", - "text": ";\n } : {\n [version in " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Range", - "canonicalReference": "@tldraw/store!~Range_2:type" - }, - { - "kind": "Content", - "text": ", FirstVersion>]: " - }, - { - "kind": "Reference", - "text": "Migration", - "canonicalReference": "@tldraw/store!Migration:type" - }, - { - "kind": "Content", - "text": ";\n } : {\n [version in " - }, - { - "kind": "Reference", - "text": "Exclude", - "canonicalReference": "!Exclude:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Range", - "canonicalReference": "@tldraw/store!~Range_2:type" - }, - { - "kind": "Content", - "text": "<1, CurrentVersion>, 0>]: " - }, - { - "kind": "Reference", - "text": "Migration", - "canonicalReference": "@tldraw/store!Migration:type" - }, - { - "kind": "Content", - "text": ";\n } : never;\n subTypeKey?: string;\n subTypeMigrations?: " + "text": ">;\n subTypeKey?: string;\n subTypeMigrations?: " }, { "kind": "Reference", @@ -999,8 +931,8 @@ }, { "kind": "Reference", - "text": "BaseMigrationsInfo", - "canonicalReference": "@tldraw/store!~BaseMigrationsInfo:interface" + "text": "LegacyBaseMigrationsInfo", + "canonicalReference": "@tldraw/store!~LegacyBaseMigrationsInfo:interface" }, { "kind": "Content", @@ -1012,8 +944,8 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "LegacyMigrations", + "canonicalReference": "@tldraw/store!LegacyMigrations:interface" }, { "kind": "Content", @@ -1022,8 +954,8 @@ ], "fileUrlPath": "packages/store/src/lib/migrate.ts", "returnTypeTokenRange": { - "startIndex": 37, - "endIndex": 38 + "startIndex": 11, + "endIndex": 12 }, "releaseTag": "Public", "overloadIndex": 1, @@ -1031,34 +963,10 @@ { "parameterName": "opts", "parameterTypeTokenRange": { - "startIndex": 13, - "endIndex": 36 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "FirstVersion", - "constraintTokenRange": { "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - } - }, - { - "typeParameterName": "CurrentVersion", - "constraintTokenRange": { - "startIndex": 6, "endIndex": 10 }, - "defaultTypeTokenRange": { - "startIndex": 11, - "endIndex": 12 - } + "isOptional": false } ], "name": "defineMigrations" @@ -1121,70 +1029,6 @@ ], "name": "devFreeze" }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!getRecordVersion:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getRecordVersion(record: " - }, - { - "kind": "Reference", - "text": "UnknownRecord", - "canonicalReference": "@tldraw/store!UnknownRecord:type" - }, - { - "kind": "Content", - "text": ", serializedSchema: " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "RecordVersion", - "canonicalReference": "@tldraw/store!RecordVersion:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "record", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "serializedSchema", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "getRecordVersion" - }, { "kind": "TypeAlias", "canonicalReference": "@tldraw/store!HistoryEntry:type", @@ -1308,167 +1152,14 @@ "endIndex": 4 } }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!migrate:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function migrate({ value, migrations, fromVersion, toVersion, }: " - }, - { - "kind": "Content", - "text": "{\n value: unknown;\n migrations: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";\n fromVersion: number;\n toVersion: number;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "MigrationResult", - "canonicalReference": "@tldraw/store!MigrationResult:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ value, migrations, fromVersion, toVersion, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "migrate" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/store!migrateRecord:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function migrateRecord({ record, migrations, fromVersion, toVersion, }: " - }, - { - "kind": "Content", - "text": "{\n record: unknown;\n migrations: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";\n fromVersion: number;\n toVersion: number;\n}" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "MigrationResult", - "canonicalReference": "@tldraw/store!MigrationResult:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ record, migrations, fromVersion, toVersion, }", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "R", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "migrateRecord" - }, { "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!Migration:type", + "canonicalReference": "@tldraw/store!LegacyMigration:type", "docComment": "/**\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "export type Migration After;\n down: (newState: After) => Before;\n}" + "text": "{\n down: (newState: After) => Before;\n up: (oldState: Before) => After;\n}" }, { "kind": "Content", @@ -1497,7 +1188,7 @@ ], "fileUrlPath": "packages/store/src/lib/migrate.ts", "releaseTag": "Public", - "name": "Migration", + "name": "LegacyMigration", "typeParameters": [ { "typeParameterName": "Before", @@ -1527,6 +1218,267 @@ "endIndex": 6 } }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/store!LegacyMigrations:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface LegacyMigrations extends " + }, + { + "kind": "Reference", + "text": "LegacyBaseMigrationsInfo", + "canonicalReference": "@tldraw/store!~LegacyBaseMigrationsInfo:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "releaseTag": "Public", + "name": "LegacyMigrations", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!LegacyMigrations#subTypeKey:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "subTypeKey?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "subTypeKey", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!LegacyMigrations#subTypeMigrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "subTypeMigrations?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "subTypeMigrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!Migration:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type Migration = " + }, + { + "kind": "Content", + "text": "{\n readonly dependsOn?: readonly " + }, + { + "kind": "Reference", + "text": "MigrationId", + "canonicalReference": "@tldraw/store!MigrationId:type" + }, + { + "kind": "Content", + "text": "[] | undefined;\n readonly id: " + }, + { + "kind": "Reference", + "text": "MigrationId", + "canonicalReference": "@tldraw/store!MigrationId:type" + }, + { + "kind": "Content", + "text": ";\n} & ({\n readonly down?: (newState: " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": ">) => " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": "> | void;\n readonly scope: 'store';\n readonly up: (oldState: " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": ">) => " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": "> | void;\n} | {\n readonly down?: (newState: " + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": " | void;\n readonly filter?: (record: " + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": ") => boolean;\n readonly scope: 'record';\n readonly up: (oldState: " + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "UnknownRecord", + "canonicalReference": "@tldraw/store!UnknownRecord:type" + }, + { + "kind": "Content", + "text": " | void;\n})" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "releaseTag": "Public", + "name": "Migration", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 32 + } + }, { "kind": "Enum", "canonicalReference": "@tldraw/store!MigrationFailureReason:enum", @@ -1670,6 +1622,32 @@ } ] }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!MigrationId:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type MigrationId = " + }, + { + "kind": "Content", + "text": "`${string}/${number}`" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/store/src/lib/migrate.ts", + "releaseTag": "Public", + "name": "MigrationId", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, { "kind": "TypeAlias", "canonicalReference": "@tldraw/store!MigrationResult:type", @@ -1681,7 +1659,7 @@ }, { "kind": "Content", - "text": "{\n type: 'error';\n reason: " + "text": "{\n reason: " }, { "kind": "Reference", @@ -1690,7 +1668,7 @@ }, { "kind": "Content", - "text": ";\n} | {\n type: 'success';\n value: T;\n}" + "text": ";\n type: 'error';\n} | {\n type: 'success';\n value: T;\n}" }, { "kind": "Content", @@ -1720,36 +1698,86 @@ }, { "kind": "Interface", - "canonicalReference": "@tldraw/store!Migrations:interface", + "canonicalReference": "@tldraw/store!MigrationSequence:interface", "docComment": "/**\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "export interface Migrations extends " - }, - { - "kind": "Reference", - "text": "BaseMigrationsInfo", - "canonicalReference": "@tldraw/store!~BaseMigrationsInfo:interface" - }, - { - "kind": "Content", - "text": " " + "text": "export interface MigrationSequence " } ], "fileUrlPath": "packages/store/src/lib/migrate.ts", "releaseTag": "Public", - "name": "Migrations", + "name": "MigrationSequence", "preserveMemberOrder": false, "members": [ { "kind": "PropertySignature", - "canonicalReference": "@tldraw/store!Migrations#subTypeKey:member", + "canonicalReference": "@tldraw/store!MigrationSequence#retroactive:member", + "docComment": "/**\n * retroactive should be true if the migrations should be applied to snapshots that were created before this migration sequence was added to the schema.\n *\n * In general:\n *\n * - retroactive should be true when app developers create their own new migration sequences. - retroactive should be false when library developers ship a migration sequence. When you install a library for the first time, any migrations that were added in the library before that point should generally _not_ be applied to your existing data.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "retroactive: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "retroactive", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!MigrationSequence#sequence:member", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "subTypeKey?: " + "text": "sequence: " + }, + { + "kind": "Reference", + "text": "Migration", + "canonicalReference": "@tldraw/store!Migration:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "sequence", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!MigrationSequence#sequenceId:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "sequenceId: " }, { "kind": "Content", @@ -1761,62 +1789,16 @@ } ], "isReadonly": false, - "isOptional": true, + "isOptional": false, "releaseTag": "Public", - "name": "subTypeKey", + "name": "sequenceId", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/store!Migrations#subTypeMigrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "subTypeMigrations?: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "subTypeMigrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } } ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 2 - } - ] + "extendsTokenRanges": [] }, { "kind": "TypeAlias", @@ -1902,6 +1884,24 @@ "text": "IdOf", "canonicalReference": "@tldraw/store!IdOf:type" }, + { + "kind": "Content", + "text": ", R>;\n removed: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, { "kind": "Content", "text": ", R>;\n updated: " @@ -1922,25 +1922,7 @@ }, { "kind": "Content", - "text": ", [from: R, to: R]>;\n removed: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": ", R>;\n}" + "text": ", [from: R, to: R]>;\n}" }, { "kind": "Content", @@ -2071,12 +2053,12 @@ }, { "kind": "Content", - "text": ", RequiredProperties>;\n readonly migrations: " + "text": ", RequiredProperties>;\n readonly scope?: " }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "RecordScope", + "canonicalReference": "@tldraw/store!~RecordScope:type" }, { "kind": "Content", @@ -2089,16 +2071,7 @@ }, { "kind": "Content", - "text": ";\n readonly scope?: " - }, - { - "kind": "Reference", - "text": "RecordScope", - "canonicalReference": "@tldraw/store!~RecordScope:type" - }, - { - "kind": "Content", - "text": ";\n }" + "text": ";\n }" }, { "kind": "Content", @@ -2121,7 +2094,7 @@ "parameterName": "config", "parameterTypeTokenRange": { "startIndex": 3, - "endIndex": 14 + "endIndex": 12 }, "isOptional": false } @@ -2510,37 +2483,6 @@ "isProtected": false, "isAbstract": false }, - { - "kind": "Property", - "canonicalReference": "@tldraw/store!RecordType#migrations:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly migrations: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "migrations", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, { "kind": "Method", "canonicalReference": "@tldraw/store!RecordType#parseId:member(1)", @@ -2854,32 +2796,6 @@ ], "implementsTokenRanges": [] }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/store!RecordVersion:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type RecordVersion = " - }, - { - "kind": "Content", - "text": "{\n rootVersion: number;\n subTypeVersion?: number;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/store/src/lib/migrate.ts", - "releaseTag": "Public", - "name": "RecordVersion", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, { "kind": "Function", "canonicalReference": "@tldraw/store!reverseRecordsDiff:function(1)", @@ -2936,23 +2852,59 @@ "name": "reverseRecordsDiff" }, { - "kind": "Interface", - "canonicalReference": "@tldraw/store!SerializedSchema:interface", + "kind": "TypeAlias", + "canonicalReference": "@tldraw/store!SerializedSchema:type", "docComment": "/**\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "export interface SerializedSchema " + "text": "export type SerializedSchema = " + }, + { + "kind": "Reference", + "text": "SerializedSchemaV1", + "canonicalReference": "@tldraw/store!SerializedSchemaV1:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "SerializedSchemaV2", + "canonicalReference": "@tldraw/store!SerializedSchemaV2:interface" + }, + { + "kind": "Content", + "text": ";" } ], "fileUrlPath": "packages/store/src/lib/StoreSchema.ts", "releaseTag": "Public", "name": "SerializedSchema", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/store!SerializedSchemaV1:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface SerializedSchemaV1 " + } + ], + "fileUrlPath": "packages/store/src/lib/StoreSchema.ts", + "releaseTag": "Public", + "name": "SerializedSchemaV1", "preserveMemberOrder": false, "members": [ { "kind": "PropertySignature", - "canonicalReference": "@tldraw/store!SerializedSchema#recordVersions:member", + "canonicalReference": "@tldraw/store!SerializedSchemaV1#recordVersions:member", "docComment": "/**\n * Record versions are the versions for each record type. e.g. adding a new field to a record\n */\n", "excerptTokens": [ { @@ -2966,7 +2918,7 @@ }, { "kind": "Content", - "text": ";\n subTypeKey: string;\n } | {\n version: number;\n }>" + "text": ";\n version: number;\n } | {\n version: number;\n }>" }, { "kind": "Content", @@ -2993,7 +2945,7 @@ }, { "kind": "PropertySignature", - "canonicalReference": "@tldraw/store!SerializedSchema#schemaVersion:member", + "canonicalReference": "@tldraw/store!SerializedSchemaV1#schemaVersion:member", "docComment": "/**\n * Schema version is the version for this type you're looking at right now\n */\n", "excerptTokens": [ { @@ -3002,7 +2954,7 @@ }, { "kind": "Content", - "text": "number" + "text": "1" }, { "kind": "Content", @@ -3020,7 +2972,7 @@ }, { "kind": "PropertySignature", - "canonicalReference": "@tldraw/store!SerializedSchema#storeVersion:member", + "canonicalReference": "@tldraw/store!SerializedSchemaV1#storeVersion:member", "docComment": "/**\n * Store version is the version for the structure of the store. e.g. higher level structure like removing or renaming a record type.\n */\n", "excerptTokens": [ { @@ -3048,6 +3000,78 @@ ], "extendsTokenRanges": [] }, + { + "kind": "Interface", + "canonicalReference": "@tldraw/store!SerializedSchemaV2:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface SerializedSchemaV2 " + } + ], + "fileUrlPath": "packages/store/src/lib/StoreSchema.ts", + "releaseTag": "Public", + "name": "SerializedSchemaV2", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!SerializedSchemaV2#schemaVersion:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "schemaVersion: " + }, + { + "kind": "Content", + "text": "2" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "schemaVersion", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tldraw/store!SerializedSchemaV2#sequences:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "sequences: " + }, + { + "kind": "Content", + "text": "{\n [sequenceId: string]: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "sequences", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, { "kind": "TypeAlias", "canonicalReference": "@tldraw/store!SerializedStore:type", @@ -3295,16 +3319,7 @@ }, { "kind": "Content", - "text": "{\n initialData?: " - }, - { - "kind": "Reference", - "text": "SerializedStore", - "canonicalReference": "@tldraw/store!SerializedStore:type" - }, - { - "kind": "Content", - "text": ";\n schema: " + "text": "{\n schema: " }, { "kind": "Reference", @@ -3313,7 +3328,16 @@ }, { "kind": "Content", - "text": ";\n props: Props;\n }" + "text": ";\n initialData?: " + }, + { + "kind": "Reference", + "text": "SerializedStore", + "canonicalReference": "@tldraw/store!SerializedStore:type" + }, + { + "kind": "Content", + "text": ";\n props: Props;\n }" }, { "kind": "Content", @@ -3634,6 +3658,15 @@ "text": "IdOf", "canonicalReference": "@tldraw/store!IdOf:type" }, + { + "kind": "Content", + "text": "]: R; };\n removed: { [K in " + }, + { + "kind": "Reference", + "text": "IdOf", + "canonicalReference": "@tldraw/store!IdOf:type" + }, { "kind": "Content", "text": "]: R; };\n updated: { [K_1 in " @@ -3645,16 +3678,7 @@ }, { "kind": "Content", - "text": "]: [from: R, to: R]; };\n removed: { [K in " - }, - { - "kind": "Reference", - "text": "IdOf", - "canonicalReference": "@tldraw/store!IdOf:type" - }, - { - "kind": "Content", - "text": "]: R; };\n } | null" + "text": "]: [from: R, to: R]; };\n } | null" }, { "kind": "Content", @@ -4759,7 +4783,7 @@ }, { "kind": "Content", - "text": ";\n phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord';\n recordBefore?: unknown;\n recordAfter: unknown;\n isExistingValidationIssue: boolean;\n}" + "text": ";\n isExistingValidationIssue: boolean;\n phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord';\n recordAfter: unknown;\n recordBefore?: unknown;\n}" }, { "kind": "Content", @@ -5004,34 +5028,67 @@ "name": "create" }, { - "kind": "Property", - "canonicalReference": "@tldraw/store!StoreSchema#currentStoreVersion:member", + "kind": "Method", + "canonicalReference": "@tldraw/store!StoreSchema#getMigrationsSince:member(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "get currentStoreVersion(): " + "text": "getMigrationsSince(persistedSchema: " + }, + { + "kind": "Reference", + "text": "SerializedSchema", + "canonicalReference": "@tldraw/store!SerializedSchema:type" }, { "kind": "Content", - "text": "number" + "text": "): " + }, + { + "kind": "Reference", + "text": "Result", + "canonicalReference": "@tldraw/utils!Result:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Migration", + "canonicalReference": "@tldraw/store!Migration:type" + }, + { + "kind": "Content", + "text": "[], string>" }, { "kind": "Content", "text": ";" } ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "currentStoreVersion", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", "isProtected": false, - "isAbstract": false + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "persistedSchema", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getMigrationsSince" }, { "kind": "Method", @@ -5053,7 +5110,7 @@ { "kind": "Reference", "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" + "canonicalReference": "@tldraw/store!SerializedSchema:type" }, { "kind": "Content", @@ -5186,6 +5243,50 @@ "isAbstract": false, "name": "migrateStoreSnapshot" }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!StoreSchema#migrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly migrations: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "migrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, { "kind": "Method", "canonicalReference": "@tldraw/store!StoreSchema#serialize:member(1)", @@ -5197,8 +5298,8 @@ }, { "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" + "text": "SerializedSchemaV2", + "canonicalReference": "@tldraw/store!SerializedSchemaV2:interface" }, { "kind": "Content", @@ -5221,7 +5322,7 @@ { "kind": "Method", "canonicalReference": "@tldraw/store!StoreSchema#serializeEarliestVersion:member(1)", - "docComment": "", + "docComment": "/**\n * @deprecated\n *\n * This is only here for legacy reasons, don't use it unless you have david's blessing!\n */\n", "excerptTokens": [ { "kind": "Content", @@ -5230,7 +5331,7 @@ { "kind": "Reference", "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" + "canonicalReference": "@tldraw/store!SerializedSchema:type" }, { "kind": "Content", @@ -5250,6 +5351,45 @@ "isAbstract": false, "name": "serializeEarliestVersion" }, + { + "kind": "Property", + "canonicalReference": "@tldraw/store!StoreSchema#sortedMigrations:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly sortedMigrations: " + }, + { + "kind": "Content", + "text": "readonly " + }, + { + "kind": "Reference", + "text": "Migration", + "canonicalReference": "@tldraw/store!Migration:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "sortedMigrations", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, { "kind": "Property", "canonicalReference": "@tldraw/store!StoreSchema#types:member", @@ -5413,16 +5553,7 @@ }, { "kind": "Content", - "text": "{\n snapshotMigrations?: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";\n onValidationFailure?: (data: {\n error: unknown;\n store: " + "text": "{\n createIntegrityChecker?: (store: " }, { "kind": "Reference", @@ -5431,7 +5562,7 @@ }, { "kind": "Content", - "text": ";\n record: R;\n phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord';\n recordBefore: null | R;\n }) => R;\n createIntegrityChecker?: (store: " + "text": ") => void;\n onValidationFailure?: (data: {\n error: unknown;\n phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord';\n record: R;\n recordBefore: null | R;\n store: " }, { "kind": "Reference", @@ -5440,7 +5571,16 @@ }, { "kind": "Content", - "text": ") => void;\n}" + "text": ";\n }) => R;\n migrations?: " + }, + { + "kind": "Reference", + "text": "MigrationSequence", + "canonicalReference": "@tldraw/store!MigrationSequence:interface" + }, + { + "kind": "Content", + "text": "[];\n}" }, { "kind": "Content", @@ -5499,7 +5639,16 @@ }, { "kind": "Content", - "text": "{\n store: " + "text": "{\n schema: " + }, + { + "kind": "Reference", + "text": "SerializedSchema", + "canonicalReference": "@tldraw/store!SerializedSchema:type" + }, + { + "kind": "Content", + "text": ";\n store: " }, { "kind": "Reference", @@ -5508,16 +5657,7 @@ }, { "kind": "Content", - "text": ";\n schema: " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" - }, - { - "kind": "Content", - "text": ";\n}" + "text": ";\n}" }, { "kind": "Content", diff --git a/packages/store/src/index.ts b/packages/store/src/index.ts index 692172fde..e773ecd73 100644 --- a/packages/store/src/index.ts +++ b/packages/store/src/index.ts @@ -15,19 +15,26 @@ export type { StoreValidators, } from './lib/Store' export { StoreSchema } from './lib/StoreSchema' -export type { SerializedSchema, StoreSchemaOptions } from './lib/StoreSchema' -export { compareSchemas } from './lib/compareSchemas' +export type { + SerializedSchema, + SerializedSchemaV1, + SerializedSchemaV2, + StoreSchemaOptions, +} from './lib/StoreSchema' export { devFreeze } from './lib/devFreeze' export { MigrationFailureReason, - compareRecordVersions, + createMigrationIds, + createMigrationSequence, + createRecordMigrationSequence, + // eslint-disable-next-line deprecation/deprecation defineMigrations, - getRecordVersion, - migrate, - migrateRecord, + parseMigrationId, + type LegacyMigration, + type LegacyMigrations, type Migration, + type MigrationId, type MigrationResult, - type Migrations, - type RecordVersion, + type MigrationSequence, } from './lib/migrate' export type { AllRecords } from './lib/type-utils' diff --git a/packages/store/src/lib/RecordType.ts b/packages/store/src/lib/RecordType.ts index 00d8443e1..40d568c00 100644 --- a/packages/store/src/lib/RecordType.ts +++ b/packages/store/src/lib/RecordType.ts @@ -2,7 +2,6 @@ import { structuredClone } from '@tldraw/utils' import { nanoid } from 'nanoid' import { IdOf, OmitMeta, UnknownRecord } from './BaseRecord' import { StoreValidator } from './Store' -import { Migrations } from './migrate' export type RecordTypeRecord> = ReturnType @@ -28,7 +27,6 @@ export class RecordType< RequiredProperties extends keyof Omit, > { readonly createDefaultProperties: () => Exclude, RequiredProperties> - readonly migrations: Migrations readonly validator: StoreValidator readonly scope: RecordScope @@ -43,13 +41,11 @@ export class RecordType< public readonly typeName: R['typeName'], config: { readonly createDefaultProperties: () => Exclude, RequiredProperties> - readonly migrations: Migrations readonly validator?: StoreValidator readonly scope?: RecordScope } ) { this.createDefaultProperties = config.createDefaultProperties - this.migrations = config.migrations this.validator = config.validator ?? { validate: (r: unknown) => r as R } this.scope = config.scope ?? 'document' } @@ -188,7 +184,6 @@ export class RecordType< ): RecordType> { return new RecordType>(this.typeName, { createDefaultProperties: createDefaultProperties as any, - migrations: this.migrations, validator: this.validator, scope: this.scope, }) @@ -221,14 +216,12 @@ export class RecordType< export function createRecordType( typeName: R['typeName'], config: { - migrations?: Migrations validator?: StoreValidator scope: RecordScope } ): RecordType> { return new RecordType>(typeName, { createDefaultProperties: () => ({}) as any, - migrations: config.migrations ?? { currentVersion: 0, firstVersion: 0, migrators: {} }, validator: config.validator, scope: config.scope, }) diff --git a/packages/store/src/lib/Store.ts b/packages/store/src/lib/Store.ts index 87856ef1a..5ce958f3f 100644 --- a/packages/store/src/lib/Store.ts +++ b/packages/store/src/lib/Store.ts @@ -617,11 +617,17 @@ export class Store { throw new Error(`Failed to migrate snapshot: ${migrationResult.reason}`) } - transact(() => { - this.clear() - this.put(Object.values(migrationResult.value)) - this.ensureStoreIsUsable() - }) + const prevRunCallbacks = this._runCallbacks + try { + this._runCallbacks = false + transact(() => { + this.clear() + this.put(Object.values(migrationResult.value)) + this.ensureStoreIsUsable() + }) + } finally { + this._runCallbacks = prevRunCallbacks + } } /** diff --git a/packages/store/src/lib/StoreSchema.ts b/packages/store/src/lib/StoreSchema.ts index 4c2067230..d0cbe70aa 100644 --- a/packages/store/src/lib/StoreSchema.ts +++ b/packages/store/src/lib/StoreSchema.ts @@ -1,19 +1,28 @@ -import { getOwnProperty, objectMapValues } from '@tldraw/utils' -import { IdOf, UnknownRecord } from './BaseRecord' +import { + Result, + assert, + exhaustiveSwitchError, + getOwnProperty, + structuredClone, +} from '@tldraw/utils' +import { UnknownRecord } from './BaseRecord' import { RecordType } from './RecordType' import { SerializedStore, Store, StoreSnapshot } from './Store' import { + Migration, MigrationFailureReason, + MigrationId, MigrationResult, - Migrations, - migrate, - migrateRecord, + MigrationSequence, + parseMigrationId, + sortMigrations, + validateMigrations, } from './migrate' /** @public */ -export interface SerializedSchema { +export interface SerializedSchemaV1 { /** Schema version is the version for this type you're looking at right now */ - schemaVersion: number + schemaVersion: 1 /** * Store version is the version for the structure of the store. e.g. higher level structure like * removing or renaming a record type. @@ -34,10 +43,39 @@ export interface SerializedSchema { > } +/** @public */ +export interface SerializedSchemaV2 { + schemaVersion: 2 + sequences: { + [sequenceId: string]: number + } +} + +/** @public */ +export type SerializedSchema = SerializedSchemaV1 | SerializedSchemaV2 + +export function upgradeSchema(schema: SerializedSchema): Result { + if (schema.schemaVersion > 2 || schema.schemaVersion < 1) return Result.err('Bad schema version') + if (schema.schemaVersion === 2) return Result.ok(schema as SerializedSchemaV2) + const result: SerializedSchemaV2 = { + schemaVersion: 2, + sequences: {}, + } + + for (const [typeName, recordVersion] of Object.entries(schema.recordVersions)) { + result.sequences[`com.tldraw.${typeName}`] = recordVersion.version + if ('subTypeKey' in recordVersion) { + for (const [subType, version] of Object.entries(recordVersion.subTypeVersions)) { + result.sequences[`com.tldraw.${typeName}.${subType}`] = version + } + } + } + return Result.ok(result) +} + /** @public */ export type StoreSchemaOptions = { - /** @public */ - snapshotMigrations?: Migrations + migrations?: MigrationSequence[] /** @public */ onValidationFailure?: (data: { error: unknown @@ -62,16 +100,30 @@ export class StoreSchema { return new StoreSchema(types as any, options ?? {}) } + readonly migrations: Record = {} + readonly sortedMigrations: readonly Migration[] + private constructor( public readonly types: { [Record in R as Record['typeName']]: RecordType }, private readonly options: StoreSchemaOptions - ) {} + ) { + for (const m of options.migrations ?? []) { + assert(!this.migrations[m.sequenceId], `Duplicate migration sequenceId ${m.sequenceId}`) + validateMigrations(m) + this.migrations[m.sequenceId] = m + } + const allMigrations = Object.values(this.migrations).flatMap((m) => m.sequence) + this.sortedMigrations = sortMigrations(allMigrations) - // eslint-disable-next-line no-restricted-syntax - get currentStoreVersion(): number { - return this.options.snapshotMigrations?.currentVersion ?? 0 + for (const migration of this.sortedMigrations) { + if (!migration.dependsOn?.length) continue + for (const dep of migration.dependsOn) { + const depMigration = allMigrations.find((m) => m.id === dep) + assert(depMigration, `Migration '${migration.id}' depends on missing migration '${dep}'`) + } + } } validateRecord( @@ -101,138 +153,151 @@ export class StoreSchema { } } + // TODO: use a weakmap to store the result of this function + public getMigrationsSince(persistedSchema: SerializedSchema): Result { + const upgradeResult = upgradeSchema(persistedSchema) + if (!upgradeResult.ok) { + return upgradeResult + } + const schema = upgradeResult.value + const sequenceIdsToInclude = new Set( + // start with any shared sequences + Object.keys(schema.sequences).filter((sequenceId) => this.migrations[sequenceId]) + ) + + // also include any sequences that are not in the persisted schema but are marked as postHoc + for (const sequenceId in this.migrations) { + if (schema.sequences[sequenceId] === undefined && this.migrations[sequenceId].retroactive) { + sequenceIdsToInclude.add(sequenceId) + } + } + + if (sequenceIdsToInclude.size === 0) { + return Result.ok([]) + } + + const allMigrationsToInclude = new Set() + for (const sequenceId of sequenceIdsToInclude) { + const theirVersion = schema.sequences[sequenceId] + if ( + (typeof theirVersion !== 'number' && this.migrations[sequenceId].retroactive) || + theirVersion === 0 + ) { + for (const migration of this.migrations[sequenceId].sequence) { + allMigrationsToInclude.add(migration.id) + } + continue + } + const theirVersionId = `${sequenceId}/${theirVersion}` + const idx = this.migrations[sequenceId].sequence.findIndex((m) => m.id === theirVersionId) + // todo: better error handling + if (idx === -1) { + return Result.err('Incompatible schema?') + } + for (const migration of this.migrations[sequenceId].sequence.slice(idx + 1)) { + allMigrationsToInclude.add(migration.id) + } + } + + // collect any migrations + return Result.ok(this.sortedMigrations.filter(({ id }) => allMigrationsToInclude.has(id))) + } + migratePersistedRecord( record: R, persistedSchema: SerializedSchema, direction: 'up' | 'down' = 'up' ): MigrationResult { - const ourType = getOwnProperty(this.types, record.typeName) - const persistedType = persistedSchema.recordVersions[record.typeName] - if (!persistedType || !ourType) { - return { type: 'error', reason: MigrationFailureReason.UnknownType } + const migrations = this.getMigrationsSince(persistedSchema) + if (!migrations.ok) { + // TODO: better error + console.error('Error migrating record', migrations.error) + return { type: 'error', reason: MigrationFailureReason.MigrationError } } - const ourVersion = ourType.migrations.currentVersion - const persistedVersion = persistedType.version - if (ourVersion !== persistedVersion) { - const result = - direction === 'up' - ? migrateRecord({ - record, - migrations: ourType.migrations, - fromVersion: persistedVersion, - toVersion: ourVersion, - }) - : migrateRecord({ - record, - migrations: ourType.migrations, - fromVersion: ourVersion, - toVersion: persistedVersion, - }) - if (result.type === 'error') { - return result - } - record = result.value - } - - if (!ourType.migrations.subTypeKey) { + let migrationsToApply = migrations.value + if (migrationsToApply.length === 0) { return { type: 'success', value: record } } - // we've handled the main version migration, now we need to handle subtypes - // subtypes are used by shape and asset types to migrate the props shape, which is configurable - // by library consumers. - - const ourSubTypeMigrations = - ourType.migrations.subTypeMigrations?.[ - record[ourType.migrations.subTypeKey as keyof R] as string - ] - - const persistedSubTypeVersion = - 'subTypeVersions' in persistedType - ? persistedType.subTypeVersions[record[ourType.migrations.subTypeKey as keyof R] as string] - : undefined - - // if ourSubTypeMigrations is undefined then we don't have access to the migrations for this subtype - // that is almost certainly because we are running on the server and this type was supplied by a 3rd party. - // It could also be that we are running in a client that is outdated. Either way, we can't migrate this record - // and we need to let the consumer know so they can handle it. - if (ourSubTypeMigrations === undefined) { - return { type: 'error', reason: MigrationFailureReason.UnrecognizedSubtype } + if (migrationsToApply.some((m) => m.scope === 'store')) { + return { + type: 'error', + reason: + direction === 'down' + ? MigrationFailureReason.TargetVersionTooOld + : MigrationFailureReason.TargetVersionTooNew, + } } - // if the persistedSubTypeVersion is undefined then the record was either created after the schema - // was persisted, or it was created in a different place to where the schema was persisted. - // either way we don't know what to do with it safely, so let's return failure. - if (persistedSubTypeVersion === undefined) { - return { type: 'error', reason: MigrationFailureReason.IncompatibleSubtype } + if (direction === 'down') { + if (!migrationsToApply.every((m) => m.down)) { + return { + type: 'error', + reason: MigrationFailureReason.TargetVersionTooOld, + } + } + migrationsToApply = migrationsToApply.slice().reverse() } - const result = - direction === 'up' - ? migrateRecord({ - record, - migrations: ourSubTypeMigrations, - fromVersion: persistedSubTypeVersion, - toVersion: ourSubTypeMigrations.currentVersion, - }) - : migrateRecord({ - record, - migrations: ourSubTypeMigrations, - fromVersion: ourSubTypeMigrations.currentVersion, - toVersion: persistedSubTypeVersion, - }) - - if (result.type === 'error') { - return result + record = structuredClone(record) + try { + for (const migration of migrationsToApply) { + if (migration.scope === 'store') throw new Error(/* won't happen, just for TS */) + const shouldApply = migration.filter ? migration.filter(record) : true + if (!shouldApply) continue + const result = migration[direction]!(record) + if (result) { + record = structuredClone(result) as any + } + } + } catch (e) { + console.error('Error migrating record', e) + return { type: 'error', reason: MigrationFailureReason.MigrationError } } - return { type: 'success', value: result.value } + return { type: 'success', value: record } } migrateStoreSnapshot(snapshot: StoreSnapshot): MigrationResult> { let { store } = snapshot - - const migrations = this.options.snapshotMigrations - if (!migrations) { + const migrations = this.getMigrationsSince(snapshot.schema) + if (!migrations.ok) { + // TODO: better error + console.error('Error migrating store', migrations.error) + return { type: 'error', reason: MigrationFailureReason.MigrationError } + } + const migrationsToApply = migrations.value + if (migrationsToApply.length === 0) { return { type: 'success', value: store } } - // apply store migrations first - const ourStoreVersion = migrations.currentVersion - const persistedStoreVersion = snapshot.schema.storeVersion ?? 0 - if (ourStoreVersion < persistedStoreVersion) { - return { type: 'error', reason: MigrationFailureReason.TargetVersionTooOld } - } + store = structuredClone(store) - if (ourStoreVersion > persistedStoreVersion) { - const result = migrate>({ - value: store, - migrations, - fromVersion: persistedStoreVersion, - toVersion: ourStoreVersion, - }) - - if (result.type === 'error') { - return result + try { + for (const migration of migrationsToApply) { + if (migration.scope === 'record') { + for (const [id, record] of Object.entries(store)) { + const shouldApply = migration.filter ? migration.filter(record as UnknownRecord) : true + if (!shouldApply) continue + const result = migration.up!(record as any) + if (result) { + store[id as keyof typeof store] = structuredClone(result) as any + } + } + } else if (migration.scope === 'store') { + const result = migration.up!(store) + if (result) { + store = structuredClone(result) as any + } + } else { + exhaustiveSwitchError(migration) + } } - store = result.value + } catch (e) { + console.error('Error migrating store', e) + return { type: 'error', reason: MigrationFailureReason.MigrationError } } - const updated: R[] = [] - for (const r of objectMapValues(store)) { - const result = this.migratePersistedRecord(r, snapshot.schema) - if (result.type === 'error') { - return result - } else if (result.value && result.value !== r) { - updated.push(result.value) - } - } - if (updated.length) { - store = { ...store } - for (const r of updated) { - store[r.id as IdOf] = r - } - } return { type: 'success', value: store } } @@ -241,58 +306,26 @@ export class StoreSchema { return this.options.createIntegrityChecker?.(store) ?? undefined } - serialize(): SerializedSchema { + serialize(): SerializedSchemaV2 { return { - schemaVersion: 1, - storeVersion: this.options.snapshotMigrations?.currentVersion ?? 0, - recordVersions: Object.fromEntries( - objectMapValues(this.types).map((type) => [ - type.typeName, - type.migrations.subTypeKey && type.migrations.subTypeMigrations - ? { - version: type.migrations.currentVersion, - subTypeKey: type.migrations.subTypeKey, - subTypeVersions: type.migrations.subTypeMigrations - ? Object.fromEntries( - Object.entries(type.migrations.subTypeMigrations).map(([k, v]) => [ - k, - v.currentVersion, - ]) - ) - : undefined, - } - : { - version: type.migrations.currentVersion, - }, + schemaVersion: 2, + sequences: Object.fromEntries( + Object.values(this.migrations).map(({ sequenceId, sequence }) => [ + sequenceId, + sequence.length ? parseMigrationId(sequence.at(-1)!.id).version : 0, ]) ), } } + /** + * @deprecated This is only here for legacy reasons, don't use it unless you have david's blessing! + */ serializeEarliestVersion(): SerializedSchema { return { - schemaVersion: 1, - storeVersion: this.options.snapshotMigrations?.firstVersion ?? 0, - recordVersions: Object.fromEntries( - objectMapValues(this.types).map((type) => [ - type.typeName, - type.migrations.subTypeKey && type.migrations.subTypeMigrations - ? { - version: type.migrations.firstVersion, - subTypeKey: type.migrations.subTypeKey, - subTypeVersions: type.migrations.subTypeMigrations - ? Object.fromEntries( - Object.entries(type.migrations.subTypeMigrations).map(([k, v]) => [ - k, - v.firstVersion, - ]) - ) - : undefined, - } - : { - version: type.migrations.firstVersion, - }, - ]) + schemaVersion: 2, + sequences: Object.fromEntries( + Object.values(this.migrations).map(({ sequenceId }) => [sequenceId, 0]) ), } } diff --git a/packages/store/src/lib/compareSchemas.ts b/packages/store/src/lib/compareSchemas.ts deleted file mode 100644 index dfb115837..000000000 --- a/packages/store/src/lib/compareSchemas.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { SerializedSchema } from './StoreSchema' - -/** @public */ -export const compareSchemas = (a: SerializedSchema, b: SerializedSchema): 0 | 1 | -1 => { - if (a.schemaVersion > b.schemaVersion) { - return 1 - } - if (a.schemaVersion < b.schemaVersion) { - return -1 - } - if (a.storeVersion > b.storeVersion) { - return 1 - } - if (a.storeVersion < b.storeVersion) { - return -1 - } - for (const key of Object.keys(a.recordVersions)) { - const aRecordVersion = a.recordVersions[key] - const bRecordVersion = b.recordVersions[key] - if (aRecordVersion.version > bRecordVersion.version) { - return 1 - } - if (aRecordVersion.version < bRecordVersion.version) { - return -1 - } - if ('subTypeVersions' in aRecordVersion && !('subTypeVersions' in bRecordVersion)) { - // todo: this assumes that subtypes were added in an up migration rather than removed. We should probably - // make sure that in either case the parent version is bumped - return 1 - } - - if (!('subTypeVersions' in aRecordVersion) && 'subTypeVersions' in bRecordVersion) { - // todo: this assumes that subtypes were added in an up migration rather than removed. We should probably - // make sure that in either case the parent version is bumped - return -1 - } - - if (!('subTypeVersions' in aRecordVersion) || !('subTypeVersions' in bRecordVersion)) { - // this will never happen - continue - } - - for (const subType of Object.keys(aRecordVersion.subTypeVersions)) { - const aSubTypeVersion = aRecordVersion.subTypeVersions[subType] - const bSubTypeVersion = bRecordVersion.subTypeVersions[subType] - if (aSubTypeVersion > bSubTypeVersion) { - return 1 - } - if (aSubTypeVersion < bSubTypeVersion) { - return -1 - } - } - } - return 0 -} diff --git a/packages/store/src/lib/migrate.ts b/packages/store/src/lib/migrate.ts index ba1c7ff83..95dc30c7e 100644 --- a/packages/store/src/lib/migrate.ts +++ b/packages/store/src/lib/migrate.ts @@ -1,26 +1,27 @@ -import { UnknownRecord, isRecord } from './BaseRecord' -import { SerializedSchema } from './StoreSchema' +import { assert, objectMapEntries } from '@tldraw/utils' +import { UnknownRecord } from './BaseRecord' +import { SerializedStore } from './Store' -type EMPTY_SYMBOL = symbol +let didWarn = false -/** @public */ -export function defineMigrations< - FirstVersion extends number | EMPTY_SYMBOL = EMPTY_SYMBOL, - CurrentVersion extends Exclude | EMPTY_SYMBOL = EMPTY_SYMBOL, ->(opts: { - firstVersion?: CurrentVersion extends number ? FirstVersion : never - currentVersion?: CurrentVersion - migrators?: CurrentVersion extends number - ? FirstVersion extends number - ? CurrentVersion extends FirstVersion - ? { [version in Exclude, 0>]: Migration } - : { [version in Exclude, FirstVersion>]: Migration } - : { [version in Exclude, 0>]: Migration } - : never +/** + * @public + * @deprecated use `createShapePropsMigrationSequence` instead. See [the docs](https://tldraw.dev/docs/persistence#Updating-legacy-shape-migrations-defineMigrations) for how to migrate. + */ +export function defineMigrations(opts: { + firstVersion?: number + currentVersion?: number + migrators?: Record subTypeKey?: string - subTypeMigrations?: Record -}): Migrations { + subTypeMigrations?: Record +}): LegacyMigrations { const { currentVersion, firstVersion, migrators = {}, subTypeKey, subTypeMigrations } = opts + if (!didWarn) { + console.warn( + `The 'defineMigrations' function is deprecated and will be removed in a future release. Use the new migrations API instead. See the migration guide for more info: https://tldraw.dev/docs/persistence#Updating-legacy-shape-migrations-defineMigrations` + ) + didWarn = true + } // Some basic guards against impossible version combinations, some of which will be caught by TypeScript if (typeof currentVersion === 'number' && typeof firstVersion === 'number') { @@ -40,22 +41,236 @@ export function defineMigrations< } } +function squashDependsOn(sequence: Array): Migration[] { + const result: Migration[] = [] + for (let i = sequence.length - 1; i >= 0; i--) { + const elem = sequence[i] + if (!('id' in elem)) { + const dependsOn = elem.dependsOn + const prev = result[0] + if (prev) { + result[0] = { + ...prev, + dependsOn: dependsOn.concat(prev.dependsOn ?? []), + } + } + } else { + result.unshift(elem) + } + } + return result +} + +/** + * Creates a migration sequence. + * See the [migration guide](https://tldraw.dev/docs/persistence#Migrations) for more info on how to use this API. + * @public + */ +export function createMigrationSequence({ + sequence, + sequenceId, + retroactive = true, +}: { + sequenceId: string + retroactive?: boolean + sequence: Array +}): MigrationSequence { + const migrations: MigrationSequence = { + sequenceId, + retroactive, + sequence: squashDependsOn(sequence), + } + validateMigrations(migrations) + return migrations +} + +/** + * Creates a named set of migration ids given a named set of version numbers and a sequence id. + * + * See the [migration guide](https://tldraw.dev/docs/persistence#Migrations) for more info on how to use this API. + * @public + * @public + */ +export function createMigrationIds>( + sequenceId: ID, + versions: Versions +): { [K in keyof Versions]: `${ID}/${Versions[K]}` } { + return Object.fromEntries( + objectMapEntries(versions).map(([key, version]) => [key, `${sequenceId}/${version}`] as const) + ) as any +} + +/** @internal */ +export function createRecordMigrationSequence(opts: { + recordType: string + filter?: (record: UnknownRecord) => boolean + retroactive?: boolean + sequenceId: string + sequence: Omit, 'scope'>[] +}): MigrationSequence { + const sequenceId = opts.sequenceId + return createMigrationSequence({ + sequenceId, + retroactive: opts.retroactive ?? true, + sequence: opts.sequence.map((m) => + 'id' in m + ? { + ...m, + scope: 'record', + filter: (r: UnknownRecord) => + r.typeName === opts.recordType && + (m.filter?.(r) ?? true) && + (opts.filter?.(r) ?? true), + } + : m + ), + }) +} + /** @public */ -export type Migration = { +export type LegacyMigration = { up: (oldState: Before) => After down: (newState: After) => Before } -interface BaseMigrationsInfo { - firstVersion: number - currentVersion: number - migrators: { [version: number]: Migration } +/** @public */ +export type MigrationId = `${string}/${number}` + +export type StandaloneDependsOn = { + readonly dependsOn: readonly MigrationId[] } /** @public */ -export interface Migrations extends BaseMigrationsInfo { +export type Migration = { + readonly id: MigrationId + readonly dependsOn?: readonly MigrationId[] | undefined +} & ( + | { + readonly scope: 'record' + readonly filter?: (record: UnknownRecord) => boolean + readonly up: (oldState: UnknownRecord) => void | UnknownRecord + readonly down?: (newState: UnknownRecord) => void | UnknownRecord + } + | { + readonly scope: 'store' + readonly up: ( + oldState: SerializedStore + ) => void | SerializedStore + readonly down?: ( + newState: SerializedStore + ) => void | SerializedStore + } +) + +interface LegacyBaseMigrationsInfo { + firstVersion: number + currentVersion: number + migrators: { [version: number]: LegacyMigration } +} + +/** @public */ +export interface LegacyMigrations extends LegacyBaseMigrationsInfo { subTypeKey?: string - subTypeMigrations?: Record + subTypeMigrations?: Record +} + +/** @public */ +export interface MigrationSequence { + sequenceId: string + /** + * retroactive should be true if the migrations should be applied to snapshots that were created before + * this migration sequence was added to the schema. + * + * In general: + * + * - retroactive should be true when app developers create their own new migration sequences. + * - retroactive should be false when library developers ship a migration sequence. When you install a library for the first time, any migrations that were added in the library before that point should generally _not_ be applied to your existing data. + */ + retroactive: boolean + sequence: Migration[] +} + +export function sortMigrations(migrations: Migration[]): Migration[] { + // we do a topological sort using dependsOn and implicit dependencies between migrations in the same sequence + const byId = new Map(migrations.map((m) => [m.id, m])) + const isProcessing = new Set() + + const result: Migration[] = [] + + function process(m: Migration) { + assert(!isProcessing.has(m.id), `Circular dependency in migrations: ${m.id}`) + isProcessing.add(m.id) + + const { version, sequenceId } = parseMigrationId(m.id) + const parent = byId.get(`${sequenceId}/${version - 1}`) + if (parent) { + process(parent) + } + + if (m.dependsOn) { + for (const dep of m.dependsOn) { + const depMigration = byId.get(dep) + if (depMigration) { + process(depMigration) + } + } + } + + byId.delete(m.id) + result.push(m) + } + + for (const m of byId.values()) { + process(m) + } + + return result +} + +/** @internal */ +export function parseMigrationId(id: MigrationId): { sequenceId: string; version: number } { + const [sequenceId, version] = id.split('/') + return { sequenceId, version: parseInt(version) } +} + +function validateMigrationId(id: string, expectedSequenceId?: string) { + if (expectedSequenceId) { + assert( + id.startsWith(expectedSequenceId + '/'), + `Every migration in sequence '${expectedSequenceId}' must have an id starting with '${expectedSequenceId}/'. Got invalid id: '${id}'` + ) + } + + assert(id.match(/^(.*?)\/(0|[1-9]\d*)$/), `Invalid migration id: '${id}'`) +} + +export function validateMigrations(migrations: MigrationSequence) { + assert( + !migrations.sequenceId.includes('/'), + `sequenceId cannot contain a '/', got ${migrations.sequenceId}` + ) + assert(migrations.sequenceId.length, 'sequenceId must be a non-empty string') + + if (migrations.sequence.length === 0) { + return + } + + validateMigrationId(migrations.sequence[0].id, migrations.sequenceId) + let n = parseMigrationId(migrations.sequence[0].id).version + assert( + n === 1, + `Expected the first migrationId to be '${migrations.sequenceId}/1' but got '${migrations.sequence[0].id}'` + ) + for (let i = 1; i < migrations.sequence.length; i++) { + const id = migrations.sequence[i].id + validateMigrationId(id, migrations.sequenceId) + const m = parseMigrationId(id).version + assert( + m === n + 1, + `Migration id numbers must increase in increments of 1, expected ${migrations.sequenceId}/${n + 1} but got '${migrations.sequence[i].id}'` + ) + n = m + } } /** @public */ @@ -72,246 +287,3 @@ export enum MigrationFailureReason { MigrationError = 'migration-error', UnrecognizedSubtype = 'unrecognized-subtype', } - -/** @public */ -export type RecordVersion = { rootVersion: number; subTypeVersion?: number } -/** @public */ -export function getRecordVersion( - record: UnknownRecord, - serializedSchema: SerializedSchema -): RecordVersion { - const persistedType = serializedSchema.recordVersions[record.typeName] - if (!persistedType) { - return { rootVersion: 0 } - } - if ('subTypeKey' in persistedType) { - const subType = record[persistedType.subTypeKey as keyof typeof record] - const subTypeVersion = persistedType.subTypeVersions[subType] - return { rootVersion: persistedType.version, subTypeVersion } - } - return { rootVersion: persistedType.version } -} - -/** @public */ -export function compareRecordVersions(a: RecordVersion, b: RecordVersion) { - if (a.rootVersion > b.rootVersion) { - return 1 - } - if (a.rootVersion < b.rootVersion) { - return -1 - } - if (a.subTypeVersion != null && b.subTypeVersion != null) { - if (a.subTypeVersion > b.subTypeVersion) { - return 1 - } - if (a.subTypeVersion < b.subTypeVersion) { - return -1 - } - } - return 0 -} - -/** @public */ -export function migrateRecord({ - record, - migrations, - fromVersion, - toVersion, -}: { - record: unknown - migrations: Migrations - fromVersion: number - toVersion: number -}): MigrationResult { - let currentVersion = fromVersion - if (!isRecord(record)) throw new Error('[migrateRecord] object is not a record') - const { typeName, id, ...others } = record - let recordWithoutMeta = others - - while (currentVersion < toVersion) { - const nextVersion = currentVersion + 1 - const migrator = migrations.migrators[nextVersion] - if (!migrator) { - return { - type: 'error', - reason: MigrationFailureReason.TargetVersionTooNew, - } - } - recordWithoutMeta = migrator.up(recordWithoutMeta) as any - currentVersion = nextVersion - } - - while (currentVersion > toVersion) { - const nextVersion = currentVersion - 1 - const migrator = migrations.migrators[currentVersion] - if (!migrator) { - return { - type: 'error', - reason: MigrationFailureReason.TargetVersionTooOld, - } - } - recordWithoutMeta = migrator.down(recordWithoutMeta) as any - currentVersion = nextVersion - } - - return { - type: 'success', - value: { ...recordWithoutMeta, id, typeName } as any, - } -} - -/** @public */ -export function migrate({ - value, - migrations, - fromVersion, - toVersion, -}: { - value: unknown - migrations: Migrations - fromVersion: number - toVersion: number -}): MigrationResult { - let currentVersion = fromVersion - - while (currentVersion < toVersion) { - const nextVersion = currentVersion + 1 - const migrator = migrations.migrators[nextVersion] - if (!migrator) { - return { - type: 'error', - reason: MigrationFailureReason.TargetVersionTooNew, - } - } - value = migrator.up(value) - currentVersion = nextVersion - } - - while (currentVersion > toVersion) { - const nextVersion = currentVersion - 1 - const migrator = migrations.migrators[currentVersion] - if (!migrator) { - return { - type: 'error', - reason: MigrationFailureReason.TargetVersionTooOld, - } - } - value = migrator.down(value) - currentVersion = nextVersion - } - - return { - type: 'success', - value: value as T, - } -} - -type Range = To extends From - ? From - : To | Range> - -type Decrement = n extends 0 - ? never - : n extends 1 - ? 0 - : n extends 2 - ? 1 - : n extends 3 - ? 2 - : n extends 4 - ? 3 - : n extends 5 - ? 4 - : n extends 6 - ? 5 - : n extends 7 - ? 6 - : n extends 8 - ? 7 - : n extends 9 - ? 8 - : n extends 10 - ? 9 - : n extends 11 - ? 10 - : n extends 12 - ? 11 - : n extends 13 - ? 12 - : n extends 14 - ? 13 - : n extends 15 - ? 14 - : n extends 16 - ? 15 - : n extends 17 - ? 16 - : n extends 18 - ? 17 - : n extends 19 - ? 18 - : n extends 20 - ? 19 - : n extends 21 - ? 20 - : n extends 22 - ? 21 - : n extends 23 - ? 22 - : n extends 24 - ? 23 - : n extends 25 - ? 24 - : n extends 26 - ? 25 - : n extends 27 - ? 26 - : n extends 28 - ? 27 - : n extends 29 - ? 28 - : n extends 30 - ? 29 - : n extends 31 - ? 30 - : n extends 32 - ? 31 - : n extends 33 - ? 32 - : n extends 34 - ? 33 - : n extends 35 - ? 34 - : n extends 36 - ? 35 - : n extends 37 - ? 36 - : n extends 38 - ? 37 - : n extends 39 - ? 38 - : n extends 40 - ? 39 - : n extends 41 - ? 40 - : n extends 42 - ? 41 - : n extends 43 - ? 42 - : n extends 44 - ? 43 - : n extends 45 - ? 44 - : n extends 46 - ? 45 - : n extends 47 - ? 46 - : n extends 48 - ? 47 - : n extends 49 - ? 48 - : n extends 50 - ? 49 - : n extends 51 - ? 50 - : never diff --git a/packages/store/src/lib/test/compareSchemas.test.ts b/packages/store/src/lib/test/compareSchemas.test.ts deleted file mode 100644 index 52592afdb..000000000 --- a/packages/store/src/lib/test/compareSchemas.test.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { compareSchemas } from '../compareSchemas' -import { testSchemaV0 } from './testSchema.v0' -import { testSchemaV1 } from './testSchema.v1' - -describe('compareSchemas', () => { - it('returns 0 for identical schemas', () => { - expect(compareSchemas(testSchemaV0.serialize(), testSchemaV0.serialize())).toBe(0) - expect( - compareSchemas(JSON.parse(JSON.stringify(testSchemaV0.serialize())), testSchemaV0.serialize()) - ).toBe(0) - expect( - compareSchemas(testSchemaV0.serialize(), JSON.parse(JSON.stringify(testSchemaV0.serialize()))) - ).toBe(0) - expect( - compareSchemas( - JSON.parse(JSON.stringify(testSchemaV0.serialize())), - JSON.parse(JSON.stringify(testSchemaV0.serialize())) - ) - ).toBe(0) - }) - - it('returns 1 when the left schema is later than the right schema', () => { - expect( - compareSchemas(JSON.parse(JSON.stringify(testSchemaV1.serialize())), testSchemaV0.serialize()) - ).toBe(1) - expect( - compareSchemas(testSchemaV1.serialize(), JSON.parse(JSON.stringify(testSchemaV0.serialize()))) - ).toBe(1) - expect( - compareSchemas( - JSON.parse(JSON.stringify(testSchemaV1.serialize())), - JSON.parse(JSON.stringify(testSchemaV0.serialize())) - ) - ).toBe(1) - }) - - it('returns -1 when the left schema is earlier than the right schema', () => { - expect( - compareSchemas(JSON.parse(JSON.stringify(testSchemaV0.serialize())), testSchemaV1.serialize()) - ).toBe(-1) - expect( - compareSchemas(testSchemaV0.serialize(), JSON.parse(JSON.stringify(testSchemaV1.serialize()))) - ).toBe(-1) - expect( - compareSchemas( - JSON.parse(JSON.stringify(testSchemaV0.serialize())), - JSON.parse(JSON.stringify(testSchemaV1.serialize())) - ) - ).toBe(-1) - }) - - it('works when a record version was updated', () => { - const schema = testSchemaV0.serialize() - schema.recordVersions.shape.version++ - expect(compareSchemas(schema, testSchemaV0.serialize())).toBe(1) - expect(compareSchemas(testSchemaV0.serialize(), schema)).toBe(-1) - }) - it('works when a record subtype was updated', () => { - const schema = testSchemaV0.serialize() - if ('subTypeVersions' in schema.recordVersions.shape) { - schema.recordVersions.shape.subTypeVersions.rectangle++ - } - expect(compareSchemas(schema, testSchemaV0.serialize())).toBe(1) - expect(compareSchemas(testSchemaV0.serialize(), schema)).toBe(-1) - }) - it('works when the schema format version is updated', () => { - const schema = testSchemaV0.serialize() - schema.schemaVersion++ - expect(compareSchemas(schema, testSchemaV0.serialize())).toBe(1) - expect(compareSchemas(testSchemaV0.serialize(), schema)).toBe(-1) - }) - it('works when the store version is updated', () => { - const schema = testSchemaV0.serialize() - schema.storeVersion++ - expect(compareSchemas(schema, testSchemaV0.serialize())).toBe(1) - expect(compareSchemas(testSchemaV0.serialize(), schema)).toBe(-1) - }) -}) diff --git a/packages/store/src/lib/test/createMigrations.test.ts b/packages/store/src/lib/test/createMigrations.test.ts new file mode 100644 index 000000000..df2ef321c --- /dev/null +++ b/packages/store/src/lib/test/createMigrations.test.ts @@ -0,0 +1,75 @@ +import { createMigrationSequence } from '../migrate' + +describe(createMigrationSequence, () => { + it('allows dependsOn to be deferred', () => { + expect( + createMigrationSequence({ + sequenceId: 'foo', + retroactive: false, + sequence: [{ dependsOn: ['bar/1'] }], + }).sequence.length + ).toBe(0) + + const result = createMigrationSequence({ + sequenceId: 'foo', + retroactive: false, + sequence: [ + { + id: 'foo/1', + scope: 'record', + up() { + // noop + }, + }, + { dependsOn: ['bar/1'] }, + ], + }) + + expect(result.sequence.length).toBe(1) + expect(result.sequence[0].dependsOn?.length).toBeFalsy() + + const result2 = createMigrationSequence({ + sequenceId: 'foo', + retroactive: false, + sequence: [ + { dependsOn: ['bar/1'] }, + { + id: 'foo/1', + scope: 'record', + up() { + // noop + }, + }, + ], + }) + + expect(result2.sequence.length).toBe(1) + expect(result2.sequence[0].dependsOn).toEqual(['bar/1']) + + const result3 = createMigrationSequence({ + sequenceId: 'foo', + retroactive: false, + sequence: [ + { + id: 'foo/1', + scope: 'record', + up() { + // noop + }, + }, + { dependsOn: ['bar/1'] }, + { + id: 'foo/2', + scope: 'record', + up() { + // noop + }, + }, + ], + }) + + expect(result3.sequence.length).toBe(2) + expect(result3.sequence[0].dependsOn?.length).toBeFalsy() + expect(result3.sequence[1].dependsOn).toEqual(['bar/1']) + }) +}) diff --git a/packages/store/src/lib/test/defineMigrations.test.ts b/packages/store/src/lib/test/defineMigrations.test.ts index 992047d3b..e63ef2dbb 100644 --- a/packages/store/src/lib/test/defineMigrations.test.ts +++ b/packages/store/src/lib/test/defineMigrations.test.ts @@ -11,32 +11,32 @@ describe('define migrations tests', () => { it('defines migrations', () => { expect(() => { // no versions + // eslint-disable-next-line deprecation/deprecation defineMigrations({ - // @ts-expect-error first version without current version firstVersion: Versions.Initial, }) }).not.toThrow() expect(() => { // no versions + // eslint-disable-next-line deprecation/deprecation defineMigrations({ - // @ts-expect-error first version without current version firstVersion: Versions.February, }) }).not.toThrow() expect(() => { // empty migrators + // eslint-disable-next-line deprecation/deprecation defineMigrations({ - // @ts-expect-error migrators: {}, }) }).not.toThrow() expect(() => { // no versions! + // eslint-disable-next-line deprecation/deprecation defineMigrations({ - // @ts-expect-error migrators: { [Versions.February]: { up: (rec: any) => rec, @@ -48,10 +48,10 @@ describe('define migrations tests', () => { expect(() => { // wrong current version! + // eslint-disable-next-line deprecation/deprecation defineMigrations({ currentVersion: Versions.January, migrators: { - // @ts-expect-error [Versions.February]: { up: (rec: any) => rec, down: (rec: any) => rec, @@ -61,6 +61,7 @@ describe('define migrations tests', () => { }).not.toThrow() expect(() => { + // eslint-disable-next-line deprecation/deprecation defineMigrations({ currentVersion: Versions.February, migrators: { @@ -80,16 +81,16 @@ describe('define migrations tests', () => { expect(() => { // can't provide only first version + // eslint-disable-next-line deprecation/deprecation defineMigrations({ - // @ts-expect-error first version without current version firstVersion: Versions.January, - // @ts-expect-error migrators without current version migrators: {}, }) }).not.toThrow() expect(() => { // same version + // eslint-disable-next-line deprecation/deprecation defineMigrations({ firstVersion: Versions.Initial, currentVersion: Versions.Initial, @@ -99,26 +100,26 @@ describe('define migrations tests', () => { expect(() => { // only first version + // eslint-disable-next-line deprecation/deprecation defineMigrations({ - // @ts-expect-error firstVersion: Versions.January, - // @ts-expect-error migrators: {}, }) }).not.toThrow() expect(() => { // missing only version + // eslint-disable-next-line deprecation/deprecation defineMigrations({ firstVersion: Versions.January, currentVersion: Versions.January, - // @ts-expect-error migrators: {}, }) }).toThrow() expect(() => { // only version, explicit start and current + // eslint-disable-next-line deprecation/deprecation defineMigrations({ firstVersion: Versions.January, currentVersion: Versions.January, @@ -133,20 +134,20 @@ describe('define migrations tests', () => { expect(() => { // missing later versions + // eslint-disable-next-line deprecation/deprecation defineMigrations({ firstVersion: Versions.January, currentVersion: Versions.February, - // @ts-expect-error migrators: {}, }) }).not.toThrow() expect(() => { // missing later versions + // eslint-disable-next-line deprecation/deprecation defineMigrations({ firstVersion: Versions.Initial, currentVersion: Versions.February, - // @ts-expect-error migrators: { [Versions.January]: { up: (rec: any) => rec, @@ -158,10 +159,10 @@ describe('define migrations tests', () => { expect(() => { // missing earlier versions + // eslint-disable-next-line deprecation/deprecation defineMigrations({ firstVersion: Versions.Initial, currentVersion: Versions.February, - // @ts-expect-error migrators: { [Versions.February]: { up: (rec: any) => rec, @@ -173,6 +174,7 @@ describe('define migrations tests', () => { expect(() => { // got em all + // eslint-disable-next-line deprecation/deprecation defineMigrations({ firstVersion: Versions.Initial, currentVersion: Versions.February, @@ -191,6 +193,7 @@ describe('define migrations tests', () => { expect(() => { // got em all starting later + // eslint-disable-next-line deprecation/deprecation defineMigrations({ firstVersion: Versions.January, currentVersion: Versions.March, @@ -209,11 +212,11 @@ describe('define migrations tests', () => { expect(() => { // first migration should be first version + 1 + // eslint-disable-next-line deprecation/deprecation defineMigrations({ firstVersion: Versions.February, currentVersion: Versions.March, migrators: { - // @ts-expect-error [Versions.February]: { up: (rec: any) => rec, down: (rec: any) => rec, diff --git a/packages/store/src/lib/test/dependsOn.test.ts b/packages/store/src/lib/test/dependsOn.test.ts new file mode 100644 index 000000000..46ff970aa --- /dev/null +++ b/packages/store/src/lib/test/dependsOn.test.ts @@ -0,0 +1,166 @@ +import { StoreSchema } from '../StoreSchema' +import { MigrationSequence, createMigrationSequence } from '../migrate' + +describe('dependsOn', () => { + it('requires the depended on ids to be present', () => { + expect(() => { + StoreSchema.create( + {}, + { + migrations: [ + { + sequenceId: 'foo', + retroactive: false, + sequence: [ + { + id: 'foo/1', + dependsOn: ['bar/1'], + scope: 'record', + up() { + // noop + }, + }, + ], + }, + ], + } + ) + }).toThrowErrorMatchingInlineSnapshot( + `"Migration 'foo/1' depends on missing migration 'bar/1'"` + ) + }) + + it('makes sure the migrations are sorted', () => { + const foo: MigrationSequence = { + sequenceId: 'foo', + retroactive: false, + sequence: [ + { + id: 'foo/1', + dependsOn: ['bar/1'], + scope: 'record', + up() { + // noop + }, + }, + ], + } + const bar: MigrationSequence = { + sequenceId: 'bar', + retroactive: false, + sequence: [ + { + id: 'bar/1', + scope: 'record', + up() { + // noop + }, + }, + ], + } + const s = StoreSchema.create( + {}, + { + migrations: [foo, bar], + } + ) + const s2 = StoreSchema.create( + {}, + { + migrations: [bar, foo], + } + ) + + expect(s.sortedMigrations.map((s) => s.id)).toMatchInlineSnapshot(` + [ + "bar/1", + "foo/1", + ] + `) + expect(s2.sortedMigrations).toEqual(s.sortedMigrations) + }) +}) + +describe('standalone dependsOn', () => { + it('requires the depended on ids to be present', () => { + expect(() => { + StoreSchema.create( + {}, + { + migrations: [ + createMigrationSequence({ + sequenceId: 'foo', + retroactive: false, + sequence: [ + { + dependsOn: ['bar/1'], + }, + { + id: 'foo/1', + scope: 'record', + up() { + // noop + }, + }, + ], + }), + ], + } + ) + }).toThrowErrorMatchingInlineSnapshot( + `"Migration 'foo/1' depends on missing migration 'bar/1'"` + ) + }) + + it('makes sure the migrations are sorted', () => { + const foo: MigrationSequence = createMigrationSequence({ + sequenceId: 'foo', + retroactive: false, + sequence: [ + { + dependsOn: ['bar/1'], + }, + { + id: 'foo/1', + scope: 'record', + up() { + // noop + }, + }, + ], + }) + const bar: MigrationSequence = createMigrationSequence({ + sequenceId: 'bar', + retroactive: false, + sequence: [ + { + id: 'bar/1', + scope: 'record', + up() { + // noop + }, + }, + ], + }) + const s = StoreSchema.create( + {}, + { + migrations: [foo, bar], + } + ) + const s2 = StoreSchema.create( + {}, + { + migrations: [bar, foo], + } + ) + + expect(s.sortedMigrations.map((s) => s.id)).toMatchInlineSnapshot(` + [ + "bar/1", + "foo/1", + ] + `) + expect(s2.sortedMigrations).toEqual(s.sortedMigrations) + }) +}) diff --git a/packages/store/src/lib/test/getMigrationsSince.test.ts b/packages/store/src/lib/test/getMigrationsSince.test.ts new file mode 100644 index 000000000..dc29293f6 --- /dev/null +++ b/packages/store/src/lib/test/getMigrationsSince.test.ts @@ -0,0 +1,121 @@ +import { SerializedSchemaV2, StoreSchema } from '../StoreSchema' +import { MigrationSequence } from '../migrate' + +const mockSequence = ({ + id, + retroactive, + versions, +}: { + id: string + retroactive: boolean + versions: number +}) => + ({ + sequenceId: id, + retroactive, + sequence: new Array(versions).fill(0).map((_, i) => ({ + id: `${id}/${i + 1}`, + scope: 'record', + up() { + // noop + }, + })), + }) satisfies MigrationSequence + +function getMigrationsBetween( + serialized: SerializedSchemaV2['sequences'], + current: MigrationSequence[] +) { + const schema = StoreSchema.create({}, { migrations: current }) + const ms = schema.getMigrationsSince({ schemaVersion: 2, sequences: serialized }) + if (!ms.ok) { + throw new Error('Expected migrations to be found') + } + return ms.value.map((m) => m.id) +} + +describe('getMigrationsSince', () => { + it('includes migrations from new migration sequences with retroactive: true', () => { + const foo = mockSequence({ id: 'foo', retroactive: true, versions: 2 }) + const bar = mockSequence({ id: 'bar', retroactive: true, versions: 3 }) + + const ids = getMigrationsBetween({}, [foo, bar]) + const foos = ids.filter((id) => id.startsWith('foo')) + const bars = ids.filter((id) => id.startsWith('bar')) + + expect(foos).toEqual(['foo/1', 'foo/2']) + expect(bars).toEqual(['bar/1', 'bar/2', 'bar/3']) + }) + + it('does not include migrations from new migration sequences with retroactive: false', () => { + const foo = mockSequence({ id: 'foo', retroactive: true, versions: 2 }) + const bar = mockSequence({ id: 'bar', retroactive: false, versions: 3 }) + + const ids = getMigrationsBetween({}, [foo, bar]) + const foos = ids.filter((id) => id.startsWith('foo')) + const bars = ids.filter((id) => id.startsWith('bar')) + + expect(foos).toEqual(['foo/1', 'foo/2']) + expect(bars).toEqual([]) + }) + + it('returns the empty array if there are no overlapping sequences and new ones are retroactive: false', () => { + const foo = mockSequence({ id: 'foo', retroactive: false, versions: 2 }) + const bar = mockSequence({ id: 'bar', retroactive: false, versions: 3 }) + + const ids = getMigrationsBetween({}, [foo, bar]) + expect(ids).toEqual([]) + }) + + it('if a sequence is present both before and now, unapplied migrations will be returned', () => { + const foo = mockSequence({ id: 'foo', retroactive: true, versions: 2 }) + const bar = mockSequence({ id: 'bar', retroactive: false, versions: 3 }) + const ids = getMigrationsBetween({ foo: 1, bar: 1 }, [foo, bar]) + + const foos = ids.filter((id) => id.startsWith('foo')) + const bars = ids.filter((id) => id.startsWith('bar')) + + expect(foos).toEqual(['foo/2']) + expect(bars).toEqual(['bar/2', 'bar/3']) + }) + + it('if a sequence has not changed the empty array will be returned', () => { + const foo = mockSequence({ id: 'foo', retroactive: true, versions: 2 }) + const bar = mockSequence({ id: 'bar', retroactive: false, versions: 3 }) + const ids = getMigrationsBetween({ foo: 2, bar: 3 }, [foo, bar]) + + expect(ids).toEqual([]) + }) + + it('if a sequence starts with 0 all unapplied migrations will be returned', () => { + const foo = mockSequence({ id: 'foo', retroactive: true, versions: 2 }) + const bar = mockSequence({ id: 'bar', retroactive: false, versions: 3 }) + + const ids = getMigrationsBetween( + { + foo: 0, + bar: 0, + }, + [foo, bar] + ) + const foos = ids.filter((id) => id.startsWith('foo')) + const bars = ids.filter((id) => id.startsWith('bar')) + + expect(foos).toEqual(['foo/1', 'foo/2']) + expect(bars).toEqual(['bar/1', 'bar/2', 'bar/3']) + }) + + it('if a sequence starts with 0 and has 0 new migrations, no migrations will be returned', () => { + const foo = mockSequence({ id: 'foo', retroactive: true, versions: 0 }) + const bar = mockSequence({ id: 'bar', retroactive: false, versions: 0 }) + + const ids = getMigrationsBetween( + { + foo: 0, + bar: 0, + }, + [foo, bar] + ) + expect(ids).toEqual([]) + }) +}) diff --git a/packages/store/src/lib/test/migrate.test.ts b/packages/store/src/lib/test/migrate.test.ts index 325669d65..6cac15c78 100644 --- a/packages/store/src/lib/test/migrate.test.ts +++ b/packages/store/src/lib/test/migrate.test.ts @@ -1,4 +1,3 @@ -import { MigrationFailureReason } from '../migrate' import { SerializedStore } from '../Store' import { testSchemaV0 } from './testSchema.v0' import { testSchemaV1 } from './testSchema.v1' @@ -9,23 +8,8 @@ const serializedV1Schenma = testSchemaV1.serialize() test('serializedV0Schenma', () => { expect(serializedV0Schenma).toMatchInlineSnapshot(` { - "recordVersions": { - "org": { - "version": 0, - }, - "shape": { - "subTypeKey": "type", - "subTypeVersions": { - "rectangle": 0, - }, - "version": 0, - }, - "user": { - "version": 0, - }, - }, - "schemaVersion": 1, - "storeVersion": 0, + "schemaVersion": 2, + "sequences": {}, } `) }) @@ -33,188 +17,18 @@ test('serializedV0Schenma', () => { test('serializedV1Schenma', () => { expect(serializedV1Schenma).toMatchInlineSnapshot(` { - "recordVersions": { - "shape": { - "subTypeKey": "type", - "subTypeVersions": { - "oval": 1, - "rectangle": 1, - }, - "version": 2, - }, - "user": { - "version": 2, - }, + "schemaVersion": 2, + "sequences": { + "com.tldraw.shape": 2, + "com.tldraw.shape.oval": 1, + "com.tldraw.shape.rectangle": 1, + "com.tldraw.store": 1, + "com.tldraw.user": 2, }, - "schemaVersion": 1, - "storeVersion": 1, } `) }) -describe('migrating from v0 to v1', () => { - it('works for a user', () => { - const user = { - id: 'user-1', - typeName: 'user', - name: 'name', - } - const userResult = testSchemaV1.migratePersistedRecord(user as any, serializedV0Schenma) - - if (userResult.type !== 'success') { - throw new Error('Migration failed') - } - - expect(userResult.value).toEqual({ - id: 'user-1', - typeName: 'user', - name: 'name', - locale: 'en', - phoneNumber: null, - }) - }) - - it('works for a rectangle', () => { - const rectangle = { - id: 'shape-1', - typeName: 'shape', - x: 0, - y: 0, - type: 'rectangle', - props: { - width: 100, - height: 100, - }, - } - - const shapeResult = testSchemaV1.migratePersistedRecord(rectangle as any, serializedV0Schenma) - - if (shapeResult.type !== 'success') { - throw new Error('Migration failed') - } - - expect(shapeResult.value).toEqual({ - id: 'shape-1', - typeName: 'shape', - x: 0, - y: 0, - rotation: 0, - parentId: null, - type: 'rectangle', - props: { - width: 100, - height: 100, - opacity: 1, - }, - }) - }) - - it('does not work for an oval because the oval didnt exist in v0', () => { - const oval = { - id: 'shape-2', - typeName: 'shape', - x: 0, - y: 0, - type: 'oval', - props: { - radius: 50, - }, - } - - const ovalResult = testSchemaV1.migratePersistedRecord(oval as any, serializedV0Schenma) - - expect(ovalResult).toEqual({ - type: 'error', - reason: MigrationFailureReason.IncompatibleSubtype, - }) - }) -}) - -describe('migrating from v1 to v0', () => { - it('works for a user', () => { - const user = { - id: 'user-1', - typeName: 'user', - name: 'name', - locale: 'en', - phoneNumber: null, - } - - const userResult = testSchemaV1.migratePersistedRecord(user as any, serializedV0Schenma, 'down') - - if (userResult.type !== 'success') { - console.error(userResult) - throw new Error('Migration failed') - } - - expect(userResult.value).toEqual({ - id: 'user-1', - typeName: 'user', - name: 'name', - }) - }) - - it('works for a rectangle', () => { - const rectangle = { - id: 'shape-1', - typeName: 'shape', - x: 0, - y: 0, - rotation: 0, - parentId: null, - type: 'rectangle', - props: { - width: 100, - height: 100, - opacity: 1, - }, - } - - const shapeResult = testSchemaV1.migratePersistedRecord( - rectangle as any, - serializedV0Schenma, - 'down' - ) - - if (shapeResult.type !== 'success') { - console.error(shapeResult) - throw new Error('Migration failed') - } - - expect(shapeResult.value).toEqual({ - id: 'shape-1', - typeName: 'shape', - x: 0, - y: 0, - type: 'rectangle', - props: { - width: 100, - height: 100, - }, - }) - }) - - it('does not work for an oval because the oval didnt exist in v0', () => { - const oval = { - id: 'shape-2', - typeName: 'shape', - x: 0, - y: 0, - type: 'oval', - props: { - radius: 50, - }, - } - - const ovalResult = testSchemaV1.migratePersistedRecord(oval as any, serializedV0Schenma, 'down') - - expect(ovalResult).toEqual({ - type: 'error', - reason: MigrationFailureReason.IncompatibleSubtype, - }) - }) -}) - test('unknown types fail', () => { expect( testSchemaV1.migratePersistedRecord( @@ -225,9 +39,8 @@ test('unknown types fail', () => { serializedV0Schenma, 'up' ) - ).toEqual({ + ).toMatchObject({ type: 'error', - reason: MigrationFailureReason.UnknownType, }) expect( @@ -239,68 +52,8 @@ test('unknown types fail', () => { serializedV0Schenma, 'down' ) - ).toEqual({ + ).toMatchObject({ type: 'error', - reason: MigrationFailureReason.UnknownType, - }) -}) - -test('versions in the future fail', () => { - expect( - testSchemaV0.migratePersistedRecord( - { - id: 'whatevere', - typeName: 'user', - name: 'steve', - } as any, - serializedV1Schenma - ) - ).toEqual({ - type: 'error', - reason: MigrationFailureReason.TargetVersionTooOld, - }) -}) - -test('unrecogized subtypes fail', () => { - expect( - testSchemaV1.migratePersistedRecord( - { - id: 'whatevere', - typeName: 'shape', - type: 'whatever', - } as any, - serializedV0Schenma - ) - ).toEqual({ - type: 'error', - reason: MigrationFailureReason.UnrecognizedSubtype, - }) -}) - -test('subtype versions in the future fail', () => { - expect( - testSchemaV0.migratePersistedRecord( - { - id: 'whatevere', - typeName: 'shape', - type: 'rectangle', - } as any, - { - schemaVersion: 0, - storeVersion: 0, - recordVersions: { - shape: { - version: 0, - subTypeVersions: { - rectangle: 1, - }, - }, - }, - } - ) - ).toEqual({ - type: 'error', - reason: MigrationFailureReason.TargetVersionTooOld, }) }) diff --git a/packages/store/src/lib/test/migratePersistedRecord.test.ts b/packages/store/src/lib/test/migratePersistedRecord.test.ts new file mode 100644 index 000000000..67ab98b9c --- /dev/null +++ b/packages/store/src/lib/test/migratePersistedRecord.test.ts @@ -0,0 +1,265 @@ +import assert from 'assert' +import { BaseRecord, RecordId } from '../BaseRecord' +import { createRecordType } from '../RecordType' +import { SerializedSchemaV2, StoreSchema } from '../StoreSchema' +import { MigrationSequence } from '../migrate' + +const mockSequence = ({ + id, + retroactive, + versions, + filter, +}: { + id: string + retroactive: boolean + versions: number + filter?: (r: TestRecordType) => boolean +}): MigrationSequence => ({ + sequenceId: id, + retroactive, + sequence: new Array(versions).fill(0).map((_, i) => ({ + id: `${id}/${i + 1}`, + scope: 'record', + filter: filter as any, + up(r) { + const record = r as TestRecordType + record.versions[id] ??= 0 + record.versions[id]++ + // noop + }, + down(r) { + const record = r as TestRecordType + record.versions[id]-- + }, + })), +}) + +interface TestRecordType extends BaseRecord<'test', RecordId> { + versions: Record +} +const TestRecordType = createRecordType('test', { + scope: 'document', +}) + +const makeSchema = (migrations: MigrationSequence[]) => { + return StoreSchema.create({ test: TestRecordType }, { migrations }) +} + +const makePersistedSchema = (...args: Array<[migrations: MigrationSequence, version: number]>) => { + return { + schemaVersion: 2, + sequences: Object.fromEntries(args.map(([m, v]) => [m.sequenceId, v])), + } satisfies SerializedSchemaV2 +} + +const makeTestRecord = (persistedSchema: SerializedSchemaV2) => { + return TestRecordType.create({ + versions: Object.fromEntries( + Object.keys(persistedSchema.sequences).map((id) => [id, persistedSchema.sequences[id]]) + ), + }) +} + +test('going up from 0', () => { + const foo = mockSequence({ id: 'foo', retroactive: false, versions: 2 }) + const bar = mockSequence({ id: 'bar', retroactive: false, versions: 3 }) + const schema = makeSchema([foo, bar]) + const persistedSchema = makePersistedSchema([foo, 0], [bar, 0]) + + const r = makeTestRecord(persistedSchema) + expect(r.versions).toEqual({ foo: 0, bar: 0 }) + const update = schema.migratePersistedRecord(r, persistedSchema) + assert(update.type === 'success', 'the update should be successful') + + // the original record did not change + expect(r.versions).toEqual({ foo: 0, bar: 0 }) + + // the updated record has the new versions + expect((update.value as TestRecordType).versions).toEqual({ foo: 2, bar: 3 }) +}) + +test('going up with a retroactive: true and a retroactive: false', () => { + const foo = mockSequence({ id: 'foo', retroactive: true, versions: 2 }) + const bar = mockSequence({ id: 'bar', retroactive: false, versions: 3 }) + const schema = makeSchema([foo, bar]) + const persistedSchema = makePersistedSchema() + + const r = makeTestRecord(persistedSchema) + expect(r.versions).toEqual({}) + const update = schema.migratePersistedRecord(r, persistedSchema) + assert(update.type === 'success', 'the update should be successful') + + // the original record did not change + expect(r.versions).toEqual({}) + + // the updated record has the new versions + expect((update.value as TestRecordType).versions).toEqual({ foo: 2 }) +}) + +test('going down to 0s', () => { + const foo = mockSequence({ id: 'foo', retroactive: false, versions: 2 }) + const bar = mockSequence({ id: 'bar', retroactive: false, versions: 3 }) + const schema = makeSchema([foo, bar]) + const persistedSchema = makePersistedSchema([foo, 0], [bar, 0]) + + const r = makeTestRecord(schema.serialize()) + expect(r.versions).toEqual({ foo: 2, bar: 3 }) + const downgrade = schema.migratePersistedRecord(r, persistedSchema, 'down') + assert(downgrade.type === 'success', 'the downgrade should be successful') + + // the original record did not change + expect(r.versions).toEqual({ foo: 2, bar: 3 }) + + // the downgraded record has the new versions + expect((downgrade.value as TestRecordType).versions).toEqual({ foo: 0, bar: 0 }) +}) + +test('going down with a retroactive: true and a retroactive: false', () => { + const foo = mockSequence({ id: 'foo', retroactive: true, versions: 2 }) + const bar = mockSequence({ id: 'bar', retroactive: false, versions: 3 }) + const schema = makeSchema([foo, bar]) + const persistedSchema = makePersistedSchema() + + const r = makeTestRecord(schema.serialize()) + expect(r.versions).toEqual({ foo: 2, bar: 3 }) + const downgrade = schema.migratePersistedRecord(r, persistedSchema, 'down') + assert(downgrade.type === 'success', 'the downgrade should be successful') + + // the original record did not change + expect(r.versions).toEqual({ foo: 2, bar: 3 }) + + // only the foo migrations were undone + expect((downgrade.value as TestRecordType).versions).toEqual({ foo: 0, bar: 3 }) +}) + +test('going up with no changes', () => { + const foo = mockSequence({ id: 'foo', retroactive: false, versions: 2 }) + const bar = mockSequence({ id: 'bar', retroactive: false, versions: 3 }) + const schema = makeSchema([foo, bar]) + const persistedSchema = makePersistedSchema([foo, 2], [bar, 3]) + + const r = makeTestRecord(persistedSchema) + expect(r.versions).toEqual({ foo: 2, bar: 3 }) + const update = schema.migratePersistedRecord(r, persistedSchema) + assert(update.type === 'success', 'the update should be successful') + + // the returned record should be the the input record, i.e. it should not have allocated a new record + expect(r).toBe(update.value) +}) + +test('going down with no changes', () => { + const foo = mockSequence({ id: 'foo', retroactive: false, versions: 2 }) + const bar = mockSequence({ id: 'bar', retroactive: false, versions: 3 }) + const schema = makeSchema([foo, bar]) + const persistedSchema = makePersistedSchema([foo, 2], [bar, 3]) + + const r = makeTestRecord(persistedSchema) + expect(r.versions).toEqual({ foo: 2, bar: 3 }) + const update = schema.migratePersistedRecord(r, persistedSchema, 'down') + assert(update.type === 'success', 'the update should be successful') + + // the returned record should be the the input record, i.e. it should not have allocated a new record + expect(r).toBe(update.value) +}) + +test('respects filters', () => { + const foo = mockSequence({ + id: 'foo', + retroactive: false, + versions: 2, + filter: (r) => (r as any).foo === true, + }) + const bar = mockSequence({ id: 'bar', retroactive: false, versions: 3 }) + const schema = makeSchema([foo, bar]) + const persistedSchema = makePersistedSchema([foo, 0], [bar, 0]) + + const r = makeTestRecord(persistedSchema) + const update = schema.migratePersistedRecord(r, persistedSchema, 'up') + assert(update.type === 'success', 'the update should be successful') + + // foo migrations shouldn't have been applied + expect((update.value as TestRecordType).versions).toEqual({ foo: 0, bar: 3 }) + + const r2 = { ...r, foo: true } + const update2 = schema.migratePersistedRecord(r2, persistedSchema, 'up') + assert(update2.type === 'success', 'the update should be successful') + + // foo migrations should have been applied + expect((update2.value as TestRecordType).versions).toEqual({ foo: 2, bar: 3 }) +}) + +test('does not go up or down if theres a store migration in the path', () => { + const foo = mockSequence({ id: 'foo', retroactive: false, versions: 3 }) + foo.sequence[1] = { + id: 'foo/2', + scope: 'store', + up() { + // noop + }, + down() { + // noop + }, + } + const schema = makeSchema([foo]) + const v0Schema = makePersistedSchema([foo, 0]) + + const r0 = makeTestRecord(v0Schema) + const r3 = makeTestRecord(schema.serialize()) + const update = schema.migratePersistedRecord(r0, v0Schema, 'up') + expect(update.type).toBe('error') + const update2 = schema.migratePersistedRecord(r3, v0Schema, 'down') + expect(update2.type).toBe('error') + + // snapshot migration up should still work + const update3 = schema.migrateStoreSnapshot({ + schema: v0Schema, + store: { [r0.id]: r0 }, + }) + + assert(update3.type === 'success', 'the update should be successful') + expect((update3.value[r0.id] as TestRecordType).versions).toEqual({ foo: 2 }) +}) + +test('does not go down if theres a migrations without the down migrator in the path', () => { + const foo = mockSequence({ id: 'foo', retroactive: false, versions: 3 }) + delete (foo.sequence[1] as any).down + const schema = makeSchema([foo]) + const v0Schema = makePersistedSchema([foo, 0]) + + // going up still works + const r0 = makeTestRecord(v0Schema) + const update = schema.migratePersistedRecord(r0, v0Schema, 'up') + expect(update.type).toBe('success') + + // going down does not + const r3 = makeTestRecord(schema.serialize()) + const update2 = schema.migratePersistedRecord(r3, v0Schema, 'down') + expect(update2.type).toBe('error') +}) + +test('allows returning a new record from the migrator fn', () => { + const foo = mockSequence({ id: 'foo', retroactive: false, versions: 3 }) + foo.sequence[1] = { + id: 'foo/2', + scope: 'record', + up(r) { + const record = r as TestRecordType + return { ...record, versions: { ...record.versions, foo: 2 } } + }, + down(r) { + const record = r as TestRecordType + return { ...record, versions: { ...record.versions, foo: 1 } } + }, + } + const schema = makeSchema([foo]) + const v0Schema = makePersistedSchema([foo, 0]) + + const r0 = makeTestRecord(v0Schema) + const r3 = makeTestRecord(schema.serialize()) + const update = schema.migratePersistedRecord(r0, v0Schema, 'up') + assert(update.type === 'success', 'the update should be successful') + expect((update.value as TestRecordType).versions).toEqual({ foo: 3 }) + const update2 = schema.migratePersistedRecord(r3, v0Schema, 'down') + assert(update2.type === 'success', 'the update should be successful') + expect((update2.value as TestRecordType).versions).toEqual({ foo: 0 }) +}) diff --git a/packages/store/src/lib/test/recordStore.test.ts b/packages/store/src/lib/test/recordStore.test.ts index d425bac74..aa12b4bcb 100644 --- a/packages/store/src/lib/test/recordStore.test.ts +++ b/packages/store/src/lib/test/recordStore.test.ts @@ -1,5 +1,6 @@ import { Computed, react, RESET_VALUE, transact } from '@tldraw/state' import { BaseRecord, RecordId } from '../BaseRecord' +import { createMigrationSequence } from '../migrate' import { createRecordType } from '../RecordType' import { CollectionDiff, RecordsDiff, Store } from '../Store' import { StoreSchema } from '../StoreSchema' @@ -47,20 +48,11 @@ describe('Store', () => { beforeEach(() => { store = new Store({ props: {}, - schema: StoreSchema.create( - { - book: Book, - author: Author, - visit: Visit, - }, - { - snapshotMigrations: { - currentVersion: 0, - firstVersion: 0, - migrators: {}, - }, - } - ), + schema: StoreSchema.create({ + book: Book, + author: Author, + visit: Visit, + }), }) }) @@ -762,19 +754,10 @@ describe('snapshots', () => { beforeEach(() => { store = new Store({ props: {}, - schema: StoreSchema.create( - { - book: Book, - author: Author, - }, - { - snapshotMigrations: { - currentVersion: 0, - firstVersion: 0, - migrators: {}, - }, - } - ), + schema: StoreSchema.create({ + book: Book, + author: Author, + }), }) transact(() => { @@ -808,19 +791,10 @@ describe('snapshots', () => { const store2 = new Store({ props: {}, - schema: StoreSchema.create( - { - book: Book, - author: Author, - }, - { - snapshotMigrations: { - currentVersion: 0, - firstVersion: 0, - migrators: {}, - }, - } - ), + schema: StoreSchema.create({ + book: Book, + author: Author, + }), }) store2.loadSnapshot(snapshot1) @@ -839,25 +813,16 @@ describe('snapshots', () => { const store2 = new Store({ props: {}, - schema: StoreSchema.create( - { - book: Book, - // no author - }, - { - snapshotMigrations: { - currentVersion: 0, - firstVersion: 0, - migrators: {}, - }, - } - ), + schema: StoreSchema.create({ + book: Book, + // no author + }), }) expect(() => { // @ts-expect-error store2.loadSnapshot(snapshot1) - }).toThrowErrorMatchingInlineSnapshot(`"Failed to migrate snapshot: unknown-type"`) + }).toThrowErrorMatchingInlineSnapshot(`"Missing definition for record type author"`) }) it('throws errors when loading a snapshot with a different schema', () => { @@ -865,28 +830,23 @@ describe('snapshots', () => { const store2 = new Store({ props: {}, - schema: StoreSchema.create( - { - book: Book, - author: Author, - }, - { - snapshotMigrations: { - currentVersion: -1, - firstVersion: 0, - migrators: {}, - }, - } - ), + schema: StoreSchema.create({ + book: Book, + }), }) expect(() => { - store2.loadSnapshot(snapshot1) - }).toThrowErrorMatchingInlineSnapshot(`"Failed to migrate snapshot: target-version-too-old"`) + store2.loadSnapshot(snapshot1 as any) + }).toThrowErrorMatchingInlineSnapshot(`"Missing definition for record type author"`) }) it('migrates the snapshot', () => { const snapshot1 = store.getSnapshot() + const up = jest.fn((s: any) => { + s['book:lotr'].numPages = 42 + }) + + expect((snapshot1.store as any)['book:lotr'].numPages).toBe(1000) const store2 = new Store({ props: {}, @@ -896,16 +856,19 @@ describe('snapshots', () => { author: Author, }, { - snapshotMigrations: { - currentVersion: 1, - firstVersion: 0, - migrators: { - 1: { - up: (r) => r, - down: (r) => r, - }, - }, - }, + migrations: [ + createMigrationSequence({ + sequenceId: 'com.tldraw', + retroactive: true, + sequence: [ + { + id: `com.tldraw/1`, + scope: 'store', + up, + }, + ], + }), + ], } ), }) @@ -913,5 +876,8 @@ describe('snapshots', () => { expect(() => { store2.loadSnapshot(snapshot1) }).not.toThrow() + + expect(up).toHaveBeenCalledTimes(1) + expect(store2.get(Book.createId('lotr'))!.numPages).toBe(42) }) }) diff --git a/packages/store/src/lib/test/recordStoreFuzzing.test.ts b/packages/store/src/lib/test/recordStoreFuzzing.test.ts index 9df20feb2..55b40bb5f 100644 --- a/packages/store/src/lib/test/recordStoreFuzzing.test.ts +++ b/packages/store/src/lib/test/recordStoreFuzzing.test.ts @@ -328,19 +328,10 @@ const NUM_OPS = 200 function runTest(seed: number) { const store = new Store({ props: {}, - schema: StoreSchema.create( - { - book: Book, - author: Author, - }, - { - snapshotMigrations: { - currentVersion: 0, - firstVersion: 0, - migrators: {}, - }, - } - ), + schema: StoreSchema.create({ + book: Book, + author: Author, + }), }) store.onBeforeDelete = (record) => { if (record.typeName === 'author') { diff --git a/packages/store/src/lib/test/recordStoreQueries.test.ts b/packages/store/src/lib/test/recordStoreQueries.test.ts index 6b573726b..e04f4f340 100644 --- a/packages/store/src/lib/test/recordStoreQueries.test.ts +++ b/packages/store/src/lib/test/recordStoreQueries.test.ts @@ -61,19 +61,10 @@ let store: Store beforeEach(() => { store = new Store({ props: {}, - schema: StoreSchema.create( - { - author: Author, - book: Book, - }, - { - snapshotMigrations: { - currentVersion: 0, - firstVersion: 0, - migrators: {}, - }, - } - ), + schema: StoreSchema.create({ + author: Author, + book: Book, + }), }) store.put([ authors.tolkein, diff --git a/packages/store/src/lib/test/sortMigrations.test.ts b/packages/store/src/lib/test/sortMigrations.test.ts new file mode 100644 index 000000000..26ad940cb --- /dev/null +++ b/packages/store/src/lib/test/sortMigrations.test.ts @@ -0,0 +1,51 @@ +import { Migration, MigrationId, sortMigrations } from '../migrate' + +describe(sortMigrations, () => { + const m = (id: MigrationId, others?: { dependsOn?: MigrationId[] }): Migration => ({ + ...others, + id, + scope: 'record', + up() { + // noop + }, + }) + const sort = (migrations: Migration[]) => { + return sortMigrations(migrations).map((m) => m.id) + } + it('should sort migrations based on version number', () => { + expect(sort([m('foo/2'), m('foo/1')])).toEqual(['foo/1', 'foo/2']) + expect(sort([m('foo/1'), m('foo/2')])).toEqual(['foo/1', 'foo/2']) + }) + it('should sort multiple migration sequences based on version number', () => { + const result = sort([m('foo/2'), m('bar/2'), m('foo/1'), m('bar/1')]) + expect(result.filter((id) => id.startsWith('foo/'))).toEqual(['foo/1', 'foo/2']) + expect(result.filter((id) => id.startsWith('bar/'))).toEqual(['bar/1', 'bar/2']) + }) + it('should use dependsOn to resolve inter-sequence dependencies', () => { + expect( + sort([m('foo/2'), m('bar/2'), m('foo/1'), m('bar/1', { dependsOn: ['foo/2'] })]) + ).toEqual(['foo/1', 'foo/2', 'bar/1', 'bar/2']) + + expect( + sort([m('foo/2'), m('bar/2'), m('foo/1', { dependsOn: ['bar/2'] }), m('bar/1')]) + ).toEqual(['bar/1', 'bar/2', 'foo/1', 'foo/2']) + }) + + it('should fail if a cycle is created', () => { + expect(() => { + sort([m('foo/1', { dependsOn: ['foo/1'] })]) + }).toThrowErrorMatchingInlineSnapshot(`"Circular dependency in migrations: foo/1"`) + + expect(() => { + sort([m('foo/1', { dependsOn: ['foo/2'] }), m('foo/2')]) + }).toThrowErrorMatchingInlineSnapshot(`"Circular dependency in migrations: foo/1"`) + + expect(() => { + sort([m('foo/1', { dependsOn: ['bar/1'] }), m('bar/1', { dependsOn: ['foo/1'] })]) + }).toThrowErrorMatchingInlineSnapshot(`"Circular dependency in migrations: foo/1"`) + + expect(() => { + sort([m('bar/1', { dependsOn: ['foo/1'] }), m('foo/1', { dependsOn: ['bar/1'] })]) + }).toThrowErrorMatchingInlineSnapshot(`"Circular dependency in migrations: bar/1"`) + }) +}) diff --git a/packages/store/src/lib/test/testSchema.v0.ts b/packages/store/src/lib/test/testSchema.v0.ts index bbba05257..273b2748b 100644 --- a/packages/store/src/lib/test/testSchema.v0.ts +++ b/packages/store/src/lib/test/testSchema.v0.ts @@ -2,17 +2,13 @@ import assert from 'assert' import { BaseRecord, RecordId } from '../BaseRecord' import { createRecordType } from '../RecordType' import { StoreSchema } from '../StoreSchema' -import { defineMigrations } from '../migrate' /** A user of tldraw */ interface User extends BaseRecord<'user', RecordId> { name: string } -const userMigrations = defineMigrations({}) - const User = createRecordType('user', { - migrations: userMigrations, validator: { validate: (record) => { assert( @@ -42,15 +38,7 @@ interface OvalProps { borderStyle: 'solid' | 'dashed' } -const shapeTypeMigrations = defineMigrations({ - subTypeKey: 'type', - subTypeMigrations: { - rectangle: defineMigrations({}), - }, -}) - const Shape = createRecordType>('shape', { - migrations: shapeTypeMigrations, validator: { validate: (record) => { assert( @@ -77,7 +65,6 @@ interface Org extends BaseRecord<'org', RecordId> { } const Org = createRecordType('org', { - migrations: defineMigrations({}), validator: { validate: (record) => { assert( @@ -89,13 +76,8 @@ const Org = createRecordType('org', { scope: 'document', }) -export const testSchemaV0 = StoreSchema.create( - { - user: User, - shape: Shape, - org: Org, - }, - { - snapshotMigrations: defineMigrations({}), - } -) +export const testSchemaV0 = StoreSchema.create({ + user: User, + shape: Shape, + org: Org, +}) diff --git a/packages/store/src/lib/test/testSchema.v1.ts b/packages/store/src/lib/test/testSchema.v1.ts index 110090c1b..5c8ef7122 100644 --- a/packages/store/src/lib/test/testSchema.v1.ts +++ b/packages/store/src/lib/test/testSchema.v1.ts @@ -3,12 +3,12 @@ import { BaseRecord, RecordId } from '../BaseRecord' import { createRecordType } from '../RecordType' import { SerializedStore } from '../Store' import { StoreSchema } from '../StoreSchema' -import { defineMigrations } from '../migrate' +import { createMigrationIds, createMigrationSequence } from '../migrate' -const UserVersion = { +const UserVersion = createMigrationIds('com.tldraw.user', { AddLocale: 1, AddPhoneNumber: 2, -} as const +} as const) /** A user of tldraw */ interface User extends BaseRecord<'user', RecordId> { @@ -17,36 +17,36 @@ interface User extends BaseRecord<'user', RecordId> { phoneNumber: string | null } -const userMigrations = defineMigrations({ - currentVersion: UserVersion.AddPhoneNumber, - migrators: { - [UserVersion.AddLocale]: { - up: (record) => ({ - ...record, - locale: 'en', - }), - down: (record) => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { locale, ...rest } = record - return rest +const userMigrations = createMigrationSequence({ + sequenceId: 'com.tldraw.user', + retroactive: true, + sequence: [ + { + id: UserVersion.AddLocale, + scope: 'record', + filter: (r) => r.typeName === 'user', + up: (record: any) => { + record.locale = 'en' + }, + down: (record: any) => { + delete record.locale }, }, - [UserVersion.AddPhoneNumber]: { - up: (record) => ({ - ...record, - phoneNumber: null, - }), - down: (record) => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { phoneNumber, ...rest } = record - return rest + { + id: UserVersion.AddPhoneNumber, + scope: 'record', + filter: (r) => r.typeName === 'user', + up: (record: any) => { + record.phoneNumber = null + }, + down: (record: any) => { + delete record.phoneNumber }, }, - }, + ], }) const User = createRecordType('user', { - migrations: userMigrations, validator: { validate: (record) => { assert(record && typeof record === 'object') @@ -66,18 +66,18 @@ const User = createRecordType('user', { name: 'New User', })) -const ShapeVersion = { +const ShapeVersion = createMigrationIds('com.tldraw.shape', { AddRotation: 1, AddParent: 2, -} as const +} as const) -const RectangleVersion = { +const RectangleVersion = createMigrationIds('com.tldraw.shape.rectangle', { AddOpacity: 1, -} as const +} as const) -const OvalVersion = { +const OvalVersion = createMigrationIds('com.tldraw.shape.oval', { AddBorderStyle: 1, -} as const +} as const) type ShapeId = RecordId> @@ -101,81 +101,72 @@ interface OvalProps { borderStyle: 'solid' | 'dashed' } -const shapeTypeMigrations = defineMigrations({ - currentVersion: ShapeVersion.AddParent, - migrators: { - [ShapeVersion.AddRotation]: { - up: (record) => ({ - ...record, - rotation: 0, - }), - down: (record) => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { rotation, ...rest } = record - return rest +const rootShapeMigrations = createMigrationSequence({ + sequenceId: 'com.tldraw.shape', + retroactive: true, + sequence: [ + { + id: ShapeVersion.AddRotation, + scope: 'record', + filter: (r) => r.typeName === 'shape', + up: (record: any) => { + record.rotation = 0 + }, + down: (record: any) => { + delete record.rotation }, }, - [ShapeVersion.AddParent]: { - up: (record) => ({ - ...record, - parentId: null, - }), - down: (record) => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { parentId, ...rest } = record - return rest + { + id: ShapeVersion.AddParent, + scope: 'record', + filter: (r) => r.typeName === 'shape', + up: (record: any) => { + record.parentId = null + }, + down: (record: any) => { + delete record.parentId }, }, - }, - subTypeKey: 'type', - subTypeMigrations: { - rectangle: defineMigrations({ - currentVersion: RectangleVersion.AddOpacity, - migrators: { - [RectangleVersion.AddOpacity]: { - up: (record) => ({ - ...record, - props: { - ...record.props, - opacity: 1, - }, - }), - // eslint-disable-next-line @typescript-eslint/no-unused-vars - down: ({ props: { opacity, ...others }, ...record }) => ({ - ...record, - props: { - ...others, - }, - }), - }, + ], +}) + +const rectangleMigrations = createMigrationSequence({ + sequenceId: 'com.tldraw.shape.rectangle', + retroactive: true, + sequence: [ + { + id: RectangleVersion.AddOpacity, + scope: 'record', + filter: (r) => r.typeName === 'shape' && (r as Shape).type === 'rectangle', + up: (record: any) => { + record.props.opacity = 1 }, - }), - oval: defineMigrations({ - currentVersion: OvalVersion.AddBorderStyle, - migrators: { - [OvalVersion.AddBorderStyle]: { - up: (record) => ({ - ...record, - props: { - ...record.props, - borderStyle: 'solid', - }, - }), - // eslint-disable-next-line @typescript-eslint/no-unused-vars - down: ({ props: { borderStyle, ...others }, ...record }) => ({ - ...record, - props: { - ...others, - }, - }), - }, + down: (record: any) => { + delete record.props.opacity }, - }), - }, + }, + ], +}) + +const ovalMigrations = createMigrationSequence({ + sequenceId: 'com.tldraw.shape.oval', + retroactive: true, + sequence: [ + { + id: OvalVersion.AddBorderStyle, + scope: 'record', + filter: (r) => r.typeName === 'shape' && (r as Shape).type === 'oval', + up: (record: any) => { + record.props.borderStyle = 'solid' + }, + down: (record: any) => { + delete record.props.borderStyle + }, + }, + ], }) const Shape = createRecordType>('shape', { - migrations: shapeTypeMigrations, validator: { validate: (record) => { assert(record && typeof record === 'object') @@ -195,14 +186,17 @@ const Shape = createRecordType>('shape', { parentId: null, })) -const StoreVersions = { +const StoreVersions = createMigrationIds('com.tldraw.store', { RemoveOrg: 1, -} +}) -const snapshotMigrations = defineMigrations({ - currentVersion: StoreVersions.RemoveOrg, - migrators: { - [StoreVersions.RemoveOrg]: { +const snapshotMigrations = createMigrationSequence({ + sequenceId: 'com.tldraw.store', + retroactive: true, + sequence: [ + { + id: StoreVersions.RemoveOrg, + scope: 'store', up: (store: SerializedStore) => { return Object.fromEntries(Object.entries(store).filter(([_, r]) => r.typeName !== 'org')) }, @@ -211,7 +205,7 @@ const snapshotMigrations = defineMigrations({ return store }, }, - }, + ], }) export const testSchemaV1 = StoreSchema.create>( @@ -220,6 +214,12 @@ export const testSchemaV1 = StoreSchema.create>( shape: Shape, }, { - snapshotMigrations, + migrations: [ + snapshotMigrations, + rootShapeMigrations, + rectangleMigrations, + ovalMigrations, + userMigrations, + ], } ) diff --git a/packages/store/src/lib/test/upgradeSchema.test.ts b/packages/store/src/lib/test/upgradeSchema.test.ts new file mode 100644 index 000000000..ea0a5205f --- /dev/null +++ b/packages/store/src/lib/test/upgradeSchema.test.ts @@ -0,0 +1,79 @@ +import { SerializedSchemaV1, upgradeSchema } from '../StoreSchema' + +describe('upgradeSchema', () => { + it('should upgrade a schema from v1 to v2, assuming its working with tldraw data', () => { + const v1: SerializedSchemaV1 = { + schemaVersion: 1, + storeVersion: 4, + recordVersions: { + asset: { + version: 1, + subTypeKey: 'type', + subTypeVersions: { image: 2, video: 2, bookmark: 0 }, + }, + camera: { version: 1 }, + document: { version: 2 }, + instance: { version: 22 }, + instance_page_state: { version: 5 }, + page: { version: 1 }, + shape: { + version: 3, + subTypeKey: 'type', + subTypeVersions: { + group: 0, + text: 1, + bookmark: 1, + draw: 1, + geo: 7, + note: 4, + line: 1, + frame: 0, + arrow: 1, + highlight: 0, + embed: 4, + image: 2, + video: 1, + }, + }, + instance_presence: { version: 5 }, + pointer: { version: 1 }, + }, + } + + expect(upgradeSchema(v1)).toMatchInlineSnapshot(` + { + "ok": true, + "value": { + "schemaVersion": 2, + "sequences": { + "com.tldraw.asset": 1, + "com.tldraw.asset.bookmark": 0, + "com.tldraw.asset.image": 2, + "com.tldraw.asset.video": 2, + "com.tldraw.camera": 1, + "com.tldraw.document": 2, + "com.tldraw.instance": 22, + "com.tldraw.instance_page_state": 5, + "com.tldraw.instance_presence": 5, + "com.tldraw.page": 1, + "com.tldraw.pointer": 1, + "com.tldraw.shape": 3, + "com.tldraw.shape.arrow": 1, + "com.tldraw.shape.bookmark": 1, + "com.tldraw.shape.draw": 1, + "com.tldraw.shape.embed": 4, + "com.tldraw.shape.frame": 0, + "com.tldraw.shape.geo": 7, + "com.tldraw.shape.group": 0, + "com.tldraw.shape.highlight": 0, + "com.tldraw.shape.image": 2, + "com.tldraw.shape.line": 1, + "com.tldraw.shape.note": 4, + "com.tldraw.shape.text": 1, + "com.tldraw.shape.video": 1, + }, + }, + } + `) + }) +}) diff --git a/packages/store/src/lib/test/validate.test.ts b/packages/store/src/lib/test/validate.test.ts index 0c649a6ac..eb08be889 100644 --- a/packages/store/src/lib/test/validate.test.ts +++ b/packages/store/src/lib/test/validate.test.ts @@ -45,19 +45,10 @@ const Author = createRecordType('author', { isPseudonym: false, })) -const schema = StoreSchema.create( - { - book: Book, - author: Author, - }, - { - snapshotMigrations: { - currentVersion: 0, - firstVersion: 0, - migrators: {}, - }, - } -) +const schema = StoreSchema.create({ + book: Book, + author: Author, +}) describe('Store with validation', () => { let store: Store diff --git a/packages/store/src/lib/test/validateMigrations.test.ts b/packages/store/src/lib/test/validateMigrations.test.ts new file mode 100644 index 000000000..5dd0b9a82 --- /dev/null +++ b/packages/store/src/lib/test/validateMigrations.test.ts @@ -0,0 +1,165 @@ +import { validateMigrations } from '../migrate' + +describe(validateMigrations, () => { + it('should throw if a migration id is invalid', () => { + expect(() => + validateMigrations({ + retroactive: false, + sequence: [ + { + id: 'foo.1' as any, + scope: 'record', + up() { + // noop + }, + }, + ], + + sequenceId: 'foo', + }) + ).toThrowErrorMatchingInlineSnapshot( + `"Every migration in sequence 'foo' must have an id starting with 'foo/'. Got invalid id: 'foo.1'"` + ) + + expect(() => + validateMigrations({ + retroactive: false, + sequence: [ + { + id: 'foo/one' as any, + scope: 'record', + up() { + // noop + }, + }, + ], + + sequenceId: 'foo', + }) + ).toThrowErrorMatchingInlineSnapshot(`"Invalid migration id: 'foo/one'"`) + + expect(() => + validateMigrations({ + retroactive: false, + sequence: [ + { + id: 'foo/1' as any, + scope: 'record', + up() { + // noop + }, + }, + { + id: 'foo.2' as any, + scope: 'record', + up() { + // noop + }, + }, + ], + + sequenceId: 'foo', + }) + ).toThrowErrorMatchingInlineSnapshot( + `"Every migration in sequence 'foo' must have an id starting with 'foo/'. Got invalid id: 'foo.2'"` + ) + + expect(() => + validateMigrations({ + retroactive: false, + sequence: [ + { + id: 'foo/1' as any, + scope: 'record', + up() { + // noop + }, + }, + { + id: 'foo/two' as any, + scope: 'record', + up() { + // noop + }, + }, + ], + + sequenceId: 'foo', + }) + ).toThrowErrorMatchingInlineSnapshot(`"Invalid migration id: 'foo/two'"`) + }) + + it('should throw if the sequenceId is invalid', () => { + expect(() => + validateMigrations({ + retroactive: false, + sequence: [], + sequenceId: 'foo/bar', + }) + ).toThrowErrorMatchingInlineSnapshot(`"sequenceId cannot contain a '/', got foo/bar"`) + + expect(() => + validateMigrations({ + retroactive: false, + sequence: [], + sequenceId: '', + }) + ).toThrowErrorMatchingInlineSnapshot(`"sequenceId must be a non-empty string"`) + }) + + it('should throw if the version numbers do not start at 1', () => { + expect(() => + validateMigrations({ + retroactive: false, + sequence: [ + { + id: 'foo/2', + scope: 'record', + up() { + // noop + }, + }, + ], + + sequenceId: 'foo', + }) + ).toThrowErrorMatchingInlineSnapshot( + `"Expected the first migrationId to be 'foo/1' but got 'foo/2'"` + ) + }) + + it('should throw if the version numbers do not increase monotonically', () => { + expect(() => + validateMigrations({ + retroactive: false, + sequence: [ + { + id: 'foo/1', + scope: 'record', + up() { + // noop + }, + }, + { + id: 'foo/2', + scope: 'record', + up() { + // noop + }, + }, + { + id: 'foo/4', + scope: 'record', + up() { + // noop + }, + }, + ], + + sequenceId: 'foo', + }) + ).toThrowErrorMatchingInlineSnapshot( + `"Migration id numbers must increase in increments of 1, expected foo/3 but got 'foo/4'"` + ) + }) +}) diff --git a/packages/tldraw/api-report.md b/packages/tldraw/api-report.md index c4b7b27e0..e6e590898 100644 --- a/packages/tldraw/api-report.md +++ b/packages/tldraw/api-report.md @@ -31,7 +31,7 @@ import { Mat } from '@tldraw/editor'; import { MatModel } from '@tldraw/editor'; import { MemoExoticComponent } from 'react'; import { MigrationFailureReason } from '@tldraw/editor'; -import { Migrations } from '@tldraw/editor'; +import { MigrationSequence } from '@tldraw/editor'; import { NamedExoticComponent } from 'react'; import { ObjectValidator } from '@tldraw/editor'; import { Polygon2d } from '@tldraw/editor'; @@ -110,6 +110,7 @@ import { TLSelectionHandle } from '@tldraw/editor'; import { TLShape } from '@tldraw/editor'; import { TLShapeId } from '@tldraw/editor'; import { TLShapePartial } from '@tldraw/editor'; +import { TLShapePropsMigrations } from '@tldraw/editor'; import { TLShapeUtilCanvasSvgDef } from '@tldraw/editor'; import { TLShapeUtilFlag } from '@tldraw/editor'; import { TLStore } from '@tldraw/editor'; @@ -189,7 +190,7 @@ export class ArrowShapeUtil extends ShapeUtil { // (undocumented) indicator(shape: TLArrowShape): JSX_2.Element | null; // (undocumented) - static migrations: Migrations; + static migrations: TLShapePropsMigrations; // (undocumented) onDoubleClickHandle: (shape: TLArrowShape, handle: TLHandle) => TLShapePartial | void; // (undocumented) @@ -204,45 +205,45 @@ export class ArrowShapeUtil extends ShapeUtil { onTranslateStart: TLOnTranslateStartHandler; // (undocumented) static props: { - labelColor: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">; - dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - arrowheadStart: EnumStyleProp<"arrow" | "bar" | "diamond" | "dot" | "inverted" | "none" | "pipe" | "square" | "triangle">; arrowheadEnd: EnumStyleProp<"arrow" | "bar" | "diamond" | "dot" | "inverted" | "none" | "pipe" | "square" | "triangle">; - font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; - start: UnionValidator<"type", { - binding: ObjectValidator< { - type: "binding"; - boundShapeId: TLShapeId; - normalizedAnchor: VecModel; - isExact: boolean; - isPrecise: boolean; - }>; - point: ObjectValidator< { - x: number; - y: number; - type: "point"; - }>; - }, never>; + arrowheadStart: EnumStyleProp<"arrow" | "bar" | "diamond" | "dot" | "inverted" | "none" | "pipe" | "square" | "triangle">; + bend: Validator; + color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; + dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">; end: UnionValidator<"type", { binding: ObjectValidator< { - type: "binding"; boundShapeId: TLShapeId; - normalizedAnchor: VecModel; isExact: boolean; isPrecise: boolean; + normalizedAnchor: VecModel; + type: "binding"; }>; point: ObjectValidator< { + type: "point"; x: number; y: number; - type: "point"; }>; }, never>; - bend: Validator; - text: Validator; + fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">; + font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; + labelColor: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; labelPosition: Validator; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; + start: UnionValidator<"type", { + binding: ObjectValidator< { + boundShapeId: TLShapeId; + isExact: boolean; + isPrecise: boolean; + normalizedAnchor: VecModel; + type: "binding"; + }>; + point: ObjectValidator< { + type: "point"; + x: number; + y: number; + }>; + }, never>; + text: Validator; }; // (undocumented) toSvg(shape: TLArrowShape, ctx: SvgExportContext): JSX_2.Element; @@ -278,17 +279,17 @@ export class BookmarkShapeUtil extends BaseBoxShapeUtil { // (undocumented) indicator(shape: TLBookmarkShape): JSX_2.Element; // (undocumented) - static migrations: Migrations; + static migrations: TLShapePropsMigrations; // (undocumented) onBeforeCreate?: TLOnBeforeCreateHandler; // (undocumented) onBeforeUpdate?: TLOnBeforeUpdateHandler; // (undocumented) static props: { - w: T.Validator; - h: T.Validator; assetId: T.Validator; + h: T.Validator; url: T.Validator; + w: T.Validator; }; // (undocumented) static type: "bookmark"; @@ -296,8 +297,8 @@ export class BookmarkShapeUtil extends BaseBoxShapeUtil { // @public (undocumented) export function BreakPointProvider({ forceMobile, children, }: { - forceMobile?: boolean; children: ReactNode; + forceMobile?: boolean; }): JSX_2.Element; // @internal (undocumented) @@ -447,8 +448,8 @@ export function DistributeMenuItems(): JSX_2.Element; // @public export function downsizeImage(blob: Blob, width: number, height: number, opts?: { - type?: string | undefined; quality?: number | undefined; + type?: string | undefined; }): Promise; // @public (undocumented) @@ -486,22 +487,22 @@ export class DrawShapeUtil extends ShapeUtil { // (undocumented) indicator(shape: TLDrawShape): JSX_2.Element; // (undocumented) - static migrations: Migrations; + static migrations: TLShapePropsMigrations; // (undocumented) onResize: TLOnResizeHandler; // (undocumented) static props: { color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">; dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - segments: ArrayOfValidator< { - type: "free" | "straight"; - points: VecModel[]; - }>; - isComplete: Validator; + fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">; isClosed: Validator; + isComplete: Validator; isPen: Validator; + segments: ArrayOfValidator< { + points: VecModel[]; + type: "free" | "straight"; + }>; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; }; // (undocumented) toSvg(shape: TLDrawShape, ctx: SvgExportContext): JSX_2.Element; @@ -543,14 +544,14 @@ export class EmbedShapeUtil extends BaseBoxShapeUtil { // (undocumented) isAspectRatioLocked: TLShapeUtilFlag; // (undocumented) - static migrations: Migrations; + static migrations: TLShapePropsMigrations; // (undocumented) onResize: TLOnResizeHandler; // (undocumented) static props: { - w: Validator; h: Validator; url: Validator; + w: Validator; }; // (undocumented) static type: "embed"; @@ -573,19 +574,19 @@ export function EraserToolbarItem(): JSX_2.Element; // @public (undocumented) export type EventsProviderProps = { - onEvent?: TLUiEventHandler; children: React_3.ReactNode; + onEvent?: TLUiEventHandler; }; // @public (undocumented) export function ExampleDialog({ title, body, cancel, confirm, displayDontShowAgain, onCancel, onContinue, }: { - title?: string; body?: string; cancel?: string; confirm?: string; displayDontShowAgain?: boolean; onCancel: () => void; onContinue: () => void; + title?: string; }): JSX_2.Element; // @public @@ -597,8 +598,8 @@ export function ExportFileContentSubMenu(): JSX_2.Element; // @public export function exportToBlob({ editor, ids, format, opts, }: { editor: Editor; - ids: TLShapeId[]; format: 'jpeg' | 'json' | 'png' | 'svg' | 'webp'; + ids: TLShapeId[]; opts?: Partial; }): Promise; @@ -650,7 +651,7 @@ export class FrameShapeUtil extends BaseBoxShapeUtil { // (undocumented) indicator(shape: TLFrameShape): JSX_2.Element; // (undocumented) - static migrations: Migrations; + static migrations: TLShapePropsMigrations; // (undocumented) onDragShapesOut: (_shape: TLFrameShape, shapes: TLShape[]) => void; // (undocumented) @@ -659,9 +660,9 @@ export class FrameShapeUtil extends BaseBoxShapeUtil { onResize: TLOnResizeHandler; // (undocumented) static props: { - w: Validator; h: Validator; name: Validator; + w: Validator; }; // (undocumented) providesBackgroundForChildren(): boolean; @@ -703,98 +704,98 @@ export class GeoShapeUtil extends BaseBoxShapeUtil { // (undocumented) indicator(shape: TLGeoShape): JSX_2.Element; // (undocumented) - static migrations: Migrations; + static migrations: TLShapePropsMigrations; // (undocumented) onBeforeCreate: (shape: TLGeoShape) => { + id: TLShapeId; + index: IndexKey; + isLocked: boolean; + meta: JsonObject; + opacity: number; + parentId: TLParentId; props: { - growY: number; - geo: "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box"; - labelColor: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; - color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; - fill: "none" | "pattern" | "semi" | "solid"; - dash: "dashed" | "dotted" | "draw" | "solid"; - size: "l" | "m" | "s" | "xl"; - font: "draw" | "mono" | "sans" | "serif"; align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start"; - verticalAlign: "end" | "middle" | "start"; - url: string; - w: number; + color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; + dash: "dashed" | "dotted" | "draw" | "solid"; + fill: "none" | "pattern" | "semi" | "solid"; + font: "draw" | "mono" | "sans" | "serif"; + geo: "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box"; + growY: number; h: number; + labelColor: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; + size: "l" | "m" | "s" | "xl"; text: string; + url: string; + verticalAlign: "end" | "middle" | "start"; + w: number; }; + rotation: number; type: "geo"; + typeName: "shape"; x: number; y: number; - rotation: number; - index: IndexKey; - parentId: TLParentId; - isLocked: boolean; - opacity: number; - meta: JsonObject; - id: TLShapeId; - typeName: "shape"; } | undefined; // (undocumented) onBeforeUpdate: (prev: TLGeoShape, next: TLGeoShape) => { + id: TLShapeId; + index: IndexKey; + isLocked: boolean; + meta: JsonObject; + opacity: number; + parentId: TLParentId; props: { - growY: number; - geo: "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box"; - labelColor: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; - color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; - fill: "none" | "pattern" | "semi" | "solid"; - dash: "dashed" | "dotted" | "draw" | "solid"; - size: "l" | "m" | "s" | "xl"; - font: "draw" | "mono" | "sans" | "serif"; align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start"; - verticalAlign: "end" | "middle" | "start"; - url: string; - w: number; + color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; + dash: "dashed" | "dotted" | "draw" | "solid"; + fill: "none" | "pattern" | "semi" | "solid"; + font: "draw" | "mono" | "sans" | "serif"; + geo: "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box"; + growY: number; h: number; + labelColor: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; + size: "l" | "m" | "s" | "xl"; text: string; + url: string; + verticalAlign: "end" | "middle" | "start"; + w: number; }; + rotation: number; type: "geo"; + typeName: "shape"; x: number; y: number; - rotation: number; - index: IndexKey; - parentId: TLParentId; - isLocked: boolean; - opacity: number; - meta: JsonObject; - id: TLShapeId; - typeName: "shape"; } | undefined; // (undocumented) onDoubleClick: (shape: TLGeoShape) => { + id: TLShapeId; + index: IndexKey; + isLocked: boolean; + meta: JsonObject; + opacity: number; + parentId: TLParentId; props: { geo: "check-box"; }; + rotation: number; type: "geo"; + typeName: "shape"; x: number; y: number; - rotation: number; - index: IndexKey; - parentId: TLParentId; - isLocked: boolean; - opacity: number; - meta: JsonObject; - id: TLShapeId; - typeName: "shape"; } | { + id: TLShapeId; + index: IndexKey; + isLocked: boolean; + meta: JsonObject; + opacity: number; + parentId: TLParentId; props: { geo: "rectangle"; }; + rotation: number; type: "geo"; + typeName: "shape"; x: number; y: number; - rotation: number; - index: IndexKey; - parentId: TLParentId; - isLocked: boolean; - opacity: number; - meta: JsonObject; - id: TLShapeId; - typeName: "shape"; } | undefined; // (undocumented) onEditEnd: TLOnEditEndHandler; @@ -802,20 +803,20 @@ export class GeoShapeUtil extends BaseBoxShapeUtil { onResize: TLOnResizeHandler; // (undocumented) static props: { - geo: EnumStyleProp<"arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box">; - labelColor: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">; - dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; align: EnumStyleProp<"end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start">; - verticalAlign: EnumStyleProp<"end" | "middle" | "start">; - url: Validator; - w: Validator; - h: Validator; + color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; + dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">; + fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">; + font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; + geo: EnumStyleProp<"arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box">; growY: Validator; + h: Validator; + labelColor: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; text: Validator; + url: Validator; + verticalAlign: EnumStyleProp<"end" | "middle" | "start">; + w: Validator; }; // (undocumented) toSvg(shape: TLGeoShape, ctx: SvgExportContext): JSX_2.Element; @@ -836,11 +837,11 @@ export function getOccludedChildren(editor: Editor, parent: TLShape): TLShapeId[ // @public (undocumented) export function getSvgAsImage(svgString: string, isSafari: boolean, options: { - type: 'jpeg' | 'png' | 'webp'; + height: number; quality: number; scale: number; + type: 'jpeg' | 'png' | 'webp'; width: number; - height: number; }): Promise; // @public (undocumented) @@ -904,19 +905,19 @@ export class HighlightShapeUtil extends ShapeUtil { // (undocumented) indicator(shape: TLHighlightShape): JSX_2.Element; // (undocumented) - static migrations: Migrations; + static migrations: TLShapePropsMigrations; // (undocumented) onResize: TLOnResizeHandler; // (undocumented) static props: { color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - segments: ArrayOfValidator< { - type: "free" | "straight"; - points: VecModel[]; - }>; isComplete: Validator; isPen: Validator; + segments: ArrayOfValidator< { + points: VecModel[]; + type: "free" | "straight"; + }>; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; }; // (undocumented) toBackgroundSvg(shape: TLHighlightShape): JSX_2.Element; @@ -942,22 +943,22 @@ export class ImageShapeUtil extends BaseBoxShapeUtil { // (undocumented) isAspectRatioLocked: () => boolean; // (undocumented) - static migrations: Migrations; + static migrations: TLShapePropsMigrations; // (undocumented) onDoubleClick: (shape: TLImageShape) => void; // (undocumented) onDoubleClickEdge: TLOnDoubleClickHandler; // (undocumented) static props: { - w: Validator; + assetId: Validator; + crop: Validator< { + bottomRight: VecModel; + topLeft: VecModel; + } | null>; h: Validator; playing: Validator; url: Validator; - assetId: Validator; - crop: Validator< { - topLeft: VecModel; - bottomRight: VecModel; - } | null>; + w: Validator; }; // (undocumented) toSvg(shape: TLImageShape): Promise; @@ -1046,7 +1047,7 @@ export class LineShapeUtil extends ShapeUtil { // (undocumented) indicator(shape: TLLineShape): JSX_2.Element; // (undocumented) - static migrations: Migrations; + static migrations: TLShapePropsMigrations; // (undocumented) onHandleDrag: TLOnHandleDragHandler; // (undocumented) @@ -1055,14 +1056,14 @@ export class LineShapeUtil extends ShapeUtil { static props: { color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - spline: EnumStyleProp<"cubic" | "line">; points: DictValidator; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; + spline: EnumStyleProp<"cubic" | "line">; }; // (undocumented) toSvg(shape: TLLineShape): JSX_2.Element; @@ -1110,70 +1111,70 @@ export class NoteShapeUtil extends ShapeUtil { // (undocumented) indicator(shape: TLNoteShape): JSX_2.Element; // (undocumented) - static migrations: Migrations; + static migrations: TLShapePropsMigrations; // (undocumented) onBeforeCreate: (next: TLNoteShape) => { + id: TLShapeId; + index: IndexKey; + isLocked: boolean; + meta: JsonObject; + opacity: number; + parentId: TLParentId; props: { - growY: number; - fontSizeAdjustment: number; - color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; - size: "l" | "m" | "s" | "xl"; - font: "draw" | "mono" | "sans" | "serif"; align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start"; - verticalAlign: "end" | "middle" | "start"; - url: string; + color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; + font: "draw" | "mono" | "sans" | "serif"; + fontSizeAdjustment: number; + growY: number; + size: "l" | "m" | "s" | "xl"; text: string; + url: string; + verticalAlign: "end" | "middle" | "start"; }; + rotation: number; type: "note"; + typeName: "shape"; x: number; y: number; - rotation: number; - index: IndexKey; - parentId: TLParentId; - isLocked: boolean; - opacity: number; - meta: JsonObject; - id: TLShapeId; - typeName: "shape"; } | undefined; // (undocumented) onBeforeUpdate: (prev: TLNoteShape, next: TLNoteShape) => { + id: TLShapeId; + index: IndexKey; + isLocked: boolean; + meta: JsonObject; + opacity: number; + parentId: TLParentId; props: { - growY: number; - fontSizeAdjustment: number; - color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; - size: "l" | "m" | "s" | "xl"; - font: "draw" | "mono" | "sans" | "serif"; align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start"; - verticalAlign: "end" | "middle" | "start"; - url: string; + color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; + font: "draw" | "mono" | "sans" | "serif"; + fontSizeAdjustment: number; + growY: number; + size: "l" | "m" | "s" | "xl"; text: string; + url: string; + verticalAlign: "end" | "middle" | "start"; }; + rotation: number; type: "note"; + typeName: "shape"; x: number; y: number; - rotation: number; - index: IndexKey; - parentId: TLParentId; - isLocked: boolean; - opacity: number; - meta: JsonObject; - id: TLShapeId; - typeName: "shape"; } | undefined; // (undocumented) onEditEnd: TLOnEditEndHandler; // (undocumented) static props: { - color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - fontSizeAdjustment: Validator; - font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; align: EnumStyleProp<"end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start">; - verticalAlign: EnumStyleProp<"end" | "middle" | "start">; + color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; + font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; + fontSizeAdjustment: Validator; growY: Validator; - url: Validator; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; text: Validator; + url: Validator; + verticalAlign: EnumStyleProp<"end" | "middle" | "start">; }; // (undocumented) toSvg(shape: TLNoteShape, ctx: SvgExportContext): JSX_2.Element; @@ -1195,9 +1196,9 @@ export function OvalToolbarItem(): JSX_2.Element; // @public (undocumented) export const PageItemInput: ({ name, id, isCurrentPage, }: { - name: string; id: TLPageId; isCurrentPage: boolean; + name: string; }) => JSX_2.Element; // @public (undocumented) @@ -1208,8 +1209,8 @@ export function parseAndLoadDocument(editor: Editor, document: string, msg: (id: // @public (undocumented) export function parseTldrawJsonFile({ json, schema, }: { - schema: TLSchema; json: string; + schema: TLSchema; }): Result; // @public (undocumented) @@ -1295,10 +1296,10 @@ export function StarToolbarItem(): JSX_2.Element; // @public (undocumented) export const TEXT_PROPS: { - lineHeight: number; - fontWeight: string; - fontVariant: string; fontStyle: string; + fontVariant: string; + fontWeight: string; + lineHeight: number; padding: string; }; @@ -1337,70 +1338,70 @@ export class TextShapeUtil extends ShapeUtil { // (undocumented) isAspectRatioLocked: TLShapeUtilFlag; // (undocumented) - static migrations: Migrations; + static migrations: TLShapePropsMigrations; // (undocumented) onBeforeCreate: (shape: TLTextShape) => { + id: TLShapeId; + index: IndexKey; + isLocked: boolean; + meta: JsonObject; + opacity: number; + parentId: TLParentId; + props: { + align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start"; + autoSize: boolean; + color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; + font: "draw" | "mono" | "sans" | "serif"; + scale: number; + size: "l" | "m" | "s" | "xl"; + text: string; + w: number; + }; + rotation: number; + type: "text"; + typeName: "shape"; x: number; y: number; - type: "text"; - rotation: number; - index: IndexKey; - parentId: TLParentId; - isLocked: boolean; - opacity: number; - props: { - color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; - size: "l" | "m" | "s" | "xl"; - font: "draw" | "mono" | "sans" | "serif"; - align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start"; - w: number; - text: string; - scale: number; - autoSize: boolean; - }; - meta: JsonObject; - id: TLShapeId; - typeName: "shape"; } | undefined; // (undocumented) onBeforeUpdate: (prev: TLTextShape, next: TLTextShape) => { + id: TLShapeId; + index: IndexKey; + isLocked: boolean; + meta: JsonObject; + opacity: number; + parentId: TLParentId; + props: { + align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start"; + autoSize: boolean; + color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; + font: "draw" | "mono" | "sans" | "serif"; + scale: number; + size: "l" | "m" | "s" | "xl"; + text: string; + w: number; + }; + rotation: number; + type: "text"; + typeName: "shape"; x: number; y: number; - props: { - w: number; - color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow"; - size: "l" | "m" | "s" | "xl"; - font: "draw" | "mono" | "sans" | "serif"; - align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start"; - text: string; - scale: number; - autoSize: boolean; - }; - type: "text"; - rotation: number; - index: IndexKey; - parentId: TLParentId; - isLocked: boolean; - opacity: number; - meta: JsonObject; - id: TLShapeId; - typeName: "shape"; } | undefined; // (undocumented) onDoubleClickEdge: (shape: TLTextShape) => { id: TLShapeId; - type: "text"; props: { autoSize: boolean; scale?: undefined; }; + type: "text"; } | { id: TLShapeId; - type: "text"; props: { - scale: number; autoSize?: undefined; + scale: number; }; + type: "text"; } | undefined; // (undocumented) onEditEnd: TLOnEditEndHandler; @@ -1408,14 +1409,14 @@ export class TextShapeUtil extends ShapeUtil { onResize: TLOnResizeHandler; // (undocumented) static props: { - color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; align: EnumStyleProp<"end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start">; - w: Validator; - text: Validator; - scale: Validator; autoSize: Validator; + color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; + font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; + scale: Validator; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; + text: Validator; + w: Validator; }; // (undocumented) toSvg(shape: TLTextShape, ctx: SvgExportContext): JSX_2.Element; @@ -1425,8 +1426,8 @@ export class TextShapeUtil extends ShapeUtil { // @public (undocumented) export function TextStylePickerSet({ theme, styles, }: { - theme: TLDefaultColorTheme; styles: ReadonlySharedStyleMap; + theme: TLDefaultColorTheme; }): JSX_2.Element | null; // @public (undocumented) @@ -1456,37 +1457,38 @@ export function TldrawHandles({ children }: TLHandlesProps): JSX_2.Element | nul // @public export const TldrawImage: NamedExoticComponent< { -snapshot: StoreSnapshot; -format?: "png" | "svg" | undefined; -pageId?: TLPageId | undefined; -shapeUtils?: readonly TLAnyShapeUtilConstructor[] | undefined; -bounds?: Box | undefined; -scale?: number | undefined; background?: boolean | undefined; -padding?: number | undefined; +bounds?: Box | undefined; darkMode?: boolean | undefined; +format?: "png" | "svg" | undefined; +padding?: number | undefined; +pageId?: TLPageId | undefined; preserveAspectRatio?: string | undefined; +scale?: number | undefined; +shapeUtils?: readonly TLAnyShapeUtilConstructor[] | undefined; +snapshot: StoreSnapshot; }>; // @public export type TldrawImageProps = Expand<{ - snapshot: StoreSnapshot; + shapeUtils?: readonly TLAnyShapeUtilConstructor[]; format?: 'png' | 'svg'; pageId?: TLPageId; - shapeUtils?: readonly TLAnyShapeUtilConstructor[]; + snapshot: StoreSnapshot; } & Partial>; // @public (undocumented) export type TldrawProps = Expand<(Omit & Omit & { components?: TLComponents; }) & Partial & ({ - store: TLStore | TLStoreWithStatus; -} | { - store?: undefined; + snapshot?: StoreSnapshot; + defaultName?: string; + migrations?: readonly MigrationSequence[]; persistenceKey?: string; sessionId?: string; - defaultName?: string; - snapshot?: StoreSnapshot; + store?: undefined; +} | { + store: TLStore | TLStoreWithStatus; })>; // @public (undocumented) @@ -1500,101 +1502,101 @@ export const TldrawSelectionForeground: MemoExoticComponent<({ bounds, rotation, // @public (undocumented) export const TldrawUi: React_2.NamedExoticComponent<{ - children?: ReactNode; - hideUi?: boolean | undefined; - components?: Partial<{ - ContextMenu: null | React_2.ComponentType; - ActionsMenu: null | React_2.ComponentType; - HelpMenu: null | React_2.ComponentType; - ZoomMenu: null | React_2.ComponentType; - MainMenu: null | React_2.ComponentType; - Minimap: null | React_2.ComponentType; - StylePanel: null | React_2.ComponentType; - PageMenu: null | React_2.ComponentType; - NavigationPanel: null | React_2.ComponentType; - Toolbar: null | React_2.ComponentType; - KeyboardShortcutsDialog: null | React_2.ComponentType; - QuickActions: null | React_2.ComponentType; - HelperButtons: null | React_2.ComponentType; - DebugPanel: null | React_2.ComponentType; - DebugMenu: null | React_2.ComponentType; - MenuPanel: null | React_2.ComponentType; - TopPanel: null | React_2.ComponentType; - SharePanel: null | React_2.ComponentType; - }> | undefined; - renderDebugMenuItems?: (() => React_2.ReactNode) | undefined; assetUrls?: (RecursivePartial & RecursivePartial) | undefined; + children?: ReactNode; + components?: Partial<{ + ActionsMenu: null | React_2.ComponentType; + ContextMenu: null | React_2.ComponentType; + DebugMenu: null | React_2.ComponentType; + DebugPanel: null | React_2.ComponentType; + HelperButtons: null | React_2.ComponentType; + HelpMenu: null | React_2.ComponentType; + KeyboardShortcutsDialog: null | React_2.ComponentType; + MainMenu: null | React_2.ComponentType; + MenuPanel: null | React_2.ComponentType; + Minimap: null | React_2.ComponentType; + NavigationPanel: null | React_2.ComponentType; + PageMenu: null | React_2.ComponentType; + QuickActions: null | React_2.ComponentType; + SharePanel: null | React_2.ComponentType; + StylePanel: null | React_2.ComponentType; + Toolbar: null | React_2.ComponentType; + TopPanel: null | React_2.ComponentType; + ZoomMenu: null | React_2.ComponentType; + }> | undefined; + forceMobile?: boolean | undefined; + hideUi?: boolean | undefined; + onUiEvent?: TLUiEventHandler | undefined; overrides?: Partial<{ actions: TLUiOverride & { - id?: string | undefined; - }) => string; - removeToast: (id: string) => string; - clearToasts: () => void; addDialog: (dialog: Omit & { id?: string | undefined; }) => string; + addToast: (toast: Omit & { + id?: string | undefined; + }) => string; clearDialogs: () => void; - removeDialog: (id: string) => string; - updateDialog: (id: string, newDialogData: Partial) => string; - msg: (id?: string | undefined) => string; + clearToasts: () => void; isMobile: boolean; + msg: (id?: string | undefined) => string; + removeDialog: (id: string) => string; + removeToast: (id: string) => string; + updateDialog: (id: string, newDialogData: Partial) => string; }>; tools: TLUiOverride void; } & { - addToast: (toast: Omit & { - id?: string | undefined; - }) => string; - removeToast: (id: string) => string; - clearToasts: () => void; addDialog: (dialog: Omit & { id?: string | undefined; }) => string; + addToast: (toast: Omit & { + id?: string | undefined; + }) => string; clearDialogs: () => void; - removeDialog: (id: string) => string; - updateDialog: (id: string, newDialogData: Partial) => string; - msg: (id?: string | undefined) => string; + clearToasts: () => void; isMobile: boolean; + msg: (id?: string | undefined) => string; + removeDialog: (id: string) => string; + removeToast: (id: string) => string; + updateDialog: (id: string, newDialogData: Partial) => string; }>; translations: Record> | undefined; }> | Partial<{ actions: TLUiOverride & { - id?: string | undefined; - }) => string; - removeToast: (id: string) => string; - clearToasts: () => void; addDialog: (dialog: Omit & { id?: string | undefined; }) => string; + addToast: (toast: Omit & { + id?: string | undefined; + }) => string; clearDialogs: () => void; - removeDialog: (id: string) => string; - updateDialog: (id: string, newDialogData: Partial) => string; - msg: (id?: string | undefined) => string; + clearToasts: () => void; isMobile: boolean; + msg: (id?: string | undefined) => string; + removeDialog: (id: string) => string; + removeToast: (id: string) => string; + updateDialog: (id: string, newDialogData: Partial) => string; }>; tools: TLUiOverride void; } & { - addToast: (toast: Omit & { - id?: string | undefined; - }) => string; - removeToast: (id: string) => string; - clearToasts: () => void; addDialog: (dialog: Omit & { id?: string | undefined; }) => string; + addToast: (toast: Omit & { + id?: string | undefined; + }) => string; clearDialogs: () => void; - removeDialog: (id: string) => string; - updateDialog: (id: string, newDialogData: Partial) => string; - msg: (id?: string | undefined) => string; + clearToasts: () => void; isMobile: boolean; + msg: (id?: string | undefined) => string; + removeDialog: (id: string) => string; + removeToast: (id: string) => string; + updateDialog: (id: string, newDialogData: Partial) => string; }>; translations: Record> | undefined; }>[] | undefined; - onUiEvent?: TLUiEventHandler | undefined; - forceMobile?: boolean | undefined; + renderDebugMenuItems?: (() => React_2.ReactNode) | undefined; }>; // @public @@ -1757,8 +1759,8 @@ export type TLUiButtonCheckProps = { // @public (undocumented) export type TLUiButtonIconProps = { icon: string; - small?: boolean; invertIcon?: boolean; + small?: boolean; }; // @public (undocumented) @@ -1799,8 +1801,8 @@ export type TLUiComponents = Partial<{ // @public (undocumented) export type TLUiComponentsProviderProps = { - overrides?: TLUiComponents; children: ReactNode; + overrides?: TLUiComponents; }; // @public (undocumented) @@ -1826,21 +1828,21 @@ export interface TLUiDialog { // @public (undocumented) export type TLUiDialogBodyProps = { - className?: string; children: ReactNode; + className?: string; style?: React.CSSProperties; }; // @public (undocumented) export type TLUiDialogFooterProps = { - className?: string; children: ReactNode; + className?: string; }; // @public (undocumented) export type TLUiDialogHeaderProps = { - className?: string; children: ReactNode; + className?: string; }; // @public (undocumented) @@ -1854,16 +1856,16 @@ export type TLUiDialogsContextType = { addDialog: (dialog: Omit & { id?: string; }) => string; - removeDialog: (id: string) => string; - updateDialog: (id: string, newDialogData: Partial) => string; clearDialogs: () => void; dialogs: TLUiDialog[]; + removeDialog: (id: string) => string; + updateDialog: (id: string, newDialogData: Partial) => string; }; // @public (undocumented) export type TLUiDialogTitleProps = { - className?: string; children: ReactNode; + className?: string; }; // @public (undocumented) @@ -1882,12 +1884,12 @@ export interface TLUiDropdownMenuCheckboxItemProps { // @public (undocumented) export type TLUiDropdownMenuContentProps = { - id?: string; - children: ReactNode; - alignOffset?: number; - sideOffset?: number; align?: 'center' | 'end' | 'start'; + alignOffset?: number; + children: ReactNode; + id?: string; side?: 'bottom' | 'left' | 'right' | 'top'; + sideOffset?: number; }; // @public (undocumented) @@ -1905,24 +1907,24 @@ export interface TLUiDropdownMenuItemProps { // @public (undocumented) export type TLUiDropdownMenuRootProps = { - id: string; children: ReactNode; - modal?: boolean; debugOpen?: boolean; + id: string; + modal?: boolean; }; // @public (undocumented) export type TLUiDropdownMenuSubProps = { - id: string; children: ReactNode; + id: string; }; // @public (undocumented) export type TLUiDropdownMenuSubTriggerProps = { - label: string; - id?: string; - title?: string; disabled?: boolean; + id?: string; + label: string; + title?: string; }; // @public (undocumented) @@ -2191,59 +2193,59 @@ export type TLUiMainMenuProps = { // @public (undocumented) export type TLUiMenuCheckboxItemProps = { + checked?: boolean; + disabled?: boolean; icon?: IconType; id: string; kbd?: string; - title?: string; label?: { [key: string]: TranslationKey; } | TranslationKey; - readonlyOk?: boolean; onSelect: (source: TLUiEventSource) => Promise | void; - checked?: boolean; - disabled?: boolean; + readonlyOk?: boolean; + title?: string; }; // @public (undocumented) export type TLUiMenuContextProviderProps = { - type: TldrawUiMenuContextType; - sourceId: TLUiEventSource; children: React.ReactNode; + sourceId: TLUiEventSource; + type: TldrawUiMenuContextType; }; // @public (undocumented) export type TLUiMenuGroupProps = { - id: string; label?: { [key: string]: TranslationKey; } | TranslationKey; children?: ReactNode; + id: string; }; // @public (undocumented) export type TLUiMenuItemProps = { - id: string; + readonlyOk?: boolean; + noClose?: boolean; + onSelect: (source: TLUiEventSource) => Promise | void; icon?: IconType; kbd?: string; label?: { [key: string]: TranslationKey; } | TranslationKey; - readonlyOk?: boolean; - onSelect: (source: TLUiEventSource) => Promise | void; - disabled?: boolean; - noClose?: boolean; - spinner?: boolean; isSelected?: boolean; + disabled?: boolean; + spinner?: boolean; + id: string; }; // @public (undocumented) export type TLUiMenuSubmenuProps = { + children: ReactNode; + disabled?: boolean; id: string; label?: { [key: string]: Translation; } | Translation; - disabled?: boolean; - children: ReactNode; size?: 'medium' | 'small' | 'tiny' | 'wide'; }; @@ -2256,19 +2258,19 @@ export type TLUiOverrides = Partial<{ // @public (undocumented) export type TLUiPopoverContentProps = { - children: React_2.ReactNode; - side: 'bottom' | 'left' | 'right' | 'top'; align?: 'center' | 'end' | 'start'; alignOffset?: number; + children: React_2.ReactNode; + side: 'bottom' | 'left' | 'right' | 'top'; sideOffset?: number; }; // @public (undocumented) export type TLUiPopoverProps = { - id: string; - open?: boolean; children: React_2.ReactNode; + id: string; onOpenChange?: (isOpen: boolean) => void; + open?: boolean; }; // @public (undocumented) @@ -2346,8 +2348,8 @@ export type TLUiToastsContextType = { addToast: (toast: Omit & { id?: string; }) => string; - removeToast: (id: TLUiToast['id']) => string; clearToasts: () => void; + removeToast: (id: TLUiToast['id']) => string; toasts: TLUiToast[]; }; @@ -2378,18 +2380,18 @@ export type TLUiToolsContextType = Record; // @public (undocumented) export type TLUiToolsProviderProps = { + children: React_3.ReactNode; overrides?: (editor: Editor, tools: TLUiToolsContextType, helpers: { insertMedia: () => void; }) => TLUiToolsContextType; - children: React_3.ReactNode; }; // @public (undocumented) export type TLUiTranslation = { - readonly locale: string; - readonly label: string; - readonly messages: Record; readonly dir: 'ltr' | 'rtl'; + readonly label: string; + readonly locale: string; + readonly messages: Record; }; // @public (undocumented) @@ -2486,19 +2488,19 @@ export const useCurrentTranslation: () => TLUiTranslation; // @public (undocumented) export function useDefaultHelpers(): { - addToast: (toast: Omit & { - id?: string | undefined; - }) => string; - removeToast: (id: string) => string; - clearToasts: () => void; addDialog: (dialog: Omit & { id?: string | undefined; }) => string; + addToast: (toast: Omit & { + id?: string | undefined; + }) => string; clearDialogs: () => void; - removeDialog: (id: string) => string; - updateDialog: (id: string, newDialogData: Partial) => string; - msg: (id?: string | undefined) => string; + clearToasts: () => void; isMobile: boolean; + msg: (id?: string | undefined) => string; + removeDialog: (id: string) => string; + removeToast: (id: string) => string; + updateDialog: (id: string, newDialogData: Partial) => string; }; // @public (undocumented) @@ -2508,16 +2510,16 @@ export function useDialogs(): TLUiDialogsContextType; export function useEditableText(id: TLShapeId, type: string, text: string, opts?: { disableTab: boolean; }): { - rInput: React_2.RefObject; - handleFocus: typeof noop; handleBlur: () => void; - handleKeyDown: (e: React_2.KeyboardEvent) => void; handleChange: (e: React_2.ChangeEvent) => void; - handleInputPointerDown: (e: React_2.PointerEvent) => void; handleDoubleClick: (e: any) => any; - isEmpty: boolean; + handleFocus: typeof noop; + handleInputPointerDown: (e: React_2.PointerEvent) => void; + handleKeyDown: (e: React_2.KeyboardEvent) => void; isEditing: boolean; isEditingAnything: boolean; + isEmpty: boolean; + rInput: React_2.RefObject; }; // @public (undocumented) @@ -2553,24 +2555,24 @@ export function useRelevantStyles(stylesToCheck?: readonly StyleProp[]): nu // @public (undocumented) export function useTldrawUiComponents(): Partial<{ - ContextMenu: ComponentType | null; ActionsMenu: ComponentType | null; - HelpMenu: ComponentType | null; - ZoomMenu: ComponentType | null; - MainMenu: ComponentType | null; - Minimap: ComponentType | null; - StylePanel: ComponentType | null; - PageMenu: ComponentType | null; - NavigationPanel: ComponentType | null; - Toolbar: ComponentType | null; - KeyboardShortcutsDialog: ComponentType | null; - QuickActions: ComponentType | null; - HelperButtons: ComponentType | null; - DebugPanel: ComponentType | null; + ContextMenu: ComponentType | null; DebugMenu: ComponentType | null; + DebugPanel: ComponentType | null; + HelperButtons: ComponentType | null; + HelpMenu: ComponentType | null; + KeyboardShortcutsDialog: ComponentType | null; + MainMenu: ComponentType | null; MenuPanel: ComponentType | null; - TopPanel: ComponentType | null; + Minimap: ComponentType | null; + NavigationPanel: ComponentType | null; + PageMenu: ComponentType | null; + QuickActions: ComponentType | null; SharePanel: ComponentType | null; + StylePanel: ComponentType | null; + Toolbar: ComponentType | null; + TopPanel: ComponentType | null; + ZoomMenu: ComponentType | null; }>; // @public (undocumented) @@ -2598,15 +2600,15 @@ export class VideoShapeUtil extends BaseBoxShapeUtil { // (undocumented) isAspectRatioLocked: () => boolean; // (undocumented) - static migrations: Migrations; + static migrations: TLShapePropsMigrations; // (undocumented) static props: { - w: Validator; - h: Validator; - time: Validator; - playing: Validator; - url: Validator; assetId: Validator; + h: Validator; + playing: Validator; + time: Validator; + url: Validator; + w: Validator; }; // (undocumented) toSvg(shape: TLVideoShape): JSX_2.Element; diff --git a/packages/tldraw/api/api.json b/packages/tldraw/api/api.json index 99fbd7074..9fb5b3376 100644 --- a/packages/tldraw/api/api.json +++ b/packages/tldraw/api/api.json @@ -1,7 +1,7 @@ { "metadata": { "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.41.0", + "toolVersion": "7.43.1", "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { @@ -1211,8 +1211,8 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -1528,7 +1528,7 @@ }, { "kind": "Content", - "text": "{\n labelColor: import(\"@tldraw/editor\")." + "text": "{\n arrowheadEnd: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -1537,7 +1537,7 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n color: import(\"@tldraw/editor\")." + "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n arrowheadStart: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -1546,7 +1546,16 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n fill: import(\"@tldraw/editor\")." + "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n bend: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n color: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -1555,7 +1564,7 @@ }, { "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"@tldraw/editor\")." + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n dash: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -1564,43 +1573,7 @@ }, { "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n arrowheadStart: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n arrowheadEnd: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n font: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n start: import(\"@tldraw/editor\")." + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n end: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -1618,7 +1591,7 @@ }, { "kind": "Content", - "text": "<{\n type: \"binding\";\n boundShapeId: import(\"@tldraw/editor\")." + "text": "<{\n boundShapeId: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -1627,7 +1600,7 @@ }, { "kind": "Content", - "text": ";\n normalizedAnchor: import(\"@tldraw/editor\")." + "text": ";\n isExact: boolean;\n isPrecise: boolean;\n normalizedAnchor: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -1636,7 +1609,7 @@ }, { "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n }>;\n point: import(\"@tldraw/editor\")." + "text": ";\n type: \"binding\";\n }>;\n point: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -1645,7 +1618,52 @@ }, { "kind": "Content", - "text": "<{\n x: number;\n y: number;\n type: \"point\";\n }>;\n }, never>;\n end: import(\"@tldraw/editor\")." + "text": "<{\n type: \"point\";\n x: number;\n y: number;\n }>;\n }, never>;\n fill: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n font: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n labelColor: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n labelPosition: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n size: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n start: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -1663,7 +1681,7 @@ }, { "kind": "Content", - "text": "<{\n type: \"binding\";\n boundShapeId: import(\"@tldraw/editor\")." + "text": "<{\n boundShapeId: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -1672,7 +1690,7 @@ }, { "kind": "Content", - "text": ";\n normalizedAnchor: import(\"@tldraw/editor\")." + "text": ";\n isExact: boolean;\n isPrecise: boolean;\n normalizedAnchor: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -1681,7 +1699,7 @@ }, { "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n }>;\n point: import(\"@tldraw/editor\")." + "text": ";\n type: \"binding\";\n }>;\n point: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -1690,7 +1708,7 @@ }, { "kind": "Content", - "text": "<{\n x: number;\n y: number;\n type: \"point\";\n }>;\n }, never>;\n bend: import(\"@tldraw/editor\")." + "text": "<{\n type: \"point\";\n x: number;\n y: number;\n }>;\n }, never>;\n text: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -1699,25 +1717,7 @@ }, { "kind": "Content", - "text": ";\n text: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n labelPosition: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n }" + "text": ";\n }" }, { "kind": "Content", @@ -2200,8 +2200,8 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -2319,25 +2319,7 @@ }, { "kind": "Content", - "text": "{\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n assetId: " + "text": "{\n assetId: " }, { "kind": "Reference", @@ -2355,7 +2337,7 @@ }, { "kind": "Content", - "text": ">;\n url: " + "text": ">;\n h: " }, { "kind": "Reference", @@ -2364,7 +2346,25 @@ }, { "kind": "Content", - "text": ";\n }" + "text": ";\n url: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" }, { "kind": "Content", @@ -2431,7 +2431,7 @@ }, { "kind": "Content", - "text": "{\n forceMobile?: boolean;\n children: " + "text": "{\n children: " }, { "kind": "Reference", @@ -2440,7 +2440,7 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n forceMobile?: boolean;\n}" }, { "kind": "Content", @@ -4368,7 +4368,7 @@ }, { "kind": "Content", - "text": "{\n type?: string | undefined;\n quality?: number | undefined;\n}" + "text": "{\n quality?: number | undefined;\n type?: string | undefined;\n}" }, { "kind": "Content", @@ -5098,8 +5098,8 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -5182,7 +5182,7 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n fill: import(\"@tldraw/editor\")." + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n dash: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -5191,7 +5191,7 @@ }, { "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"@tldraw/editor\")." + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n fill: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -5200,34 +5200,7 @@ }, { "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n segments: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "ArrayOfValidator", - "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"free\" | \"straight\";\n points: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "[];\n }>;\n isComplete: import(\"@tldraw/editor\")." + "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n isClosed: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -5236,7 +5209,7 @@ }, { "kind": "Content", - "text": ";\n isClosed: import(\"@tldraw/editor\")." + "text": ";\n isComplete: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -5254,7 +5227,34 @@ }, { "kind": "Content", - "text": ";\n }" + "text": ";\n segments: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "ArrayOfValidator", + "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" + }, + { + "kind": "Content", + "text": "<{\n points: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "[];\n type: \"free\" | \"straight\";\n }>;\n size: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n }" }, { "kind": "Content", @@ -5952,8 +5952,8 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -6027,16 +6027,7 @@ }, { "kind": "Content", - "text": "{\n w: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: import(\"@tldraw/editor\")." + "text": "{\n h: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -6054,7 +6045,16 @@ }, { "kind": "Content", - "text": ";\n }" + "text": ";\n w: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" }, { "kind": "Content", @@ -6333,22 +6333,22 @@ }, { "kind": "Content", - "text": "{\n onEvent?: " - }, - { - "kind": "Reference", - "text": "TLUiEventHandler", - "canonicalReference": "tldraw!TLUiEventHandler:type" - }, - { - "kind": "Content", - "text": ";\n children: " + "text": "{\n children: " }, { "kind": "Reference", "text": "React.ReactNode", "canonicalReference": "@types/react!React.ReactNode:type" }, + { + "kind": "Content", + "text": ";\n onEvent?: " + }, + { + "kind": "Reference", + "text": "TLUiEventHandler", + "canonicalReference": "tldraw!TLUiEventHandler:type" + }, { "kind": "Content", "text": ";\n}" @@ -6377,7 +6377,7 @@ }, { "kind": "Content", - "text": "{\n title?: string;\n body?: string;\n cancel?: string;\n confirm?: string;\n displayDontShowAgain?: boolean;\n onCancel: () => void;\n onContinue: () => void;\n}" + "text": "{\n body?: string;\n cancel?: string;\n confirm?: string;\n displayDontShowAgain?: boolean;\n onCancel: () => void;\n onContinue: () => void;\n title?: string;\n}" }, { "kind": "Content", @@ -6608,7 +6608,7 @@ }, { "kind": "Content", - "text": ";\n ids: " + "text": ";\n format: 'jpeg' | 'json' | 'png' | 'svg' | 'webp';\n ids: " }, { "kind": "Reference", @@ -6617,7 +6617,7 @@ }, { "kind": "Content", - "text": "[];\n format: 'jpeg' | 'json' | 'png' | 'svg' | 'webp';\n opts?: " + "text": "[];\n opts?: " }, { "kind": "Reference", @@ -7470,8 +7470,8 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -7632,16 +7632,7 @@ }, { "kind": "Content", - "text": "{\n w: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: import(\"@tldraw/editor\")." + "text": "{\n h: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -7659,7 +7650,16 @@ }, { "kind": "Content", - "text": ";\n }" + "text": ";\n w: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" }, { "kind": "Content", @@ -8383,8 +8383,8 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -8423,34 +8423,7 @@ }, { "kind": "Content", - "text": ") => {\n props: {\n growY: number;\n geo: \"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\";\n labelColor: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n fill: \"none\" | \"pattern\" | \"semi\" | \"solid\";\n dash: \"dashed\" | \"dotted\" | \"draw\" | \"solid\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n verticalAlign: \"end\" | \"middle\" | \"start\";\n url: string;\n w: number;\n h: number;\n text: string;\n };\n type: \"geo\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." + "text": ") => {\n id: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8459,7 +8432,34 @@ }, { "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" + "text": ";\n index: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n opacity: number;\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n props: {\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n dash: \"dashed\" | \"dotted\" | \"draw\" | \"solid\";\n fill: \"none\" | \"pattern\" | \"semi\" | \"solid\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n geo: \"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\";\n growY: number;\n h: number;\n labelColor: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n text: string;\n url: string;\n verticalAlign: \"end\" | \"middle\" | \"start\";\n w: number;\n };\n rotation: number;\n type: \"geo\";\n typeName: \"shape\";\n x: number;\n y: number;\n } | undefined" }, { "kind": "Content", @@ -8507,34 +8507,7 @@ }, { "kind": "Content", - "text": ") => {\n props: {\n growY: number;\n geo: \"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\";\n labelColor: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n fill: \"none\" | \"pattern\" | \"semi\" | \"solid\";\n dash: \"dashed\" | \"dotted\" | \"draw\" | \"solid\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n verticalAlign: \"end\" | \"middle\" | \"start\";\n url: string;\n w: number;\n h: number;\n text: string;\n };\n type: \"geo\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." + "text": ") => {\n id: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8543,7 +8516,34 @@ }, { "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" + "text": ";\n index: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n opacity: number;\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n props: {\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n dash: \"dashed\" | \"dotted\" | \"draw\" | \"solid\";\n fill: \"none\" | \"pattern\" | \"semi\" | \"solid\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n geo: \"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\";\n growY: number;\n h: number;\n labelColor: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n text: string;\n url: string;\n verticalAlign: \"end\" | \"middle\" | \"start\";\n w: number;\n };\n rotation: number;\n type: \"geo\";\n typeName: \"shape\";\n x: number;\n y: number;\n } | undefined" }, { "kind": "Content", @@ -8582,34 +8582,7 @@ }, { "kind": "Content", - "text": ") => {\n props: {\n geo: \"check-box\";\n };\n type: \"geo\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." + "text": ") => {\n id: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8618,7 +8591,7 @@ }, { "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | {\n props: {\n geo: \"rectangle\";\n };\n type: \"geo\";\n x: number;\n y: number;\n rotation: number;\n index: import(\"@tldraw/editor\")." + "text": ";\n index: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8627,16 +8600,7 @@ }, { "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." + "text": ";\n isLocked: boolean;\n meta: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8645,7 +8609,16 @@ }, { "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." + "text": ";\n opacity: number;\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n props: {\n geo: \"check-box\";\n };\n rotation: number;\n type: \"geo\";\n typeName: \"shape\";\n x: number;\n y: number;\n } | {\n id: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8654,7 +8627,34 @@ }, { "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" + "text": ";\n index: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n opacity: number;\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n props: {\n geo: \"rectangle\";\n };\n rotation: number;\n type: \"geo\";\n typeName: \"shape\";\n x: number;\n y: number;\n } | undefined" }, { "kind": "Content", @@ -8772,7 +8772,7 @@ }, { "kind": "Content", - "text": "{\n geo: import(\"@tldraw/editor\")." + "text": "{\n align: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8781,7 +8781,7 @@ }, { "kind": "Content", - "text": "<\"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\">;\n labelColor: import(\"@tldraw/editor\")." + "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n color: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8790,7 +8790,7 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n color: import(\"@tldraw/editor\")." + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n dash: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8799,7 +8799,7 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n fill: import(\"@tldraw/editor\")." + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n fill: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8808,7 +8808,7 @@ }, { "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"@tldraw/editor\")." + "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n font: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8817,7 +8817,7 @@ }, { "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"@tldraw/editor\")." + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n geo: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8826,43 +8826,7 @@ }, { "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n verticalAlign: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end\" | \"middle\" | \"start\">;\n url: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n w: import(\"@tldraw/editor\")." + "text": "<\"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\">;\n growY: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8880,7 +8844,25 @@ }, { "kind": "Content", - "text": ";\n growY: import(\"@tldraw/editor\")." + "text": ";\n labelColor: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n text: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8889,7 +8871,7 @@ }, { "kind": "Content", - "text": ";\n text: import(\"@tldraw/editor\")." + "text": ";\n url: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -8898,7 +8880,25 @@ }, { "kind": "Content", - "text": ";\n }" + "text": ";\n verticalAlign: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end\" | \"middle\" | \"start\">;\n w: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" }, { "kind": "Content", @@ -9229,7 +9229,7 @@ }, { "kind": "Content", - "text": "{\n type: 'jpeg' | 'png' | 'webp';\n quality: number;\n scale: number;\n width: number;\n height: number;\n}" + "text": "{\n height: number;\n quality: number;\n scale: number;\n type: 'jpeg' | 'png' | 'webp';\n width: number;\n}" }, { "kind": "Content", @@ -10298,8 +10298,8 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -10382,34 +10382,7 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n segments: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "ArrayOfValidator", - "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"free\" | \"straight\";\n points: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "[];\n }>;\n isComplete: import(\"@tldraw/editor\")." + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n isComplete: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -10427,7 +10400,34 @@ }, { "kind": "Content", - "text": ";\n }" + "text": ";\n segments: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "ArrayOfValidator", + "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" + }, + { + "kind": "Content", + "text": "<{\n points: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "[];\n type: \"free\" | \"straight\";\n }>;\n size: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n }" }, { "kind": "Content", @@ -10885,8 +10885,8 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -10999,43 +10999,7 @@ }, { "kind": "Content", - "text": "{\n w: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n playing: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n assetId: import(\"@tldraw/editor\")." + "text": "{\n assetId: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -11062,7 +11026,7 @@ }, { "kind": "Content", - "text": "<{\n topLeft: import(\"@tldraw/editor\")." + "text": "<{\n bottomRight: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -11071,7 +11035,7 @@ }, { "kind": "Content", - "text": ";\n bottomRight: import(\"@tldraw/editor\")." + "text": ";\n topLeft: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -11080,7 +11044,43 @@ }, { "kind": "Content", - "text": ";\n } | null>;\n }" + "text": ";\n } | null>;\n h: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n playing: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n w: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" }, { "kind": "Content", @@ -12210,8 +12210,8 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -12347,7 +12347,25 @@ }, { "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"@tldraw/editor\")." + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n points: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "DictValidator", + "canonicalReference": "@tldraw/validate!DictValidator:class" + }, + { + "kind": "Content", + "text": ";\n size: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -12365,25 +12383,7 @@ }, { "kind": "Content", - "text": "<\"cubic\" | \"line\">;\n points: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "DictValidator", - "canonicalReference": "@tldraw/validate!DictValidator:class" - }, - { - "kind": "Content", - "text": ";\n }" + "text": "<\"cubic\" | \"line\">;\n }" }, { "kind": "Content", @@ -13157,8 +13157,8 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -13197,34 +13197,7 @@ }, { "kind": "Content", - "text": ") => {\n props: {\n growY: number;\n fontSizeAdjustment: number;\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n verticalAlign: \"end\" | \"middle\" | \"start\";\n url: string;\n text: string;\n };\n type: \"note\";\n x: number;\n y: number;\n rotation: number;\n index: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: " + "text": ") => {\n id: " }, { "kind": "Reference", @@ -13233,7 +13206,34 @@ }, { "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" + "text": ";\n index: " + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n opacity: number;\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n props: {\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n fontSizeAdjustment: number;\n growY: number;\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n text: string;\n url: string;\n verticalAlign: \"end\" | \"middle\" | \"start\";\n };\n rotation: number;\n type: \"note\";\n typeName: \"shape\";\n x: number;\n y: number;\n } | undefined" }, { "kind": "Content", @@ -13281,34 +13281,7 @@ }, { "kind": "Content", - "text": ") => {\n props: {\n growY: number;\n fontSizeAdjustment: number;\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n verticalAlign: \"end\" | \"middle\" | \"start\";\n url: string;\n text: string;\n };\n type: \"note\";\n x: number;\n y: number;\n rotation: number;\n index: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: " + "text": ") => {\n id: " }, { "kind": "Reference", @@ -13317,7 +13290,34 @@ }, { "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" + "text": ";\n index: " + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n opacity: number;\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n props: {\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n fontSizeAdjustment: number;\n growY: number;\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n text: string;\n url: string;\n verticalAlign: \"end\" | \"middle\" | \"start\";\n };\n rotation: number;\n type: \"note\";\n typeName: \"shape\";\n x: number;\n y: number;\n } | undefined" }, { "kind": "Content", @@ -13391,7 +13391,7 @@ }, { "kind": "Content", - "text": "{\n color: import(\"@tldraw/editor\")." + "text": "{\n align: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -13400,7 +13400,7 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"@tldraw/editor\")." + "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n color: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -13409,7 +13409,16 @@ }, { "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n fontSizeAdjustment: import(\"@tldraw/editor\")." + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n font: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n fontSizeAdjustment: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -13418,34 +13427,7 @@ }, { "kind": "Content", - "text": ";\n font: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n verticalAlign: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end\" | \"middle\" | \"start\">;\n growY: import(\"@tldraw/editor\")." + "text": ";\n growY: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -13454,7 +13436,16 @@ }, { "kind": "Content", - "text": ";\n url: import(\"@tldraw/editor\")." + "text": ";\n size: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n text: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -13463,7 +13454,7 @@ }, { "kind": "Content", - "text": ";\n text: import(\"@tldraw/editor\")." + "text": ";\n url: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -13472,7 +13463,16 @@ }, { "kind": "Content", - "text": ";\n }" + "text": ";\n verticalAlign: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end\" | \"middle\" | \"start\">;\n }" }, { "kind": "Content", @@ -13746,7 +13746,7 @@ }, { "kind": "Content", - "text": "{\n name: string;\n id: " + "text": "{\n id: " }, { "kind": "Reference", @@ -13755,7 +13755,7 @@ }, { "kind": "Content", - "text": ";\n isCurrentPage: boolean;\n}" + "text": ";\n isCurrentPage: boolean;\n name: string;\n}" }, { "kind": "Content", @@ -13851,7 +13851,7 @@ }, { "kind": "Content", - "text": "{\n schema: " + "text": "{\n json: string;\n schema: " }, { "kind": "Reference", @@ -13860,7 +13860,7 @@ }, { "kind": "Content", - "text": ";\n json: string;\n}" + "text": ";\n}" }, { "kind": "Content", @@ -15102,7 +15102,7 @@ }, { "kind": "Content", - "text": "{\n lineHeight: number;\n fontWeight: string;\n fontVariant: string;\n fontStyle: string;\n padding: string;\n}" + "text": "{\n fontStyle: string;\n fontVariant: string;\n fontWeight: string;\n lineHeight: number;\n padding: string;\n}" } ], "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/default-shape-constants.ts", @@ -15695,8 +15695,8 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -15735,34 +15735,7 @@ }, { "kind": "Content", - "text": ") => {\n x: number;\n y: number;\n type: \"text\";\n rotation: number;\n index: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n props: {\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n w: number;\n text: string;\n scale: number;\n autoSize: boolean;\n };\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." + "text": ") => {\n id: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -15771,7 +15744,34 @@ }, { "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" + "text": ";\n index: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n opacity: number;\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n props: {\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n autoSize: boolean;\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n scale: number;\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n text: string;\n w: number;\n };\n rotation: number;\n type: \"text\";\n typeName: \"shape\";\n x: number;\n y: number;\n } | undefined" }, { "kind": "Content", @@ -15819,34 +15819,7 @@ }, { "kind": "Content", - "text": ") => {\n x: number;\n y: number;\n props: {\n w: number;\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n text: string;\n scale: number;\n autoSize: boolean;\n };\n type: \"text\";\n rotation: number;\n index: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";\n parentId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLParentId", - "canonicalReference": "@tldraw/tlschema!TLParentId:type" - }, - { - "kind": "Content", - "text": ";\n isLocked: boolean;\n opacity: number;\n meta: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n id: import(\"@tldraw/editor\")." + "text": ") => {\n id: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -15855,7 +15828,34 @@ }, { "kind": "Content", - "text": ";\n typeName: \"shape\";\n } | undefined" + "text": ";\n index: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "IndexKey", + "canonicalReference": "@tldraw/utils!IndexKey:type" + }, + { + "kind": "Content", + "text": ";\n isLocked: boolean;\n meta: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "JsonObject", + "canonicalReference": "@tldraw/utils!JsonObject:type" + }, + { + "kind": "Content", + "text": ";\n opacity: number;\n parentId: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLParentId", + "canonicalReference": "@tldraw/tlschema!TLParentId:type" + }, + { + "kind": "Content", + "text": ";\n props: {\n align: \"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\";\n autoSize: boolean;\n color: \"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\";\n font: \"draw\" | \"mono\" | \"sans\" | \"serif\";\n scale: number;\n size: \"l\" | \"m\" | \"s\" | \"xl\";\n text: string;\n w: number;\n };\n rotation: number;\n type: \"text\";\n typeName: \"shape\";\n x: number;\n y: number;\n } | undefined" }, { "kind": "Content", @@ -15903,7 +15903,7 @@ }, { "kind": "Content", - "text": ";\n type: \"text\";\n props: {\n autoSize: boolean;\n scale?: undefined;\n };\n } | {\n id: import(\"@tldraw/editor\")." + "text": ";\n props: {\n autoSize: boolean;\n scale?: undefined;\n };\n type: \"text\";\n } | {\n id: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -15912,7 +15912,7 @@ }, { "kind": "Content", - "text": ";\n type: \"text\";\n props: {\n scale: number;\n autoSize?: undefined;\n };\n } | undefined" + "text": ";\n props: {\n autoSize?: undefined;\n scale: number;\n };\n type: \"text\";\n } | undefined" }, { "kind": "Content", @@ -16030,7 +16030,7 @@ }, { "kind": "Content", - "text": "{\n color: import(\"@tldraw/editor\")." + "text": "{\n align: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -16039,7 +16039,16 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"@tldraw/editor\")." + "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n autoSize: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n color: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -16048,7 +16057,7 @@ }, { "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"@tldraw/editor\")." + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n font: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -16057,7 +16066,16 @@ }, { "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"@tldraw/editor\")." + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n scale: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n size: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -16066,7 +16084,7 @@ }, { "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n w: import(\"@tldraw/editor\")." + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n text: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -16075,7 +16093,7 @@ }, { "kind": "Content", - "text": ";\n text: import(\"@tldraw/editor\")." + "text": ";\n w: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -16084,25 +16102,7 @@ }, { "kind": "Content", - "text": ";\n scale: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n autoSize: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n }" + "text": ";\n }" }, { "kind": "Content", @@ -16240,22 +16240,22 @@ }, { "kind": "Content", - "text": "{\n theme: " - }, - { - "kind": "Reference", - "text": "TLDefaultColorTheme", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type" - }, - { - "kind": "Content", - "text": ";\n styles: " + "text": "{\n styles: " }, { "kind": "Reference", "text": "ReadonlySharedStyleMap", "canonicalReference": "@tldraw/editor!ReadonlySharedStyleMap:class" }, + { + "kind": "Content", + "text": ";\n theme: " + }, + { + "kind": "Reference", + "text": "TLDefaultColorTheme", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type" + }, { "kind": "Content", "text": ";\n}" @@ -16516,7 +16516,7 @@ { "kind": "Reference", "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:interface" + "canonicalReference": "@tldraw/store!SerializedSchema:type" }, { "kind": "Content", @@ -16637,7 +16637,34 @@ }, { "kind": "Content", - "text": "<{\n snapshot: " + "text": "<{\n background?: boolean | undefined;\n bounds?: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Box", + "canonicalReference": "@tldraw/editor!Box:class" + }, + { + "kind": "Content", + "text": " | undefined;\n darkMode?: boolean | undefined;\n format?: \"png\" | \"svg\" | undefined;\n padding?: number | undefined;\n pageId?: " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": " | undefined;\n preserveAspectRatio?: string | undefined;\n scale?: number | undefined;\n shapeUtils?: readonly " + }, + { + "kind": "Reference", + "text": "TLAnyShapeUtilConstructor", + "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" + }, + { + "kind": "Content", + "text": "[] | undefined;\n snapshot: " }, { "kind": "Reference", @@ -16655,34 +16682,7 @@ }, { "kind": "Content", - "text": ">;\n format?: \"png\" | \"svg\" | undefined;\n pageId?: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": " | undefined;\n shapeUtils?: readonly " - }, - { - "kind": "Reference", - "text": "TLAnyShapeUtilConstructor", - "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" - }, - { - "kind": "Content", - "text": "[] | undefined;\n bounds?: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": " | undefined;\n scale?: number | undefined;\n background?: boolean | undefined;\n padding?: number | undefined;\n darkMode?: boolean | undefined;\n preserveAspectRatio?: string | undefined;\n}>" + "text": ">;\n}>" } ], "fileUrlPath": "packages/tldraw/src/lib/TldrawImage.tsx", @@ -16710,7 +16710,25 @@ }, { "kind": "Content", - "text": "<{\n snapshot: " + "text": "<{\n shapeUtils?: readonly " + }, + { + "kind": "Reference", + "text": "TLAnyShapeUtilConstructor", + "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" + }, + { + "kind": "Content", + "text": "[];\n format?: 'png' | 'svg';\n pageId?: " + }, + { + "kind": "Reference", + "text": "TLPageId", + "canonicalReference": "@tldraw/tlschema!TLPageId:type" + }, + { + "kind": "Content", + "text": ";\n snapshot: " }, { "kind": "Reference", @@ -16728,25 +16746,7 @@ }, { "kind": "Content", - "text": ">;\n format?: 'png' | 'svg';\n pageId?: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";\n shapeUtils?: readonly " - }, - { - "kind": "Reference", - "text": "TLAnyShapeUtilConstructor", - "canonicalReference": "@tldraw/editor!TLAnyShapeUtilConstructor:type" - }, - { - "kind": "Content", - "text": "[];\n} & " + "text": ">;\n} & " }, { "kind": "Reference", @@ -16858,25 +16858,7 @@ }, { "kind": "Content", - "text": "> & ({\n store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TLStoreWithStatus", - "canonicalReference": "@tldraw/editor!TLStoreWithStatus:type" - }, - { - "kind": "Content", - "text": ";\n} | {\n store?: undefined;\n persistenceKey?: string;\n sessionId?: string;\n defaultName?: string;\n snapshot?: " + "text": "> & ({\n snapshot?: " }, { "kind": "Reference", @@ -16894,7 +16876,34 @@ }, { "kind": "Content", - "text": ">;\n})>" + "text": ">;\n defaultName?: string;\n migrations?: readonly " + }, + { + "kind": "Reference", + "text": "MigrationSequence", + "canonicalReference": "@tldraw/store!MigrationSequence:interface" + }, + { + "kind": "Content", + "text": "[];\n persistenceKey?: string;\n sessionId?: string;\n store?: undefined;\n} | {\n store: " + }, + { + "kind": "Reference", + "text": "TLStore", + "canonicalReference": "@tldraw/tlschema!TLStore:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLStoreWithStatus", + "canonicalReference": "@tldraw/editor!TLStoreWithStatus:type" + }, + { + "kind": "Content", + "text": ";\n})>" }, { "kind": "Content", @@ -16906,7 +16915,7 @@ "name": "TldrawProps", "typeTokenRange": { "startIndex": 1, - "endIndex": 25 + "endIndex": 27 } }, { @@ -17081,277 +17090,7 @@ }, { "kind": "Content", - "text": "<{\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n hideUi?: boolean | undefined;\n components?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n ContextMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n ActionsMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n HelpMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n ZoomMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n MainMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n Minimap: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n StylePanel: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n PageMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n NavigationPanel: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n Toolbar: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n KeyboardShortcutsDialog: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n QuickActions: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n HelperButtons: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n DebugPanel: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n DebugMenu: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n MenuPanel: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n TopPanel: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n SharePanel: null | " - }, - { - "kind": "Reference", - "text": "React.ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": ";\n }> | undefined;\n renderDebugMenuItems?: (() => " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ") | undefined;\n assetUrls?: (import(\"@tldraw/editor\")." + "text": "<{\n assetUrls?: (import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -17387,7 +17126,277 @@ }, { "kind": "Content", - "text": ">) | undefined;\n overrides?: " + "text": ">) | undefined;\n children?: " + }, + { + "kind": "Reference", + "text": "ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n components?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n ActionsMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n ContextMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n DebugMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n DebugPanel: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n HelperButtons: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n HelpMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n KeyboardShortcutsDialog: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n MainMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n MenuPanel: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n Minimap: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n NavigationPanel: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n PageMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n QuickActions: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n SharePanel: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n StylePanel: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n Toolbar: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n TopPanel: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n ZoomMenu: null | " + }, + { + "kind": "Reference", + "text": "React.ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": ";\n }> | undefined;\n forceMobile?: boolean | undefined;\n hideUi?: boolean | undefined;\n onUiEvent?: import(\"./context/events\")." + }, + { + "kind": "Reference", + "text": "TLUiEventHandler", + "canonicalReference": "tldraw!TLUiEventHandler:type" + }, + { + "kind": "Content", + "text": " | undefined;\n overrides?: " }, { "kind": "Reference", @@ -17414,7 +17423,25 @@ }, { "kind": "Content", - "text": ", {\n addToast: (toast: " + "text": ", {\n addDialog: (dialog: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n addToast: (toast: " }, { "kind": "Reference", @@ -17432,25 +17459,7 @@ }, { "kind": "Content", - "text": ", \"id\"> & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " + "text": ", \"id\"> & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n clearToasts: () => void;\n isMobile: boolean;\n msg: (id?: string | undefined) => string;\n removeDialog: (id: string) => string;\n removeToast: (id: string) => string;\n updateDialog: (id: string, newDialogData: " }, { "kind": "Reference", @@ -17468,7 +17477,7 @@ }, { "kind": "Content", - "text": ">) => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n tools: import(\"./overrides\")." + "text": ">) => string;\n }>;\n tools: import(\"./overrides\")." }, { "kind": "Reference", @@ -17486,7 +17495,25 @@ }, { "kind": "Content", - "text": ", {\n insertMedia: () => void;\n } & {\n addToast: (toast: " + "text": ", {\n insertMedia: () => void;\n } & {\n addDialog: (dialog: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n addToast: (toast: " }, { "kind": "Reference", @@ -17504,25 +17531,7 @@ }, { "kind": "Content", - "text": ", \"id\"> & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " + "text": ", \"id\"> & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n clearToasts: () => void;\n isMobile: boolean;\n msg: (id?: string | undefined) => string;\n removeDialog: (id: string) => string;\n removeToast: (id: string) => string;\n updateDialog: (id: string, newDialogData: " }, { "kind": "Reference", @@ -17540,7 +17549,7 @@ }, { "kind": "Content", - "text": ">) => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n translations: " + "text": ">) => string;\n }>;\n translations: " }, { "kind": "Reference", @@ -17585,7 +17594,25 @@ }, { "kind": "Content", - "text": ", {\n addToast: (toast: " + "text": ", {\n addDialog: (dialog: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n addToast: (toast: " }, { "kind": "Reference", @@ -17603,25 +17630,7 @@ }, { "kind": "Content", - "text": ", \"id\"> & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " + "text": ", \"id\"> & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n clearToasts: () => void;\n isMobile: boolean;\n msg: (id?: string | undefined) => string;\n removeDialog: (id: string) => string;\n removeToast: (id: string) => string;\n updateDialog: (id: string, newDialogData: " }, { "kind": "Reference", @@ -17639,7 +17648,7 @@ }, { "kind": "Content", - "text": ">) => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n tools: import(\"./overrides\")." + "text": ">) => string;\n }>;\n tools: import(\"./overrides\")." }, { "kind": "Reference", @@ -17657,7 +17666,25 @@ }, { "kind": "Content", - "text": ", {\n insertMedia: () => void;\n } & {\n addToast: (toast: " + "text": ", {\n insertMedia: () => void;\n } & {\n addDialog: (dialog: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n addToast: (toast: " }, { "kind": "Reference", @@ -17675,25 +17702,7 @@ }, { "kind": "Content", - "text": ", \"id\"> & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " + "text": ", \"id\"> & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n clearToasts: () => void;\n isMobile: boolean;\n msg: (id?: string | undefined) => string;\n removeDialog: (id: string) => string;\n removeToast: (id: string) => string;\n updateDialog: (id: string, newDialogData: " }, { "kind": "Reference", @@ -17711,7 +17720,7 @@ }, { "kind": "Content", - "text": ">) => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n }>;\n translations: " + "text": ">) => string;\n }>;\n translations: " }, { "kind": "Reference", @@ -17729,16 +17738,16 @@ }, { "kind": "Content", - "text": "> | undefined;\n }>[] | undefined;\n onUiEvent?: import(\"./context/events\")." + "text": "> | undefined;\n }>[] | undefined;\n renderDebugMenuItems?: (() => " }, { "kind": "Reference", - "text": "TLUiEventHandler", - "canonicalReference": "tldraw!TLUiEventHandler:type" + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" }, { "kind": "Content", - "text": " | undefined;\n forceMobile?: boolean | undefined;\n}>" + "text": ") | undefined;\n}>" } ], "fileUrlPath": "packages/tldraw/src/lib/ui/TldrawUi.tsx", @@ -20384,7 +20393,7 @@ }, { "kind": "Content", - "text": "{\n icon: string;\n small?: boolean;\n invertIcon?: boolean;\n}" + "text": "{\n icon: string;\n invertIcon?: boolean;\n small?: boolean;\n}" }, { "kind": "Content", @@ -20846,22 +20855,22 @@ }, { "kind": "Content", - "text": "{\n overrides?: " - }, - { - "kind": "Reference", - "text": "TLUiComponents", - "canonicalReference": "tldraw!TLUiComponents:type" - }, - { - "kind": "Content", - "text": ";\n children: " + "text": "{\n children: " }, { "kind": "Reference", "text": "ReactNode", "canonicalReference": "@types/react!React.ReactNode:type" }, + { + "kind": "Content", + "text": ";\n overrides?: " + }, + { + "kind": "Reference", + "text": "TLUiComponents", + "canonicalReference": "tldraw!TLUiComponents:type" + }, { "kind": "Content", "text": ";\n}" @@ -21084,7 +21093,7 @@ }, { "kind": "Content", - "text": "{\n className?: string;\n children: " + "text": "{\n children: " }, { "kind": "Reference", @@ -21093,7 +21102,7 @@ }, { "kind": "Content", - "text": ";\n style?: " + "text": ";\n className?: string;\n style?: " }, { "kind": "Reference", @@ -21128,7 +21137,7 @@ }, { "kind": "Content", - "text": "{\n className?: string;\n children: " + "text": "{\n children: " }, { "kind": "Reference", @@ -21137,7 +21146,7 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n className?: string;\n}" }, { "kind": "Content", @@ -21163,7 +21172,7 @@ }, { "kind": "Content", - "text": "{\n className?: string;\n children: " + "text": "{\n children: " }, { "kind": "Reference", @@ -21172,7 +21181,7 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n className?: string;\n}" }, { "kind": "Content", @@ -21261,7 +21270,16 @@ }, { "kind": "Content", - "text": ", 'id'> & {\n id?: string;\n }) => string;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " + "text": ", 'id'> & {\n id?: string;\n }) => string;\n clearDialogs: () => void;\n dialogs: " + }, + { + "kind": "Reference", + "text": "TLUiDialog", + "canonicalReference": "tldraw!TLUiDialog:interface" + }, + { + "kind": "Content", + "text": "[];\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " }, { "kind": "Reference", @@ -21279,16 +21297,7 @@ }, { "kind": "Content", - "text": ">) => string;\n clearDialogs: () => void;\n dialogs: " - }, - { - "kind": "Reference", - "text": "TLUiDialog", - "canonicalReference": "tldraw!TLUiDialog:interface" - }, - { - "kind": "Content", - "text": "[];\n}" + "text": ">) => string;\n}" }, { "kind": "Content", @@ -21314,7 +21323,7 @@ }, { "kind": "Content", - "text": "{\n className?: string;\n children: " + "text": "{\n children: " }, { "kind": "Reference", @@ -21323,7 +21332,7 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n className?: string;\n}" }, { "kind": "Content", @@ -21512,7 +21521,7 @@ }, { "kind": "Content", - "text": "{\n id?: string;\n children: " + "text": "{\n align?: 'center' | 'end' | 'start';\n alignOffset?: number;\n children: " }, { "kind": "Reference", @@ -21521,7 +21530,7 @@ }, { "kind": "Content", - "text": ";\n alignOffset?: number;\n sideOffset?: number;\n align?: 'center' | 'end' | 'start';\n side?: 'bottom' | 'left' | 'right' | 'top';\n}" + "text": ";\n id?: string;\n side?: 'bottom' | 'left' | 'right' | 'top';\n sideOffset?: number;\n}" }, { "kind": "Content", @@ -21655,7 +21664,7 @@ }, { "kind": "Content", - "text": "{\n id: string;\n children: " + "text": "{\n children: " }, { "kind": "Reference", @@ -21664,7 +21673,7 @@ }, { "kind": "Content", - "text": ";\n modal?: boolean;\n debugOpen?: boolean;\n}" + "text": ";\n debugOpen?: boolean;\n id: string;\n modal?: boolean;\n}" }, { "kind": "Content", @@ -21690,7 +21699,7 @@ }, { "kind": "Content", - "text": "{\n id: string;\n children: " + "text": "{\n children: " }, { "kind": "Reference", @@ -21699,7 +21708,7 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n id: string;\n}" }, { "kind": "Content", @@ -21725,7 +21734,7 @@ }, { "kind": "Content", - "text": "{\n label: string;\n id?: string;\n title?: string;\n disabled?: boolean;\n}" + "text": "{\n disabled?: boolean;\n id?: string;\n label: string;\n title?: string;\n}" }, { "kind": "Content", @@ -24764,7 +24773,7 @@ }, { "kind": "Content", - "text": "{\n icon?: IconType;\n id: string;\n kbd?: string;\n title?: string;\n label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n readonlyOk?: boolean;\n onSelect: (source: " + "text": "{\n checked?: boolean;\n disabled?: boolean;\n icon?: IconType;\n id: string;\n kbd?: string;\n label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n onSelect: (source: " }, { "kind": "Reference", @@ -24782,7 +24791,7 @@ }, { "kind": "Content", - "text": " | void;\n checked?: boolean;\n disabled?: boolean;\n}" + "text": " | void;\n readonlyOk?: boolean;\n title?: string;\n}" }, { "kind": "Content", @@ -24832,12 +24841,12 @@ }, { "kind": "Content", - "text": "{\n type: " + "text": "{\n children: " }, { "kind": "Reference", - "text": "TldrawUiMenuContextType", - "canonicalReference": "tldraw!~TldrawUiMenuContextType:type" + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" }, { "kind": "Content", @@ -24850,12 +24859,12 @@ }, { "kind": "Content", - "text": ";\n children: " + "text": ";\n type: " }, { "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" + "text": "TldrawUiMenuContextType", + "canonicalReference": "tldraw!~TldrawUiMenuContextType:type" }, { "kind": "Content", @@ -24901,7 +24910,7 @@ }, { "kind": "Content", - "text": "{\n id: string;\n label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n children?: " + "text": "{\n label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n children?: " }, { "kind": "Reference", @@ -24910,7 +24919,7 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n id: string;\n}" }, { "kind": "Content", @@ -24981,7 +24990,7 @@ }, { "kind": "Content", - "text": "{\n id: string;\n icon?: IconType;\n kbd?: string;\n label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n readonlyOk?: boolean;\n onSelect: (source: " + "text": "{\n readonlyOk?: boolean;\n noClose?: boolean;\n onSelect: (source: " }, { "kind": "Reference", @@ -24999,7 +25008,7 @@ }, { "kind": "Content", - "text": " | void;\n disabled?: boolean;\n noClose?: boolean;\n spinner?: boolean;\n isSelected?: boolean;\n}" + "text": " | void;\n icon?: IconType;\n kbd?: string;\n label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n isSelected?: boolean;\n disabled?: boolean;\n spinner?: boolean;\n id: string;\n}" }, { "kind": "Content", @@ -25065,7 +25074,7 @@ }, { "kind": "Content", - "text": "{\n id: string;\n label?: {\n [key: string]: Translation;\n } | Translation;\n disabled?: boolean;\n children: " + "text": "{\n children: " }, { "kind": "Reference", @@ -25074,7 +25083,7 @@ }, { "kind": "Content", - "text": ";\n size?: 'medium' | 'small' | 'tiny' | 'wide';\n}" + "text": ";\n disabled?: boolean;\n id: string;\n label?: {\n [key: string]: Translation;\n } | Translation;\n size?: 'medium' | 'small' | 'tiny' | 'wide';\n}" }, { "kind": "Content", @@ -25207,7 +25216,7 @@ }, { "kind": "Content", - "text": "{\n children: " + "text": "{\n align?: 'center' | 'end' | 'start';\n alignOffset?: number;\n children: " }, { "kind": "Reference", @@ -25216,7 +25225,7 @@ }, { "kind": "Content", - "text": ";\n side: 'bottom' | 'left' | 'right' | 'top';\n align?: 'center' | 'end' | 'start';\n alignOffset?: number;\n sideOffset?: number;\n}" + "text": ";\n side: 'bottom' | 'left' | 'right' | 'top';\n sideOffset?: number;\n}" }, { "kind": "Content", @@ -25242,7 +25251,7 @@ }, { "kind": "Content", - "text": "{\n id: string;\n open?: boolean;\n children: " + "text": "{\n children: " }, { "kind": "Reference", @@ -25251,7 +25260,7 @@ }, { "kind": "Content", - "text": ";\n onOpenChange?: (isOpen: boolean) => void;\n}" + "text": ";\n id: string;\n onOpenChange?: (isOpen: boolean) => void;\n open?: boolean;\n}" }, { "kind": "Content", @@ -25833,7 +25842,7 @@ }, { "kind": "Content", - "text": ", 'id'> & {\n id?: string;\n }) => string;\n removeToast: (id: " + "text": ", 'id'> & {\n id?: string;\n }) => string;\n clearToasts: () => void;\n removeToast: (id: " }, { "kind": "Reference", @@ -25842,7 +25851,7 @@ }, { "kind": "Content", - "text": "['id']) => string;\n clearToasts: () => void;\n toasts: " + "text": "['id']) => string;\n toasts: " }, { "kind": "Reference", @@ -26216,7 +26225,16 @@ }, { "kind": "Content", - "text": "{\n overrides?: (editor: " + "text": "{\n children: " + }, + { + "kind": "Reference", + "text": "React.ReactNode", + "canonicalReference": "@types/react!React.ReactNode:type" + }, + { + "kind": "Content", + "text": ";\n overrides?: (editor: " }, { "kind": "Reference", @@ -26241,15 +26259,6 @@ "text": "TLUiToolsContextType", "canonicalReference": "tldraw!TLUiToolsContextType:type" }, - { - "kind": "Content", - "text": ";\n children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, { "kind": "Content", "text": ";\n}" @@ -26278,7 +26287,7 @@ }, { "kind": "Content", - "text": "{\n readonly locale: string;\n readonly label: string;\n readonly messages: " + "text": "{\n readonly dir: 'ltr' | 'rtl';\n readonly label: string;\n readonly locale: string;\n readonly messages: " }, { "kind": "Reference", @@ -26296,7 +26305,7 @@ }, { "kind": "Content", - "text": ", string>;\n readonly dir: 'ltr' | 'rtl';\n}" + "text": ", string>;\n}" }, { "kind": "Content", @@ -27341,7 +27350,25 @@ }, { "kind": "Content", - "text": "{\n addToast: (toast: " + "text": "{\n addDialog: (dialog: " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": " & {\n id?: string | undefined;\n }) => string;\n addToast: (toast: " }, { "kind": "Reference", @@ -27359,25 +27386,7 @@ }, { "kind": "Content", - "text": ", \"id\"> & {\n id?: string | undefined;\n }) => string;\n removeToast: (id: string) => string;\n clearToasts: () => void;\n addDialog: (dialog: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n removeDialog: (id: string) => string;\n updateDialog: (id: string, newDialogData: " + "text": ", \"id\"> & {\n id?: string | undefined;\n }) => string;\n clearDialogs: () => void;\n clearToasts: () => void;\n isMobile: boolean;\n msg: (id?: string | undefined) => string;\n removeDialog: (id: string) => string;\n removeToast: (id: string) => string;\n updateDialog: (id: string, newDialogData: " }, { "kind": "Reference", @@ -27395,7 +27404,7 @@ }, { "kind": "Content", - "text": ">) => string;\n msg: (id?: string | undefined) => string;\n isMobile: boolean;\n}" + "text": ">) => string;\n}" }, { "kind": "Content", @@ -27485,52 +27494,7 @@ }, { "kind": "Content", - "text": "{\n rInput: " - }, - { - "kind": "Reference", - "text": "React.RefObject", - "canonicalReference": "@types/react!React.RefObject:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HTMLTextAreaElement", - "canonicalReference": "!HTMLTextAreaElement:interface" - }, - { - "kind": "Content", - "text": ">;\n handleFocus: typeof " - }, - { - "kind": "Reference", - "text": "noop", - "canonicalReference": "tldraw!~noop:function" - }, - { - "kind": "Content", - "text": ";\n handleBlur: () => void;\n handleKeyDown: (e: " - }, - { - "kind": "Reference", - "text": "React.KeyboardEvent", - "canonicalReference": "@types/react!React.KeyboardEvent:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HTMLTextAreaElement", - "canonicalReference": "!HTMLTextAreaElement:interface" - }, - { - "kind": "Content", - "text": ">) => void;\n handleChange: (e: " + "text": "{\n handleBlur: () => void;\n handleChange: (e: " }, { "kind": "Reference", @@ -27548,7 +27512,16 @@ }, { "kind": "Content", - "text": ">) => void;\n handleInputPointerDown: (e: " + "text": ">) => void;\n handleDoubleClick: (e: any) => any;\n handleFocus: typeof " + }, + { + "kind": "Reference", + "text": "noop", + "canonicalReference": "tldraw!~noop:function" + }, + { + "kind": "Content", + "text": ";\n handleInputPointerDown: (e: " }, { "kind": "Reference", @@ -27557,7 +27530,43 @@ }, { "kind": "Content", - "text": ") => void;\n handleDoubleClick: (e: any) => any;\n isEmpty: boolean;\n isEditing: boolean;\n isEditingAnything: boolean;\n}" + "text": ") => void;\n handleKeyDown: (e: " + }, + { + "kind": "Reference", + "text": "React.KeyboardEvent", + "canonicalReference": "@types/react!React.KeyboardEvent:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "HTMLTextAreaElement", + "canonicalReference": "!HTMLTextAreaElement:interface" + }, + { + "kind": "Content", + "text": ">) => void;\n isEditing: boolean;\n isEditingAnything: boolean;\n isEmpty: boolean;\n rInput: " + }, + { + "kind": "Reference", + "text": "React.RefObject", + "canonicalReference": "@types/react!React.RefObject:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "HTMLTextAreaElement", + "canonicalReference": "!HTMLTextAreaElement:interface" + }, + { + "kind": "Content", + "text": ">;\n}" }, { "kind": "Content", @@ -28092,7 +28101,25 @@ }, { "kind": "Content", - "text": "<{\n ContextMenu: " + "text": "<{\n ActionsMenu: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiActionsMenuProps", + "canonicalReference": "tldraw!TLUiActionsMenuProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n ContextMenu: " }, { "kind": "Reference", @@ -28110,7 +28137,25 @@ }, { "kind": "Content", - "text": "> | null;\n ActionsMenu: " + "text": "> | null;\n DebugMenu: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n DebugPanel: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n HelperButtons: " }, { "kind": "Reference", @@ -28123,8 +28168,8 @@ }, { "kind": "Reference", - "text": "TLUiActionsMenuProps", - "canonicalReference": "tldraw!TLUiActionsMenuProps:type" + "text": "TLUiHelperButtonsProps", + "canonicalReference": "tldraw!TLUiHelperButtonsProps:type" }, { "kind": "Content", @@ -28146,7 +28191,7 @@ }, { "kind": "Content", - "text": "> | null;\n ZoomMenu: " + "text": "> | null;\n KeyboardShortcutsDialog: " }, { "kind": "Reference", @@ -28159,8 +28204,8 @@ }, { "kind": "Reference", - "text": "TLUiZoomMenuProps", - "canonicalReference": "tldraw!TLUiZoomMenuProps:type" + "text": "TLUiKeyboardShortcutsDialogProps", + "canonicalReference": "tldraw!TLUiKeyboardShortcutsDialogProps:type" }, { "kind": "Content", @@ -28182,7 +28227,61 @@ }, { "kind": "Content", - "text": "> | null;\n Minimap: " + "text": "> | null;\n MenuPanel: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n Minimap: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n NavigationPanel: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n PageMenu: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": " | null;\n QuickActions: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiQuickActionsProps", + "canonicalReference": "tldraw!TLUiQuickActionsProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n SharePanel: " }, { "kind": "Reference", @@ -28209,106 +28308,7 @@ }, { "kind": "Content", - "text": "> | null;\n PageMenu: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n NavigationPanel: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n Toolbar: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n KeyboardShortcutsDialog: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiKeyboardShortcutsDialogProps", - "canonicalReference": "tldraw!TLUiKeyboardShortcutsDialogProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n QuickActions: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiQuickActionsProps", - "canonicalReference": "tldraw!TLUiQuickActionsProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n HelperButtons: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiHelperButtonsProps", - "canonicalReference": "tldraw!TLUiHelperButtonsProps:type" - }, - { - "kind": "Content", - "text": "> | null;\n DebugPanel: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n DebugMenu: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": " | null;\n MenuPanel: " + "text": "> | null;\n Toolbar: " }, { "kind": "Reference", @@ -28326,7 +28326,7 @@ }, { "kind": "Content", - "text": " | null;\n SharePanel: " + "text": " | null;\n ZoomMenu: " }, { "kind": "Reference", @@ -28335,7 +28335,16 @@ }, { "kind": "Content", - "text": " | null;\n}>" + "text": "<" + }, + { + "kind": "Reference", + "text": "TLUiZoomMenuProps", + "canonicalReference": "tldraw!TLUiZoomMenuProps:type" + }, + { + "kind": "Content", + "text": "> | null;\n}>" }, { "kind": "Content", @@ -28742,8 +28751,8 @@ }, { "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" }, { "kind": "Content", @@ -28773,52 +28782,7 @@ }, { "kind": "Content", - "text": "{\n w: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n time: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n playing: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n assetId: import(\"@tldraw/editor\")." + "text": "{\n assetId: import(\"@tldraw/editor\")." }, { "kind": "Reference", @@ -28836,7 +28800,52 @@ }, { "kind": "Content", - "text": " | null>;\n }" + "text": " | null>;\n h: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n playing: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n time: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n w: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n }" }, { "kind": "Content", diff --git a/packages/tldraw/package.json b/packages/tldraw/package.json index 288cc2773..1fa49505f 100644 --- a/packages/tldraw/package.json +++ b/packages/tldraw/package.json @@ -54,6 +54,7 @@ "@radix-ui/react-slider": "^1.1.0", "@radix-ui/react-toast": "^1.1.1", "@tldraw/editor": "workspace:*", + "@tldraw/store": "workspace:*", "canvas-size": "^1.2.6", "classnames": "^2.3.2", "hotkeys-js": "^3.11.2", diff --git a/packages/tldraw/src/lib/Tldraw.tsx b/packages/tldraw/src/lib/Tldraw.tsx index 320b52555..203cf49f9 100644 --- a/packages/tldraw/src/lib/Tldraw.tsx +++ b/packages/tldraw/src/lib/Tldraw.tsx @@ -3,6 +3,7 @@ import { ErrorScreen, Expand, LoadingScreen, + MigrationSequence, StoreSnapshot, TLEditorComponents, TLOnMountHandler, @@ -55,6 +56,7 @@ export type TldrawProps = Expand< } | { store?: undefined + migrations?: readonly MigrationSequence[] persistenceKey?: string sessionId?: string defaultName?: string diff --git a/packages/tldraw/src/lib/utils/assets/preload-font.ts b/packages/tldraw/src/lib/utils/assets/preload-font.ts index b18da8ccb..ca094bca3 100644 --- a/packages/tldraw/src/lib/utils/assets/preload-font.ts +++ b/packages/tldraw/src/lib/utils/assets/preload-font.ts @@ -32,6 +32,7 @@ export async function preloadFont(id: string, font: TLTypeFace) { featureSettings, stretch, unicodeRange, + // @ts-expect-error why is this here variant, } diff --git a/packages/tldraw/src/lib/utils/tldr/file.ts b/packages/tldraw/src/lib/utils/tldr/file.ts index 33bac0e30..bee4c2ac2 100644 --- a/packages/tldraw/src/lib/utils/tldr/file.ts +++ b/packages/tldraw/src/lib/utils/tldr/file.ts @@ -6,6 +6,8 @@ import { RecordId, Result, SerializedSchema, + SerializedSchemaV1, + SerializedSchemaV2, SerializedStore, T, TLAsset, @@ -40,19 +42,29 @@ export interface TldrawFile { records: UnknownRecord[] } +const schemaV1 = T.object({ + schemaVersion: T.literal(1), + storeVersion: T.positiveInteger, + recordVersions: T.dict( + T.string, + T.object({ + version: T.positiveInteger, + subTypeVersions: T.dict(T.string, T.positiveInteger).optional(), + subTypeKey: T.string.optional(), + }) + ), +}) + +const schemaV2 = T.object({ + schemaVersion: T.literal(2), + sequences: T.dict(T.string, T.positiveInteger), +}) + const tldrawFileValidator: T.Validator = T.object({ tldrawFileFormatVersion: T.nonZeroInteger, - schema: T.object({ - schemaVersion: T.positiveInteger, - storeVersion: T.positiveInteger, - recordVersions: T.dict( - T.string, - T.object({ - version: T.positiveInteger, - subTypeVersions: T.dict(T.string, T.positiveInteger).optional(), - subTypeKey: T.string.optional(), - }) - ), + schema: T.union('schemaVersion', { + 1: schemaV1, + 2: schemaV2, }), records: T.arrayOf( T.object({ diff --git a/packages/tldraw/src/test/TldrawEditor.test.tsx b/packages/tldraw/src/test/TldrawEditor.test.tsx index df82c98f0..c25ac55e8 100644 --- a/packages/tldraw/src/test/TldrawEditor.test.tsx +++ b/packages/tldraw/src/test/TldrawEditor.test.tsx @@ -15,10 +15,6 @@ import { GeoShapeUtil } from '../lib/shapes/geo/GeoShapeUtil' import { renderTldrawComponent } from './testutils/renderTldrawComponent' function checkAllShapes(editor: Editor, shapes: string[]) { - expect(Object.keys(editor!.store.schema.types.shape.migrations.subTypeMigrations!)).toStrictEqual( - shapes - ) - expect(Object.keys(editor!.shapeUtils)).toStrictEqual(shapes) } diff --git a/packages/tldraw/tsconfig.json b/packages/tldraw/tsconfig.json index 9bdffb10f..4807b2fb5 100644 --- a/packages/tldraw/tsconfig.json +++ b/packages/tldraw/tsconfig.json @@ -10,6 +10,9 @@ "references": [ { "path": "../editor" + }, + { + "path": "../store" } ] } diff --git a/packages/tlschema/api-report.md b/packages/tlschema/api-report.md index 1d5fb6dd1..86936de6c 100644 --- a/packages/tlschema/api-report.md +++ b/packages/tlschema/api-report.md @@ -8,7 +8,9 @@ import { BaseRecord } from '@tldraw/store'; import { Expand } from '@tldraw/utils'; import { IndexKey } from '@tldraw/utils'; import { JsonObject } from '@tldraw/utils'; -import { Migrations } from '@tldraw/store'; +import { LegacyMigrations } from '@tldraw/store'; +import { MigrationId } from '@tldraw/store'; +import { MigrationSequence } from '@tldraw/store'; import { RecordId } from '@tldraw/store'; import { RecordType } from '@tldraw/store'; import { SerializedStore } from '@tldraw/store'; @@ -26,56 +28,56 @@ export const ArrowShapeArrowheadEndStyle: EnumStyleProp<"arrow" | "bar" | "diamo export const ArrowShapeArrowheadStartStyle: EnumStyleProp<"arrow" | "bar" | "diamond" | "dot" | "inverted" | "none" | "pipe" | "square" | "triangle">; // @internal (undocumented) -export const arrowShapeMigrations: Migrations; +export const arrowShapeMigrations: TLShapePropsMigrations; // @public (undocumented) export const arrowShapeProps: { - labelColor: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">; - dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - arrowheadStart: EnumStyleProp<"arrow" | "bar" | "diamond" | "dot" | "inverted" | "none" | "pipe" | "square" | "triangle">; arrowheadEnd: EnumStyleProp<"arrow" | "bar" | "diamond" | "dot" | "inverted" | "none" | "pipe" | "square" | "triangle">; - font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; - start: T.UnionValidator<"type", { - binding: T.ObjectValidator<{ - type: "binding"; - boundShapeId: TLShapeId; - normalizedAnchor: VecModel; - isExact: boolean; - isPrecise: boolean; - } & {}>; - point: T.ObjectValidator<{ - x: number; - y: number; - type: "point"; - } & {}>; - }, never>; + arrowheadStart: EnumStyleProp<"arrow" | "bar" | "diamond" | "dot" | "inverted" | "none" | "pipe" | "square" | "triangle">; + bend: T.Validator; + color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; + dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">; end: T.UnionValidator<"type", { binding: T.ObjectValidator<{ - type: "binding"; boundShapeId: TLShapeId; - normalizedAnchor: VecModel; isExact: boolean; isPrecise: boolean; + normalizedAnchor: VecModel; + type: "binding"; } & {}>; point: T.ObjectValidator<{ + type: "point"; x: number; y: number; - type: "point"; } & {}>; }, never>; - bend: T.Validator; - text: T.Validator; + fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">; + font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; + labelColor: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; labelPosition: T.Validator; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; + start: T.UnionValidator<"type", { + binding: T.ObjectValidator<{ + boundShapeId: TLShapeId; + isExact: boolean; + isPrecise: boolean; + normalizedAnchor: VecModel; + type: "binding"; + } & {}>; + point: T.ObjectValidator<{ + type: "point"; + x: number; + y: number; + } & {}>; + }, never>; + text: T.Validator; }; // @public export const assetIdValidator: T.Validator; // @internal (undocumented) -export const assetMigrations: Migrations; +export const assetMigrations: MigrationSequence; // @public (undocumented) export const AssetRecordType: RecordType; @@ -84,14 +86,14 @@ export const AssetRecordType: RecordType; export const assetValidator: T.Validator; // @internal (undocumented) -export const bookmarkShapeMigrations: Migrations; +export const bookmarkShapeMigrations: TLShapePropsMigrations; // @public (undocumented) export const bookmarkShapeProps: { - w: T.Validator; - h: T.Validator; assetId: T.Validator; + h: T.Validator; url: T.Validator; + w: T.Validator; }; // @public @@ -118,28 +120,31 @@ export const canvasUiColorTypeValidator: T.Validator<"accent" | "black" | "laser // @public export function createAssetValidator(type: Type, props: T.Validator): T.ObjectValidator<{ [P in "id" | "meta" | "typeName" | (undefined extends Props ? never : "props") | (undefined extends Type ? never : "type")]: { id: TLAssetId; - typeName: 'asset'; - type: Type; - props: Props; meta: JsonObject; + props: Props; + type: Type; + typeName: 'asset'; }[P]; } & { [P_1 in (undefined extends Props ? "props" : never) | (undefined extends Type ? "type" : never)]?: { id: TLAssetId; - typeName: 'asset'; - type: Type; - props: Props; meta: JsonObject; + props: Props; + type: Type; + typeName: 'asset'; }[P_1] | undefined; }>; -// @public (undocumented) +// @public export const createPresenceStateDerivation: ($user: Signal<{ - id: string; color: string; + id: string; name: string; }>, instanceId?: TLInstancePresence['id']) => (store: TLStore) => Signal; // @public (undocumented) export function createShapeId(id?: string): TLShapeId; +// @public (undocumented) +export function createShapePropsMigrationSequence(migrations: TLShapePropsMigrations): TLShapePropsMigrations; + // @public (undocumented) export function createShapeValidator(type: Type, props?: { [K in keyof Props]: T.Validatable; @@ -148,7 +153,8 @@ export function createShapeValidator[P]; } & { [P_1 in (undefined extends Props ? "props" : never) | (undefined extends Type ? "type" : never)]?: TLBaseShape[P_1] | undefined; }>; // @public -export function createTLSchema({ shapes, }?: { +export function createTLSchema({ shapes, migrations, }?: { + migrations?: readonly MigrationSequence[]; shapes?: Record; }): TLSchema; @@ -157,8 +163,8 @@ export const DefaultColorStyle: EnumStyleProp<"black" | "blue" | "green" | "grey // @public (undocumented) export const DefaultColorThemePalette: { - lightMode: TLDefaultColorTheme; darkMode: TLDefaultColorTheme; + lightMode: TLDefaultColorTheme; }; // @public (undocumented) @@ -170,9 +176,9 @@ export const DefaultFillStyle: EnumStyleProp<"none" | "pattern" | "semi" | "soli // @public (undocumented) export const DefaultFontFamilies: { draw: string; + mono: string; sans: string; serif: string; - mono: string; }; // @public (undocumented) @@ -191,250 +197,250 @@ export const DefaultVerticalAlignStyle: EnumStyleProp<"end" | "middle" | "start" export const DocumentRecordType: RecordType; // @internal (undocumented) -export const drawShapeMigrations: Migrations; +export const drawShapeMigrations: TLShapePropsMigrations; // @public (undocumented) export const drawShapeProps: { color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">; dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - segments: T.ArrayOfValidator<{ - type: "free" | "straight"; - points: VecModel[]; - } & {}>; - isComplete: T.Validator; + fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">; isClosed: T.Validator; + isComplete: T.Validator; isPen: T.Validator; + segments: T.ArrayOfValidator<{ + points: VecModel[]; + type: "free" | "straight"; + } & {}>; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; }; // @public (undocumented) export const EMBED_DEFINITIONS: readonly [{ - readonly type: "tldraw"; - readonly title: "tldraw"; - readonly hostnames: readonly ["beta.tldraw.com", "tldraw.com", "localhost:3000"]; - readonly minWidth: 300; - readonly minHeight: 300; - readonly width: 720; - readonly height: 500; readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 500; + readonly hostnames: readonly ["beta.tldraw.com", "tldraw.com", "localhost:3000"]; + readonly minHeight: 300; + readonly minWidth: 300; readonly overridePermissions: { readonly 'allow-top-navigation': true; }; + readonly title: "tldraw"; readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; + readonly type: "tldraw"; + readonly width: 720; }, { - readonly type: "figma"; - readonly title: "Figma"; + readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 500; readonly hostnames: readonly ["figma.com"]; - readonly width: 720; - readonly height: 500; - readonly doesResize: true; + readonly title: "Figma"; readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; + readonly type: "figma"; + readonly width: 720; }, { - readonly type: "google_maps"; - readonly title: "Google Maps"; + readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 500; readonly hostnames: readonly ["google.*"]; - readonly width: 720; - readonly height: 500; - readonly doesResize: true; + readonly title: "Google Maps"; readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; + readonly type: "google_maps"; + readonly width: 720; }, { - readonly type: "val_town"; - readonly title: "Val Town"; + readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 500; readonly hostnames: readonly ["val.town"]; - readonly minWidth: 260; readonly minHeight: 100; - readonly width: 720; - readonly height: 500; - readonly doesResize: true; + readonly minWidth: 260; + readonly title: "Val Town"; readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; + readonly type: "val_town"; + readonly width: 720; }, { - readonly type: "codesandbox"; - readonly title: "CodeSandbox"; + readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 500; readonly hostnames: readonly ["codesandbox.io"]; - readonly minWidth: 300; readonly minHeight: 300; + readonly minWidth: 300; + readonly title: "CodeSandbox"; + readonly toEmbedUrl: (url: string) => string | undefined; + readonly type: "codesandbox"; readonly width: 720; - readonly height: 500; - readonly doesResize: true; - readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; }, { - readonly type: "codepen"; - readonly title: "Codepen"; + readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 400; readonly hostnames: readonly ["codepen.io"]; - readonly minWidth: 300; readonly minHeight: 300; - readonly width: 520; - readonly height: 400; - readonly doesResize: true; + readonly minWidth: 300; + readonly title: "Codepen"; readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; -}, { - readonly type: "scratch"; - readonly title: "Scratch"; - readonly hostnames: readonly ["scratch.mit.edu"]; + readonly type: "codepen"; readonly width: 520; - readonly height: 400; +}, { readonly doesResize: false; - readonly toEmbedUrl: (url: string) => string | undefined; readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 400; + readonly hostnames: readonly ["scratch.mit.edu"]; + readonly title: "Scratch"; + readonly toEmbedUrl: (url: string) => string | undefined; + readonly type: "scratch"; + readonly width: 520; }, { - readonly type: "youtube"; - readonly title: "YouTube"; - readonly hostnames: readonly ["*.youtube.com", "youtube.com", "youtu.be"]; - readonly width: 800; - readonly height: 450; readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 450; + readonly hostnames: readonly ["*.youtube.com", "youtube.com", "youtu.be"]; + readonly isAspectRatioLocked: true; readonly overridePermissions: { readonly 'allow-presentation': true; }; - readonly isAspectRatioLocked: true; + readonly title: "YouTube"; readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; + readonly type: "youtube"; + readonly width: 800; }, { - readonly type: "google_calendar"; - readonly title: "Google Calendar"; + readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 500; readonly hostnames: readonly ["calendar.google.*"]; - readonly width: 720; - readonly height: 500; - readonly minWidth: 460; - readonly minHeight: 360; - readonly doesResize: true; readonly instructionLink: "https://support.google.com/calendar/answer/41207?hl=en"; - readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; -}, { - readonly type: "google_slides"; - readonly title: "Google Slides"; - readonly hostnames: readonly ["docs.google.*"]; - readonly width: 720; - readonly height: 500; - readonly minWidth: 460; readonly minHeight: 360; - readonly doesResize: true; + readonly minWidth: 460; + readonly title: "Google Calendar"; readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; + readonly type: "google_calendar"; + readonly width: 720; }, { - readonly type: "github_gist"; - readonly title: "GitHub Gist"; + readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 500; + readonly hostnames: readonly ["docs.google.*"]; + readonly minHeight: 360; + readonly minWidth: 460; + readonly title: "Google Slides"; + readonly toEmbedUrl: (url: string) => string | undefined; + readonly type: "google_slides"; + readonly width: 720; +}, { + readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 500; readonly hostnames: readonly ["gist.github.com"]; - readonly width: 720; - readonly height: 500; - readonly doesResize: true; + readonly title: "GitHub Gist"; readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; + readonly type: "github_gist"; + readonly width: 720; }, { - readonly type: "replit"; - readonly title: "Replit"; + readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 500; readonly hostnames: readonly ["replit.com"]; - readonly width: 720; - readonly height: 500; - readonly doesResize: true; + readonly title: "Replit"; readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; + readonly type: "replit"; + readonly width: 720; }, { - readonly type: "felt"; - readonly title: "Felt"; + readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 500; readonly hostnames: readonly ["felt.com"]; - readonly width: 720; - readonly height: 500; - readonly doesResize: true; + readonly title: "Felt"; readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; -}, { - readonly type: "spotify"; - readonly title: "Spotify"; - readonly hostnames: readonly ["open.spotify.com"]; + readonly type: "felt"; readonly width: 720; +}, { + readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; readonly height: 500; + readonly hostnames: readonly ["open.spotify.com"]; readonly minHeight: 500; readonly overrideOutlineRadius: 12; - readonly doesResize: true; + readonly title: "Spotify"; readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; + readonly type: "spotify"; + readonly width: 720; }, { - readonly type: "vimeo"; - readonly title: "Vimeo"; - readonly hostnames: readonly ["vimeo.com", "player.vimeo.com"]; - readonly width: 640; + readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; readonly height: 360; - readonly doesResize: true; + readonly hostnames: readonly ["vimeo.com", "player.vimeo.com"]; readonly isAspectRatioLocked: true; + readonly title: "Vimeo"; readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; + readonly type: "vimeo"; + readonly width: 640; }, { - readonly type: "excalidraw"; - readonly title: "Excalidraw"; + readonly doesResize: true; + readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 500; readonly hostnames: readonly ["excalidraw.com"]; - readonly width: 720; - readonly height: 500; - readonly doesResize: true; readonly isAspectRatioLocked: true; + readonly title: "Excalidraw"; readonly toEmbedUrl: (url: string) => string | undefined; - readonly fromEmbedUrl: (url: string) => string | undefined; -}, { - readonly type: "observable"; - readonly title: "Observable"; - readonly hostnames: readonly ["observablehq.com"]; + readonly type: "excalidraw"; readonly width: 720; - readonly height: 500; - readonly doesResize: true; - readonly isAspectRatioLocked: false; +}, { readonly backgroundColor: "#fff"; - readonly toEmbedUrl: (url: string) => string | undefined; + readonly doesResize: true; readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: 500; + readonly hostnames: readonly ["observablehq.com"]; + readonly isAspectRatioLocked: false; + readonly title: "Observable"; + readonly toEmbedUrl: (url: string) => string | undefined; + readonly type: "observable"; + readonly width: 720; }]; // @public (undocumented) export type EmbedDefinition = { - readonly type: string; - readonly title: string; - readonly hostnames: readonly string[]; - readonly minWidth?: number; - readonly minHeight?: number; - readonly width: number; - readonly height: number; - readonly doesResize: boolean; - readonly isAspectRatioLocked?: boolean; - readonly overridePermissions?: TLEmbedShapePermissions; - readonly instructionLink?: string; readonly backgroundColor?: string; - readonly overrideOutlineRadius?: number; - readonly toEmbedUrl: (url: string) => string | undefined; + readonly doesResize: boolean; readonly fromEmbedUrl: (url: string) => string | undefined; + readonly height: number; + readonly hostnames: readonly string[]; + readonly instructionLink?: string; + readonly isAspectRatioLocked?: boolean; + readonly minHeight?: number; + readonly minWidth?: number; + readonly overrideOutlineRadius?: number; + readonly overridePermissions?: TLEmbedShapePermissions; + readonly title: string; + readonly toEmbedUrl: (url: string) => string | undefined; + readonly type: string; + readonly width: number; }; // @internal (undocumented) -export const embedShapeMigrations: Migrations; +export const embedShapeMigrations: TLShapePropsMigrations; // @public export const embedShapePermissionDefaults: { readonly 'allow-downloads-without-user-activation': false; readonly 'allow-downloads': false; + readonly 'allow-forms': true; readonly 'allow-modals': false; readonly 'allow-orientation-lock': false; readonly 'allow-pointer-lock': false; - readonly 'allow-popups': true; readonly 'allow-popups-to-escape-sandbox': false; + readonly 'allow-popups': true; readonly 'allow-presentation': false; - readonly 'allow-storage-access-by-user-activation': false; - readonly 'allow-top-navigation': false; - readonly 'allow-top-navigation-by-user-activation': false; - readonly 'allow-scripts': true; readonly 'allow-same-origin': true; - readonly 'allow-forms': true; + readonly 'allow-scripts': true; + readonly 'allow-storage-access-by-user-activation': false; + readonly 'allow-top-navigation-by-user-activation': false; + readonly 'allow-top-navigation': false; }; // @public (undocumented) export const embedShapeProps: { - w: T.Validator; h: T.Validator; url: T.Validator; + w: T.Validator; }; // @public @@ -446,37 +452,37 @@ export class EnumStyleProp extends StyleProp { } // @internal (undocumented) -export const frameShapeMigrations: Migrations; +export const frameShapeMigrations: TLShapePropsMigrations; // @public (undocumented) export const frameShapeProps: { - w: T.Validator; h: T.Validator; name: T.Validator; + w: T.Validator; }; // @public (undocumented) export const GeoShapeGeoStyle: EnumStyleProp<"arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box">; // @internal (undocumented) -export const geoShapeMigrations: Migrations; +export const geoShapeMigrations: TLShapePropsMigrations; // @public (undocumented) export const geoShapeProps: { - geo: EnumStyleProp<"arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box">; - labelColor: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">; - dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; align: EnumStyleProp<"end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start">; - verticalAlign: EnumStyleProp<"end" | "middle" | "start">; - url: T.Validator; - w: T.Validator; - h: T.Validator; + color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; + dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">; + fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">; + font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; + geo: EnumStyleProp<"arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box">; growY: T.Validator; + h: T.Validator; + labelColor: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; text: T.Validator; + url: T.Validator; + verticalAlign: EnumStyleProp<"end" | "middle" | "start">; + w: T.Validator; }; // @public (undocumented) @@ -491,43 +497,43 @@ export function getDefaultTranslationLocale(): TLLanguage['locale']; export function getShapePropKeysByStyle(props: Record>): Map, string>; // @internal (undocumented) -export const groupShapeMigrations: Migrations; +export const groupShapeMigrations: TLShapePropsMigrations; // @internal (undocumented) export const groupShapeProps: ShapeProps; // @internal (undocumented) -export const highlightShapeMigrations: Migrations; +export const highlightShapeMigrations: TLShapePropsMigrations; // @public (undocumented) export const highlightShapeProps: { color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - segments: T.ArrayOfValidator<{ - type: "free" | "straight"; - points: VecModel[]; - } & {}>; isComplete: T.Validator; isPen: T.Validator; + segments: T.ArrayOfValidator<{ + points: VecModel[]; + type: "free" | "straight"; + } & {}>; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; }; // @internal (undocumented) export function idValidator>(prefix: Id['__type__']['typeName']): T.Validator; // @internal (undocumented) -export const imageShapeMigrations: Migrations; +export const imageShapeMigrations: TLShapePropsMigrations; // @public (undocumented) export const imageShapeProps: { - w: T.Validator; + assetId: T.Validator; + crop: T.Validator<({ + bottomRight: VecModel; + topLeft: VecModel; + } & {}) | null>; h: T.Validator; playing: T.Validator; url: T.Validator; - assetId: T.Validator; - crop: T.Validator<({ - topLeft: VecModel; - bottomRight: VecModel; - } & {}) | null>; + w: T.Validator; }; // @public (undocumented) @@ -547,149 +553,149 @@ export function isShapeId(id?: string): id is TLShapeId; // @public (undocumented) export const LANGUAGES: readonly [{ - readonly locale: "ca"; readonly label: "Català"; + readonly locale: "ca"; }, { - readonly locale: "cs"; readonly label: "Čeština"; + readonly locale: "cs"; }, { - readonly locale: "da"; readonly label: "Danish"; + readonly locale: "da"; }, { - readonly locale: "de"; readonly label: "Deutsch"; + readonly locale: "de"; }, { - readonly locale: "en"; readonly label: "English"; + readonly locale: "en"; }, { - readonly locale: "es"; readonly label: "Español"; + readonly locale: "es"; }, { - readonly locale: "fr"; readonly label: "Français"; + readonly locale: "fr"; }, { - readonly locale: "gl"; readonly label: "Galego"; + readonly locale: "gl"; }, { - readonly locale: "hr"; readonly label: "Hrvatski"; + readonly locale: "hr"; }, { - readonly locale: "it"; readonly label: "Italiano"; + readonly locale: "it"; }, { - readonly locale: "hu"; readonly label: "Magyar"; + readonly locale: "hu"; }, { - readonly locale: "no"; readonly label: "Norwegian"; + readonly locale: "no"; }, { - readonly locale: "pl"; readonly label: "Polski"; + readonly locale: "pl"; }, { - readonly locale: "pt-br"; readonly label: "Português - Brasil"; + readonly locale: "pt-br"; }, { - readonly locale: "pt-pt"; readonly label: "Português - Europeu"; + readonly locale: "pt-pt"; }, { - readonly locale: "ro"; readonly label: "Română"; + readonly locale: "ro"; }, { - readonly locale: "ru"; readonly label: "Russian"; + readonly locale: "ru"; }, { - readonly locale: "sl"; readonly label: "Slovenščina"; + readonly locale: "sl"; }, { - readonly locale: "fi"; readonly label: "Suomi"; + readonly locale: "fi"; }, { - readonly locale: "sv"; readonly label: "Svenska"; + readonly locale: "sv"; }, { - readonly locale: "vi"; readonly label: "Tiếng Việt"; + readonly locale: "vi"; }, { - readonly locale: "tr"; readonly label: "Türkçe"; + readonly locale: "tr"; }, { - readonly locale: "uk"; readonly label: "Ukrainian"; + readonly locale: "uk"; }, { - readonly locale: "he"; readonly label: "עברית"; + readonly locale: "he"; }, { - readonly locale: "ar"; readonly label: "عربي"; + readonly locale: "ar"; }, { - readonly locale: "fa"; readonly label: "فارسی"; + readonly locale: "fa"; }, { - readonly locale: "ku"; readonly label: "کوردی"; + readonly locale: "ku"; }, { - readonly locale: "ne"; readonly label: "नेपाली"; + readonly locale: "ne"; }, { - readonly locale: "hi-in"; readonly label: "हिन्दी"; + readonly locale: "hi-in"; }, { - readonly locale: "te"; readonly label: "తెలుగు"; + readonly locale: "te"; }, { - readonly locale: "th"; readonly label: "ภาษาไทย"; + readonly locale: "th"; }, { - readonly locale: "my"; readonly label: "မြန်မာစာ"; + readonly locale: "my"; }, { - readonly locale: "ko-kr"; readonly label: "한국어"; + readonly locale: "ko-kr"; }, { - readonly locale: "ja"; readonly label: "日本語"; + readonly locale: "ja"; }, { - readonly locale: "zh-cn"; readonly label: "简体中文"; + readonly locale: "zh-cn"; }, { - readonly locale: "zh-tw"; readonly label: "繁體中文 (台灣)"; + readonly locale: "zh-tw"; }]; // @internal (undocumented) -export const lineShapeMigrations: Migrations; +export const lineShapeMigrations: TLShapePropsMigrations; // @public (undocumented) export const lineShapeProps: { color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - spline: EnumStyleProp<"cubic" | "line">; points: T.DictValidator; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; + spline: EnumStyleProp<"cubic" | "line">; }; // @public (undocumented) export const LineShapeSplineStyle: EnumStyleProp<"cubic" | "line">; // @internal (undocumented) -export const noteShapeMigrations: Migrations; +export const noteShapeMigrations: TLShapePropsMigrations; // @public (undocumented) export const noteShapeProps: { - color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - fontSizeAdjustment: T.Validator; - font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; align: EnumStyleProp<"end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start">; - verticalAlign: EnumStyleProp<"end" | "middle" | "start">; + color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; + font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; + fontSizeAdjustment: T.Validator; growY: T.Validator; - url: T.Validator; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; text: T.Validator; + url: T.Validator; + verticalAlign: EnumStyleProp<"end" | "middle" | "start">; }; // @internal (undocumented) @@ -708,13 +714,13 @@ export const parentIdValidator: T.Validator; export const PointerRecordType: RecordType; // @internal (undocumented) -export const rootShapeMigrations: Migrations; +export const rootShapeMigrations: MigrationSequence; // @public (undocumented) export type SchemaShapeInfo = { - migrations?: Migrations; - props?: Record; meta?: Record; + migrations?: LegacyMigrations | MigrationSequence | TLShapePropsMigrations; + props?: Record; }; // @internal (undocumented) @@ -761,18 +767,18 @@ export class StyleProp implements T.Validatable { export type StylePropValue> = T extends StyleProp ? U : never; // @internal (undocumented) -export const textShapeMigrations: Migrations; +export const textShapeMigrations: TLShapePropsMigrations; // @public (undocumented) export const textShapeProps: { - color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; - size: EnumStyleProp<"l" | "m" | "s" | "xl">; - font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; align: EnumStyleProp<"end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start">; - w: T.Validator; - text: T.Validator; - scale: T.Validator; autoSize: T.Validator; + color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow">; + font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">; + scale: T.Validator; + size: EnumStyleProp<"l" | "m" | "s" | "xl">; + text: T.Validator; + w: T.Validator; }; // @public @@ -799,9 +805,9 @@ export type TLAssetId = RecordId>; // @public (undocumented) export type TLAssetPartial = T extends T ? { id: TLAssetId; - type: T['type']; - props?: Partial; meta?: Partial; + props?: Partial; + type: T['type']; } & Partial> : never; // @public (undocumented) @@ -847,10 +853,10 @@ export interface TLBaseShape extends // @public export type TLBookmarkAsset = TLBaseAsset<'bookmark', { - title: string; description: string; image: string; src: null | string; + title: string; }>; // @public (undocumented) @@ -890,25 +896,25 @@ export type TLDefaultColorStyle = T.TypeOf; // @public (undocumented) export type TLDefaultColorTheme = Expand<{ - id: 'dark' | 'light'; - text: string; background: string; + id: 'dark' | 'light'; solid: string; + text: string; } & Record<(typeof colors)[number], TLDefaultColorThemeColor>>; // @public (undocumented) export type TLDefaultColorThemeColor = { - solid: string; - semi: string; - pattern: string; + highlight: { + p3: string; + srgb: string; + }; note: { fill: string; text: string; }; - highlight: { - srgb: string; - p3: string; - }; + pattern: string; + semi: string; + solid: string; }; // @public (undocumented) @@ -993,12 +999,12 @@ export type TLHighlightShape = TLBaseShape<'highlight', TLHighlightShapeProps>; // @public export type TLImageAsset = TLBaseAsset<'image', { - w: number; h: number; - name: string; isAnimated: boolean; mimeType: null | string; + name: string; src: null | string; + w: number; }>; // @public (undocumented) @@ -1026,11 +1032,11 @@ export interface TLInstance extends BaseRecord<'instance', TLInstanceId> { devicePixelRatio: number; // (undocumented) duplicateProps: { - shapeIds: TLShapeId[]; offset: { x: number; y: number; }; + shapeIds: TLShapeId[]; } | null; // (undocumented) exportBackground: boolean; @@ -1122,10 +1128,10 @@ export interface TLInstancePresence extends BaseRecord<'instance_presence', TLIn currentPageId: TLPageId; // (undocumented) cursor: { + rotation: number; + type: TLCursor['type']; x: number; y: number; - type: TLCursor['type']; - rotation: number; }; // (undocumented) followingUserId: null | string; @@ -1184,14 +1190,14 @@ export type TLSchema = StoreSchema; // @public export type TLScribble = { - id: string; - points: VecModel[]; - size: number; color: TLCanvasUiColor; - opacity: number; - state: SetValue; delay: number; + id: string; + opacity: number; + points: VecModel[]; shrink: number; + size: number; + state: SetValue; taper: boolean; }; @@ -1207,9 +1213,9 @@ export type TLShapeId = RecordId; // @public (undocumented) export type TLShapePartial = T extends T ? { id: TLShapeId; - type: T['type']; - props?: Partial; meta?: Partial; + props?: Partial; + type: T['type']; } & Partial> : never; // @public (undocumented) @@ -1218,6 +1224,18 @@ export type TLShapeProp = keyof TLShapeProps; // @public (undocumented) export type TLShapeProps = Identity>; +// @public (undocumented) +export type TLShapePropsMigrations = { + sequence: Array<{ + readonly dependsOn: readonly MigrationId[]; + } | { + readonly dependsOn?: MigrationId[]; + readonly down?: ((props: any) => any) | typeof NO_DOWN_MIGRATION | typeof RETIRED_DOWN_MIGRATION; + readonly id: MigrationId; + readonly up: (props: any) => any; + }>; +}; + // @public (undocumented) export type TLStore = Store; @@ -1243,12 +1261,12 @@ export type TLUnknownShape = TLBaseShape; // @public export type TLVideoAsset = TLBaseAsset<'video', { - w: number; h: number; - name: string; isAnimated: boolean; mimeType: null | string; + name: string; src: null | string; + w: number; }>; // @public (undocumented) @@ -1268,16 +1286,16 @@ export interface VecModel { export const vecModelValidator: T.Validator; // @internal (undocumented) -export const videoShapeMigrations: Migrations; +export const videoShapeMigrations: TLShapePropsMigrations; // @public (undocumented) export const videoShapeProps: { - w: T.Validator; - h: T.Validator; - time: T.Validator; - playing: T.Validator; - url: T.Validator; assetId: T.Validator; + h: T.Validator; + playing: T.Validator; + time: T.Validator; + url: T.Validator; + w: T.Validator; }; // (No @packageDocumentation comment for this package) diff --git a/packages/tlschema/api/api.json b/packages/tlschema/api/api.json index 2d2f90969..94c56e457 100644 --- a/packages/tlschema/api/api.json +++ b/packages/tlschema/api/api.json @@ -1,7 +1,7 @@ { "metadata": { "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.41.0", + "toolVersion": "7.43.1", "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { @@ -247,7 +247,7 @@ }, { "kind": "Content", - "text": "{\n labelColor: import(\"../styles/StyleProp\")." + "text": "{\n arrowheadEnd: import(\"../styles/StyleProp\")." }, { "kind": "Reference", @@ -256,7 +256,7 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n color: import(\"../styles/StyleProp\")." + "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n arrowheadStart: import(\"../styles/StyleProp\")." }, { "kind": "Reference", @@ -265,7 +265,16 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n fill: import(\"../styles/StyleProp\")." + "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n bend: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n color: import(\"../styles/StyleProp\")." }, { "kind": "Reference", @@ -274,7 +283,7 @@ }, { "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"../styles/StyleProp\")." + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n dash: import(\"../styles/StyleProp\")." }, { "kind": "Reference", @@ -283,43 +292,7 @@ }, { "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n arrowheadStart: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n arrowheadEnd: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"arrow\" | \"bar\" | \"diamond\" | \"dot\" | \"inverted\" | \"none\" | \"pipe\" | \"square\" | \"triangle\">;\n font: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n start: " + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n end: " }, { "kind": "Reference", @@ -337,7 +310,7 @@ }, { "kind": "Content", - "text": "<{\n type: \"binding\";\n boundShapeId: import(\"..\")." + "text": "<{\n boundShapeId: import(\"../records/TLShape\")." }, { "kind": "Reference", @@ -346,7 +319,7 @@ }, { "kind": "Content", - "text": ";\n normalizedAnchor: import(\"../misc/geometry-types\")." + "text": ";\n isExact: boolean;\n isPrecise: boolean;\n normalizedAnchor: import(\"../misc/geometry-types\")." }, { "kind": "Reference", @@ -355,7 +328,7 @@ }, { "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n } & {}>;\n point: " + "text": ";\n type: \"binding\";\n } & {}>;\n point: " }, { "kind": "Reference", @@ -364,7 +337,52 @@ }, { "kind": "Content", - "text": "<{\n x: number;\n y: number;\n type: \"point\";\n } & {}>;\n }, never>;\n end: " + "text": "<{\n type: \"point\";\n x: number;\n y: number;\n } & {}>;\n }, never>;\n fill: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n font: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n labelColor: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n labelPosition: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n size: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n start: " }, { "kind": "Reference", @@ -382,7 +400,7 @@ }, { "kind": "Content", - "text": "<{\n type: \"binding\";\n boundShapeId: import(\"..\")." + "text": "<{\n boundShapeId: import(\"../records/TLShape\")." }, { "kind": "Reference", @@ -391,7 +409,7 @@ }, { "kind": "Content", - "text": ";\n normalizedAnchor: import(\"../misc/geometry-types\")." + "text": ";\n isExact: boolean;\n isPrecise: boolean;\n normalizedAnchor: import(\"../misc/geometry-types\")." }, { "kind": "Reference", @@ -400,7 +418,7 @@ }, { "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n } & {}>;\n point: " + "text": ";\n type: \"binding\";\n } & {}>;\n point: " }, { "kind": "Reference", @@ -409,7 +427,7 @@ }, { "kind": "Content", - "text": "<{\n x: number;\n y: number;\n type: \"point\";\n } & {}>;\n }, never>;\n bend: " + "text": "<{\n type: \"point\";\n x: number;\n y: number;\n } & {}>;\n }, never>;\n text: " }, { "kind": "Reference", @@ -418,25 +436,7 @@ }, { "kind": "Content", - "text": ";\n text: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n labelPosition: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n}" + "text": ";\n}" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLArrowShape.ts", @@ -537,25 +537,7 @@ }, { "kind": "Content", - "text": "{\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n assetId: " + "text": "{\n assetId: " }, { "kind": "Reference", @@ -573,7 +555,7 @@ }, { "kind": "Content", - "text": " | null>;\n url: " + "text": " | null>;\n h: " }, { "kind": "Reference", @@ -582,7 +564,25 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n url: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLBookmarkShape.ts", @@ -889,7 +889,7 @@ }, { "kind": "Content", - "text": ";\n typeName: 'asset';\n type: Type;\n props: Props;\n meta: " + "text": ";\n meta: " }, { "kind": "Reference", @@ -898,7 +898,7 @@ }, { "kind": "Content", - "text": ";\n}[P]; } & { [P_1 in (undefined extends Props ? \"props\" : never) | (undefined extends Type ? \"type\" : never)]?: {\n id: " + "text": ";\n props: Props;\n type: Type;\n typeName: 'asset';\n}[P]; } & { [P_1 in (undefined extends Props ? \"props\" : never) | (undefined extends Type ? \"type\" : never)]?: {\n id: " }, { "kind": "Reference", @@ -907,7 +907,7 @@ }, { "kind": "Content", - "text": ";\n typeName: 'asset';\n type: Type;\n props: Props;\n meta: " + "text": ";\n meta: " }, { "kind": "Reference", @@ -916,7 +916,7 @@ }, { "kind": "Content", - "text": ";\n}[P_1] | undefined; }>" + "text": ";\n props: Props;\n type: Type;\n typeName: 'asset';\n}[P_1] | undefined; }>" }, { "kind": "Content", @@ -977,7 +977,7 @@ { "kind": "Function", "canonicalReference": "@tldraw/tlschema!createPresenceStateDerivation:function(1)", - "docComment": "/**\n * @public\n */\n", + "docComment": "/**\n * Creates a derivation that represents the current presence state of the current user.\n *\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", @@ -990,7 +990,7 @@ }, { "kind": "Content", - "text": "<{\n id: string;\n color: string;\n name: string;\n}>" + "text": "<{\n color: string;\n id: string;\n name: string;\n}>" }, { "kind": "Content", @@ -1114,6 +1114,53 @@ ], "name": "createShapeId" }, + { + "kind": "Function", + "canonicalReference": "@tldraw/tlschema!createShapePropsMigrationSequence:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createShapePropsMigrationSequence(migrations: " + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "migrations", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "createShapePropsMigrationSequence" + }, { "kind": "Function", "canonicalReference": "@tldraw/tlschema!createShapeValidator:function(1)", @@ -1300,11 +1347,20 @@ "excerptTokens": [ { "kind": "Content", - "text": "export declare function createTLSchema({ shapes, }?: " + "text": "export declare function createTLSchema({ shapes, migrations, }?: " }, { "kind": "Content", - "text": "{\n shapes?: " + "text": "{\n migrations?: readonly " + }, + { + "kind": "Reference", + "text": "MigrationSequence", + "canonicalReference": "@tldraw/store!MigrationSequence:interface" + }, + { + "kind": "Content", + "text": "[];\n shapes?: " }, { "kind": "Reference", @@ -1340,17 +1396,17 @@ ], "fileUrlPath": "packages/tlschema/src/createTLSchema.ts", "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 + "startIndex": 9, + "endIndex": 10 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { - "parameterName": "{ shapes, }", + "parameterName": "{ shapes, migrations, }", "parameterTypeTokenRange": { "startIndex": 1, - "endIndex": 6 + "endIndex": 8 }, "isOptional": true } @@ -1400,7 +1456,7 @@ }, { "kind": "Content", - "text": "{\n lightMode: " + "text": "{\n darkMode: " }, { "kind": "Reference", @@ -1409,7 +1465,7 @@ }, { "kind": "Content", - "text": ";\n darkMode: " + "text": ";\n lightMode: " }, { "kind": "Reference", @@ -1505,7 +1561,7 @@ }, { "kind": "Content", - "text": "{\n draw: string;\n sans: string;\n serif: string;\n mono: string;\n}" + "text": "{\n draw: string;\n mono: string;\n sans: string;\n serif: string;\n}" } ], "fileUrlPath": "packages/tlschema/src/styles/TLFontStyle.ts", @@ -1706,7 +1762,7 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n fill: import(\"..\")." + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n dash: import(\"..\")." }, { "kind": "Reference", @@ -1715,7 +1771,7 @@ }, { "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"..\")." + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n fill: import(\"..\")." }, { "kind": "Reference", @@ -1724,34 +1780,7 @@ }, { "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n segments: " - }, - { - "kind": "Reference", - "text": "T.ArrayOfValidator", - "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"free\" | \"straight\";\n points: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "[];\n } & {}>;\n isComplete: " + "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n isClosed: " }, { "kind": "Reference", @@ -1760,7 +1789,7 @@ }, { "kind": "Content", - "text": ";\n isClosed: " + "text": ";\n isComplete: " }, { "kind": "Reference", @@ -1778,7 +1807,34 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n segments: " + }, + { + "kind": "Reference", + "text": "T.ArrayOfValidator", + "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" + }, + { + "kind": "Content", + "text": "<{\n points: import(\"../misc/geometry-types\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "[];\n type: \"free\" | \"straight\";\n } & {}>;\n size: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n}" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLDrawShape.ts", @@ -1801,7 +1857,7 @@ }, { "kind": "Content", - "text": "readonly [{\n readonly type: \"tldraw\";\n readonly title: \"tldraw\";\n readonly hostnames: readonly [\"beta.tldraw.com\", \"tldraw.com\", \"localhost:3000\"];\n readonly minWidth: 300;\n readonly minHeight: 300;\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly overridePermissions: {\n readonly 'allow-top-navigation': true;\n };\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"figma\";\n readonly title: \"Figma\";\n readonly hostnames: readonly [\"figma.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"google_maps\";\n readonly title: \"Google Maps\";\n readonly hostnames: readonly [\"google.*\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"val_town\";\n readonly title: \"Val Town\";\n readonly hostnames: readonly [\"val.town\"];\n readonly minWidth: 260;\n readonly minHeight: 100;\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"codesandbox\";\n readonly title: \"CodeSandbox\";\n readonly hostnames: readonly [\"codesandbox.io\"];\n readonly minWidth: 300;\n readonly minHeight: 300;\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"codepen\";\n readonly title: \"Codepen\";\n readonly hostnames: readonly [\"codepen.io\"];\n readonly minWidth: 300;\n readonly minHeight: 300;\n readonly width: 520;\n readonly height: 400;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"scratch\";\n readonly title: \"Scratch\";\n readonly hostnames: readonly [\"scratch.mit.edu\"];\n readonly width: 520;\n readonly height: 400;\n readonly doesResize: false;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"youtube\";\n readonly title: \"YouTube\";\n readonly hostnames: readonly [\"*.youtube.com\", \"youtube.com\", \"youtu.be\"];\n readonly width: 800;\n readonly height: 450;\n readonly doesResize: true;\n readonly overridePermissions: {\n readonly 'allow-presentation': true;\n };\n readonly isAspectRatioLocked: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"google_calendar\";\n readonly title: \"Google Calendar\";\n readonly hostnames: readonly [\"calendar.google.*\"];\n readonly width: 720;\n readonly height: 500;\n readonly minWidth: 460;\n readonly minHeight: 360;\n readonly doesResize: true;\n readonly instructionLink: \"https://support.google.com/calendar/answer/41207?hl=en\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"google_slides\";\n readonly title: \"Google Slides\";\n readonly hostnames: readonly [\"docs.google.*\"];\n readonly width: 720;\n readonly height: 500;\n readonly minWidth: 460;\n readonly minHeight: 360;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"github_gist\";\n readonly title: \"GitHub Gist\";\n readonly hostnames: readonly [\"gist.github.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"replit\";\n readonly title: \"Replit\";\n readonly hostnames: readonly [\"replit.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"felt\";\n readonly title: \"Felt\";\n readonly hostnames: readonly [\"felt.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"spotify\";\n readonly title: \"Spotify\";\n readonly hostnames: readonly [\"open.spotify.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly minHeight: 500;\n readonly overrideOutlineRadius: 12;\n readonly doesResize: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"vimeo\";\n readonly title: \"Vimeo\";\n readonly hostnames: readonly [\"vimeo.com\", \"player.vimeo.com\"];\n readonly width: 640;\n readonly height: 360;\n readonly doesResize: true;\n readonly isAspectRatioLocked: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"excalidraw\";\n readonly title: \"Excalidraw\";\n readonly hostnames: readonly [\"excalidraw.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly isAspectRatioLocked: true;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}, {\n readonly type: \"observable\";\n readonly title: \"Observable\";\n readonly hostnames: readonly [\"observablehq.com\"];\n readonly width: 720;\n readonly height: 500;\n readonly doesResize: true;\n readonly isAspectRatioLocked: false;\n readonly backgroundColor: \"#fff\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}]" + "text": "readonly [{\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 500;\n readonly hostnames: readonly [\"beta.tldraw.com\", \"tldraw.com\", \"localhost:3000\"];\n readonly minHeight: 300;\n readonly minWidth: 300;\n readonly overridePermissions: {\n readonly 'allow-top-navigation': true;\n };\n readonly title: \"tldraw\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"tldraw\";\n readonly width: 720;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 500;\n readonly hostnames: readonly [\"figma.com\"];\n readonly title: \"Figma\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"figma\";\n readonly width: 720;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 500;\n readonly hostnames: readonly [\"google.*\"];\n readonly title: \"Google Maps\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"google_maps\";\n readonly width: 720;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 500;\n readonly hostnames: readonly [\"val.town\"];\n readonly minHeight: 100;\n readonly minWidth: 260;\n readonly title: \"Val Town\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"val_town\";\n readonly width: 720;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 500;\n readonly hostnames: readonly [\"codesandbox.io\"];\n readonly minHeight: 300;\n readonly minWidth: 300;\n readonly title: \"CodeSandbox\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"codesandbox\";\n readonly width: 720;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 400;\n readonly hostnames: readonly [\"codepen.io\"];\n readonly minHeight: 300;\n readonly minWidth: 300;\n readonly title: \"Codepen\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"codepen\";\n readonly width: 520;\n}, {\n readonly doesResize: false;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 400;\n readonly hostnames: readonly [\"scratch.mit.edu\"];\n readonly title: \"Scratch\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"scratch\";\n readonly width: 520;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 450;\n readonly hostnames: readonly [\"*.youtube.com\", \"youtube.com\", \"youtu.be\"];\n readonly isAspectRatioLocked: true;\n readonly overridePermissions: {\n readonly 'allow-presentation': true;\n };\n readonly title: \"YouTube\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"youtube\";\n readonly width: 800;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 500;\n readonly hostnames: readonly [\"calendar.google.*\"];\n readonly instructionLink: \"https://support.google.com/calendar/answer/41207?hl=en\";\n readonly minHeight: 360;\n readonly minWidth: 460;\n readonly title: \"Google Calendar\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"google_calendar\";\n readonly width: 720;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 500;\n readonly hostnames: readonly [\"docs.google.*\"];\n readonly minHeight: 360;\n readonly minWidth: 460;\n readonly title: \"Google Slides\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"google_slides\";\n readonly width: 720;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 500;\n readonly hostnames: readonly [\"gist.github.com\"];\n readonly title: \"GitHub Gist\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"github_gist\";\n readonly width: 720;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 500;\n readonly hostnames: readonly [\"replit.com\"];\n readonly title: \"Replit\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"replit\";\n readonly width: 720;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 500;\n readonly hostnames: readonly [\"felt.com\"];\n readonly title: \"Felt\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"felt\";\n readonly width: 720;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 500;\n readonly hostnames: readonly [\"open.spotify.com\"];\n readonly minHeight: 500;\n readonly overrideOutlineRadius: 12;\n readonly title: \"Spotify\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"spotify\";\n readonly width: 720;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 360;\n readonly hostnames: readonly [\"vimeo.com\", \"player.vimeo.com\"];\n readonly isAspectRatioLocked: true;\n readonly title: \"Vimeo\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"vimeo\";\n readonly width: 640;\n}, {\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 500;\n readonly hostnames: readonly [\"excalidraw.com\"];\n readonly isAspectRatioLocked: true;\n readonly title: \"Excalidraw\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"excalidraw\";\n readonly width: 720;\n}, {\n readonly backgroundColor: \"#fff\";\n readonly doesResize: true;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: 500;\n readonly hostnames: readonly [\"observablehq.com\"];\n readonly isAspectRatioLocked: false;\n readonly title: \"Observable\";\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: \"observable\";\n readonly width: 720;\n}]" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", @@ -1824,7 +1880,7 @@ }, { "kind": "Content", - "text": "{\n readonly type: string;\n readonly title: string;\n readonly hostnames: readonly string[];\n readonly minWidth?: number;\n readonly minHeight?: number;\n readonly width: number;\n readonly height: number;\n readonly doesResize: boolean;\n readonly isAspectRatioLocked?: boolean;\n readonly overridePermissions?: " + "text": "{\n readonly backgroundColor?: string;\n readonly doesResize: boolean;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n readonly height: number;\n readonly hostnames: readonly string[];\n readonly instructionLink?: string;\n readonly isAspectRatioLocked?: boolean;\n readonly minHeight?: number;\n readonly minWidth?: number;\n readonly overrideOutlineRadius?: number;\n readonly overridePermissions?: " }, { "kind": "Reference", @@ -1833,7 +1889,7 @@ }, { "kind": "Content", - "text": ";\n readonly instructionLink?: string;\n readonly backgroundColor?: string;\n readonly overrideOutlineRadius?: number;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly fromEmbedUrl: (url: string) => string | undefined;\n}" + "text": ";\n readonly title: string;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: string;\n readonly width: number;\n}" }, { "kind": "Content", @@ -1859,7 +1915,7 @@ }, { "kind": "Content", - "text": "{\n readonly 'allow-downloads-without-user-activation': false;\n readonly 'allow-downloads': false;\n readonly 'allow-modals': false;\n readonly 'allow-orientation-lock': false;\n readonly 'allow-pointer-lock': false;\n readonly 'allow-popups': true;\n readonly 'allow-popups-to-escape-sandbox': false;\n readonly 'allow-presentation': false;\n readonly 'allow-storage-access-by-user-activation': false;\n readonly 'allow-top-navigation': false;\n readonly 'allow-top-navigation-by-user-activation': false;\n readonly 'allow-scripts': true;\n readonly 'allow-same-origin': true;\n readonly 'allow-forms': true;\n}" + "text": "{\n readonly 'allow-downloads-without-user-activation': false;\n readonly 'allow-downloads': false;\n readonly 'allow-forms': true;\n readonly 'allow-modals': false;\n readonly 'allow-orientation-lock': false;\n readonly 'allow-pointer-lock': false;\n readonly 'allow-popups-to-escape-sandbox': false;\n readonly 'allow-popups': true;\n readonly 'allow-presentation': false;\n readonly 'allow-same-origin': true;\n readonly 'allow-scripts': true;\n readonly 'allow-storage-access-by-user-activation': false;\n readonly 'allow-top-navigation-by-user-activation': false;\n readonly 'allow-top-navigation': false;\n}" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", @@ -1882,16 +1938,7 @@ }, { "kind": "Content", - "text": "{\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: " + "text": "{\n h: " }, { "kind": "Reference", @@ -1909,7 +1956,16 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLEmbedShape.ts", @@ -2011,16 +2067,7 @@ }, { "kind": "Content", - "text": "{\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: " + "text": "{\n h: " }, { "kind": "Reference", @@ -2038,7 +2085,16 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLFrameShape.ts", @@ -2093,7 +2149,7 @@ }, { "kind": "Content", - "text": "{\n geo: import(\"../styles/StyleProp\")." + "text": "{\n align: import(\"../styles/StyleProp\")." }, { "kind": "Reference", @@ -2102,7 +2158,7 @@ }, { "kind": "Content", - "text": "<\"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\">;\n labelColor: import(\"../styles/StyleProp\")." + "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n color: import(\"../styles/StyleProp\")." }, { "kind": "Reference", @@ -2111,7 +2167,7 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n color: import(\"../styles/StyleProp\")." + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n dash: import(\"../styles/StyleProp\")." }, { "kind": "Reference", @@ -2120,7 +2176,7 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n fill: import(\"../styles/StyleProp\")." + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n fill: import(\"../styles/StyleProp\")." }, { "kind": "Reference", @@ -2129,7 +2185,7 @@ }, { "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n dash: import(\"../styles/StyleProp\")." + "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n font: import(\"../styles/StyleProp\")." }, { "kind": "Reference", @@ -2138,7 +2194,7 @@ }, { "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"../styles/StyleProp\")." + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n geo: import(\"../styles/StyleProp\")." }, { "kind": "Reference", @@ -2147,43 +2203,7 @@ }, { "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n verticalAlign: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end\" | \"middle\" | \"start\">;\n url: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n w: " + "text": "<\"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"check-box\" | \"cloud\" | \"diamond\" | \"ellipse\" | \"hexagon\" | \"octagon\" | \"oval\" | \"pentagon\" | \"rectangle\" | \"rhombus-2\" | \"rhombus\" | \"star\" | \"trapezoid\" | \"triangle\" | \"x-box\">;\n growY: " }, { "kind": "Reference", @@ -2201,7 +2221,25 @@ }, { "kind": "Content", - "text": ";\n growY: " + "text": ";\n labelColor: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n text: " }, { "kind": "Reference", @@ -2210,7 +2248,7 @@ }, { "kind": "Content", - "text": ";\n text: " + "text": ";\n url: " }, { "kind": "Reference", @@ -2219,7 +2257,25 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n verticalAlign: import(\"../styles/StyleProp\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end\" | \"middle\" | \"start\">;\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLGeoShape.ts", @@ -2330,34 +2386,7 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n segments: " - }, - { - "kind": "Reference", - "text": "T.ArrayOfValidator", - "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"free\" | \"straight\";\n points: import(\"..\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "[];\n } & {}>;\n isComplete: " + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n isComplete: " }, { "kind": "Reference", @@ -2375,7 +2404,34 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n segments: " + }, + { + "kind": "Reference", + "text": "T.ArrayOfValidator", + "canonicalReference": "@tldraw/validate!ArrayOfValidator:class" + }, + { + "kind": "Content", + "text": "<{\n points: import(\"..\")." + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "[];\n type: \"free\" | \"straight\";\n } & {}>;\n size: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n}" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLHighlightShape.ts", @@ -2398,43 +2454,7 @@ }, { "kind": "Content", - "text": "{\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n playing: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n assetId: " + "text": "{\n assetId: " }, { "kind": "Reference", @@ -2461,7 +2481,7 @@ }, { "kind": "Content", - "text": "<({\n topLeft: import(\"../misc/geometry-types\")." + "text": "<({\n bottomRight: import(\"../misc/geometry-types\")." }, { "kind": "Reference", @@ -2470,7 +2490,7 @@ }, { "kind": "Content", - "text": ";\n bottomRight: import(\"../misc/geometry-types\")." + "text": ";\n topLeft: import(\"../misc/geometry-types\")." }, { "kind": "Reference", @@ -2479,7 +2499,43 @@ }, { "kind": "Content", - "text": ";\n } & {}) | null>;\n}" + "text": ";\n } & {}) | null>;\n h: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n playing: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLImageShape.ts", @@ -2750,7 +2806,7 @@ }, { "kind": "Content", - "text": "readonly [{\n readonly locale: \"ca\";\n readonly label: \"Català\";\n}, {\n readonly locale: \"cs\";\n readonly label: \"Čeština\";\n}, {\n readonly locale: \"da\";\n readonly label: \"Danish\";\n}, {\n readonly locale: \"de\";\n readonly label: \"Deutsch\";\n}, {\n readonly locale: \"en\";\n readonly label: \"English\";\n}, {\n readonly locale: \"es\";\n readonly label: \"Español\";\n}, {\n readonly locale: \"fr\";\n readonly label: \"Français\";\n}, {\n readonly locale: \"gl\";\n readonly label: \"Galego\";\n}, {\n readonly locale: \"hr\";\n readonly label: \"Hrvatski\";\n}, {\n readonly locale: \"it\";\n readonly label: \"Italiano\";\n}, {\n readonly locale: \"hu\";\n readonly label: \"Magyar\";\n}, {\n readonly locale: \"no\";\n readonly label: \"Norwegian\";\n}, {\n readonly locale: \"pl\";\n readonly label: \"Polski\";\n}, {\n readonly locale: \"pt-br\";\n readonly label: \"Português - Brasil\";\n}, {\n readonly locale: \"pt-pt\";\n readonly label: \"Português - Europeu\";\n}, {\n readonly locale: \"ro\";\n readonly label: \"Română\";\n}, {\n readonly locale: \"ru\";\n readonly label: \"Russian\";\n}, {\n readonly locale: \"sl\";\n readonly label: \"Slovenščina\";\n}, {\n readonly locale: \"fi\";\n readonly label: \"Suomi\";\n}, {\n readonly locale: \"sv\";\n readonly label: \"Svenska\";\n}, {\n readonly locale: \"vi\";\n readonly label: \"Tiếng Việt\";\n}, {\n readonly locale: \"tr\";\n readonly label: \"Türkçe\";\n}, {\n readonly locale: \"uk\";\n readonly label: \"Ukrainian\";\n}, {\n readonly locale: \"he\";\n readonly label: \"עברית\";\n}, {\n readonly locale: \"ar\";\n readonly label: \"عربي\";\n}, {\n readonly locale: \"fa\";\n readonly label: \"فارسی\";\n}, {\n readonly locale: \"ku\";\n readonly label: \"کوردی\";\n}, {\n readonly locale: \"ne\";\n readonly label: \"नेपाली\";\n}, {\n readonly locale: \"hi-in\";\n readonly label: \"हिन्दी\";\n}, {\n readonly locale: \"te\";\n readonly label: \"తెలుగు\";\n}, {\n readonly locale: \"th\";\n readonly label: \"ภาษาไทย\";\n}, {\n readonly locale: \"my\";\n readonly label: \"မြန်မာစာ\";\n}, {\n readonly locale: \"ko-kr\";\n readonly label: \"한국어\";\n}, {\n readonly locale: \"ja\";\n readonly label: \"日本語\";\n}, {\n readonly locale: \"zh-cn\";\n readonly label: \"简体中文\";\n}, {\n readonly locale: \"zh-tw\";\n readonly label: \"繁體中文 (台灣)\";\n}]" + "text": "readonly [{\n readonly label: \"Català\";\n readonly locale: \"ca\";\n}, {\n readonly label: \"Čeština\";\n readonly locale: \"cs\";\n}, {\n readonly label: \"Danish\";\n readonly locale: \"da\";\n}, {\n readonly label: \"Deutsch\";\n readonly locale: \"de\";\n}, {\n readonly label: \"English\";\n readonly locale: \"en\";\n}, {\n readonly label: \"Español\";\n readonly locale: \"es\";\n}, {\n readonly label: \"Français\";\n readonly locale: \"fr\";\n}, {\n readonly label: \"Galego\";\n readonly locale: \"gl\";\n}, {\n readonly label: \"Hrvatski\";\n readonly locale: \"hr\";\n}, {\n readonly label: \"Italiano\";\n readonly locale: \"it\";\n}, {\n readonly label: \"Magyar\";\n readonly locale: \"hu\";\n}, {\n readonly label: \"Norwegian\";\n readonly locale: \"no\";\n}, {\n readonly label: \"Polski\";\n readonly locale: \"pl\";\n}, {\n readonly label: \"Português - Brasil\";\n readonly locale: \"pt-br\";\n}, {\n readonly label: \"Português - Europeu\";\n readonly locale: \"pt-pt\";\n}, {\n readonly label: \"Română\";\n readonly locale: \"ro\";\n}, {\n readonly label: \"Russian\";\n readonly locale: \"ru\";\n}, {\n readonly label: \"Slovenščina\";\n readonly locale: \"sl\";\n}, {\n readonly label: \"Suomi\";\n readonly locale: \"fi\";\n}, {\n readonly label: \"Svenska\";\n readonly locale: \"sv\";\n}, {\n readonly label: \"Tiếng Việt\";\n readonly locale: \"vi\";\n}, {\n readonly label: \"Türkçe\";\n readonly locale: \"tr\";\n}, {\n readonly label: \"Ukrainian\";\n readonly locale: \"uk\";\n}, {\n readonly label: \"עברית\";\n readonly locale: \"he\";\n}, {\n readonly label: \"عربي\";\n readonly locale: \"ar\";\n}, {\n readonly label: \"فارسی\";\n readonly locale: \"fa\";\n}, {\n readonly label: \"کوردی\";\n readonly locale: \"ku\";\n}, {\n readonly label: \"नेपाली\";\n readonly locale: \"ne\";\n}, {\n readonly label: \"हिन्दी\";\n readonly locale: \"hi-in\";\n}, {\n readonly label: \"తెలుగు\";\n readonly locale: \"te\";\n}, {\n readonly label: \"ภาษาไทย\";\n readonly locale: \"th\";\n}, {\n readonly label: \"မြန်မာစာ\";\n readonly locale: \"my\";\n}, {\n readonly label: \"한국어\";\n readonly locale: \"ko-kr\";\n}, {\n readonly label: \"日本語\";\n readonly locale: \"ja\";\n}, {\n readonly label: \"简体中文\";\n readonly locale: \"zh-cn\";\n}, {\n readonly label: \"繁體中文 (台灣)\";\n readonly locale: \"zh-tw\";\n}]" } ], "fileUrlPath": "packages/tlschema/src/translations/languages.ts", @@ -2791,7 +2847,25 @@ }, { "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n size: import(\"../styles/StyleProp\")." + "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n points: " + }, + { + "kind": "Reference", + "text": "T.DictValidator", + "canonicalReference": "@tldraw/validate!DictValidator:class" + }, + { + "kind": "Content", + "text": ";\n size: import(\"../styles/StyleProp\")." }, { "kind": "Reference", @@ -2809,25 +2883,7 @@ }, { "kind": "Content", - "text": "<\"cubic\" | \"line\">;\n points: " - }, - { - "kind": "Reference", - "text": "T.DictValidator", - "canonicalReference": "@tldraw/validate!DictValidator:class" - }, - { - "kind": "Content", - "text": ";\n}" + "text": "<\"cubic\" | \"line\">;\n}" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLLineShape.ts", @@ -2882,7 +2938,7 @@ }, { "kind": "Content", - "text": "{\n color: import(\"..\")." + "text": "{\n align: import(\"..\")." }, { "kind": "Reference", @@ -2891,7 +2947,7 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"..\")." + "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n color: import(\"..\")." }, { "kind": "Reference", @@ -2900,7 +2956,16 @@ }, { "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n fontSizeAdjustment: " + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n font: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n fontSizeAdjustment: " }, { "kind": "Reference", @@ -2909,34 +2974,7 @@ }, { "kind": "Content", - "text": ";\n font: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n verticalAlign: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end\" | \"middle\" | \"start\">;\n growY: " + "text": ";\n growY: " }, { "kind": "Reference", @@ -2945,7 +2983,16 @@ }, { "kind": "Content", - "text": ";\n url: " + "text": ";\n size: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n text: " }, { "kind": "Reference", @@ -2954,7 +3001,7 @@ }, { "kind": "Content", - "text": ";\n text: " + "text": ";\n url: " }, { "kind": "Reference", @@ -2963,7 +3010,16 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n verticalAlign: import(\"..\")." + }, + { + "kind": "Reference", + "text": "EnumStyleProp", + "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" + }, + { + "kind": "Content", + "text": "<\"end\" | \"middle\" | \"start\">;\n}" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLNoteShape.ts", @@ -3105,16 +3161,7 @@ }, { "kind": "Content", - "text": "{\n migrations?: " - }, - { - "kind": "Reference", - "text": "Migrations", - "canonicalReference": "@tldraw/store!Migrations:interface" - }, - { - "kind": "Content", - "text": ";\n props?: " + "text": "{\n meta?: " }, { "kind": "Reference", @@ -3132,7 +3179,34 @@ }, { "kind": "Content", - "text": ">;\n meta?: " + "text": ">;\n migrations?: " + }, + { + "kind": "Reference", + "text": "LegacyMigrations", + "canonicalReference": "@tldraw/store!LegacyMigrations:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "MigrationSequence", + "canonicalReference": "@tldraw/store!MigrationSequence:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TLShapePropsMigrations", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type" + }, + { + "kind": "Content", + "text": ";\n props?: " }, { "kind": "Reference", @@ -3162,7 +3236,7 @@ "name": "SchemaShapeInfo", "typeTokenRange": { "startIndex": 1, - "endIndex": 12 + "endIndex": 16 } }, { @@ -3848,7 +3922,7 @@ }, { "kind": "Content", - "text": "{\n color: import(\"..\")." + "text": "{\n align: import(\"..\")." }, { "kind": "Reference", @@ -3857,7 +3931,16 @@ }, { "kind": "Content", - "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n size: import(\"..\")." + "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n autoSize: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n color: import(\"..\")." }, { "kind": "Reference", @@ -3866,7 +3949,7 @@ }, { "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n font: import(\"..\")." + "text": "<\"black\" | \"blue\" | \"green\" | \"grey\" | \"light-blue\" | \"light-green\" | \"light-red\" | \"light-violet\" | \"orange\" | \"red\" | \"violet\" | \"white\" | \"yellow\">;\n font: import(\"..\")." }, { "kind": "Reference", @@ -3875,7 +3958,16 @@ }, { "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n align: import(\"..\")." + "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n scale: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n size: import(\"..\")." }, { "kind": "Reference", @@ -3884,7 +3976,7 @@ }, { "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\n w: " + "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n text: " }, { "kind": "Reference", @@ -3893,7 +3985,7 @@ }, { "kind": "Content", - "text": ";\n text: " + "text": ";\n w: " }, { "kind": "Reference", @@ -3902,25 +3994,7 @@ }, { "kind": "Content", - "text": ";\n scale: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n autoSize: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n}" + "text": ";\n}" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLTextShape.ts", @@ -4243,7 +4317,7 @@ }, { "kind": "Content", - "text": ";\n type: T['type'];\n props?: " + "text": ";\n meta?: " }, { "kind": "Reference", @@ -4252,7 +4326,7 @@ }, { "kind": "Content", - "text": ";\n meta?: " + "text": ";\n props?: " }, { "kind": "Reference", @@ -4261,7 +4335,7 @@ }, { "kind": "Content", - "text": ";\n} & " + "text": ";\n type: T['type'];\n} & " }, { "kind": "Reference", @@ -4890,7 +4964,7 @@ }, { "kind": "Content", - "text": "<'bookmark', {\n title: string;\n description: string;\n image: string;\n src: null | string;\n}>" + "text": "<'bookmark', {\n description: string;\n image: string;\n src: null | string;\n title: string;\n}>" }, { "kind": "Content", @@ -5348,7 +5422,7 @@ }, { "kind": "Content", - "text": "<{\n id: 'dark' | 'light';\n text: string;\n background: string;\n solid: string;\n} & " + "text": "<{\n background: string;\n id: 'dark' | 'light';\n solid: string;\n text: string;\n} & " }, { "kind": "Reference", @@ -5401,7 +5475,7 @@ }, { "kind": "Content", - "text": "{\n solid: string;\n semi: string;\n pattern: string;\n note: {\n fill: string;\n text: string;\n };\n highlight: {\n srgb: string;\n p3: string;\n };\n}" + "text": "{\n highlight: {\n p3: string;\n srgb: string;\n };\n note: {\n fill: string;\n text: string;\n };\n pattern: string;\n semi: string;\n solid: string;\n}" }, { "kind": "Content", @@ -6544,7 +6618,7 @@ }, { "kind": "Content", - "text": "<'image', {\n w: number;\n h: number;\n name: string;\n isAnimated: boolean;\n mimeType: null | string;\n src: null | string;\n}>" + "text": "<'image', {\n h: number;\n isAnimated: boolean;\n mimeType: null | string;\n name: string;\n src: null | string;\n w: number;\n}>" }, { "kind": "Content", @@ -6920,7 +6994,7 @@ }, { "kind": "Content", - "text": "{\n shapeIds: " + "text": "{\n offset: {\n x: number;\n y: number;\n };\n shapeIds: " }, { "kind": "Reference", @@ -6929,7 +7003,7 @@ }, { "kind": "Content", - "text": "[];\n offset: {\n x: number;\n y: number;\n };\n } | null" + "text": "[];\n } | null" }, { "kind": "Content", @@ -8132,7 +8206,7 @@ }, { "kind": "Content", - "text": "{\n x: number;\n y: number;\n type: " + "text": "{\n rotation: number;\n type: " }, { "kind": "Reference", @@ -8141,7 +8215,7 @@ }, { "kind": "Content", - "text": "['type'];\n rotation: number;\n }" + "text": "['type'];\n x: number;\n y: number;\n }" }, { "kind": "Content", @@ -8921,16 +8995,7 @@ }, { "kind": "Content", - "text": "{\n id: string;\n points: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": "[];\n size: number;\n color: " + "text": "{\n color: " }, { "kind": "Reference", @@ -8939,7 +9004,16 @@ }, { "kind": "Content", - "text": ";\n opacity: number;\n state: " + "text": ";\n delay: number;\n id: string;\n opacity: number;\n points: " + }, + { + "kind": "Reference", + "text": "VecModel", + "canonicalReference": "@tldraw/tlschema!VecModel:interface" + }, + { + "kind": "Content", + "text": "[];\n shrink: number;\n size: number;\n state: " }, { "kind": "Reference", @@ -8957,7 +9031,7 @@ }, { "kind": "Content", - "text": ">;\n delay: number;\n shrink: number;\n taper: boolean;\n}" + "text": ">;\n taper: boolean;\n}" }, { "kind": "Content", @@ -9126,7 +9200,7 @@ }, { "kind": "Content", - "text": ";\n type: T['type'];\n props?: " + "text": ";\n meta?: " }, { "kind": "Reference", @@ -9135,7 +9209,7 @@ }, { "kind": "Content", - "text": ";\n meta?: " + "text": ";\n props?: " }, { "kind": "Reference", @@ -9144,7 +9218,7 @@ }, { "kind": "Content", - "text": ";\n} & " + "text": ";\n type: T['type'];\n} & " }, { "kind": "Reference", @@ -9270,6 +9344,86 @@ "endIndex": 7 } }, + { + "kind": "TypeAlias", + "canonicalReference": "@tldraw/tlschema!TLShapePropsMigrations:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLShapePropsMigrations = " + }, + { + "kind": "Content", + "text": "{\n sequence: " + }, + { + "kind": "Reference", + "text": "Array", + "canonicalReference": "!Array:interface" + }, + { + "kind": "Content", + "text": "<{\n readonly dependsOn: readonly " + }, + { + "kind": "Reference", + "text": "MigrationId", + "canonicalReference": "@tldraw/store!MigrationId:type" + }, + { + "kind": "Content", + "text": "[];\n } | {\n readonly dependsOn?: " + }, + { + "kind": "Reference", + "text": "MigrationId", + "canonicalReference": "@tldraw/store!MigrationId:type" + }, + { + "kind": "Content", + "text": "[];\n readonly down?: ((props: any) => any) | typeof " + }, + { + "kind": "Reference", + "text": "NO_DOWN_MIGRATION", + "canonicalReference": "@tldraw/tlschema!~NO_DOWN_MIGRATION:var" + }, + { + "kind": "Content", + "text": " | typeof " + }, + { + "kind": "Reference", + "text": "RETIRED_DOWN_MIGRATION", + "canonicalReference": "@tldraw/tlschema!~RETIRED_DOWN_MIGRATION:var" + }, + { + "kind": "Content", + "text": ";\n readonly id: " + }, + { + "kind": "Reference", + "text": "MigrationId", + "canonicalReference": "@tldraw/store!MigrationId:type" + }, + { + "kind": "Content", + "text": ";\n readonly up: (props: any) => any;\n }>;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "releaseTag": "Public", + "name": "TLShapePropsMigrations", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 14 + } + }, { "kind": "TypeAlias", "canonicalReference": "@tldraw/tlschema!TLStore:type", @@ -9561,7 +9715,7 @@ }, { "kind": "Content", - "text": "<'video', {\n w: number;\n h: number;\n name: string;\n isAnimated: boolean;\n mimeType: null | string;\n src: null | string;\n}>" + "text": "<'video', {\n h: number;\n isAnimated: boolean;\n mimeType: null | string;\n name: string;\n src: null | string;\n w: number;\n}>" }, { "kind": "Content", @@ -9763,52 +9917,7 @@ }, { "kind": "Content", - "text": "{\n w: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n h: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n time: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n playing: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n url: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\n assetId: " + "text": "{\n assetId: " }, { "kind": "Reference", @@ -9826,7 +9935,52 @@ }, { "kind": "Content", - "text": " | null>;\n}" + "text": " | null>;\n h: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n playing: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n time: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n url: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n w: " + }, + { + "kind": "Reference", + "text": "T.Validator", + "canonicalReference": "@tldraw/validate!Validator:class" + }, + { + "kind": "Content", + "text": ";\n}" } ], "fileUrlPath": "packages/tlschema/src/shapes/TLVideoShape.ts", diff --git a/packages/tlschema/src/__tests__/migrationTestUtils.ts b/packages/tlschema/src/__tests__/migrationTestUtils.ts new file mode 100644 index 000000000..8de5b06e1 --- /dev/null +++ b/packages/tlschema/src/__tests__/migrationTestUtils.ts @@ -0,0 +1,57 @@ +import { Migration, MigrationId, Store, UnknownRecord } from '@tldraw/store' +import { structuredClone } from '@tldraw/utils' +import { createTLSchema } from '../createTLSchema' + +export const testSchema = createTLSchema() + +// mock all migrator fns +for (const migration of testSchema.sortedMigrations) { + ;(migration as any).up = jest.fn(migration.up as any) + if (typeof migration.down === 'function') { + ;(migration as any).down = jest.fn(migration.down as any) + } +} + +function getEmptySnapshot() { + const store = new Store({ + schema: testSchema, + props: null as any, + }) + store.ensureStoreIsUsable() + return store.getSnapshot() +} + +export function snapshotUp(migrationId: MigrationId, ...records: UnknownRecord[]) { + const migration = testSchema.sortedMigrations.find((m) => m.id === migrationId) as Migration + if (!migration) { + throw new Error(`Migration ${migrationId} not found`) + } + const snapshot = getEmptySnapshot() + for (const record of records) { + snapshot.store[record.id as any] = structuredClone(record as any) + } + + const result = migration.up(snapshot.store as any) + return result ?? snapshot.store +} + +export function getTestMigration(migrationId: MigrationId) { + const migration = testSchema.sortedMigrations.find((m) => m.id === migrationId) as Migration + if (!migration) { + throw new Error(`Migration ${migrationId} not found`) + } + return { + id: migrationId, + up: (stuff: any) => { + const result = structuredClone(stuff) + return migration.up(result) ?? result + }, + down: (stuff: any) => { + if (typeof migration.down !== 'function') { + throw new Error(`Migration ${migrationId} does not have a down function`) + } + const result = structuredClone(stuff) + return migration.down(result) ?? result + }, + } +} diff --git a/packages/tlschema/src/assets/TLBookmarkAsset.ts b/packages/tlschema/src/assets/TLBookmarkAsset.ts index ba01ea8a1..654b0defc 100644 --- a/packages/tlschema/src/assets/TLBookmarkAsset.ts +++ b/packages/tlschema/src/assets/TLBookmarkAsset.ts @@ -1,6 +1,7 @@ -import { defineMigrations } from '@tldraw/store' +import { createMigrationIds, createRecordMigrationSequence } from '@tldraw/store' import { T } from '@tldraw/validate' -import { createAssetValidator, TLBaseAsset } from './TLBaseAsset' +import { TLAsset } from '../records/TLAsset' +import { TLBaseAsset, createAssetValidator } from './TLBaseAsset' /** * An asset used for URL bookmarks, used by the TLBookmarkShape. @@ -27,23 +28,28 @@ export const bookmarkAssetValidator: T.Validator = createAssetV }) ) -const Versions = { +const Versions = createMigrationIds('com.tldraw.asset.bookmark', { MakeUrlsValid: 1, -} as const +} as const) + +export { Versions as bookmarkAssetVersions } /** @internal */ -export const bookmarkAssetMigrations = defineMigrations({ - currentVersion: Versions.MakeUrlsValid, - migrators: { - [Versions.MakeUrlsValid]: { - up: (asset) => { - const src = asset.props.src - if (src && !T.srcUrl.isValid(src)) { - return { ...asset, props: { ...asset.props, src: '' } } +export const bookmarkAssetMigrations = createRecordMigrationSequence({ + sequenceId: 'com.tldraw.asset.bookmark', + recordType: 'asset', + filter: (asset) => (asset as TLAsset).type === 'bookmark', + sequence: [ + { + id: Versions.MakeUrlsValid, + up: (asset: any) => { + if (!T.srcUrl.isValid(asset.props.src)) { + asset.props.src = '' } - return asset }, - down: (asset) => asset, + down: (_asset) => { + // noop + }, }, - }, + ], }) diff --git a/packages/tlschema/src/assets/TLImageAsset.ts b/packages/tlschema/src/assets/TLImageAsset.ts index 27fd614ba..bf53f1002 100644 --- a/packages/tlschema/src/assets/TLImageAsset.ts +++ b/packages/tlschema/src/assets/TLImageAsset.ts @@ -1,6 +1,7 @@ -import { defineMigrations } from '@tldraw/store' +import { createMigrationIds, createRecordMigrationSequence } from '@tldraw/store' import { T } from '@tldraw/validate' -import { createAssetValidator, TLBaseAsset } from './TLBaseAsset' +import { TLAsset } from '../records/TLAsset' +import { TLBaseAsset, createAssetValidator } from './TLBaseAsset' /** * An asset for images such as PNGs and JPEGs, used by the TLImageShape. @@ -31,54 +32,54 @@ export const imageAssetValidator: T.Validator = createAssetValidat }) ) -const Versions = { +const Versions = createMigrationIds('com.tldraw.asset.image', { AddIsAnimated: 1, RenameWidthHeight: 2, MakeUrlsValid: 3, -} as const +} as const) + +export { Versions as imageAssetVersions } /** @internal */ -export const imageAssetMigrations = defineMigrations({ - currentVersion: Versions.MakeUrlsValid, - migrators: { - [Versions.AddIsAnimated]: { - up: (asset) => { - return { - ...asset, - props: { - ...asset.props, - isAnimated: false, - }, - } +export const imageAssetMigrations = createRecordMigrationSequence({ + sequenceId: 'com.tldraw.asset.image', + recordType: 'asset', + filter: (asset) => (asset as TLAsset).type === 'image', + sequence: [ + { + id: Versions.AddIsAnimated, + up: (asset: any) => { + asset.props.isAnimated = false }, - down: (asset) => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { isAnimated, ...rest } = asset.props - return { - ...asset, - props: rest, - } + down: (asset: any) => { + delete asset.props.isAnimated }, }, - [Versions.RenameWidthHeight]: { - up: (asset) => { - const { width, height, ...others } = asset.props - return { ...asset, props: { w: width, h: height, ...others } } + { + id: Versions.RenameWidthHeight, + up: (asset: any) => { + asset.props.w = asset.props.width + asset.props.h = asset.props.height + delete asset.props.width + delete asset.props.height }, - down: (asset) => { - const { w, h, ...others } = asset.props - return { ...asset, props: { width: w, height: h, ...others } } + down: (asset: any) => { + asset.props.width = asset.props.w + asset.props.height = asset.props.h + delete asset.props.w + delete asset.props.h }, }, - [Versions.MakeUrlsValid]: { - up: (asset: TLImageAsset) => { - const src = asset.props.src - if (src && !T.srcUrl.isValid(src)) { - return { ...asset, props: { ...asset.props, src: '' } } + { + id: Versions.MakeUrlsValid, + up: (asset: any) => { + if (!T.srcUrl.isValid(asset.props.src)) { + asset.props.src = '' } - return asset }, - down: (asset) => asset, + down: (_asset) => { + // noop + }, }, - }, + ], }) diff --git a/packages/tlschema/src/assets/TLVideoAsset.ts b/packages/tlschema/src/assets/TLVideoAsset.ts index bf8ea9003..de7bb16be 100644 --- a/packages/tlschema/src/assets/TLVideoAsset.ts +++ b/packages/tlschema/src/assets/TLVideoAsset.ts @@ -1,6 +1,7 @@ -import { defineMigrations } from '@tldraw/store' +import { createMigrationIds, createRecordMigrationSequence } from '@tldraw/store' import { T } from '@tldraw/validate' -import { createAssetValidator, TLBaseAsset } from './TLBaseAsset' +import { TLAsset } from '../records/TLAsset' +import { TLBaseAsset, createAssetValidator } from './TLBaseAsset' /** * An asset used for videos, used by the TLVideoShape. @@ -31,54 +32,54 @@ export const videoAssetValidator: T.Validator = createAssetValidat }) ) -const Versions = { +const Versions = createMigrationIds('com.tldraw.asset.video', { AddIsAnimated: 1, RenameWidthHeight: 2, MakeUrlsValid: 3, -} as const +} as const) + +export { Versions as videoAssetVersions } /** @internal */ -export const videoAssetMigrations = defineMigrations({ - currentVersion: Versions.MakeUrlsValid, - migrators: { - [Versions.AddIsAnimated]: { - up: (asset) => { - return { - ...asset, - props: { - ...asset.props, - isAnimated: false, - }, - } +export const videoAssetMigrations = createRecordMigrationSequence({ + sequenceId: 'com.tldraw.asset.video', + recordType: 'asset', + filter: (asset) => (asset as TLAsset).type === 'video', + sequence: [ + { + id: Versions.AddIsAnimated, + up: (asset: any) => { + asset.props.isAnimated = false }, - down: (asset) => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { isAnimated, ...rest } = asset.props - return { - ...asset, - props: rest, - } + down: (asset: any) => { + delete asset.props.isAnimated }, }, - [Versions.RenameWidthHeight]: { - up: (asset) => { - const { width, height, ...others } = asset.props - return { ...asset, props: { w: width, h: height, ...others } } + { + id: Versions.RenameWidthHeight, + up: (asset: any) => { + asset.props.w = asset.props.width + asset.props.h = asset.props.height + delete asset.props.width + delete asset.props.height }, - down: (asset) => { - const { w, h, ...others } = asset.props - return { ...asset, props: { width: w, height: h, ...others } } + down: (asset: any) => { + asset.props.width = asset.props.w + asset.props.height = asset.props.h + delete asset.props.w + delete asset.props.h }, }, - [Versions.MakeUrlsValid]: { - up: (asset: TLVideoAsset) => { - const src = asset.props.src - if (src && !T.srcUrl.isValid(src)) { - return { ...asset, props: { ...asset.props, src: '' } } + { + id: Versions.MakeUrlsValid, + up: (asset: any) => { + if (!T.srcUrl.isValid(asset.props.src)) { + asset.props.src = '' } - return asset }, - down: (asset) => asset, + down: (_asset) => { + // noop + }, }, - }, + ], }) diff --git a/packages/tlschema/src/createPresenceStateDerivation.ts b/packages/tlschema/src/createPresenceStateDerivation.ts index 9c5e0b0c0..d99a7a839 100644 --- a/packages/tlschema/src/createPresenceStateDerivation.ts +++ b/packages/tlschema/src/createPresenceStateDerivation.ts @@ -6,7 +6,10 @@ import { InstancePageStateRecordType } from './records/TLPageState' import { TLPOINTER_ID } from './records/TLPointer' import { InstancePresenceRecordType, TLInstancePresence } from './records/TLPresence' -/** @public */ +/** + * Creates a derivation that represents the current presence state of the current user. + * @public + */ export const createPresenceStateDerivation = ( $user: Signal<{ id: string; color: string; name: string }>, diff --git a/packages/tlschema/src/createTLSchema.ts b/packages/tlschema/src/createTLSchema.ts index 5638f9cec..f0a298728 100644 --- a/packages/tlschema/src/createTLSchema.ts +++ b/packages/tlschema/src/createTLSchema.ts @@ -1,16 +1,26 @@ -import { Migrations, StoreSchema } from '@tldraw/store' +import { LegacyMigrations, MigrationSequence, StoreSchema } from '@tldraw/store' import { objectMapValues } from '@tldraw/utils' import { TLStoreProps, createIntegrityChecker, onValidationFailure } from './TLStore' -import { AssetRecordType } from './records/TLAsset' -import { CameraRecordType } from './records/TLCamera' -import { DocumentRecordType } from './records/TLDocument' -import { createInstanceRecordType } from './records/TLInstance' -import { PageRecordType } from './records/TLPage' -import { InstancePageStateRecordType } from './records/TLPageState' -import { PointerRecordType } from './records/TLPointer' -import { InstancePresenceRecordType } from './records/TLPresence' +import { bookmarkAssetMigrations } from './assets/TLBookmarkAsset' +import { imageAssetMigrations } from './assets/TLImageAsset' +import { videoAssetMigrations } from './assets/TLVideoAsset' +import { AssetRecordType, assetMigrations } from './records/TLAsset' +import { CameraRecordType, cameraMigrations } from './records/TLCamera' +import { DocumentRecordType, documentMigrations } from './records/TLDocument' +import { createInstanceRecordType, instanceMigrations } from './records/TLInstance' +import { PageRecordType, pageMigrations } from './records/TLPage' +import { InstancePageStateRecordType, instancePageStateMigrations } from './records/TLPageState' +import { PointerRecordType, pointerMigrations } from './records/TLPointer' +import { InstancePresenceRecordType, instancePresenceMigrations } from './records/TLPresence' import { TLRecord } from './records/TLRecord' -import { TLDefaultShape, createShapeRecordType, getShapePropKeysByStyle } from './records/TLShape' +import { + TLDefaultShape, + TLShapePropsMigrations, + createShapeRecordType, + getShapePropKeysByStyle, + processShapeMigrations, + rootShapeMigrations, +} from './records/TLShape' import { arrowShapeMigrations, arrowShapeProps } from './shapes/TLArrowShape' import { bookmarkShapeMigrations, bookmarkShapeProps } from './shapes/TLBookmarkShape' import { drawShapeMigrations, drawShapeProps } from './shapes/TLDrawShape' @@ -34,7 +44,7 @@ type AnyValidator = { /** @public */ export type SchemaShapeInfo = { - migrations?: Migrations + migrations?: LegacyMigrations | TLShapePropsMigrations | MigrationSequence props?: Record meta?: Record } @@ -66,8 +76,10 @@ const defaultShapes: { [T in TLDefaultShape['type']]: SchemaShapeInfo } = { * @public */ export function createTLSchema({ shapes = defaultShapes, + migrations, }: { shapes?: Record + migrations?: readonly MigrationSequence[] } = {}): TLSchema { const stylesById = new Map>() for (const shape of objectMapValues(shapes)) { @@ -90,14 +102,33 @@ export function createTLSchema({ instance: InstanceRecordType, instance_page_state: InstancePageStateRecordType, page: PageRecordType, - shape: ShapeRecordType, instance_presence: InstancePresenceRecordType, pointer: PointerRecordType, + shape: ShapeRecordType, }, { - snapshotMigrations: storeMigrations, + migrations: [ + storeMigrations, + assetMigrations, + cameraMigrations, + documentMigrations, + instanceMigrations, + instancePageStateMigrations, + pageMigrations, + instancePresenceMigrations, + pointerMigrations, + rootShapeMigrations, + + bookmarkAssetMigrations, + imageAssetMigrations, + videoAssetMigrations, + + ...processShapeMigrations(shapes), + + ...(migrations ?? []), + ], onValidationFailure, - createIntegrityChecker: createIntegrityChecker, + createIntegrityChecker, } ) } diff --git a/packages/tlschema/src/index.ts b/packages/tlschema/src/index.ts index cf3d6ff18..a4c61e4d7 100644 --- a/packages/tlschema/src/index.ts +++ b/packages/tlschema/src/index.ts @@ -52,6 +52,7 @@ export { InstancePresenceRecordType, type TLInstancePresence } from './records/T export { type TLRecord } from './records/TLRecord' export { createShapeId, + createShapePropsMigrationSequence, getShapePropKeysByStyle, isShape, isShapeId, @@ -63,6 +64,7 @@ export { type TLShapePartial, type TLShapeProp, type TLShapeProps, + type TLShapePropsMigrations, type TLUnknownShape, } from './records/TLShape' export { diff --git a/packages/tlschema/src/migrations.test.ts b/packages/tlschema/src/migrations.test.ts index 06de3815b..bb3f985e2 100644 --- a/packages/tlschema/src/migrations.test.ts +++ b/packages/tlschema/src/migrations.test.ts @@ -1,109 +1,28 @@ -import { Migrations, Store, createRecordType } from '@tldraw/store' -import { structuredClone } from '@tldraw/utils' -import fs from 'fs' -import { bookmarkAssetMigrations } from './assets/TLBookmarkAsset' -import { imageAssetMigrations } from './assets/TLImageAsset' -import { videoAssetMigrations } from './assets/TLVideoAsset' -import { assetMigrations, assetVersions } from './records/TLAsset' -import { cameraMigrations, cameraVersions } from './records/TLCamera' -import { documentMigrations, documentVersions } from './records/TLDocument' -import { instanceMigrations, instanceVersions } from './records/TLInstance' -import { pageMigrations, pageVersions } from './records/TLPage' -import { instancePageStateMigrations, instancePageStateVersions } from './records/TLPageState' -import { pointerMigrations, pointerVersions } from './records/TLPointer' -import { instancePresenceMigrations, instancePresenceVersions } from './records/TLPresence' -import { TLShape, rootShapeMigrations, rootShapeVersions } from './records/TLShape' -import { ArrowMigrationVersions, arrowShapeMigrations } from './shapes/TLArrowShape' -import { bookmarkShapeMigrations } from './shapes/TLBookmarkShape' -import { drawShapeMigrations } from './shapes/TLDrawShape' -import { embedShapeMigrations } from './shapes/TLEmbedShape' -import { GeoShapeVersions, geoShapeMigrations } from './shapes/TLGeoShape' -import { imageShapeMigrations } from './shapes/TLImageShape' -import { lineShapeMigrations, lineShapeVersions } from './shapes/TLLineShape' -import { noteShapeMigrations, noteShapeVersions } from './shapes/TLNoteShape' -import { textShapeMigrations } from './shapes/TLTextShape' -import { videoShapeMigrations } from './shapes/TLVideoShape' -import { storeMigrations, storeVersions } from './store-migrations' - -const assetModules = fs - .readdirSync('src/assets') - .filter((n) => n.match(/^TL.*\.ts$/)) - .map((f) => [f, require(`./assets/${f.slice(0, -3)}`)]) -const shapeModules = fs - .readdirSync('src/shapes') - .filter((n) => n.match(/^TL.*\.ts$/)) - .map((f) => [f, require(`./shapes/${f.slice(0, -3)}`)]) -const recordModules = fs - .readdirSync('src/records') - .filter((n) => n.match(/^TL.*\.ts$/)) - .map((f) => [f, require(`./records/${f.slice(0, -3)}`)]) - -const allModules = [ - ...assetModules, - ...shapeModules, - ...recordModules, - ['store-migrations.ts', require('./store-migrations')], -] - -const allMigrators: Array<{ - fileName: string - version: number - up: jest.SpyInstance - down: jest.SpyInstance -}> = [] - -for (const [fileName, module] of allModules) { - const migrationsKey = Object.keys(module).find((k) => k.endsWith('igrations')) - - if (!migrationsKey) continue - - const migrations: Migrations = module[migrationsKey] - - for (const version of Object.keys(migrations.migrators)) { - const originalUp = migrations.migrators[version as any].up - const originalDown = migrations.migrators[version as any].down - const up = jest - .spyOn(migrations.migrators[version as any], 'up') - .mockImplementation((initialRecord) => { - if (initialRecord instanceof Store) return originalUp(initialRecord) - - const clonedRecord = structuredClone(initialRecord) - const result = originalUp(initialRecord) - // mutations should never mutate their input - expect(initialRecord).toEqual(clonedRecord) - return result - }) - const down = jest - .spyOn(migrations.migrators[version as any], 'down') - .mockImplementation((initialRecord) => { - if (initialRecord instanceof Store) return originalDown(initialRecord) - - const clonedRecord = structuredClone(initialRecord) - const result = originalDown(initialRecord) - // mutations should never mutate their input - expect(initialRecord).toEqual(clonedRecord) - return result - }) - allMigrators.push({ - fileName, - version: Number(version), - up, - down, - }) - } -} - -test('all modules export migrations', () => { - const modulesWithoutMigrations = allModules - .filter(([, module]) => { - return !Object.keys(module).find((k) => k.endsWith('igrations')) - }) - .map(([fileName]) => fileName) - .filter((n) => !(n === 'TLBaseAsset.ts' || n === 'TLBaseShape.ts' || n === 'TLRecord.ts')) - - // IF THIS LINE IS FAILING YOU NEED TO MAKE SURE THE MIGRATIONS ARE EXPORTED - expect(modulesWithoutMigrations).toHaveLength(0) -}) +import { createRecordType } from '@tldraw/store' +import { getTestMigration, testSchema } from './__tests__/migrationTestUtils' +import { bookmarkAssetVersions } from './assets/TLBookmarkAsset' +import { imageAssetVersions } from './assets/TLImageAsset' +import { videoAssetVersions } from './assets/TLVideoAsset' +import { assetVersions } from './records/TLAsset' +import { cameraVersions } from './records/TLCamera' +import { documentVersions } from './records/TLDocument' +import { instanceVersions } from './records/TLInstance' +import { pageVersions } from './records/TLPage' +import { instancePageStateVersions } from './records/TLPageState' +import { pointerVersions } from './records/TLPointer' +import { instancePresenceVersions } from './records/TLPresence' +import { TLShape, rootShapeVersions } from './records/TLShape' +import { arrowShapeVersions } from './shapes/TLArrowShape' +import { bookmarkShapeVersions } from './shapes/TLBookmarkShape' +import { drawShapeVersions } from './shapes/TLDrawShape' +import { embedShapeVersions } from './shapes/TLEmbedShape' +import { geoShapeVersions } from './shapes/TLGeoShape' +import { imageShapeVersions } from './shapes/TLImageShape' +import { lineShapeVersions } from './shapes/TLLineShape' +import { noteShapeVersions } from './shapes/TLNoteShape' +import { textShapeVersions } from './shapes/TLTextShape' +import { videoShapeVersions } from './shapes/TLVideoShape' +import { storeVersions } from './store-migrations' /* --- PUT YOUR MIGRATIONS TESTS BELOW HERE --- */ @@ -133,7 +52,7 @@ describe('TLVideoAsset AddIsAnimated', () => { }, } - const { up, down } = videoAssetMigrations.migrators[1] + const { up, down } = getTestMigration(videoAssetVersions.AddIsAnimated) test('up works as expected', () => { expect(up(oldAsset)).toEqual(newAsset) @@ -169,7 +88,7 @@ describe('TLImageAsset AddIsAnimated', () => { }, } - const { up, down } = imageAssetMigrations.migrators[1] + const { up, down } = getTestMigration(imageAssetVersions.AddIsAnimated) test('up works as expected', () => { expect(up(oldAsset)).toEqual(newAsset) @@ -185,6 +104,7 @@ const ShapeRecord = createRecordType('shape', { }) describe('Store removing Icon and Code shapes', () => { + const { up } = getTestMigration(storeVersions.RemoveCodeAndIconShapeTypes) test('up works as expected', () => { const snapshot = Object.fromEntries( [ @@ -220,127 +140,78 @@ describe('Store removing Icon and Code shapes', () => { } as any), ].map((shape) => [shape.id, shape]) ) - const fixed = storeMigrations.migrators[storeVersions.RemoveCodeAndIconShapeTypes].up(snapshot) + const fixed = up(snapshot) expect(Object.entries(fixed)).toHaveLength(1) }) - - test('down works as expected', () => { - const snapshot = Object.fromEntries( - [ - ShapeRecord.create({ - type: 'geo', - parentId: 'page:any', - index: 'a0', - props: { geo: 'rectangle', name: 'e', w: 1, h: 1, growY: 1, text: '' }, - } as any), - ].map((shape) => [shape.id, shape]) - ) - - storeMigrations.migrators[storeVersions.RemoveCodeAndIconShapeTypes].down(snapshot) - expect(Object.entries(snapshot)).toHaveLength(1) - }) }) describe('Adding export background', () => { - const { up, down } = instanceMigrations.migrators[1] + const { up } = getTestMigration(instanceVersions.AddTransparentExportBgs) test('up works as expected', () => { const before = {} const after = { exportBackground: true } - expect(up(before)).toStrictEqual(after) - }) - - test('down works as expected', () => { - const before = { exportBackground: true } - const after = {} - expect(down(before)).toStrictEqual(after) + expect(up(before)).toEqual(after) }) }) describe('Removing dialogs from instance', () => { - const { up, down } = instanceMigrations.migrators[2] + const { up } = getTestMigration(instanceVersions.RemoveDialog) test('up works as expected', () => { const before = { dialog: null } const after = {} - expect(up(before)).toStrictEqual(after) - }) - - test('down works as expected', () => { - const before = {} - const after = { dialog: null } - expect(down(before)).toStrictEqual(after) + expect(up(before)).toEqual(after) }) }) describe('Adding url props', () => { - for (const [name, { up, down }] of [ - ['video shape', videoShapeMigrations.migrators[1]], - ['note shape', noteShapeMigrations.migrators[1]], - ['geo shape', geoShapeMigrations.migrators[1]], - ['image shape', imageShapeMigrations.migrators[1]], + for (const [name, { up }] of [ + ['video shape', getTestMigration(videoShapeVersions.AddUrlProp)], + ['note shape', getTestMigration(noteShapeVersions.AddUrlProp)], + ['geo shape', getTestMigration(geoShapeVersions.AddUrlProp)], + ['image shape', getTestMigration(imageShapeVersions.AddUrlProp)], ] as const) { test(`${name}: up works as expected`, () => { - const before = { props: {} } - const after = { props: { url: '' } } - expect(up(before)).toStrictEqual(after) - }) - - test(`${name}: down works as expected`, () => { - const before = { props: { url: '' } } - const after = { props: {} } - expect(down(before)).toStrictEqual(after) + expect(up({ props: {} })).toEqual({ props: { url: '' } }) }) } }) describe('Bookmark null asset id', () => { - const { up, down } = bookmarkShapeMigrations.migrators[1] + const { up } = getTestMigration(bookmarkShapeVersions.NullAssetId) test('up works as expected', () => { - const before = { props: {} } - const after = { props: { assetId: null } } - expect(up(before)).toStrictEqual(after) - }) - - test('down works as expected', () => { - const before = { props: { assetId: null } } - const after = { props: {} } - expect(down(before)).toStrictEqual(after) + expect(up({ props: {} })).toEqual({ props: { assetId: null } }) }) }) describe('Renaming asset props', () => { for (const [name, { up, down }] of [ - ['image shape', imageAssetMigrations.migrators[2]], - ['video shape', videoAssetMigrations.migrators[2]], + ['image shape', getTestMigration(imageAssetVersions.RenameWidthHeight)], + ['video shape', getTestMigration(videoAssetVersions.RenameWidthHeight)], ] as const) { test(`${name}: up works as expected`, () => { const before = { props: { width: 100, height: 100 } } const after = { props: { w: 100, h: 100 } } - expect(up(before)).toStrictEqual(after) + expect(up(before)).toEqual(after) }) test(`${name}: down works as expected`, () => { const before = { props: { w: 100, h: 100 } } const after = { props: { width: 100, height: 100 } } - expect(down(before)).toStrictEqual(after) + expect(down(before)).toEqual(after) }) } }) describe('Adding instance.isToolLocked', () => { - const { up, down } = instanceMigrations.migrators[3] + const { up } = getTestMigration(instanceVersions.AddToolLockMode) test('up works as expected', () => { expect(up({})).toMatchObject({ isToolLocked: false }) expect(up({ isToolLocked: true })).toMatchObject({ isToolLocked: false }) }) - - test('down works as expected', () => { - expect(down({ isToolLocked: true })).toStrictEqual({}) - expect(down({ isToolLocked: false })).toStrictEqual({}) - }) }) describe('Cleaning up junk data in instance.propsForNextShape', () => { - const { up, down } = instanceMigrations.migrators[4] + const { up } = getTestMigration(instanceVersions.RemoveExtraPropsForNextShape) test('up works as expected', () => { expect(up({ propsForNextShape: { color: 'red', unknown: 'gone' } })).toEqual({ propsForNextShape: { @@ -348,15 +219,10 @@ describe('Cleaning up junk data in instance.propsForNextShape', () => { }, }) }) - - test('down works as expected', () => { - const instance = { propsForNextShape: { color: 'red' } } - expect(down(instance)).toBe(instance) - }) }) describe('Generating original URL from embed URL in GenOriginalUrlInEmbed', () => { - const { up, down } = embedShapeMigrations.migrators[1] + const { up } = getTestMigration(embedShapeVersions.GenOriginalUrlInEmbed) test('up works as expected', () => { expect(up({ props: { url: 'https://codepen.io/Rplus/embed/PWZYRM' } })).toEqual({ props: { @@ -374,30 +240,10 @@ describe('Generating original URL from embed URL in GenOriginalUrlInEmbed', () = }, }) }) - - test('down works as expected', () => { - const instance = { - props: { - url: 'https://codepen.io/Rplus/pen/PWZYRM', - tmpOldUrl: 'https://codepen.io/Rplus/embed/PWZYRM', - }, - } - expect(down(instance)).toEqual({ props: { url: 'https://codepen.io/Rplus/embed/PWZYRM' } }) - }) - - test('invalid down works as expected', () => { - const instance = { - props: { - url: 'https://example.com', - tmpOldUrl: '', - }, - } - expect(down(instance)).toEqual({ props: { url: '' } }) - }) }) describe('Adding isPen prop', () => { - const { up, down } = drawShapeMigrations.migrators[1] + const { up } = getTestMigration(drawShapeVersions.AddInPen) test('up works as expected with a shape that is not a pen shape', () => { expect( @@ -460,16 +306,10 @@ describe('Adding isPen prop', () => { }, }) }) - - test('down works as expected', () => { - expect(down({ props: { isPen: false } })).toEqual({ - props: {}, - }) - }) }) describe('Adding isLocked prop', () => { - const { up, down } = rootShapeMigrations.migrators[1] + const { up, down } = getTestMigration(rootShapeVersions.AddIsLocked) test('up works as expected', () => { expect(up({})).toEqual({ isLocked: false }) @@ -481,55 +321,38 @@ describe('Adding isLocked prop', () => { }) describe('Adding labelColor prop to geo / arrow shapes', () => { - for (const [name, { up, down }] of [ - ['arrow shape', arrowShapeMigrations.migrators[1]], - ['geo shape', geoShapeMigrations.migrators[2]], + for (const [name, { up }] of [ + ['arrow shape', getTestMigration(arrowShapeVersions.AddLabelColor)], + ['geo shape', getTestMigration(geoShapeVersions.AddLabelColor)], ] as const) { test(`${name}: up works as expected`, () => { expect(up({ props: { color: 'red' } })).toEqual({ props: { color: 'red', labelColor: 'black' }, }) }) - - test(`${name}: down works as expected`, () => { - expect(down({ props: { color: 'red', labelColor: 'blue' } })).toEqual({ - props: { color: 'red' }, - }) - }) } }) describe('Adding labelColor prop to propsForNextShape', () => { - const { up, down } = instanceMigrations.migrators[5] + const { up } = getTestMigration(instanceVersions.AddLabelColor) test('up works as expected', () => { expect(up({ propsForNextShape: { color: 'red' } })).toEqual({ propsForNextShape: { color: 'red', labelColor: 'black' }, }) }) - - test('down works as expected', () => { - expect(down({ propsForNextShape: { color: 'red', labelColor: 'blue' } })).toEqual({ - propsForNextShape: { color: 'red' }, - }) - }) }) describe('Adding croppingShapeId to instancePageState', () => { - const { up, down } = instancePageStateMigrations.migrators[1] + const { up } = getTestMigration(instancePageStateVersions.AddCroppingId) test('up works as expected', () => { expect(up({})).toEqual({ croppingShapeId: null, }) }) - - test('down works as expected', () => { - expect(down({ croppingShapeId: null })).toEqual({}) - }) }) describe('Renaming properties in instancePageState', () => { - const { up, down } = - instancePageStateMigrations.migrators[instancePageStateVersions.RenameProperties] + const { up, down } = getTestMigration(instancePageStateVersions.RenameProperties) test('up works as expected', () => { expect( up({ @@ -588,8 +411,7 @@ describe('Renaming properties in instancePageState', () => { }) describe('Renaming properties again in instancePageState', () => { - const { up, down } = - instancePageStateMigrations.migrators[instancePageStateVersions.RenamePropertiesAgain] + const { up, down } = getTestMigration(instancePageStateVersions.RenamePropertiesAgain) test('up works as expected', () => { expect( up({ @@ -648,18 +470,14 @@ describe('Renaming properties again in instancePageState', () => { }) describe('Adding followingUserId prop to instance', () => { - const { up, down } = instanceMigrations.migrators[6] + const { up } = getTestMigration(instanceVersions.AddFollowingUserId) test('up works as expected', () => { expect(up({})).toEqual({ followingUserId: null }) }) - - test('down works as expected', () => { - expect(down({ followingUserId: '123' })).toEqual({}) - }) }) describe('Removing align=justify from propsForNextShape', () => { - const { up, down } = instanceMigrations.migrators[7] + const { up } = getTestMigration(instanceVersions.RemoveAlignJustify) test('up works as expected', () => { expect(up({ propsForNextShape: { color: 'black', align: 'justify' } })).toEqual({ propsForNextShape: { color: 'black', align: 'start' }, @@ -668,83 +486,49 @@ describe('Removing align=justify from propsForNextShape', () => { propsForNextShape: { color: 'black', align: 'end' }, }) }) - - test('down works as expected', () => { - expect(down({ propsForNextShape: { color: 'black', align: 'end' } })).toEqual({ - propsForNextShape: { color: 'black', align: 'end' }, - }) - }) }) describe('Adding zoomBrush prop to instance', () => { - const { up, down } = instanceMigrations.migrators[8] + const { up } = getTestMigration(instanceVersions.AddZoom) test('up works as expected', () => { expect(up({})).toEqual({ zoomBrush: null }) }) - - test('down works as expected', () => { - expect(down({ zoomBrush: { x: 1, y: 2, w: 3, h: 4 } })).toEqual({}) - }) }) describe('Removing align=justify from shape align props', () => { - for (const [name, { up, down }] of [ - ['text', textShapeMigrations.migrators[1]], - ['note', noteShapeMigrations.migrators[2]], - ['geo', geoShapeMigrations.migrators[3]], + for (const [name, { up }] of [ + ['text', getTestMigration(textShapeVersions.RemoveJustify)], + ['note', getTestMigration(noteShapeVersions.RemoveJustify)], + ['geo', getTestMigration(geoShapeVersions.RemoveJustify)], ] as const) { test(`${name}: up works as expected`, () => { - expect(up({ props: { align: 'justify' } })).toEqual({ - props: { align: 'start' }, - }) - expect(up({ props: { align: 'end' } })).toEqual({ - props: { align: 'end' }, - }) - }) - - test(`${name}: down works as expected`, () => { - expect(down({ props: { align: 'start' } })).toEqual({ - props: { align: 'start' }, - }) + expect(up({ props: { align: 'justify' } })).toEqual({ props: { align: 'start' } }) + expect(up({ props: { align: 'end' } })).toEqual({ props: { align: 'end' } }) }) } }) describe('Add crop=null to image shapes', () => { - const { up, down } = imageShapeMigrations.migrators[2] + const { up, down } = getTestMigration(imageShapeVersions.AddCropProp) test('up works as expected', () => { - expect(up({ props: { w: 100 } })).toEqual({ - props: { w: 100, crop: null }, - }) + expect(up({ props: { w: 100 } })).toEqual({ props: { w: 100, crop: null } }) }) test('down works as expected', () => { - expect(down({ props: { w: 100, crop: null } })).toEqual({ - props: { w: 100 }, - }) + expect(down({ props: { w: 100, crop: null } })).toEqual({ props: { w: 100 } }) }) }) describe('Adding instance_presence to the schema', () => { - const { up, down } = storeMigrations.migrators[storeVersions.AddInstancePresenceType] + const { up } = getTestMigration(storeVersions.AddInstancePresenceType) test('up works as expected', () => { expect(up({})).toEqual({}) }) - test('down works as expected', () => { - expect( - down({ - 'instance_presence:123': { id: 'instance_presence:123', typeName: 'instance_presence' }, - 'instance:123': { id: 'instance:123', typeName: 'instance' }, - }) - ).toEqual({ - 'instance:123': { id: 'instance:123', typeName: 'instance' }, - }) - }) }) describe('Adding name to document', () => { - const { up, down } = documentMigrations.migrators[1] + const { up, down } = getTestMigration(documentVersions.AddName) test('up works as expected', () => { expect(up({})).toEqual({ name: '' }) @@ -756,34 +540,25 @@ describe('Adding name to document', () => { }) describe('Adding check-box to geo shape', () => { - const { up, down } = geoShapeMigrations.migrators[4] + const { up } = getTestMigration(geoShapeVersions.AddCheckBox) test('up works as expected', () => { expect(up({ props: { geo: 'rectangle' } })).toEqual({ props: { geo: 'rectangle' } }) }) - test('down works as expected', () => { - expect(down({ props: { geo: 'rectangle' } })).toEqual({ props: { geo: 'rectangle' } }) - expect(down({ props: { geo: 'check-box' } })).toEqual({ props: { geo: 'rectangle' } }) - }) }) describe('Add verticalAlign to geo shape', () => { - const { up, down } = geoShapeMigrations.migrators[5] + const { up } = getTestMigration(geoShapeVersions.AddVerticalAlign) test('up works as expected', () => { expect(up({ props: { type: 'ellipse' } })).toEqual({ props: { type: 'ellipse', verticalAlign: 'middle' }, }) }) - test('down works as expected', () => { - expect(down({ props: { verticalAlign: 'middle', type: 'ellipse' } })).toEqual({ - props: { type: 'ellipse' }, - }) - }) }) describe('Add verticalAlign to props for next shape', () => { - const { up, down } = instanceMigrations.migrators[9] + const { up } = getTestMigration(instanceVersions.AddVerticalAlign) test('up works as expected', () => { expect(up({ propsForNextShape: { color: 'red' } })).toEqual({ propsForNextShape: { @@ -792,62 +567,40 @@ describe('Add verticalAlign to props for next shape', () => { }, }) }) - - test('down works as expected', () => { - const instance = { propsForNextShape: { color: 'red', verticalAlign: 'middle' } } - expect(down(instance)).toEqual({ - propsForNextShape: { - color: 'red', - }, - }) - }) }) describe('Migrate GeoShape legacy horizontal alignment', () => { - const { up, down } = geoShapeMigrations.migrators[6] + const { up } = getTestMigration(geoShapeVersions.MigrateLegacyAlign) test('up works as expected', () => { expect(up({ props: { align: 'start', type: 'ellipse' } })).toEqual({ - props: { align: 'start-legacy', type: 'ellipse' }, + props: { + align: 'start-legacy', + type: 'ellipse', + }, }) expect(up({ props: { align: 'middle', type: 'ellipse' } })).toEqual({ - props: { align: 'middle-legacy', type: 'ellipse' }, + props: { + align: 'middle-legacy', + type: 'ellipse', + }, }) expect(up({ props: { align: 'end', type: 'ellipse' } })).toEqual({ props: { align: 'end-legacy', type: 'ellipse' }, }) }) - test('down works as expected', () => { - expect(down({ props: { align: 'start-legacy', type: 'ellipse' } })).toEqual({ - props: { align: 'start', type: 'ellipse' }, - }) - expect(down({ props: { align: 'middle-legacy', type: 'ellipse' } })).toEqual({ - props: { align: 'middle', type: 'ellipse' }, - }) - expect(down({ props: { align: 'end-legacy', type: 'ellipse' } })).toEqual({ - props: { align: 'end', type: 'ellipse' }, - }) - }) }) describe('adding cloud shape', () => { - const { up, down } = geoShapeMigrations.migrators[GeoShapeVersions.AddCloud] + const { up } = getTestMigration(geoShapeVersions.AddCloud) test('up does nothing', () => { - expect(up({ props: { geo: 'rectangle' } })).toEqual({ - props: { geo: 'rectangle' }, - }) - }) - - test('down converts clouds to rectangles', () => { - expect(down({ props: { geo: 'cloud' } })).toEqual({ - props: { geo: 'rectangle' }, - }) + expect(up({ props: { geo: 'rectangle' } })).toEqual({ props: { geo: 'rectangle' } }) }) }) describe('Migrate NoteShape legacy horizontal alignment', () => { - const { up, down } = noteShapeMigrations.migrators[3] + const { up } = getTestMigration(noteShapeVersions.MigrateLegacyAlign) test('up works as expected', () => { expect(up({ props: { align: 'start', color: 'red' } })).toEqual({ @@ -860,21 +613,10 @@ describe('Migrate NoteShape legacy horizontal alignment', () => { props: { align: 'end-legacy', color: 'red' }, }) }) - test('down works as expected', () => { - expect(down({ props: { align: 'start-legacy', color: 'red' } })).toEqual({ - props: { align: 'start', color: 'red' }, - }) - expect(down({ props: { align: 'middle-legacy', color: 'red' } })).toEqual({ - props: { align: 'middle', color: 'red' }, - }) - expect(down({ props: { align: 'end-legacy', color: 'red' } })).toEqual({ - props: { align: 'end', color: 'red' }, - }) - }) }) describe('Adds delay to scribble', () => { - const { up, down } = instanceMigrations.migrators[10] + const { up } = getTestMigration(instanceVersions.AddScribbleDelay) test('up has no effect when scribble is null', () => { expect( @@ -906,37 +648,10 @@ describe('Adds delay to scribble', () => { }, }) }) - - test('down has no effect when scribble is null', () => { - expect(down({ scribble: null })).toEqual({ scribble: null }) - }) - - test('removes the delay property', () => { - expect( - down({ - scribble: { - points: [{ x: 0, y: 0 }], - size: 4, - color: 'black', - opacity: 1, - state: 'starting', - delay: 0, - }, - }) - ).toEqual({ - scribble: { - points: [{ x: 0, y: 0 }], - size: 4, - color: 'black', - opacity: 1, - state: 'starting', - }, - }) - }) }) describe('Adds delay to scribble', () => { - const { up, down } = instancePresenceMigrations.migrators[1] + const { up } = getTestMigration(instancePresenceVersions.AddScribbleDelay) test('up has no effect when scribble is null', () => { expect( @@ -968,39 +683,11 @@ describe('Adds delay to scribble', () => { }, }) }) - - test('down has no effect when scribble is null', () => { - expect(down({ scribble: null })).toEqual({ scribble: null }) - }) - - test('removes the delay property', () => { - expect( - down({ - scribble: { - points: [{ x: 0, y: 0 }], - size: 4, - color: 'black', - opacity: 1, - state: 'starting', - delay: 0, - }, - }) - ).toEqual({ - scribble: { - points: [{ x: 0, y: 0 }], - size: 4, - color: 'black', - opacity: 1, - state: 'starting', - }, - }) - }) }) describe('user config refactor', () => { test('removes user and user_presence types from snapshots', () => { - const { up, down } = - storeMigrations.migrators[storeVersions.RemoveTLUserAndPresenceAndAddPointer] + const { up } = getTestMigration(storeVersions.RemoveTLUserAndPresenceAndAddPointer) const prevSnapshot = { 'user:123': { @@ -1026,20 +713,10 @@ describe('user config refactor', () => { // up removes the user and user_presence types expect(up(prevSnapshot)).toEqual(nextSnapshot) - // down cannot add them back so it should be a no-op - expect( - down({ - ...nextSnapshot, - 'pointer:134': { - id: 'pointer:134', - typeName: 'pointer', - }, - }) - ).toEqual(nextSnapshot) }) test('removes userId from the instance state', () => { - const { up, down } = instanceMigrations.migrators[instanceVersions.RemoveUserId] + const { up } = getTestMigration(instanceVersions.RemoveUserId) const prev = { id: 'instance:123', @@ -1053,21 +730,12 @@ describe('user config refactor', () => { } expect(up(prev)).toEqual(next) - // it cannot be added back so it should add some meaningless id in there - // in practice, because we bumped the store version, this down migrator will never be used - expect(down(next)).toMatchInlineSnapshot(` - { - "id": "instance:123", - "typeName": "instance", - "userId": "user:none", - } - `) }) }) describe('making instance state independent', () => { it('adds isPenMode and isGridMode to instance state', () => { - const { up, down } = instanceMigrations.migrators[instanceVersions.AddIsPenModeAndIsGridMode] + const { up } = getTestMigration(instanceVersions.AddIsPenModeAndIsGridMode) const prev = { id: 'instance:123', @@ -1081,12 +749,10 @@ describe('making instance state independent', () => { } expect(up(prev)).toEqual(next) - expect(down(next)).toEqual(prev) }) it('removes instanceId and cameraId from instancePageState', () => { - const { up, down } = - instancePageStateMigrations.migrators[instancePageStateVersions.RemoveInstanceIdAndCameraId] + const { up } = getTestMigration(instancePageStateVersions.RemoveInstanceIdAndCameraId) const prev = { id: 'instance_page_state:123', @@ -1103,21 +769,10 @@ describe('making instance state independent', () => { } expect(up(prev)).toEqual(next) - // down should never be called - expect(down(next)).toMatchInlineSnapshot(` - { - "cameraId": "camera:void", - "id": "instance_page_state:123", - "instanceId": "instance:instance", - "selectedShapeIds": [], - "typeName": "instance_page_state", - } - `) }) it('removes instanceId from instancePresence', () => { - const { up, down } = - instancePresenceMigrations.migrators[instancePresenceVersions.RemoveInstanceId] + const { up } = getTestMigration(instancePresenceVersions.RemoveInstanceId) const prev = { id: 'instance_presence:123', @@ -1133,20 +788,10 @@ describe('making instance state independent', () => { } expect(up(prev)).toEqual(next) - - // down should never be called - expect(down(next)).toMatchInlineSnapshot(` - { - "id": "instance_presence:123", - "instanceId": "instance:instance", - "selectedShapeIds": [], - "typeName": "instance_presence", - } - `) }) it('removes userDocument from the schema', () => { - const { up, down } = storeMigrations.migrators[storeVersions.RemoveUserDocument] + const { up } = getTestMigration(storeVersions.RemoveUserDocument) const prev = { 'user_document:123': { @@ -1167,28 +812,22 @@ describe('making instance state independent', () => { } expect(up(prev)).toEqual(next) - expect(down(next)).toEqual(next) }) }) describe('Adds NoteShape vertical alignment', () => { - const { up, down } = noteShapeMigrations.migrators[4] + const { up } = getTestMigration(noteShapeVersions.AddVerticalAlign) test('up works as expected', () => { expect(up({ props: { color: 'red' } })).toEqual({ - props: { verticalAlign: 'middle', color: 'red' }, - }) - }) - test('down works as expected', () => { - expect(down({ props: { verticalAlign: 'top', color: 'red' } })).toEqual({ - props: { color: 'red' }, + props: { color: 'red', verticalAlign: 'middle' }, }) }) }) describe('hoist opacity', () => { - test('hoists opacity from a shape to another', () => { - const { up, down } = rootShapeMigrations.migrators[rootShapeVersions.HoistOpacity] + test('hoists opacity from props to the root of the shape', () => { + const { up, down } = getTestMigration(rootShapeVersions.HoistOpacity) const before = { type: 'myShape', x: 0, @@ -1207,6 +846,10 @@ describe('hoist opacity', () => { color: 'red', }, } + + expect(up(before)).toEqual(after) + expect(down(after)).toEqual(before) + const afterWithNonMatchingOpacity = { type: 'myShape', x: 0, @@ -1217,13 +860,11 @@ describe('hoist opacity', () => { }, } - expect(up(before)).toEqual(after) - expect(down(after)).toEqual(before) expect(down(afterWithNonMatchingOpacity)).toEqual(before) }) test('hoists opacity from propsForNextShape', () => { - const { up, down } = instanceMigrations.migrators[instanceVersions.HoistOpacity] + const { up } = getTestMigration(instanceVersions.HoistOpacity) const before = { isToolLocked: true, propsForNextShape: { @@ -1238,105 +879,74 @@ describe('hoist opacity', () => { color: 'black', }, } - const afterWithNonMatchingOpacity = { - isToolLocked: true, - opacityForNextShape: 0.6, - propsForNextShape: { - color: 'black', - }, - } expect(up(before)).toEqual(after) - expect(down(after)).toEqual(before) - expect(down(afterWithNonMatchingOpacity)).toEqual(before) }) }) describe('Adds highlightedUserIds to instance', () => { - const { up, down } = instanceMigrations.migrators[instanceVersions.AddHighlightedUserIds] + const { up } = getTestMigration(instanceVersions.AddHighlightedUserIds) test('up works as expected', () => { expect(up({})).toEqual({ highlightedUserIds: [] }) }) - - test('down works as expected', () => { - expect(down({ highlightedUserIds: [] })).toEqual({}) - }) }) describe('Adds chat message to presence', () => { - const { up, down } = instancePresenceMigrations.migrators[3] + const { up } = getTestMigration(instancePresenceVersions.AddChatMessage) test('up adds the chatMessage property', () => { expect(up({})).toEqual({ chatMessage: '' }) }) - - test('down removes the chatMessage property', () => { - expect(down({ chatMessage: '' })).toEqual({}) - }) }) describe('Adds chat properties to instance', () => { - const { up, down } = instanceMigrations.migrators[14] + const { up } = getTestMigration(instanceVersions.AddChat) test('up adds the chatMessage property', () => { expect(up({})).toEqual({ chatMessage: '', isChatting: false }) }) - - test('down removes the chatMessage property', () => { - expect(down({ chatMessage: '', isChatting: true })).toEqual({}) - }) }) describe('Removes does resize from embed', () => { - const { up, down } = embedShapeMigrations.migrators[2] + const { up } = getTestMigration(embedShapeVersions.RemoveDoesResize) test('up works as expected', () => { expect(up({ props: { url: 'https://tldraw.com', doesResize: true } })).toEqual({ - props: { url: 'https://tldraw.com' }, - }) - }) - test('down works as expected', () => { - expect(down({ props: { url: 'https://tldraw.com' } })).toEqual({ - props: { url: 'https://tldraw.com', doesResize: true }, + props: { + url: 'https://tldraw.com', + }, }) }) }) describe('Removes tmpOldUrl from embed', () => { - const { up, down } = embedShapeMigrations.migrators[3] + const { up } = getTestMigration(embedShapeVersions.RemoveTmpOldUrl) test('up works as expected', () => { expect(up({ props: { url: 'https://tldraw.com', tmpOldUrl: 'https://tldraw.com' } })).toEqual({ - props: { url: 'https://tldraw.com' }, - }) - }) - test('down works as expected', () => { - expect(down({ props: { url: 'https://tldraw.com' } })).toEqual({ - props: { url: 'https://tldraw.com' }, + props: { + url: 'https://tldraw.com', + }, }) }) }) describe('Removes overridePermissions from embed', () => { - const { up, down } = embedShapeMigrations.migrators[4] + const { up } = getTestMigration(embedShapeVersions.RemovePermissionOverrides) test('up works as expected', () => { expect( up({ props: { url: 'https://tldraw.com', overridePermissions: { display: 'maybe' } } }) ).toEqual({ - props: { url: 'https://tldraw.com' }, - }) - }) - test('down works as expected', () => { - expect(down({ props: { url: 'https://tldraw.com' } })).toEqual({ - props: { url: 'https://tldraw.com' }, + props: { + url: 'https://tldraw.com', + }, }) }) }) describe('propsForNextShape -> stylesForNextShape', () => { test('deletes propsForNextShape and adds stylesForNextShape without trying to bring across contents', () => { - const { up, down } = - instanceMigrations.migrators[instanceVersions.ReplacePropsForNextShapeWithStylesForNextShape] + const { up } = getTestMigration(instanceVersions.ReplacePropsForNextShapeWithStylesForNextShape) const beforeUp = { isToolLocked: true, propsForNextShape: { @@ -1348,56 +958,33 @@ describe('propsForNextShape -> stylesForNextShape', () => { isToolLocked: true, stylesForNextShape: {}, } - const afterDown = { - isToolLocked: true, - propsForNextShape: { - color: 'black', - labelColor: 'black', - dash: 'draw', - fill: 'none', - size: 'm', - icon: 'file', - font: 'draw', - align: 'middle', - verticalAlign: 'middle', - geo: 'rectangle', - arrowheadStart: 'none', - arrowheadEnd: 'arrow', - spline: 'line', - }, - } expect(up(beforeUp)).toEqual(afterUp) - expect(down(afterUp)).toEqual(afterDown) }) }) describe('adds meta ', () => { const metaMigrations = [ - assetMigrations.migrators[assetVersions.AddMeta], - cameraMigrations.migrators[cameraVersions.AddMeta], - documentMigrations.migrators[documentVersions.AddMeta], - instanceMigrations.migrators[instanceVersions.AddMeta], - instancePageStateMigrations.migrators[instancePageStateVersions.AddMeta], - instancePresenceMigrations.migrators[instancePresenceVersions.AddMeta], - pageMigrations.migrators[pageVersions.AddMeta], - pointerMigrations.migrators[pointerVersions.AddMeta], - rootShapeMigrations.migrators[rootShapeVersions.AddMeta], + getTestMigration(assetVersions.AddMeta), + getTestMigration(cameraVersions.AddMeta), + getTestMigration(documentVersions.AddMeta), + getTestMigration(instanceVersions.AddMeta), + getTestMigration(instancePageStateVersions.AddMeta), + getTestMigration(instancePresenceVersions.AddMeta), + getTestMigration(pageVersions.AddMeta), + getTestMigration(pointerVersions.AddMeta), + getTestMigration(rootShapeVersions.AddMeta), ] - for (const { up, down } of metaMigrations) { - test('up works as expected', () => { - expect(up({})).toStrictEqual({ meta: {} }) - }) - - test('down works as expected', () => { - expect(down({ meta: {} })).toStrictEqual({}) + for (const { up, id } of metaMigrations) { + test('up works as expected for ' + id, () => { + expect(up({})).toEqual({ meta: {} }) }) } }) describe('removes cursor color', () => { - const { up, down } = instanceMigrations.migrators[instanceVersions.RemoveCursorColor] + const { up } = getTestMigration(instanceVersions.RemoveCursorColor) test('up works as expected', () => { expect( @@ -1408,37 +995,20 @@ describe('removes cursor color', () => { color: 'black', }, }) - ).toStrictEqual({ + ).toEqual({ cursor: { type: 'default', rotation: 0.1, }, }) }) - - test('down works as expected', () => { - expect( - down({ - cursor: { - type: 'default', - rotation: 0.1, - }, - }) - ).toStrictEqual({ - cursor: { - type: 'default', - rotation: 0.1, - color: 'black', - }, - }) - }) }) describe('adds lonely properties', () => { - const { up, down } = instanceMigrations.migrators[instanceVersions.AddLonelyProperties] + const { up } = getTestMigration(instanceVersions.AddLonelyProperties) test('up works as expected', () => { - expect(up({})).toStrictEqual({ + expect(up({})).toEqual({ canMoveCamera: true, isFocused: false, devicePixelRatio: 1, @@ -1448,53 +1018,28 @@ describe('adds lonely properties', () => { isReadOnly: false, }) }) - - test('down works as expected', () => { - expect( - down({ - canMoveCamera: true, - isFocused: false, - devicePixelRatio: 1, - isCoarsePointer: false, - openMenus: [], - isChangingStyle: false, - isReadOnly: false, - }) - ).toStrictEqual({}) - }) }) describe('rename isReadOnly to isReadonly', () => { - const { up, down } = instanceMigrations.migrators[instanceVersions.ReadOnlyReadonly] + const { up } = getTestMigration(instanceVersions.ReadOnlyReadonly) test('up works as expected', () => { - expect(up({ isReadOnly: false })).toStrictEqual({ + expect(up({ isReadOnly: false })).toEqual({ isReadonly: false, }) }) - - test('down works as expected', () => { - expect(down({ isReadonly: false })).toStrictEqual({ - isReadOnly: false, - }) - }) }) describe('Renames selectedShapeIds in presence', () => { - const { up, down } = - instancePresenceMigrations.migrators[instancePresenceVersions.RenameSelectedShapeIds] + const { up } = getTestMigration(instancePresenceVersions.RenameSelectedShapeIds) test('up adds the chatMessage property', () => { expect(up({ selectedShapeIds: [] })).toEqual({ selectedShapeIds: [] }) }) - - test('down removes the chatMessage property', () => { - expect(down({ selectedShapeIds: [] })).toEqual({ selectedShapeIds: [] }) - }) }) describe('Adding canSnap to line handles', () => { - const { up, down } = lineShapeMigrations.migrators[lineShapeVersions.AddSnapHandles] + const { up } = getTestMigration(lineShapeVersions.AddSnapHandles) test(`up works as expected`, () => { expect( @@ -1545,72 +1090,18 @@ describe('Adding canSnap to line handles', () => { }, }) }) - - test(`down works as expected`, () => { - expect( - down({ - props: { - handles: { - start: { - id: 'start', - type: 'vertex', - canBind: false, - canSnap: true, - index: 'a1', - x: 0, - y: 0, - }, - end: { - id: 'end', - type: 'vertex', - canBind: false, - canSnap: true, - index: 'a2', - x: 100.66015625, - y: -22.07421875, - }, - }, - }, - }) - ).toEqual({ - props: { - handles: { - start: { - id: 'start', - type: 'vertex', - canBind: false, - index: 'a1', - x: 0, - y: 0, - }, - end: { - id: 'end', - type: 'vertex', - canBind: false, - index: 'a2', - x: 100.66015625, - y: -22.07421875, - }, - }, - }, - }) - }) }) describe('add isHoveringCanvas to TLInstance', () => { - const { up, down } = instanceMigrations.migrators[instanceVersions.AddHoveringCanvas] + const { up } = getTestMigration(instanceVersions.AddHoveringCanvas) test('up works as expected', () => { expect(up({})).toEqual({ isHoveringCanvas: null }) }) - - test('down works as expected', () => { - expect(down({ isHoveringCanvas: null })).toEqual({}) - }) }) describe('add isInset to TLInstance', () => { - const { up, down } = instanceMigrations.migrators[instanceVersions.AddInset] + const { up, down } = getTestMigration(instanceVersions.AddInset) test('up works as expected', () => { expect(up({})).toEqual({ insets: [false, false, false, false] }) @@ -1622,7 +1113,7 @@ describe('add isInset to TLInstance', () => { }) describe('add scribbles to TLInstance', () => { - const { up, down } = instanceMigrations.migrators[instanceVersions.AddScribbles] + const { up } = getTestMigration(instanceVersions.AddScribbles) test('up works as expected', () => { expect( @@ -1631,14 +1122,10 @@ describe('add scribbles to TLInstance', () => { }) ).toEqual({ scribbles: [] }) }) - - test('down works as expected', () => { - expect(down({ scribbles: [] })).toEqual({ scribble: null }) - }) }) describe('add isPrecise to arrow handles', () => { - const { up, down } = arrowShapeMigrations.migrators[ArrowMigrationVersions.AddIsPrecise] + const { up, down } = getTestMigration(arrowShapeVersions.AddIsPrecise) test('up works as expected', () => { expect( @@ -1773,16 +1260,10 @@ describe('add isPrecise to arrow handles', () => { }) describe('add AddLabelPosition to arrow handles', () => { - const { up, down } = arrowShapeMigrations.migrators[ArrowMigrationVersions.AddLabelPosition] + const { up, down } = getTestMigration(arrowShapeVersions.AddLabelPosition) test('up works as expected', () => { - expect( - up({ - props: {}, - }) - ).toEqual({ - props: { labelPosition: 0.5 }, - }) + expect(up({ props: {} })).toEqual({ props: { labelPosition: 0.5 } }) }) test('down works as expected', () => { @@ -1792,9 +1273,7 @@ describe('add AddLabelPosition to arrow handles', () => { labelPosition: 0.5, }, }) - ).toEqual({ - props: {}, - }) + ).toEqual({ props: {} }) }) }) @@ -1803,11 +1282,11 @@ const validUrl = '' describe('Make urls valid for all the shapes', () => { const migrations = [ - ['bookmark shape', bookmarkShapeMigrations.migrators[2]], - ['geo shape', geoShapeMigrations.migrators[8]], - ['image shape', imageShapeMigrations.migrators[3]], - ['note shape', noteShapeMigrations.migrators[5]], - ['video shape', videoShapeMigrations.migrators[2]], + ['bookmark shape', getTestMigration(bookmarkShapeVersions.MakeUrlsValid)], + ['geo shape', getTestMigration(geoShapeVersions.MakeUrlsValid)], + ['image shape', getTestMigration(imageShapeVersions.MakeUrlsValid)], + ['note shape', getTestMigration(noteShapeVersions.MakeUrlsValid)], + ['video shape', getTestMigration(videoShapeVersions.MakeUrlsValid)], ] as const for (const [shapeName, { up, down }] of migrations) { @@ -1821,9 +1300,9 @@ describe('Make urls valid for all the shapes', () => { describe('Make urls valid for all the assets', () => { const migrations = [ - ['bookmark asset', bookmarkAssetMigrations.migrators[1]], - ['image asset', imageAssetMigrations.migrators[3]], - ['video asset', videoAssetMigrations.migrators[3]], + ['bookmark asset', getTestMigration(bookmarkAssetVersions.MakeUrlsValid)], + ['image asset', getTestMigration(imageAssetVersions.MakeUrlsValid)], + ['video asset', getTestMigration(videoAssetVersions.MakeUrlsValid)], ] as const for (const [assetName, { up, down }] of migrations) { @@ -1836,7 +1315,7 @@ describe('Make urls valid for all the assets', () => { }) describe('Add duplicate props to instance', () => { - const { up, down } = instanceMigrations.migrators[instanceVersions.AddDuplicateProps] + const { up, down } = getTestMigration(instanceVersions.AddDuplicateProps) it('up works as expected', () => { expect(up({})).toEqual({ duplicateProps: null }) }) @@ -1846,7 +1325,7 @@ describe('Add duplicate props to instance', () => { }) describe('Remove extra handle props', () => { - const { up, down } = lineShapeMigrations.migrators[lineShapeVersions.RemoveExtraHandleProps] + const { up, down } = getTestMigration(lineShapeVersions.RemoveExtraHandleProps) it('up works as expected', () => { expect( up({ @@ -1939,7 +1418,7 @@ describe('Remove extra handle props', () => { }) describe('Restore some handle props', () => { - const { up, down } = lineShapeMigrations.migrators[lineShapeVersions.HandlesToPoints] + const { up, down } = getTestMigration(lineShapeVersions.HandlesToPoints) it('up works as expected', () => { expect( up({ @@ -1985,7 +1464,7 @@ describe('Restore some handle props', () => { }) describe('Fractional indexing for line points', () => { - const { up, down } = lineShapeMigrations.migrators[lineShapeVersions.PointIndexIds] + const { up, down } = getTestMigration(lineShapeVersions.PointIndexIds) it('up works as expected', () => { expect( up({ @@ -2030,20 +1509,8 @@ describe('Fractional indexing for line points', () => { }) }) -describe('Add font size adjustment to notes', () => { - const { up, down } = noteShapeMigrations.migrators[noteShapeVersions.AddFontSizeAdjustment] - - test('up works as expected', () => { - expect(up({ props: {} })).toEqual({ props: { fontSizeAdjustment: 0 } }) - }) - - test('down works as expected', () => { - expect(down({ props: { fontSizeAdjustment: 0 } })).toEqual({ props: {} }) - }) -}) - describe('add white', () => { - const { up, down } = rootShapeMigrations.migrators[rootShapeVersions.AddWhite] + const { up, down } = getTestMigration(rootShapeVersions.AddWhite) test('up works as expected', () => { expect( @@ -2070,11 +1537,28 @@ describe('add white', () => { }) }) +describe('Add font size adjustment to notes', () => { + const { up, down } = getTestMigration(noteShapeVersions.AddFontSizeAdjustment) + + test('up works as expected', () => { + expect(up({ props: {} })).toEqual({ props: { fontSizeAdjustment: 0 } }) + }) + + test('down works as expected', () => { + expect(down({ props: { fontSizeAdjustment: 0 } })).toEqual({ props: {} }) + }) +}) + /* --- PUT YOUR MIGRATIONS TESTS ABOVE HERE --- */ -for (const migrator of allMigrators) { - test(`[${migrator.fileName} v${migrator.version}] up and down migrations have both been tested`, () => { - expect(migrator.up).toHaveBeenCalled() - expect(migrator.down).toHaveBeenCalled() - }) -} +// check that all migrator fns were called at least once +describe('all migrator fns were called at least once', () => { + for (const migration of testSchema.sortedMigrations) { + it(`migration ${migration.id}`, () => { + expect((migration as any).up).toHaveBeenCalled() + if (typeof migration.down === 'function') { + expect((migration as any).down).toHaveBeenCalled() + } + }) + } +}) diff --git a/packages/tlschema/src/records/TLAsset.ts b/packages/tlschema/src/records/TLAsset.ts index cf29cb282..56a1f24a8 100644 --- a/packages/tlschema/src/records/TLAsset.ts +++ b/packages/tlschema/src/records/TLAsset.ts @@ -1,13 +1,14 @@ -import { createRecordType, defineMigrations, RecordId } from '@tldraw/store' +import { + createMigrationIds, + createRecordMigrationSequence, + createRecordType, + RecordId, +} from '@tldraw/store' import { T } from '@tldraw/validate' import { TLBaseAsset } from '../assets/TLBaseAsset' -import { - bookmarkAssetMigrations, - bookmarkAssetValidator, - TLBookmarkAsset, -} from '../assets/TLBookmarkAsset' -import { imageAssetMigrations, imageAssetValidator, TLImageAsset } from '../assets/TLImageAsset' -import { TLVideoAsset, videoAssetMigrations, videoAssetValidator } from '../assets/TLVideoAsset' +import { bookmarkAssetValidator, TLBookmarkAsset } from '../assets/TLBookmarkAsset' +import { imageAssetValidator, TLImageAsset } from '../assets/TLImageAsset' +import { TLVideoAsset, videoAssetValidator } from '../assets/TLVideoAsset' import { TLShape } from './TLShape' /** @public */ @@ -24,34 +25,22 @@ export const assetValidator: T.Validator = T.model( ) /** @internal */ -export const assetVersions = { +export const assetVersions = createMigrationIds('com.tldraw.asset', { AddMeta: 1, -} +} as const) /** @internal */ -export const assetMigrations = defineMigrations({ - subTypeKey: 'type', - subTypeMigrations: { - image: imageAssetMigrations, - video: videoAssetMigrations, - bookmark: bookmarkAssetMigrations, - }, - currentVersion: assetVersions.AddMeta, - migrators: { - [assetVersions.AddMeta]: { +export const assetMigrations = createRecordMigrationSequence({ + sequenceId: 'com.tldraw.asset', + recordType: 'asset', + sequence: [ + { + id: assetVersions.AddMeta, up: (record) => { - return { - ...record, - meta: {}, - } - }, - down: ({ meta: _, ...record }) => { - return { - ...record, - } + ;(record as any).meta = {} }, }, - }, + ], }) /** @public */ @@ -66,7 +55,6 @@ export type TLAssetPartial = T extends T /** @public */ export const AssetRecordType = createRecordType('asset', { - migrations: assetMigrations, validator: assetValidator, scope: 'document', }).withDefaultProperties(() => ({ diff --git a/packages/tlschema/src/records/TLCamera.ts b/packages/tlschema/src/records/TLCamera.ts index ae068ca2d..2ee8ae983 100644 --- a/packages/tlschema/src/records/TLCamera.ts +++ b/packages/tlschema/src/records/TLCamera.ts @@ -1,4 +1,10 @@ -import { BaseRecord, createRecordType, defineMigrations, RecordId } from '@tldraw/store' +import { + BaseRecord, + createMigrationIds, + createRecordMigrationSequence, + createRecordType, + RecordId, +} from '@tldraw/store' import { JsonObject } from '@tldraw/utils' import { T } from '@tldraw/validate' import { idValidator } from '../misc/id-validator' @@ -35,34 +41,27 @@ export const cameraValidator: T.Validator = T.model( ) /** @internal */ -export const cameraVersions = { +export const cameraVersions = createMigrationIds('com.tldraw.camera', { AddMeta: 1, -} +}) /** @internal */ -export const cameraMigrations = defineMigrations({ - currentVersion: cameraVersions.AddMeta, - migrators: { - [cameraVersions.AddMeta]: { +export const cameraMigrations = createRecordMigrationSequence({ + sequenceId: 'com.tldraw.camera', + recordType: 'camera', + sequence: [ + { + id: cameraVersions.AddMeta, up: (record) => { - return { - ...record, - meta: {}, - } - }, - down: ({ meta: _, ...record }) => { - return { - ...record, - } + ;(record as any).meta = {} }, }, - }, + ], }) /** @public */ export const CameraRecordType = createRecordType('camera', { validator: cameraValidator, - migrations: cameraMigrations, scope: 'session', }).withDefaultProperties( (): Omit => ({ diff --git a/packages/tlschema/src/records/TLDocument.ts b/packages/tlschema/src/records/TLDocument.ts index 3ee1e3e5a..2640d3345 100644 --- a/packages/tlschema/src/records/TLDocument.ts +++ b/packages/tlschema/src/records/TLDocument.ts @@ -1,4 +1,10 @@ -import { BaseRecord, createRecordType, defineMigrations, RecordId } from '@tldraw/store' +import { + BaseRecord, + createMigrationIds, + createRecordMigrationSequence, + createRecordType, + RecordId, +} from '@tldraw/store' import { JsonObject } from '@tldraw/utils' import { T } from '@tldraw/validate' @@ -26,42 +32,36 @@ export const documentValidator: T.Validator = T.model( ) /** @internal */ -export const documentVersions = { +export const documentVersions = createMigrationIds('com.tldraw.document', { AddName: 1, AddMeta: 2, -} as const +} as const) /** @internal */ -export const documentMigrations = defineMigrations({ - currentVersion: documentVersions.AddMeta, - migrators: { - [documentVersions.AddName]: { - up: (document: TLDocument) => { - return { ...document, name: '' } +export const documentMigrations = createRecordMigrationSequence({ + sequenceId: 'com.tldraw.document', + recordType: 'document', + sequence: [ + { + id: documentVersions.AddName, + up: (document) => { + ;(document as any).name = '' }, - down: ({ name: _, ...document }: TLDocument) => { - return document + down: (document) => { + delete (document as any).name }, }, - [documentVersions.AddMeta]: { + { + id: documentVersions.AddMeta, up: (record) => { - return { - ...record, - meta: {}, - } - }, - down: ({ meta: _, ...record }) => { - return { - ...record, - } + ;(record as any).meta = {} }, }, - }, + ], }) /** @public */ export const DocumentRecordType = createRecordType('document', { - migrations: documentMigrations, validator: documentValidator, scope: 'document', }).withDefaultProperties( diff --git a/packages/tlschema/src/records/TLInstance.ts b/packages/tlschema/src/records/TLInstance.ts index 1a70188be..d01bd16ad 100644 --- a/packages/tlschema/src/records/TLInstance.ts +++ b/packages/tlschema/src/records/TLInstance.ts @@ -1,4 +1,10 @@ -import { BaseRecord, createRecordType, defineMigrations, RecordId } from '@tldraw/store' +import { + BaseRecord, + createMigrationIds, + createRecordMigrationSequence, + createRecordType, + RecordId, +} from '@tldraw/store' import { JsonObject } from '@tldraw/utils' import { T } from '@tldraw/validate' import { BoxModel, boxModelValidator } from '../misc/geometry-types' @@ -121,7 +127,6 @@ export function createInstanceRecordType(stylesById: Map('instance', { - migrations: instanceMigrations, validator: instanceTypeValidator, scope: 'session', }).withDefaultProperties( @@ -162,7 +167,7 @@ export function createInstanceRecordType(stylesById: Map { +export const instanceMigrations = createRecordMigrationSequence({ + sequenceId: 'com.tldraw.instance', + recordType: 'instance', + sequence: [ + { + id: instanceVersions.AddTransparentExportBgs, + up: (instance) => { return { ...instance, exportBackground: true } }, - down: ({ exportBackground: _, ...instance }: TLInstance) => { - return instance - }, }, - [instanceVersions.RemoveDialog]: { + { + id: instanceVersions.RemoveDialog, up: ({ dialog: _, ...instance }: any) => { return instance }, - down: (instance: TLInstance) => { - return { ...instance, dialog: null } - }, }, - [instanceVersions.AddToolLockMode]: { - up: (instance: TLInstance) => { + + { + id: instanceVersions.AddToolLockMode, + up: (instance) => { return { ...instance, isToolLocked: false } }, - down: ({ isToolLocked: _, ...instance }: TLInstance) => { - return instance - }, }, - [instanceVersions.RemoveExtraPropsForNextShape]: { + { + id: instanceVersions.RemoveExtraPropsForNextShape, up: ({ propsForNextShape, ...instance }: any) => { return { ...instance, @@ -242,12 +246,9 @@ export const instanceMigrations = defineMigrations({ ), } }, - down: (instance: TLInstance) => { - // we can't restore these, so do nothing :/ - return instance - }, }, - [instanceVersions.AddLabelColor]: { + { + id: instanceVersions.AddLabelColor, up: ({ propsForNextShape, ...instance }: any) => { return { ...instance, @@ -257,25 +258,15 @@ export const instanceMigrations = defineMigrations({ }, } }, - down: (instance) => { - const { labelColor: _, ...rest } = instance.propsForNextShape - return { - ...instance, - propsForNextShape: { - ...rest, - }, - } - }, }, - [instanceVersions.AddFollowingUserId]: { - up: (instance: TLInstance) => { + { + id: instanceVersions.AddFollowingUserId, + up: (instance) => { return { ...instance, followingUserId: null } }, - down: ({ followingUserId: _, ...instance }: TLInstance) => { - return instance - }, }, - [instanceVersions.RemoveAlignJustify]: { + { + id: instanceVersions.RemoveAlignJustify, up: (instance: any) => { let newAlign = instance.propsForNextShape.align if (newAlign === 'justify') { @@ -290,20 +281,16 @@ export const instanceMigrations = defineMigrations({ }, } }, - down: (instance: TLInstance) => { - return { ...instance } - }, }, - [instanceVersions.AddZoom]: { - up: (instance: TLInstance) => { + { + id: instanceVersions.AddZoom, + up: (instance) => { return { ...instance, zoomBrush: null } }, - down: ({ zoomBrush: _, ...instance }: TLInstance) => { - return instance - }, }, - [instanceVersions.AddVerticalAlign]: { - up: (instance) => { + { + id: instanceVersions.AddVerticalAlign, + up: (instance: any) => { return { ...instance, propsForNextShape: { @@ -312,141 +299,73 @@ export const instanceMigrations = defineMigrations({ }, } }, - down: (instance) => { - const { verticalAlign: _, ...propsForNextShape } = instance.propsForNextShape - return { - ...instance, - propsForNextShape, - } - }, }, - [instanceVersions.AddScribbleDelay]: { - up: (instance) => { + { + id: instanceVersions.AddScribbleDelay, + up: (instance: any) => { if (instance.scribble !== null) { return { ...instance, scribble: { ...instance.scribble, delay: 0 } } } return { ...instance } }, - down: (instance) => { - if (instance.scribble !== null) { - const { delay: _delay, ...rest } = instance.scribble - return { ...instance, scribble: rest } - } - return { ...instance } - }, }, - [instanceVersions.RemoveUserId]: { + { + id: instanceVersions.RemoveUserId, up: ({ userId: _, ...instance }: any) => { return instance }, - down: (instance: TLInstance) => { - return { ...instance, userId: 'user:none' } - }, }, - [instanceVersions.AddIsPenModeAndIsGridMode]: { - up: (instance: TLInstance) => { + { + id: instanceVersions.AddIsPenModeAndIsGridMode, + up: (instance) => { return { ...instance, isPenMode: false, isGridMode: false } }, - down: ({ isPenMode: _, isGridMode: __, ...instance }: TLInstance) => { - return instance - }, }, - [instanceVersions.HoistOpacity]: { + { + id: instanceVersions.HoistOpacity, up: ({ propsForNextShape: { opacity, ...propsForNextShape }, ...instance }: any) => { return { ...instance, opacityForNextShape: Number(opacity ?? '1'), propsForNextShape } }, - down: ({ opacityForNextShape: opacity, ...instance }: any) => { - return { - ...instance, - propsForNextShape: { - ...instance.propsForNextShape, - opacity: - opacity < 0.175 - ? '0.1' - : opacity < 0.375 - ? '0.25' - : opacity < 0.625 - ? '0.5' - : opacity < 0.875 - ? '0.75' - : '1', - }, - } - }, }, - [instanceVersions.AddChat]: { - up: (instance: TLInstance) => { + { + id: instanceVersions.AddChat, + up: (instance) => { return { ...instance, chatMessage: '', isChatting: false } }, - down: ({ chatMessage: _, isChatting: __, ...instance }: TLInstance) => { - return instance - }, }, - [instanceVersions.AddHighlightedUserIds]: { - up: (instance: TLInstance) => { + { + id: instanceVersions.AddHighlightedUserIds, + up: (instance) => { return { ...instance, highlightedUserIds: [] } }, - down: ({ highlightedUserIds: _, ...instance }: TLInstance) => { - return instance - }, }, - [instanceVersions.ReplacePropsForNextShapeWithStylesForNextShape]: { - up: ({ propsForNextShape: _, ...instance }) => { + { + id: instanceVersions.ReplacePropsForNextShapeWithStylesForNextShape, + up: ({ propsForNextShape: _, ...instance }: any) => { return { ...instance, stylesForNextShape: {} } }, - down: ({ stylesForNextShape: _, ...instance }: TLInstance) => { - return { - ...instance, - propsForNextShape: { - color: 'black', - labelColor: 'black', - dash: 'draw', - fill: 'none', - size: 'm', - icon: 'file', - font: 'draw', - align: 'middle', - verticalAlign: 'middle', - geo: 'rectangle', - arrowheadStart: 'none', - arrowheadEnd: 'arrow', - spline: 'line', - }, - } - }, }, - [instanceVersions.AddMeta]: { + { + id: instanceVersions.AddMeta, up: (record) => { return { ...record, meta: {}, } }, - down: ({ meta: _, ...record }) => { - return { - ...record, - } - }, }, - [instanceVersions.RemoveCursorColor]: { - up: (record) => { + { + id: instanceVersions.RemoveCursorColor, + up: (record: any) => { const { color: _, ...cursor } = record.cursor return { ...record, cursor, } }, - down: (record) => { - return { - ...record, - cursor: { - ...record.cursor, - color: 'black', - }, - } - }, }, - [instanceVersions.AddLonelyProperties]: { + { + id: instanceVersions.AddLonelyProperties, up: (record) => { return { ...record, @@ -459,86 +378,63 @@ export const instanceMigrations = defineMigrations({ isReadOnly: false, } }, - down: ({ - canMoveCamera: _canMoveCamera, - isFocused: _isFocused, - devicePixelRatio: _devicePixelRatio, - isCoarsePointer: _isCoarsePointer, - openMenus: _openMenus, - isChangingStyle: _isChangingStyle, - isReadOnly: _isReadOnly, - ...record - }) => { - return { - ...record, - } - }, }, - [instanceVersions.ReadOnlyReadonly]: { - up: ({ isReadOnly: _isReadOnly, ...record }) => { + { + id: instanceVersions.ReadOnlyReadonly, + up: ({ isReadOnly: _isReadOnly, ...record }: any) => { return { ...record, isReadonly: _isReadOnly, } }, - down: ({ isReadonly: _isReadonly, ...record }) => { - return { - ...record, - isReadOnly: _isReadonly, - } - }, }, - [instanceVersions.AddHoveringCanvas]: { + { + id: instanceVersions.AddHoveringCanvas, up: (record) => { return { ...record, isHoveringCanvas: null, } }, - down: ({ isHoveringCanvas: _, ...record }) => { - return { - ...record, - } - }, }, - [instanceVersions.AddScribbles]: { - up: ({ scribble: _, ...record }) => { + { + id: instanceVersions.AddScribbles, + up: ({ scribble: _, ...record }: any) => { return { ...record, scribbles: [], } }, - down: ({ scribbles: _, ...record }) => { - return { ...record, scribble: null } - }, }, - [instanceVersions.AddInset]: { + { + id: instanceVersions.AddInset, up: (record) => { return { ...record, insets: [false, false, false, false], } }, - down: ({ insets: _, ...record }) => { + down: ({ insets: _, ...record }: any) => { return { ...record, } }, }, - [instanceVersions.AddDuplicateProps]: { + { + id: instanceVersions.AddDuplicateProps, up: (record) => { return { ...record, duplicateProps: null, } }, - down: ({ duplicateProps: _, ...record }) => { + down: ({ duplicateProps: _, ...record }: any) => { return { ...record, } }, }, - }, + ], }) /** @public */ diff --git a/packages/tlschema/src/records/TLPage.ts b/packages/tlschema/src/records/TLPage.ts index a0c8a51c0..5a4019c3c 100644 --- a/packages/tlschema/src/records/TLPage.ts +++ b/packages/tlschema/src/records/TLPage.ts @@ -1,4 +1,10 @@ -import { BaseRecord, createRecordType, defineMigrations, RecordId } from '@tldraw/store' +import { + BaseRecord, + createMigrationIds, + createRecordMigrationSequence, + createRecordType, + RecordId, +} from '@tldraw/store' import { IndexKey, JsonObject } from '@tldraw/utils' import { T } from '@tldraw/validate' import { idValidator } from '../misc/id-validator' @@ -33,34 +39,27 @@ export const pageValidator: T.Validator = T.model( ) /** @internal */ -export const pageVersions = { +export const pageVersions = createMigrationIds('com.tldraw.page', { AddMeta: 1, -} +}) /** @internal */ -export const pageMigrations = defineMigrations({ - currentVersion: pageVersions.AddMeta, - migrators: { - [pageVersions.AddMeta]: { - up: (record) => { - return { - ...record, - meta: {}, - } - }, - down: ({ meta: _, ...record }) => { - return { - ...record, - } +export const pageMigrations = createRecordMigrationSequence({ + sequenceId: 'com.tldraw.page', + recordType: 'page', + sequence: [ + { + id: pageVersions.AddMeta, + up: (record: any) => { + record.meta = {} }, }, - }, + ], }) /** @public */ export const PageRecordType = createRecordType('page', { validator: pageValidator, - migrations: pageMigrations, scope: 'document', }).withDefaultProperties(() => ({ meta: {}, diff --git a/packages/tlschema/src/records/TLPageState.ts b/packages/tlschema/src/records/TLPageState.ts index 763c8f13d..9599e300f 100644 --- a/packages/tlschema/src/records/TLPageState.ts +++ b/packages/tlschema/src/records/TLPageState.ts @@ -1,10 +1,14 @@ -import { BaseRecord, createRecordType, defineMigrations, RecordId } from '@tldraw/store' +import { + BaseRecord, + createMigrationIds, + createRecordMigrationSequence, + createRecordType, + RecordId, +} from '@tldraw/store' import { JsonObject } from '@tldraw/utils' import { T } from '@tldraw/validate' import { idValidator } from '../misc/id-validator' import { shapeIdValidator } from '../shapes/TLBaseShape' -import { CameraRecordType } from './TLCamera' -import { TLINSTANCE_ID } from './TLInstance' import { pageIdValidator, TLPage } from './TLPage' import { TLShapeId } from './TLShape' @@ -47,155 +51,91 @@ export const instancePageStateValidator: T.Validator = T.mo ) /** @internal */ -export const instancePageStateVersions = { +export const instancePageStateVersions = createMigrationIds('com.tldraw.instance_page_state', { AddCroppingId: 1, RemoveInstanceIdAndCameraId: 2, AddMeta: 3, RenameProperties: 4, RenamePropertiesAgain: 5, -} as const +} as const) /** @public */ -export const instancePageStateMigrations = defineMigrations({ - currentVersion: instancePageStateVersions.RenamePropertiesAgain, - migrators: { - [instancePageStateVersions.AddCroppingId]: { - up(instance) { - return { ...instance, croppingShapeId: null } - }, - down({ croppingShapeId: _croppingShapeId, ...instance }) { - return instance +export const instancePageStateMigrations = createRecordMigrationSequence({ + sequenceId: 'com.tldraw.instance_page_state', + recordType: 'instance_page_state', + sequence: [ + { + id: instancePageStateVersions.AddCroppingId, + up(instance: any) { + instance.croppingShapeId = null }, }, - [instancePageStateVersions.RemoveInstanceIdAndCameraId]: { - up({ instanceId: _, cameraId: __, ...instance }) { - return instance - }, - down(instance) { - // this should never be called since we bump the schema version - return { - ...instance, - instanceId: TLINSTANCE_ID, - cameraId: CameraRecordType.createId('void'), - } + { + id: instancePageStateVersions.RemoveInstanceIdAndCameraId, + up(instance: any) { + delete instance.instanceId + delete instance.cameraId }, }, - [instancePageStateVersions.AddMeta]: { - up: (record) => { - return { - ...record, - meta: {}, - } - }, - down: ({ meta: _, ...record }) => { - return { - ...record, - } + { + id: instancePageStateVersions.AddMeta, + up: (record: any) => { + record.meta = {} }, }, - [instancePageStateVersions.RenameProperties]: { + { + id: instancePageStateVersions.RenameProperties, // this migration is cursed: it was written wrong and doesn't do anything. // rather than replace it, I've added another migration below that fixes it. - up: (record) => { - const { - selectedShapeIds, - hintingShapeIds, - erasingShapeIds, - hoveredShapeId, - editingShapeId, - croppingShapeId, - focusedGroupId, - ...rest - } = record - return { - selectedShapeIds: selectedShapeIds, - hintingShapeIds: hintingShapeIds, - erasingShapeIds: erasingShapeIds, - hoveredShapeId: hoveredShapeId, - editingShapeId: editingShapeId, - croppingShapeId: croppingShapeId, - focusedGroupId: focusedGroupId, - ...rest, - } + up: (_record) => { + // noop }, - down: (record) => { - const { - selectedShapeIds, - hintingShapeIds, - erasingShapeIds, - hoveredShapeId, - editingShapeId, - croppingShapeId, - focusedGroupId, - ...rest - } = record - return { - selectedShapeIds: selectedShapeIds, - hintingShapeIds: hintingShapeIds, - erasingShapeIds: erasingShapeIds, - hoveredShapeId: hoveredShapeId, - editingShapeId: editingShapeId, - croppingShapeId: croppingShapeId, - focusedGroupId: focusedGroupId, - ...rest, - } + down: (_record) => { + // noop }, }, - [instancePageStateVersions.RenamePropertiesAgain]: { - up: (record) => { - const { - selectedIds, - hintingIds, - erasingIds, - hoveredId, - editingId, - croppingShapeId, - croppingId, - focusLayerId, - ...rest - } = record - return { - ...rest, - selectedShapeIds: selectedIds, - hintingShapeIds: hintingIds, - erasingShapeIds: erasingIds, - hoveredShapeId: hoveredId, - editingShapeId: editingId, - croppingShapeId: croppingShapeId ?? croppingId ?? null, - focusedGroupId: focusLayerId, - } + { + id: instancePageStateVersions.RenamePropertiesAgain, + up: (record: any) => { + record.selectedShapeIds = record.selectedIds + delete record.selectedIds + record.hintingShapeIds = record.hintingIds + delete record.hintingIds + record.erasingShapeIds = record.erasingIds + delete record.erasingIds + record.hoveredShapeId = record.hoveredId + delete record.hoveredId + record.editingShapeId = record.editingId + delete record.editingId + record.croppingShapeId = record.croppingShapeId ?? record.croppingId ?? null + delete record.croppingId + record.focusedGroupId = record.focusLayerId + delete record.focusLayerId }, - down: (record) => { - const { - selectedShapeIds, - hintingShapeIds, - erasingShapeIds, - hoveredShapeId, - editingShapeId, - croppingShapeId, - focusedGroupId, - ...rest - } = record - return { - ...rest, - selectedIds: selectedShapeIds, - hintingIds: hintingShapeIds, - erasingIds: erasingShapeIds, - hoveredId: hoveredShapeId, - editingId: editingShapeId, - croppingId: croppingShapeId, - focusLayerId: focusedGroupId, - } + down: (record: any) => { + record.selectedIds = record.selectedShapeIds + delete record.selectedShapeIds + record.hintingIds = record.hintingShapeIds + delete record.hintingShapeIds + record.erasingIds = record.erasingShapeIds + delete record.erasingShapeIds + record.hoveredId = record.hoveredShapeId + delete record.hoveredShapeId + record.editingId = record.editingShapeId + delete record.editingShapeId + record.croppingId = record.croppingShapeId + delete record.croppingShapeId + record.focusLayerId = record.focusedGroupId + delete record.focusedGroupId }, }, - }, + ], }) /** @public */ export const InstancePageStateRecordType = createRecordType( 'instance_page_state', { - migrations: instancePageStateMigrations, validator: instancePageStateValidator, scope: 'session', } diff --git a/packages/tlschema/src/records/TLPointer.ts b/packages/tlschema/src/records/TLPointer.ts index ddb740771..ff45a6c9c 100644 --- a/packages/tlschema/src/records/TLPointer.ts +++ b/packages/tlschema/src/records/TLPointer.ts @@ -1,4 +1,10 @@ -import { BaseRecord, createRecordType, defineMigrations, RecordId } from '@tldraw/store' +import { + BaseRecord, + createMigrationIds, + createRecordMigrationSequence, + createRecordType, + RecordId, +} from '@tldraw/store' import { JsonObject } from '@tldraw/utils' import { T } from '@tldraw/validate' import { idValidator } from '../misc/id-validator' @@ -32,34 +38,27 @@ export const pointerValidator: T.Validator = T.model( ) /** @internal */ -export const pointerVersions = { +export const pointerVersions = createMigrationIds('com.tldraw.pointer', { AddMeta: 1, -} +}) /** @internal */ -export const pointerMigrations = defineMigrations({ - currentVersion: pointerVersions.AddMeta, - migrators: { - [pointerVersions.AddMeta]: { - up: (record) => { - return { - ...record, - meta: {}, - } - }, - down: ({ meta: _, ...record }) => { - return { - ...record, - } +export const pointerMigrations = createRecordMigrationSequence({ + sequenceId: 'com.tldraw.pointer', + recordType: 'pointer', + sequence: [ + { + id: pointerVersions.AddMeta, + up: (record: any) => { + record.meta = {} }, }, - }, + ], }) /** @public */ export const PointerRecordType = createRecordType('pointer', { validator: pointerValidator, - migrations: pointerMigrations, scope: 'session', }).withDefaultProperties( (): Omit => ({ diff --git a/packages/tlschema/src/records/TLPresence.ts b/packages/tlschema/src/records/TLPresence.ts index fd3abba92..e988ba316 100644 --- a/packages/tlschema/src/records/TLPresence.ts +++ b/packages/tlschema/src/records/TLPresence.ts @@ -1,11 +1,16 @@ -import { BaseRecord, createRecordType, defineMigrations, RecordId } from '@tldraw/store' +import { + BaseRecord, + createMigrationIds, + createRecordMigrationSequence, + createRecordType, + RecordId, +} from '@tldraw/store' import { JsonObject } from '@tldraw/utils' import { T } from '@tldraw/validate' import { BoxModel, boxModelValidator } from '../misc/geometry-types' import { idValidator } from '../misc/id-validator' import { cursorTypeValidator, TLCursor } from '../misc/TLCursor' import { scribbleValidator, TLScribble } from '../misc/TLScribble' -import { TLINSTANCE_ID } from './TLInstance' import { TLPageId } from './TLPage' import { TLShapeId } from './TLShape' @@ -68,85 +73,57 @@ export const instancePresenceValidator: T.Validator = T.mode ) /** @internal */ -export const instancePresenceVersions = { +export const instancePresenceVersions = createMigrationIds('com.tldraw.instance_presence', { AddScribbleDelay: 1, RemoveInstanceId: 2, AddChatMessage: 3, AddMeta: 4, RenameSelectedShapeIds: 5, -} as const +} as const) -export const instancePresenceMigrations = defineMigrations({ - currentVersion: instancePresenceVersions.RenameSelectedShapeIds, - migrators: { - [instancePresenceVersions.AddScribbleDelay]: { - up: (instance) => { +export const instancePresenceMigrations = createRecordMigrationSequence({ + sequenceId: 'com.tldraw.instance_presence', + recordType: 'instance_presence', + sequence: [ + { + id: instancePresenceVersions.AddScribbleDelay, + up: (instance: any) => { if (instance.scribble !== null) { - return { ...instance, scribble: { ...instance.scribble, delay: 0 } } - } - return { ...instance } - }, - down: (instance) => { - if (instance.scribble !== null) { - const { delay: _delay, ...rest } = instance.scribble - return { ...instance, scribble: rest } - } - return { ...instance } - }, - }, - [instancePresenceVersions.RemoveInstanceId]: { - up: ({ instanceId: _, ...instance }) => { - return instance - }, - down: (instance) => { - return { ...instance, instanceId: TLINSTANCE_ID } - }, - }, - [instancePresenceVersions.AddChatMessage]: { - up: (instance) => { - return { ...instance, chatMessage: '' } - }, - down: ({ chatMessage: _, ...instance }) => { - return instance - }, - }, - [instancePresenceVersions.AddMeta]: { - up: (record) => { - return { - ...record, - meta: {}, - } - }, - down: ({ meta: _, ...record }) => { - return { - ...record, + instance.scribble.delay = 0 } }, }, - [instancePresenceVersions.RenameSelectedShapeIds]: { - up: (record) => { - const { selectedShapeIds, ...rest } = record - return { - selectedShapeIds: selectedShapeIds, - ...rest, - } - }, - down: (record) => { - const { selectedShapeIds, ...rest } = record - return { - selectedShapeIds: selectedShapeIds, - ...rest, - } + { + id: instancePresenceVersions.RemoveInstanceId, + up: (instance: any) => { + delete instance.instanceId }, }, - }, + { + id: instancePresenceVersions.AddChatMessage, + up: (instance: any) => { + instance.chatMessage = '' + }, + }, + { + id: instancePresenceVersions.AddMeta, + up: (record: any) => { + record.meta = {} + }, + }, + { + id: instancePresenceVersions.RenameSelectedShapeIds, + up: (_record) => { + // noop, whoopsie + }, + }, + ], }) /** @public */ export const InstancePresenceRecordType = createRecordType( 'instance_presence', { - migrations: instancePresenceMigrations, validator: instancePresenceValidator, scope: 'presence', } diff --git a/packages/tlschema/src/records/TLShape.ts b/packages/tlschema/src/records/TLShape.ts index 300c5fad4..4c295e05d 100644 --- a/packages/tlschema/src/records/TLShape.ts +++ b/packages/tlschema/src/records/TLShape.ts @@ -1,10 +1,20 @@ -import { createRecordType, defineMigrations, RecordId, UnknownRecord } from '@tldraw/store' -import { mapObjectMapValues } from '@tldraw/utils' +import { + Migration, + MigrationId, + MigrationSequence, + RecordId, + UnknownRecord, + createMigrationIds, + createMigrationSequence, + createRecordMigrationSequence, + createRecordType, +} from '@tldraw/store' +import { assert, mapObjectMapValues } from '@tldraw/utils' import { T } from '@tldraw/validate' import { nanoid } from 'nanoid' import { SchemaShapeInfo } from '../createTLSchema' import { TLArrowShape } from '../shapes/TLArrowShape' -import { createShapeValidator, TLBaseShape } from '../shapes/TLBaseShape' +import { TLBaseShape, createShapeValidator } from '../shapes/TLBaseShape' import { TLBookmarkShape } from '../shapes/TLBookmarkShape' import { TLDrawShape } from '../shapes/TLDrawShape' import { TLEmbedShape } from '../shapes/TLEmbedShape' @@ -83,88 +93,66 @@ export type TLShapeProp = keyof TLShapeProps export type TLParentId = TLPageId | TLShapeId /** @internal */ -export const rootShapeVersions = { +export const rootShapeVersions = createMigrationIds('com.tldraw.shape', { AddIsLocked: 1, HoistOpacity: 2, AddMeta: 3, AddWhite: 4, -} as const +} as const) /** @internal */ -export const rootShapeMigrations = defineMigrations({ - currentVersion: rootShapeVersions.AddWhite, - migrators: { - [rootShapeVersions.AddIsLocked]: { - up: (record) => { - return { - ...record, - isLocked: false, - } +export const rootShapeMigrations = createRecordMigrationSequence({ + sequenceId: 'com.tldraw.shape', + recordType: 'shape', + sequence: [ + { + id: rootShapeVersions.AddIsLocked, + up: (record: any) => { + record.isLocked = false }, - down: (record) => { - const { isLocked: _, ...rest } = record - return { - ...rest, + down: (record: any) => { + delete record.isLocked + }, + }, + { + id: rootShapeVersions.HoistOpacity, + up: (record: any) => { + record.opacity = Number(record.props.opacity ?? '1') + delete record.props.opacity + }, + down: (record: any) => { + const opacity = record.opacity + delete record.opacity + record.props.opacity = + opacity < 0.175 + ? '0.1' + : opacity < 0.375 + ? '0.25' + : opacity < 0.625 + ? '0.5' + : opacity < 0.875 + ? '0.75' + : '1' + }, + }, + { + id: rootShapeVersions.AddMeta, + up: (record: any) => { + record.meta = {} + }, + }, + { + id: rootShapeVersions.AddWhite, + up: (_record) => { + // noop + }, + down: (record: any) => { + if (record.props.color === 'white') { + record.props.color = 'black' } }, }, - [rootShapeVersions.HoistOpacity]: { - up: ({ props: { opacity, ...props }, ...record }) => { - return { - ...record, - opacity: Number(opacity ?? '1'), - props, - } - }, - down: ({ opacity, ...record }) => { - return { - ...record, - props: { - ...record.props, - opacity: - opacity < 0.175 - ? '0.1' - : opacity < 0.375 - ? '0.25' - : opacity < 0.625 - ? '0.5' - : opacity < 0.875 - ? '0.75' - : '1', - }, - } - }, - }, - [rootShapeVersions.AddMeta]: { - up: (record) => { - return { - ...record, - meta: {}, - } - }, - down: ({ meta: _, ...record }) => { - return { - ...record, - } - }, - }, - [rootShapeVersions.AddWhite]: { - up: (record) => { - return { - ...record, - } - }, - down: (record) => { - return { - ...record, - props: { - ...record.props, - color: record.props.color === 'white' ? 'black' : record.props.color, - }, - } - }, - }, - }, + ], }) /** @public */ @@ -200,16 +188,142 @@ export function getShapePropKeysByStyle(props: Record return propKeysByStyle } +export const NO_DOWN_MIGRATION = 'none' as const +// If a down migration was deployed more than a couple of months ago it should be safe to retire it. +// We only really need them to smooth over the transition between versions, and some folks do keep +// browser tabs open for months without refreshing, but at a certain point that kind of behavior is +// on them. Plus anyway recently chrome has started to actually kill tabs that are open for too long rather +// than just suspending them, so if other browsers follow suit maybe it's less of a concern. +export const RETIRED_DOWN_MIGRATION = 'retired' as const + +/** + * @public + */ +export type TLShapePropsMigrations = { + sequence: Array< + | { readonly dependsOn: readonly MigrationId[] } + | { + readonly id: MigrationId + readonly dependsOn?: MigrationId[] + readonly up: (props: any) => any + readonly down?: + | typeof NO_DOWN_MIGRATION + | typeof RETIRED_DOWN_MIGRATION + | ((props: any) => any) + } + > +} + +/** + * @public + */ +export function createShapePropsMigrationSequence( + migrations: TLShapePropsMigrations +): TLShapePropsMigrations { + return migrations +} + +/** + * @public + */ +export function createShapePropsMigrationIds>( + shapeType: S, + ids: T +): { [k in keyof T]: `com.tldraw.shape.${S}/${T[k]}` } { + return mapObjectMapValues(ids, (_k, v) => `com.tldraw.shape.${shapeType}/${v}`) as any +} + +export function processShapeMigrations(shapes: Record) { + const result: MigrationSequence[] = [] + + for (const [shapeType, { migrations }] of Object.entries(shapes)) { + const sequenceId = `com.tldraw.shape.${shapeType}` + if (!migrations) { + // provide empty migrations sequence to allow for future migrations + result.push( + createMigrationSequence({ + sequenceId, + retroactive: false, + sequence: [], + }) + ) + } else if ('sequenceId' in migrations) { + assert( + sequenceId === migrations.sequenceId, + `sequenceId mismatch for ${shapeType} shape migrations. Expected '${sequenceId}', got '${migrations.sequenceId}'` + ) + result.push(migrations) + } else if ('sequence' in migrations) { + result.push( + createMigrationSequence({ + sequenceId, + retroactive: false, + sequence: migrations.sequence.map((m) => + 'id' in m + ? { + id: m.id, + scope: 'record', + filter: (r) => r.typeName === 'shape' && (r as TLShape).type === shapeType, + dependsOn: m.dependsOn, + up: (record: any) => { + const result = m.up(record.props) + if (result) { + record.props = result + } + }, + down: + typeof m.down === 'function' + ? (record: any) => { + const result = (m.down as (props: any) => any)(record.props) + if (result) { + record.props = result + } + } + : undefined, + } + : m + ), + }) + ) + } else { + // legacy migrations, will be removed in the future + result.push( + createMigrationSequence({ + sequenceId, + retroactive: false, + sequence: Object.keys(migrations.migrators) + .map((k) => Number(k)) + .sort((a: number, b: number) => a - b) + .map( + (version): Migration => ({ + id: `${sequenceId}/${version}`, + scope: 'record', + filter: (r) => r.typeName === 'shape' && (r as TLShape).type === shapeType, + up: (record: any) => { + const result = migrations.migrators[version].up(record) + if (result) { + return result + } + }, + down: (record: any) => { + const result = migrations.migrators[version].down(record) + if (result) { + return result + } + }, + }) + ), + }) + ) + } + } + + return result +} + /** @internal */ export function createShapeRecordType(shapes: Record) { return createRecordType('shape', { - migrations: defineMigrations({ - currentVersion: rootShapeMigrations.currentVersion, - firstVersion: rootShapeMigrations.firstVersion, - migrators: rootShapeMigrations.migrators, - subTypeKey: 'type', - subTypeMigrations: mapObjectMapValues(shapes, (_, v) => v.migrations ?? defineMigrations({})), - }), scope: 'document', validator: T.model( 'shape', diff --git a/packages/tlschema/src/shapes/TLArrowShape.ts b/packages/tlschema/src/shapes/TLArrowShape.ts index b76c3ab04..b6ca8ea0a 100644 --- a/packages/tlschema/src/shapes/TLArrowShape.ts +++ b/packages/tlschema/src/shapes/TLArrowShape.ts @@ -1,6 +1,10 @@ -import { defineMigrations } from '@tldraw/store' import { T } from '@tldraw/validate' import { vecModelValidator } from '../misc/geometry-types' +import { + RETIRED_DOWN_MIGRATION, + createShapePropsMigrationIds, + createShapePropsMigrationSequence, +} from '../records/TLShape' import { StyleProp } from '../styles/StyleProp' import { DefaultColorStyle, DefaultLabelColorStyle } from '../styles/TLColorStyle' import { DefaultDashStyle } from '../styles/TLDashStyle' @@ -78,105 +82,57 @@ export type TLArrowShapeProps = ShapePropsType /** @public */ export type TLArrowShape = TLBaseShape<'arrow', TLArrowShapeProps> -export const ArrowMigrationVersions = { +export const arrowShapeVersions = createShapePropsMigrationIds('arrow', { AddLabelColor: 1, AddIsPrecise: 2, AddLabelPosition: 3, -} as const +}) /** @internal */ -export const arrowShapeMigrations = defineMigrations({ - currentVersion: ArrowMigrationVersions.AddLabelPosition, - migrators: { - [ArrowMigrationVersions.AddLabelColor]: { - up: (record) => { - return { - ...record, - props: { - ...record.props, - labelColor: 'black', - }, +export const arrowShapeMigrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: arrowShapeVersions.AddLabelColor, + up: (props) => { + props.labelColor = 'black' + }, + down: RETIRED_DOWN_MIGRATION, + }, + + { + id: arrowShapeVersions.AddIsPrecise, + up: ({ start, end }) => { + if (start.type === 'binding') { + start.isPrecise = !(start.normalizedAnchor.x === 0.5 && start.normalizedAnchor.y === 0.5) + } + if (end.type === 'binding') { + end.isPrecise = !(end.normalizedAnchor.x === 0.5 && end.normalizedAnchor.y === 0.5) } }, - down: (record) => { - const { labelColor: _, ...props } = record.props - return { - ...record, - props, + down: ({ start, end }) => { + if (start.type === 'binding') { + if (!start.isPrecise) { + start.normalizedAnchor = { x: 0.5, y: 0.5 } + } + delete start.isPrecise + } + if (end.type === 'binding') { + if (!end.isPrecise) { + end.normalizedAnchor = { x: 0.5, y: 0.5 } + } + delete end.isPrecise } }, }, - [ArrowMigrationVersions.AddIsPrecise]: { - up: (record) => { - const { start, end } = record.props - return { - ...record, - props: { - ...record.props, - start: - (start as TLArrowShapeTerminal).type === 'binding' - ? { - ...start, - isPrecise: !( - start.normalizedAnchor.x === 0.5 && start.normalizedAnchor.y === 0.5 - ), - } - : start, - end: - (end as TLArrowShapeTerminal).type === 'binding' - ? { - ...end, - isPrecise: !(end.normalizedAnchor.x === 0.5 && end.normalizedAnchor.y === 0.5), - } - : end, - }, - } + { + id: arrowShapeVersions.AddLabelPosition, + up: (props) => { + props.labelPosition = 0.5 }, - down: (record: any) => { - const { start, end } = record.props - const nStart = { ...start } - const nEnd = { ...end } - if (nStart.type === 'binding') { - if (!nStart.isPrecise) { - nStart.normalizedAnchor = { x: 0.5, y: 0.5 } - } - delete nStart.isPrecise - } - if (nEnd.type === 'binding') { - if (!nEnd.isPrecise) { - nEnd.normalizedAnchor = { x: 0.5, y: 0.5 } - } - delete nEnd.isPrecise - } - return { - ...record, - props: { - ...record.props, - start: nStart, - end: nEnd, - }, - } + down: (props) => { + delete props.labelPosition }, }, - - [ArrowMigrationVersions.AddLabelPosition]: { - up: (record) => { - return { - ...record, - props: { - ...record.props, - labelPosition: 0.5, - }, - } - }, - down: (record) => { - const { labelPosition: _, ...props } = record.props - return { - ...record, - props, - } - }, - }, - }, + ], }) diff --git a/packages/tlschema/src/shapes/TLBookmarkShape.ts b/packages/tlschema/src/shapes/TLBookmarkShape.ts index c2a1444ea..6a8694fdd 100644 --- a/packages/tlschema/src/shapes/TLBookmarkShape.ts +++ b/packages/tlschema/src/shapes/TLBookmarkShape.ts @@ -1,6 +1,10 @@ -import { defineMigrations } from '@tldraw/store' import { T } from '@tldraw/validate' import { assetIdValidator } from '../assets/TLBaseAsset' +import { + RETIRED_DOWN_MIGRATION, + createShapePropsMigrationIds, + createShapePropsMigrationSequence, +} from '../records/TLShape' import { ShapePropsType, TLBaseShape } from './TLBaseShape' /** @public */ @@ -17,39 +21,35 @@ export type TLBookmarkShapeProps = ShapePropsType /** @public */ export type TLBookmarkShape = TLBaseShape<'bookmark', TLBookmarkShapeProps> -const Versions = { +const Versions = createShapePropsMigrationIds('bookmark', { NullAssetId: 1, MakeUrlsValid: 2, -} as const +}) + +export { Versions as bookmarkShapeVersions } /** @internal */ -export const bookmarkShapeMigrations = defineMigrations({ - currentVersion: Versions.MakeUrlsValid, - migrators: { - [Versions.NullAssetId]: { - up: (shape: TLBookmarkShape) => { - if (shape.props.assetId === undefined) { - return { ...shape, props: { ...shape.props, assetId: null } } as typeof shape +export const bookmarkShapeMigrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: Versions.NullAssetId, + up: (props) => { + if (props.assetId === undefined) { + props.assetId = null } - return shape }, - down: (shape: TLBookmarkShape) => { - if (shape.props.assetId === null) { - const { assetId: _, ...props } = shape.props - return { ...shape, props } as typeof shape + down: RETIRED_DOWN_MIGRATION, + }, + { + id: Versions.MakeUrlsValid, + up: (props) => { + if (!T.linkUrl.isValid(props.url)) { + props.url = '' } - return shape + }, + down: (_props) => { + // noop }, }, - [Versions.MakeUrlsValid]: { - up: (shape) => { - const url = shape.props.url - if (url !== '' && !T.linkUrl.isValid(shape.props.url)) { - return { ...shape, props: { ...shape.props, url: '' } } - } - return shape - }, - down: (shape) => shape, - }, - }, + ], }) diff --git a/packages/tlschema/src/shapes/TLDrawShape.ts b/packages/tlschema/src/shapes/TLDrawShape.ts index 14b7f2882..041ad7dc5 100644 --- a/packages/tlschema/src/shapes/TLDrawShape.ts +++ b/packages/tlschema/src/shapes/TLDrawShape.ts @@ -1,6 +1,10 @@ -import { defineMigrations } from '@tldraw/store' import { T } from '@tldraw/validate' import { vecModelValidator } from '../misc/geometry-types' +import { + RETIRED_DOWN_MIGRATION, + createShapePropsMigrationIds, + createShapePropsMigrationSequence, +} from '../records/TLShape' import { DefaultColorStyle } from '../styles/TLColorStyle' import { DefaultDashStyle } from '../styles/TLDashStyle' import { DefaultFillStyle } from '../styles/TLFillStyle' @@ -33,31 +37,28 @@ export type TLDrawShapeProps = ShapePropsType /** @public */ export type TLDrawShape = TLBaseShape<'draw', TLDrawShapeProps> -const Versions = { +const Versions = createShapePropsMigrationIds('draw', { AddInPen: 1, -} as const +}) + +export { Versions as drawShapeVersions } /** @internal */ -export const drawShapeMigrations = defineMigrations({ - currentVersion: Versions.AddInPen, - migrators: { - [Versions.AddInPen]: { - up: (shape) => { +export const drawShapeMigrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: Versions.AddInPen, + up: (props) => { // Rather than checking to see whether the shape is a pen at runtime, // from now on we're going to use the type of device reported to us // as well as the pressure data received; but for existing shapes we // need to check the pressure data to see if it's a pen or not. - const { points } = shape.props.segments[0] + const { points } = props.segments[0] if (points.length === 0) { - return { - ...shape, - props: { - ...shape.props, - isPen: false, - }, - } + props.isPen = false + return } let isPen = !(points[0].z === 0 || points[0].z === 0.5) @@ -66,24 +67,9 @@ export const drawShapeMigrations = defineMigrations({ // Double check if we have a second point (we probably should) isPen = isPen && !(points[1].z === 0 || points[1].z === 0.5) } - - return { - ...shape, - props: { - ...shape.props, - isPen, - }, - } - }, - down: (shape) => { - const { isPen: _isPen, ...propsWithOutIsPen } = shape.props - return { - ...shape, - props: { - ...propsWithOutIsPen, - }, - } + props.isPen = isPen }, + down: RETIRED_DOWN_MIGRATION, }, - }, + ], }) diff --git a/packages/tlschema/src/shapes/TLEmbedShape.ts b/packages/tlschema/src/shapes/TLEmbedShape.ts index 416ab83a3..c3027fefe 100644 --- a/packages/tlschema/src/shapes/TLEmbedShape.ts +++ b/packages/tlschema/src/shapes/TLEmbedShape.ts @@ -1,5 +1,9 @@ -import { defineMigrations } from '@tldraw/store' import { T } from '@tldraw/validate' +import { + RETIRED_DOWN_MIGRATION, + createShapePropsMigrationIds, + createShapePropsMigrationSequence, +} from '../records/TLShape' import { ShapePropsType, TLBaseShape } from './TLBaseShape' // Only allow multiplayer embeds. If we add additional routes later for example '/help' this won't match @@ -612,128 +616,65 @@ export type EmbedDefinition = { readonly fromEmbedUrl: (url: string) => string | undefined } -const Versions = { +const Versions = createShapePropsMigrationIds('embed', { GenOriginalUrlInEmbed: 1, RemoveDoesResize: 2, RemoveTmpOldUrl: 3, RemovePermissionOverrides: 4, -} as const +}) + +export { Versions as embedShapeVersions } /** @internal */ -export const embedShapeMigrations = defineMigrations({ - currentVersion: Versions.RemovePermissionOverrides, - migrators: { - [Versions.GenOriginalUrlInEmbed]: { +export const embedShapeMigrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: Versions.GenOriginalUrlInEmbed, // add tmpOldUrl property - up: (shape) => { - const url = shape.props.url - const host = new URL(url).host.replace('www.', '') - let originalUrl - for (const localEmbedDef of EMBED_DEFINITIONS) { - if ((localEmbedDef as EmbedDefinition).hostnames.includes(host)) { - try { - originalUrl = localEmbedDef.fromEmbedUrl(url) - } catch (err) { - console.warn(err) - } - } - } - - return { - ...shape, - props: { - ...shape.props, - tmpOldUrl: shape.props.url, - url: originalUrl ?? '', - }, - } - }, - // remove tmpOldUrl property - down: (shape) => { - let newUrl = shape.props.tmpOldUrl - if (!newUrl || newUrl === '') { - const url = shape.props.url + up: (props) => { + try { + const url = props.url const host = new URL(url).host.replace('www.', '') - + let originalUrl for (const localEmbedDef of EMBED_DEFINITIONS) { if ((localEmbedDef as EmbedDefinition).hostnames.includes(host)) { try { - newUrl = localEmbedDef.toEmbedUrl(url) + originalUrl = localEmbedDef.fromEmbedUrl(url) } catch (err) { console.warn(err) } } } - } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { tmpOldUrl, ...props } = shape.props - return { - ...shape, - props: { - ...props, - url: newUrl ?? '', - }, + props.tmpOldUrl = props.url + props.url = originalUrl ?? '' + } catch (e) { + props.url = '' + props.tmpOldUrl = props.url } }, + down: RETIRED_DOWN_MIGRATION, }, - [Versions.RemoveDoesResize]: { - up: (shape) => { - const { doesResize: _, ...props } = shape.props - return { - ...shape, - props: { - ...props, - }, - } - }, - down: (shape) => { - return { - ...shape, - props: { - ...shape.props, - doesResize: true, - }, - } + { + id: Versions.RemoveDoesResize, + up: (props) => { + delete props.doesResize }, + down: RETIRED_DOWN_MIGRATION, }, - [Versions.RemoveTmpOldUrl]: { - up: (shape) => { - const { tmpOldUrl: _, ...props } = shape.props - return { - ...shape, - props: { - ...props, - }, - } - }, - down: (shape) => { - return { - ...shape, - props: { - ...shape.props, - }, - } + { + id: Versions.RemoveTmpOldUrl, + up: (props) => { + delete props.tmpOldUrl }, + down: RETIRED_DOWN_MIGRATION, }, - [Versions.RemovePermissionOverrides]: { - up: (shape) => { - const { overridePermissions: _, ...props } = shape.props - return { - ...shape, - props: { - ...props, - }, - } - }, - down: (shape) => { - return { - ...shape, - props: { - ...shape.props, - }, - } + { + id: Versions.RemovePermissionOverrides, + up: (props) => { + delete props.overridePermissions }, + down: RETIRED_DOWN_MIGRATION, }, - }, + ], }) diff --git a/packages/tlschema/src/shapes/TLFrameShape.ts b/packages/tlschema/src/shapes/TLFrameShape.ts index cd767cff9..e1c54859f 100644 --- a/packages/tlschema/src/shapes/TLFrameShape.ts +++ b/packages/tlschema/src/shapes/TLFrameShape.ts @@ -1,5 +1,5 @@ -import { defineMigrations } from '@tldraw/store' import { T } from '@tldraw/validate' +import { createShapePropsMigrationSequence } from '../records/TLShape' import { ShapePropsType, TLBaseShape } from './TLBaseShape' /** @public */ @@ -15,4 +15,6 @@ type TLFrameShapeProps = ShapePropsType export type TLFrameShape = TLBaseShape<'frame', TLFrameShapeProps> /** @internal */ -export const frameShapeMigrations = defineMigrations({}) +export const frameShapeMigrations = createShapePropsMigrationSequence({ + sequence: [], +}) diff --git a/packages/tlschema/src/shapes/TLGeoShape.ts b/packages/tlschema/src/shapes/TLGeoShape.ts index bf63722eb..d6f5ec06d 100644 --- a/packages/tlschema/src/shapes/TLGeoShape.ts +++ b/packages/tlschema/src/shapes/TLGeoShape.ts @@ -1,5 +1,9 @@ -import { defineMigrations } from '@tldraw/store' import { T } from '@tldraw/validate' +import { + RETIRED_DOWN_MIGRATION, + createShapePropsMigrationIds, + createShapePropsMigrationSequence, +} from '../records/TLShape' import { StyleProp } from '../styles/StyleProp' import { DefaultColorStyle, DefaultLabelColorStyle } from '../styles/TLColorStyle' import { DefaultDashStyle } from '../styles/TLDashStyle' @@ -66,7 +70,7 @@ export type TLGeoShapeProps = ShapePropsType /** @public */ export type TLGeoShape = TLBaseShape<'geo', TLGeoShapeProps> -const Versions = { +const geoShapeVersions = createShapePropsMigrationIds('geo', { AddUrlProp: 1, AddLabelColor: 2, RemoveJustify: 3, @@ -75,96 +79,55 @@ const Versions = { MigrateLegacyAlign: 6, AddCloud: 7, MakeUrlsValid: 8, -} as const +}) -export { Versions as GeoShapeVersions } +export { geoShapeVersions as geoShapeVersions } /** @internal */ -export const geoShapeMigrations = defineMigrations({ - currentVersion: Versions.MakeUrlsValid, - migrators: { - [Versions.AddUrlProp]: { - up: (shape) => { - return { ...shape, props: { ...shape.props, url: '' } } - }, - down: (shape) => { - const { url: _, ...props } = shape.props - return { ...shape, props } +export const geoShapeMigrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: geoShapeVersions.AddUrlProp, + up: (props) => { + props.url = '' }, + down: RETIRED_DOWN_MIGRATION, }, - [Versions.AddLabelColor]: { - up: (record) => { - return { - ...record, - props: { - ...record.props, - labelColor: 'black', - }, - } - }, - down: (record) => { - const { labelColor: _, ...props } = record.props - return { - ...record, - props, - } + { + id: geoShapeVersions.AddLabelColor, + up: (props) => { + props.labelColor = 'black' }, + down: RETIRED_DOWN_MIGRATION, }, - [Versions.RemoveJustify]: { - up: (shape) => { - let newAlign = shape.props.align - if (newAlign === 'justify') { - newAlign = 'start' - } - - return { - ...shape, - props: { - ...shape.props, - align: newAlign, - }, + { + id: geoShapeVersions.RemoveJustify, + up: (props) => { + if (props.align === 'justify') { + props.align = 'start' } }, - down: (shape) => { - return { ...shape } - }, + down: RETIRED_DOWN_MIGRATION, }, - [Versions.AddCheckBox]: { - up: (shape) => { - return { ...shape } - }, - down: (shape) => { - return { - ...shape, - props: { - ...shape.props, - geo: shape.props.geo === 'check-box' ? 'rectangle' : shape.props.geo, - }, - } + { + id: geoShapeVersions.AddCheckBox, + up: (_props) => { + // noop }, + down: RETIRED_DOWN_MIGRATION, }, - [Versions.AddVerticalAlign]: { - up: (shape) => { - return { - ...shape, - props: { - ...shape.props, - verticalAlign: 'middle', - }, - } - }, - down: (shape) => { - const { verticalAlign: _, ...props } = shape.props - return { - ...shape, - props, - } + { + id: geoShapeVersions.AddVerticalAlign, + up: (props) => { + props.verticalAlign = 'middle' }, + down: RETIRED_DOWN_MIGRATION, }, - [Versions.MigrateLegacyAlign]: { - up: (shape) => { + { + id: geoShapeVersions.MigrateLegacyAlign, + up: (props) => { let newAlign: TLDefaultHorizontalAlignStyle - switch (shape.props.align) { + switch (props.align) { case 'start': newAlign = 'start-legacy' break @@ -175,63 +138,27 @@ export const geoShapeMigrations = defineMigrations({ newAlign = 'middle-legacy' break } - return { - ...shape, - props: { - ...shape.props, - align: newAlign, - }, + props.align = newAlign + }, + down: RETIRED_DOWN_MIGRATION, + }, + { + id: geoShapeVersions.AddCloud, + up: (_props) => { + // noop + }, + down: RETIRED_DOWN_MIGRATION, + }, + { + id: geoShapeVersions.MakeUrlsValid, + up: (props) => { + if (!T.linkUrl.isValid(props.url)) { + props.url = '' } }, - down: (shape) => { - let oldAlign: TLDefaultHorizontalAlignStyle - switch (shape.props.align) { - case 'start-legacy': - oldAlign = 'start' - break - case 'end-legacy': - oldAlign = 'end' - break - case 'middle-legacy': - oldAlign = 'middle' - break - default: - oldAlign = shape.props.align - } - return { - ...shape, - props: { - ...shape.props, - align: oldAlign, - }, - } + down: (_props) => { + // noop }, }, - [Versions.AddCloud]: { - up: (shape) => { - return shape - }, - down: (shape) => { - if (shape.props.geo === 'cloud') { - return { - ...shape, - props: { - ...shape.props, - geo: 'rectangle', - }, - } - } - }, - }, - [Versions.MakeUrlsValid]: { - up: (shape) => { - const url = shape.props.url - if (url !== '' && !T.linkUrl.isValid(shape.props.url)) { - return { ...shape, props: { ...shape.props, url: '' } } - } - return shape - }, - down: (shape) => shape, - }, - }, + ], }) diff --git a/packages/tlschema/src/shapes/TLGroupShape.ts b/packages/tlschema/src/shapes/TLGroupShape.ts index 458d1cb13..4b1c5f3a3 100644 --- a/packages/tlschema/src/shapes/TLGroupShape.ts +++ b/packages/tlschema/src/shapes/TLGroupShape.ts @@ -1,4 +1,4 @@ -import { defineMigrations } from '@tldraw/store' +import { createShapePropsMigrationSequence } from '../records/TLShape' import { ShapeProps, TLBaseShape } from './TLBaseShape' /** @public */ @@ -11,4 +11,4 @@ export type TLGroupShape = TLBaseShape<'group', TLGroupShapeProps> export const groupShapeProps: ShapeProps = {} /** @internal */ -export const groupShapeMigrations = defineMigrations({}) +export const groupShapeMigrations = createShapePropsMigrationSequence({ sequence: [] }) diff --git a/packages/tlschema/src/shapes/TLHighlightShape.ts b/packages/tlschema/src/shapes/TLHighlightShape.ts index d8df8b43f..9950ca94a 100644 --- a/packages/tlschema/src/shapes/TLHighlightShape.ts +++ b/packages/tlschema/src/shapes/TLHighlightShape.ts @@ -1,5 +1,5 @@ -import { defineMigrations } from '@tldraw/store' import { T } from '@tldraw/validate' +import { createShapePropsMigrationSequence } from '../records/TLShape' import { DefaultColorStyle } from '../styles/TLColorStyle' import { DefaultSizeStyle } from '../styles/TLSizeStyle' import { ShapePropsType, TLBaseShape } from './TLBaseShape' @@ -21,4 +21,4 @@ export type TLHighlightShapeProps = ShapePropsType export type TLHighlightShape = TLBaseShape<'highlight', TLHighlightShapeProps> /** @internal */ -export const highlightShapeMigrations = defineMigrations({}) +export const highlightShapeMigrations = createShapePropsMigrationSequence({ sequence: [] }) diff --git a/packages/tlschema/src/shapes/TLImageShape.ts b/packages/tlschema/src/shapes/TLImageShape.ts index f599c18c6..33a67e8b4 100644 --- a/packages/tlschema/src/shapes/TLImageShape.ts +++ b/packages/tlschema/src/shapes/TLImageShape.ts @@ -1,7 +1,11 @@ -import { defineMigrations } from '@tldraw/store' import { T } from '@tldraw/validate' import { assetIdValidator } from '../assets/TLBaseAsset' import { vecModelValidator } from '../misc/geometry-types' +import { + RETIRED_DOWN_MIGRATION, + createShapePropsMigrationIds, + createShapePropsMigrationSequence, +} from '../records/TLShape' import { ShapePropsType, TLBaseShape } from './TLBaseShape' /** @public */ @@ -28,43 +32,43 @@ export type TLImageShapeProps = ShapePropsType /** @public */ export type TLImageShape = TLBaseShape<'image', TLImageShapeProps> -const Versions = { +const Versions = createShapePropsMigrationIds('image', { AddUrlProp: 1, AddCropProp: 2, MakeUrlsValid: 3, -} as const +}) + +export { Versions as imageShapeVersions } /** @internal */ -export const imageShapeMigrations = defineMigrations({ - currentVersion: Versions.MakeUrlsValid, - migrators: { - [Versions.AddUrlProp]: { - up: (shape) => { - return { ...shape, props: { ...shape.props, url: '' } } +export const imageShapeMigrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: Versions.AddUrlProp, + up: (props) => { + props.url = '' }, - down: (shape) => { - const { url: _, ...props } = shape.props - return { ...shape, props } + down: RETIRED_DOWN_MIGRATION, + }, + { + id: Versions.AddCropProp, + up: (props) => { + props.crop = null + }, + down: (props) => { + delete props.crop }, }, - [Versions.AddCropProp]: { - up: (shape) => { - return { ...shape, props: { ...shape.props, crop: null } } - }, - down: (shape) => { - const { crop: _, ...props } = shape.props - return { ...shape, props } - }, - }, - [Versions.MakeUrlsValid]: { - up: (shape) => { - const url = shape.props.url - if (url !== '' && !T.linkUrl.isValid(shape.props.url)) { - return { ...shape, props: { ...shape.props, url: '' } } + { + id: Versions.MakeUrlsValid, + up: (props) => { + if (!T.linkUrl.isValid(props.url)) { + props.url = '' } - return shape }, - down: (shape) => shape, + down: (_props) => { + // noop + }, }, - }, + ], }) diff --git a/packages/tlschema/src/shapes/TLLineShape.ts b/packages/tlschema/src/shapes/TLLineShape.ts index 2de66362a..81dedd503 100644 --- a/packages/tlschema/src/shapes/TLLineShape.ts +++ b/packages/tlschema/src/shapes/TLLineShape.ts @@ -1,12 +1,10 @@ -import { defineMigrations } from '@tldraw/store' -import { - IndexKey, - getIndices, - objectMapFromEntries, - sortByIndex, - structuredClone, -} from '@tldraw/utils' +import { IndexKey, getIndices, objectMapFromEntries, sortByIndex } from '@tldraw/utils' import { T } from '@tldraw/validate' +import { + RETIRED_DOWN_MIGRATION, + createShapePropsMigrationIds, + createShapePropsMigrationSequence, +} from '../records/TLShape' import { StyleProp } from '../styles/StyleProp' import { DefaultColorStyle } from '../styles/TLColorStyle' import { DefaultDashStyle } from '../styles/TLDashStyle' @@ -45,161 +43,120 @@ export type TLLineShapeProps = ShapePropsType export type TLLineShape = TLBaseShape<'line', TLLineShapeProps> /** @internal */ -export const lineShapeVersions = { +export const lineShapeVersions = createShapePropsMigrationIds('line', { AddSnapHandles: 1, RemoveExtraHandleProps: 2, HandlesToPoints: 3, PointIndexIds: 4, -} as const +}) /** @internal */ -export const lineShapeMigrations = defineMigrations({ - currentVersion: lineShapeVersions.PointIndexIds, - migrators: { - [lineShapeVersions.AddSnapHandles]: { - up: (record: any) => { - const handles = structuredClone(record.props.handles as Record) - for (const id in handles) { - handles[id].canSnap = true +export const lineShapeMigrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: lineShapeVersions.AddSnapHandles, + up: (props) => { + for (const handle of Object.values(props.handles)) { + ;(handle as any).canSnap = true } - return { ...record, props: { ...record.props, handles } } - }, - down: (record: any) => { - const handles = structuredClone(record.props.handles as Record) - for (const id in handles) { - delete handles[id].canSnap - } - return { ...record, props: { ...record.props, handles } } }, + down: RETIRED_DOWN_MIGRATION, }, - [lineShapeVersions.RemoveExtraHandleProps]: { - up: (record: any) => { - return { - ...record, - props: { - ...record.props, - handles: objectMapFromEntries( - Object.values(record.props.handles).map((handle: any) => [ - handle.index, - { - x: handle.x, - y: handle.y, - }, - ]) - ), - }, - } + { + id: lineShapeVersions.RemoveExtraHandleProps, + up: (props) => { + props.handles = objectMapFromEntries( + Object.values(props.handles).map((handle: any) => [ + handle.index, + { + x: handle.x, + y: handle.y, + }, + ]) + ) }, - down: (record: any) => { - const handles = Object.entries(record.props.handles) + down: (props) => { + const handles = Object.entries(props.handles) .map(([index, handle]: any) => ({ index, ...handle })) .sort(sortByIndex) - - return { - ...record, - props: { - ...record.props, - handles: Object.fromEntries( - handles.map((handle, i) => { - const id = - i === 0 ? 'start' : i === handles.length - 1 ? 'end' : `handle:${handle.index}` - return [ - id, - { - id, - type: 'vertex', - canBind: false, - canSnap: true, - index: handle.index, - x: handle.x, - y: handle.y, - }, - ] - }) - ), - }, - } + props.handles = Object.fromEntries( + handles.map((handle, i) => { + const id = + i === 0 ? 'start' : i === handles.length - 1 ? 'end' : `handle:${handle.index}` + return [ + id, + { + id, + type: 'vertex', + canBind: false, + canSnap: true, + index: handle.index, + x: handle.x, + y: handle.y, + }, + ] + }) + ) }, }, - [lineShapeVersions.HandlesToPoints]: { - up: (record: any) => { - const { handles, ...props } = record.props - - const sortedHandles = (Object.entries(handles) as [IndexKey, { x: number; y: number }][]) + { + id: lineShapeVersions.HandlesToPoints, + up: (props) => { + const sortedHandles = ( + Object.entries(props.handles) as [IndexKey, { x: number; y: number }][] + ) .map(([index, { x, y }]) => ({ x, y, index })) .sort(sortByIndex) - return { - ...record, - props: { - ...props, - points: sortedHandles.map(({ x, y }) => ({ x, y })), - }, - } + props.points = sortedHandles.map(({ x, y }) => ({ x, y })) + delete props.handles }, - down: (record: any) => { - const { points, ...props } = record.props - const indices = getIndices(points.length) + down: (props) => { + const indices = getIndices(props.points.length) - return { - ...record, - props: { - ...props, - handles: Object.fromEntries( - points.map((handle: { x: number; y: number }, i: number) => { - const index = indices[i] - return [ - index, - { - x: handle.x, - y: handle.y, - }, - ] - }) - ), - }, - } + props.handles = Object.fromEntries( + props.points.map((handle: { x: number; y: number }, i: number) => { + const index = indices[i] + return [ + index, + { + x: handle.x, + y: handle.y, + }, + ] + }) + ) + + delete props.points }, }, - [lineShapeVersions.PointIndexIds]: { - up: (record: any) => { - const { points, ...props } = record.props - const indices = getIndices(points.length) + { + id: lineShapeVersions.PointIndexIds, + up: (props) => { + const indices = getIndices(props.points.length) - return { - ...record, - props: { - ...props, - points: Object.fromEntries( - points.map((point: { x: number; y: number }, i: number) => { - const id = indices[i] - return [ - id, - { - id: id, - index: id, - x: point.x, - y: point.y, - }, - ] - }) - ), - }, - } + props.points = Object.fromEntries( + props.points.map((point: { x: number; y: number }, i: number) => { + const id = indices[i] + return [ + id, + { + id: id, + index: id, + x: point.x, + y: point.y, + }, + ] + }) + ) }, - down: (record: any) => { + down: (props) => { const sortedHandles = ( - Object.values(record.props.points) as { x: number; y: number; index: IndexKey }[] + Object.values(props.points) as { x: number; y: number; index: IndexKey }[] ).sort(sortByIndex) - return { - ...record, - props: { - ...record.props, - points: sortedHandles.map(({ x, y }) => ({ x, y })), - }, - } + props.points = sortedHandles.map(({ x, y }) => ({ x, y })) }, }, - }, + ], }) diff --git a/packages/tlschema/src/shapes/TLNoteShape.ts b/packages/tlschema/src/shapes/TLNoteShape.ts index 972aeca55..369c7cfe8 100644 --- a/packages/tlschema/src/shapes/TLNoteShape.ts +++ b/packages/tlschema/src/shapes/TLNoteShape.ts @@ -1,11 +1,12 @@ -import { defineMigrations } from '@tldraw/store' import { T } from '@tldraw/validate' +import { + RETIRED_DOWN_MIGRATION, + createShapePropsMigrationIds, + createShapePropsMigrationSequence, +} from '../records/TLShape' import { DefaultColorStyle } from '../styles/TLColorStyle' import { DefaultFontStyle } from '../styles/TLFontStyle' -import { - DefaultHorizontalAlignStyle, - TLDefaultHorizontalAlignStyle, -} from '../styles/TLHorizontalAlignStyle' +import { DefaultHorizontalAlignStyle } from '../styles/TLHorizontalAlignStyle' import { DefaultSizeStyle } from '../styles/TLSizeStyle' import { DefaultVerticalAlignStyle } from '../styles/TLVerticalAlignStyle' import { ShapePropsType, TLBaseShape } from './TLBaseShape' @@ -14,8 +15,8 @@ import { ShapePropsType, TLBaseShape } from './TLBaseShape' export const noteShapeProps = { color: DefaultColorStyle, size: DefaultSizeStyle, - fontSizeAdjustment: T.positiveNumber, font: DefaultFontStyle, + fontSizeAdjustment: T.positiveNumber, align: DefaultHorizontalAlignStyle, verticalAlign: DefaultVerticalAlignStyle, growY: T.positiveNumber, @@ -29,131 +30,79 @@ export type TLNoteShapeProps = ShapePropsType /** @public */ export type TLNoteShape = TLBaseShape<'note', TLNoteShapeProps> -export const noteShapeVersions = { +const Versions = createShapePropsMigrationIds('note', { AddUrlProp: 1, RemoveJustify: 2, MigrateLegacyAlign: 3, AddVerticalAlign: 4, MakeUrlsValid: 5, AddFontSizeAdjustment: 6, -} as const +}) + +export { Versions as noteShapeVersions } /** @internal */ -export const noteShapeMigrations = defineMigrations({ - currentVersion: noteShapeVersions.AddFontSizeAdjustment, - migrators: { - [noteShapeVersions.AddUrlProp]: { - up: (shape) => { - return { ...shape, props: { ...shape.props, url: '' } } - }, - down: (shape) => { - const { url: _, ...props } = shape.props - return { ...shape, props } +export const noteShapeMigrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: Versions.AddUrlProp, + up: (props) => { + props.url = '' }, + down: RETIRED_DOWN_MIGRATION, }, - [noteShapeVersions.RemoveJustify]: { - up: (shape) => { - let newAlign = shape.props.align - if (newAlign === 'justify') { - newAlign = 'start' - } - - return { - ...shape, - props: { - ...shape.props, - align: newAlign, - }, + { + id: Versions.RemoveJustify, + up: (props) => { + if (props.align === 'justify') { + props.align = 'start' } }, - down: (shape) => { - return { ...shape } - }, + down: RETIRED_DOWN_MIGRATION, }, - - [noteShapeVersions.MigrateLegacyAlign]: { - up: (shape) => { - let newAlign: TLDefaultHorizontalAlignStyle - switch (shape.props.align) { + { + id: Versions.MigrateLegacyAlign, + up: (props) => { + switch (props.align) { case 'start': - newAlign = 'start-legacy' - break + props.align = 'start-legacy' + return case 'end': - newAlign = 'end-legacy' - break + props.align = 'end-legacy' + return default: - newAlign = 'middle-legacy' - break - } - return { - ...shape, - props: { - ...shape.props, - align: newAlign, - }, + props.align = 'middle-legacy' + return } }, - down: (shape) => { - let oldAlign: TLDefaultHorizontalAlignStyle - switch (shape.props.align) { - case 'start-legacy': - oldAlign = 'start' - break - case 'end-legacy': - oldAlign = 'end' - break - case 'middle-legacy': - oldAlign = 'middle' - break - default: - oldAlign = shape.props.align - } - return { - ...shape, - props: { - ...shape.props, - align: oldAlign, - }, + down: RETIRED_DOWN_MIGRATION, + }, + { + id: Versions.AddVerticalAlign, + up: (props) => { + props.verticalAlign = 'middle' + }, + down: RETIRED_DOWN_MIGRATION, + }, + { + id: Versions.MakeUrlsValid, + up: (props) => { + if (!T.linkUrl.isValid(props.url)) { + props.url = '' } }, + down: (_props) => { + // noop + }, }, - [noteShapeVersions.AddVerticalAlign]: { - up: (shape) => { - return { - ...shape, - props: { - ...shape.props, - verticalAlign: 'middle', - }, - } + { + id: Versions.AddFontSizeAdjustment, + up: (props) => { + props.fontSizeAdjustment = 0 }, - down: (shape) => { - const { verticalAlign: _, ...props } = shape.props - - return { - ...shape, - props, - } + down: (props) => { + delete props.fontSizeAdjustment }, }, - [noteShapeVersions.MakeUrlsValid]: { - up: (shape) => { - const url = shape.props.url - if (url !== '' && !T.linkUrl.isValid(shape.props.url)) { - return { ...shape, props: { ...shape.props, url: '' } } - } - return shape - }, - down: (shape) => shape, - }, - [noteShapeVersions.AddFontSizeAdjustment]: { - up: (shape) => { - return { ...shape, props: { ...shape.props, fontSizeAdjustment: 0 } } - }, - down: (shape) => { - const { fontSizeAdjustment: _, ...props } = shape.props - return { ...shape, props } - }, - }, - }, + ], }) diff --git a/packages/tlschema/src/shapes/TLTextShape.ts b/packages/tlschema/src/shapes/TLTextShape.ts index 29c802619..f3342e9d0 100644 --- a/packages/tlschema/src/shapes/TLTextShape.ts +++ b/packages/tlschema/src/shapes/TLTextShape.ts @@ -1,5 +1,9 @@ -import { defineMigrations } from '@tldraw/store' import { T } from '@tldraw/validate' +import { + RETIRED_DOWN_MIGRATION, + createShapePropsMigrationIds, + createShapePropsMigrationSequence, +} from '../records/TLShape' import { DefaultColorStyle } from '../styles/TLColorStyle' import { DefaultFontStyle } from '../styles/TLFontStyle' import { DefaultHorizontalAlignStyle } from '../styles/TLHorizontalAlignStyle' @@ -24,32 +28,23 @@ export type TLTextShapeProps = ShapePropsType /** @public */ export type TLTextShape = TLBaseShape<'text', TLTextShapeProps> -const Versions = { +const Versions = createShapePropsMigrationIds('text', { RemoveJustify: 1, -} as const +}) + +export { Versions as textShapeVersions } /** @internal */ -export const textShapeMigrations = defineMigrations({ - currentVersion: Versions.RemoveJustify, - migrators: { - [Versions.RemoveJustify]: { - up: (shape) => { - let newAlign = shape.props.align - if (newAlign === 'justify') { - newAlign = 'start' - } - - return { - ...shape, - props: { - ...shape.props, - align: newAlign, - }, +export const textShapeMigrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: Versions.RemoveJustify, + up: (props) => { + if (props.align === 'justify') { + props.align = 'start' } }, - down: (shape) => { - return { ...shape } - }, + down: RETIRED_DOWN_MIGRATION, }, - }, + ], }) diff --git a/packages/tlschema/src/shapes/TLVideoShape.ts b/packages/tlschema/src/shapes/TLVideoShape.ts index 6ccc1baf3..ba28ab8c3 100644 --- a/packages/tlschema/src/shapes/TLVideoShape.ts +++ b/packages/tlschema/src/shapes/TLVideoShape.ts @@ -1,6 +1,10 @@ -import { defineMigrations } from '@tldraw/store' import { T } from '@tldraw/validate' import { assetIdValidator } from '../assets/TLBaseAsset' +import { + RETIRED_DOWN_MIGRATION, + createShapePropsMigrationIds, + createShapePropsMigrationSequence, +} from '../records/TLShape' import { ShapePropsType, TLBaseShape } from './TLBaseShape' /** @public */ @@ -19,33 +23,33 @@ export type TLVideoShapeProps = ShapePropsType /** @public */ export type TLVideoShape = TLBaseShape<'video', TLVideoShapeProps> -const Versions = { +const Versions = createShapePropsMigrationIds('video', { AddUrlProp: 1, MakeUrlsValid: 2, -} as const +}) + +export { Versions as videoShapeVersions } /** @internal */ -export const videoShapeMigrations = defineMigrations({ - currentVersion: Versions.MakeUrlsValid, - migrators: { - [Versions.AddUrlProp]: { - up: (shape) => { - return { ...shape, props: { ...shape.props, url: '' } } - }, - down: (shape) => { - const { url: _, ...props } = shape.props - return { ...shape, props } +export const videoShapeMigrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: Versions.AddUrlProp, + up: (props) => { + props.url = '' }, + down: RETIRED_DOWN_MIGRATION, }, - [Versions.MakeUrlsValid]: { - up: (shape) => { - const url = shape.props.url - if (url !== '' && !T.linkUrl.isValid(shape.props.url)) { - return { ...shape, props: { ...shape.props, url: '' } } + { + id: Versions.MakeUrlsValid, + up: (props) => { + if (!T.linkUrl.isValid(props.url)) { + props.url = '' } - return shape }, - down: (shape) => shape, + down: (_props) => { + // noop + }, }, - }, + ], }) diff --git a/packages/tlschema/src/store-migrations.ts b/packages/tlschema/src/store-migrations.ts index 39f06d74d..0b06fc510 100644 --- a/packages/tlschema/src/store-migrations.ts +++ b/packages/tlschema/src/store-migrations.ts @@ -1,63 +1,67 @@ -import { defineMigrations, SerializedStore } from '@tldraw/store' -import { TLRecord } from './records/TLRecord' +import { createMigrationIds, createMigrationSequence } from '@tldraw/store' +import { objectMapEntries } from '@tldraw/utils' +import { TLShape } from './records/TLShape' -const Versions = { +const Versions = createMigrationIds('com.tldraw.store', { RemoveCodeAndIconShapeTypes: 1, AddInstancePresenceType: 2, RemoveTLUserAndPresenceAndAddPointer: 3, RemoveUserDocument: 4, -} as const +} as const) export { Versions as storeVersions } /** @public */ -export const storeMigrations = defineMigrations({ - currentVersion: Versions.RemoveUserDocument, - migrators: { - [Versions.RemoveCodeAndIconShapeTypes]: { - up: (store: SerializedStore) => { - return Object.fromEntries( - Object.entries(store).filter( - ([_, v]) => v.typeName !== 'shape' || (v.type !== 'icon' && v.type !== 'code') - ) - ) +export const storeMigrations = createMigrationSequence({ + sequenceId: 'com.tldraw.store', + retroactive: false, + sequence: [ + { + id: Versions.RemoveCodeAndIconShapeTypes, + scope: 'store', + up: (store) => { + for (const [id, record] of objectMapEntries(store)) { + if ( + record.typeName === 'shape' && + ((record as TLShape).type === 'icon' || (record as TLShape).type === 'code') + ) { + delete store[id] + } + } }, - down: (store: SerializedStore) => { + }, + { + id: Versions.AddInstancePresenceType, + scope: 'store', + up(_store) { // noop - return store + // there used to be a down migration for this but we made down migrations optional + // and we don't use them on store-level migrations so we can just remove it }, }, - [Versions.AddInstancePresenceType]: { - up: (store: SerializedStore) => { - return store - }, - down: (store: SerializedStore) => { - return Object.fromEntries( - Object.entries(store).filter(([_, v]) => v.typeName !== 'instance_presence') - ) + { + // remove user and presence records and add pointer records + id: Versions.RemoveTLUserAndPresenceAndAddPointer, + scope: 'store', + up: (store) => { + for (const [id, record] of objectMapEntries(store)) { + if (record.typeName.match(/^(user|user_presence)$/)) { + delete store[id] + } + } }, }, - [Versions.RemoveTLUserAndPresenceAndAddPointer]: { - up: (store: SerializedStore) => { - return Object.fromEntries( - Object.entries(store).filter(([_, v]) => !v.typeName.match(/^(user|user_presence)$/)) - ) - }, - down: (store: SerializedStore) => { - return Object.fromEntries( - Object.entries(store).filter(([_, v]) => v.typeName !== 'pointer') - ) + { + // remove user document records + id: Versions.RemoveUserDocument, + scope: 'store', + up: (store) => { + for (const [id, record] of objectMapEntries(store)) { + if (record.typeName.match('user_document')) { + delete store[id] + } + } }, }, - [Versions.RemoveUserDocument]: { - up: (store: SerializedStore) => { - return Object.fromEntries( - Object.entries(store).filter(([_, v]) => !v.typeName.match('user_document')) - ) - }, - down: (store: SerializedStore) => { - return store - }, - }, - }, + ], }) diff --git a/packages/tlsync/src/lib/TLSyncRoom.ts b/packages/tlsync/src/lib/TLSyncRoom.ts index adef32028..02f023efe 100644 --- a/packages/tlsync/src/lib/TLSyncRoom.ts +++ b/packages/tlsync/src/lib/TLSyncRoom.ts @@ -6,8 +6,6 @@ import { SerializedSchema, StoreSchema, UnknownRecord, - compareRecordVersions, - getRecordVersion, } from '@tldraw/store' import { DocumentRecordType, PageRecordType, TLDOCUMENT_ID } from '@tldraw/tlschema' import { @@ -288,6 +286,7 @@ export class TLSyncRoom { store: Object.fromEntries( objectMapEntries(documents).map(([id, { state }]) => [id, state as R]) ) as Record, R>, + // eslint-disable-next-line deprecation/deprecation schema: snapshot.schema ?? schema.serializeEarliestVersion(), }) @@ -692,11 +691,14 @@ export class TLSyncRoom { } // If the client's store is at a different version to ours, it could cause corruption. // We should disconnect the client and ask them to refresh. - if (message.schema == null || message.schema.storeVersion < this.schema.currentStoreVersion) { + if (message.schema == null) { this.rejectSession(session, TLIncompatibilityReason.ClientTooOld) return - } else if (message.schema.storeVersion > this.schema.currentStoreVersion) { - this.rejectSession(session, TLIncompatibilityReason.ServerTooOld) + } + const migrations = this.schema.getMigrationsSince(message.schema) + // if the client's store is at a different version to ours, we can't support them + if (!migrations.ok || migrations.value.some((m) => m.scope === 'store' || !m.down)) { + this.rejectSession(session, TLIncompatibilityReason.ClientTooOld) return } @@ -878,61 +880,48 @@ export class TLSyncRoom { // if it was already deleted, there's no need to apply the patch const doc = this.getDocument(id) if (!doc) return Result.ok(undefined) + // If the client's version of the record is older than ours, + // we apply the patch to the downgraded version of the record + const downgraded = this.schema.migratePersistedRecord( + doc.state, + session.serializedSchema, + 'down' + ) + if (downgraded.type === 'error') { + return fail(TLIncompatibilityReason.ClientTooOld) + } - // Compare versions of the record - const theirVersion = getRecordVersion(doc.state, session.serializedSchema) - const ourVersion = getRecordVersion(doc.state, this.serializedSchema) - const comparison = compareRecordVersions(ourVersion, theirVersion) - - switch (comparison) { - case 0: { - // If the versions are compatible, apply the patch and propagate the patch op - const diff = doc.mergeDiff(patch, this.clock) - if (!diff.ok) { - return fail(TLIncompatibilityReason.InvalidRecord) - } - if (diff.value) { - propagateOp(id, [RecordOpType.Patch, diff.value]) - } - break + if (downgraded.value === doc.state) { + // If the versions are compatible, apply the patch and propagate the patch op + const diff = doc.mergeDiff(patch, this.clock) + if (!diff.ok) { + return fail(TLIncompatibilityReason.InvalidRecord) } - case -1: { - // If the client's version of the record is newer than ours, we can't apply the patch - return fail(TLIncompatibilityReason.ServerTooOld) + if (diff.value) { + propagateOp(id, [RecordOpType.Patch, diff.value]) } - case 1: { - // If the client's version of the record is older than ours, - // we apply the patch to the downgraded version of the record - const downgraded = this.schema.migratePersistedRecord( - doc.state, - session.serializedSchema, - 'down' - ) - if (downgraded.type === 'error') { - return fail(TLIncompatibilityReason.ClientTooOld) - } + } else { + // need to apply the patch to the downgraded version and then upgrade it - // apply the patch to the downgraded version - const patched = applyObjectDiff(downgraded.value, patch) - // then upgrade the patched version and use that as the new state - const upgraded = this.schema.migratePersistedRecord( - patched, - session.serializedSchema, - 'up' - ) - // If the client's version is too old, we'll hit an error - if (upgraded.type === 'error') { - return fail(TLIncompatibilityReason.ClientTooOld) - } - // replace the state with the upgraded version and propagate the patch op - const diff = doc.replaceState(upgraded.value, this.clock) - if (!diff.ok) { - return fail(TLIncompatibilityReason.InvalidRecord) - } - if (diff.value) { - propagateOp(id, [RecordOpType.Patch, diff.value]) - } - break + // apply the patch to the downgraded version + const patched = applyObjectDiff(downgraded.value, patch) + // then upgrade the patched version and use that as the new state + const upgraded = this.schema.migratePersistedRecord( + patched, + session.serializedSchema, + 'up' + ) + // If the client's version is too old, we'll hit an error + if (upgraded.type === 'error') { + return fail(TLIncompatibilityReason.ClientTooOld) + } + // replace the state with the upgraded version and propagate the patch op + const diff = doc.replaceState(upgraded.value, this.clock) + if (!diff.ok) { + return fail(TLIncompatibilityReason.InvalidRecord) + } + if (diff.value) { + propagateOp(id, [RecordOpType.Patch, diff.value]) } } diff --git a/packages/tlsync/src/test/TLSyncRoom.test.ts b/packages/tlsync/src/test/TLSyncRoom.test.ts index 557f7d504..b6fe25a53 100644 --- a/packages/tlsync/src/test/TLSyncRoom.test.ts +++ b/packages/tlsync/src/test/TLSyncRoom.test.ts @@ -1,4 +1,4 @@ -import { SerializedSchema } from '@tldraw/store' +import { SerializedSchemaV2 } from '@tldraw/store' import { CameraRecordType, DocumentRecordType, @@ -98,20 +98,11 @@ describe('TLSyncRoom', () => { it('migrates the snapshot if it is dealing with old data', () => { const serializedSchema = schema.serialize() - const oldSerializedSchema: SerializedSchema = { - ...serializedSchema, - recordVersions: { - ...serializedSchema.recordVersions, - shape: { - ...serializedSchema.recordVersions.shape, - subTypeVersions: { - ...('subTypeVersions' in serializedSchema.recordVersions.shape - ? serializedSchema.recordVersions.shape.subTypeVersions - : {}), - // we add a labelColor to arrow in v1 - arrow: 0, - }, - }, + const oldSerializedSchema: SerializedSchemaV2 = { + schemaVersion: 2, + sequences: { + ...serializedSchema.sequences, + 'com.tldraw.shape.arrow': 0, }, } diff --git a/packages/tlsync/src/test/schema.test.ts b/packages/tlsync/src/test/schema.test.ts deleted file mode 100644 index a6a6806e3..000000000 --- a/packages/tlsync/src/test/schema.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { coreShapes, defaultShapeUtils } from 'tldraw' -import { schema } from '../lib/schema' - -describe('schema', () => { - test('shape types match core+default shapes', () => { - const shapeTypes = Object.keys(schema.types.shape.migrations.subTypeMigrations!) - expect(shapeTypes).toEqual([...coreShapes, ...defaultShapeUtils].map((s) => s.type)) - }) -}) diff --git a/packages/tlsync/src/test/upgradeDowngrade.test.ts b/packages/tlsync/src/test/upgradeDowngrade.test.ts index c984fdc8c..290d71d1a 100644 --- a/packages/tlsync/src/test/upgradeDowngrade.test.ts +++ b/packages/tlsync/src/test/upgradeDowngrade.test.ts @@ -2,12 +2,13 @@ import { computed } from '@tldraw/state' import { BaseRecord, RecordId, - SerializedStore, Store, StoreSchema, UnknownRecord, + createMigrationIds, + createMigrationSequence, + createRecordMigrationSequence, createRecordType, - defineMigrations, } from '@tldraw/store' import { TLSyncClient } from '../lib/TLSyncClient' import { RoomSnapshot, TLRoomSocket } from '../lib/TLSyncRoom' @@ -44,9 +45,9 @@ afterEach(() => { disposables.length = 0 }) -const UserVersions = { +const UserVersions = createMigrationIds('com.tldraw.user', { ReplaceAgeWithBirthdate: 1, -} as const +} as const) interface UserV1 extends BaseRecord<'user', RecordId> { name: string @@ -64,7 +65,6 @@ const PresenceV1 = createRecordType('presence', { const UserV1 = createRecordType('user', { scope: 'document', - migrations: defineMigrations({}), validator: { validate: (value) => value as UserV1 }, }) @@ -73,74 +73,85 @@ interface UserV2 extends BaseRecord<'user', RecordId> { birthdate: string | null } -const UserV2 = createRecordType('user', { - scope: 'document', - migrations: defineMigrations({ - currentVersion: UserVersions.ReplaceAgeWithBirthdate, - migrators: { - [UserVersions.ReplaceAgeWithBirthdate]: { - up({ age: _age, ...user }) { - return { - ...user, - birthdate: null, - } - }, - down({ birthdate: _birthdate, ...user }) { - return { - ...user, - age: 0, - } - }, +const userV2Migrations = createRecordMigrationSequence({ + sequenceId: 'com.tldraw.user', + recordType: 'user', + sequence: [ + { + id: UserVersions.ReplaceAgeWithBirthdate, + up({ age: _age, ...user }: any) { + return { + ...user, + birthdate: null, + } + }, + down({ birthdate: _birthdate, ...user }: any) { + return { + ...user, + age: 0, + } }, }, - }), + ], +}) +const UserV2 = createRecordType('user', { + scope: 'document', validator: { validate: (value) => value as UserV2 }, }) type RV1 = UserV1 | PresenceV1 type RV2 = UserV2 | PresenceV1 +const userV1Migrations = createMigrationSequence({ + sequenceId: 'com.tldraw.user', + sequence: [], + retroactive: true, +}) + const schemaV1 = StoreSchema.create( { user: UserV1, presence: PresenceV1 }, - { - snapshotMigrations: defineMigrations({}), - } + { migrations: [userV1Migrations] } ) const schemaV2 = StoreSchema.create( { user: UserV2, presence: PresenceV1 }, { - snapshotMigrations: defineMigrations({}), + migrations: [userV2Migrations], } ) const schemaV3 = StoreSchema.create( { user: UserV2, presence: PresenceV1 }, { - snapshotMigrations: defineMigrations({ - currentVersion: 1, - migrators: { - 1: { - up(store: SerializedStore) { - // remove any users called joe - const result = Object.fromEntries( - Object.entries(store).filter(([_, r]) => r.typeName !== 'user' || r.name !== 'joe') - ) - // add a user called steve - const id = UserV2.createId('steve') - result[id] = UserV2.create({ - id, - name: 'steve', - birthdate: '2022-02-02', - }) - return result + migrations: [ + userV2Migrations, + createMigrationSequence({ + sequenceId: 'com.tldraw.store', + retroactive: true, + sequence: [ + { + id: 'com.tldraw.store/1', + scope: 'store', + up(store: any) { + // remove any users called joe + const result = Object.fromEntries( + Object.entries(store).filter( + ([_, r]) => (r as any).typeName !== 'user' || (r as any).name !== 'joe' + ) + ) + // add a user called steve + const id = UserV2.createId('steve') + result[id] = UserV2.create({ + id, + name: 'steve', + birthdate: '2022-02-02', + }) + return result as any + }, }, - down(store: SerializedStore) { - return store - }, - }, - }, - }), + ], + }), + ], } ) @@ -393,198 +404,47 @@ test('clients using a too-new protocol will receive compatibility errors', () => }) }) -describe('when the client is too new', () => { - function setup() { - const steve = UserV1.create({ id: UserV1.createId('steve'), name: 'steve', age: 23 }) - const jeff = UserV1.create({ id: UserV1.createId('jeff'), name: 'jeff', age: 23 }) - const annie = UserV1.create({ id: UserV1.createId('annie'), name: 'annie', age: 23 }) - const v1Server = new TestServer(schemaV1, { - clock: 10, - documents: [ - { - state: steve, - lastChangedClock: 10, - }, - { - state: jeff, - lastChangedClock: 10, - }, - { - state: annie, - lastChangedClock: 10, - }, - ], - schema: schemaV1.serialize(), - tombstones: {}, - }) - - const v2_id = 'test_upgrade_v2' - const v2_socket = mockSocket() - - const v1_id = 'test_upgrade_v1' - const v1_socket = mockSocket() - - v1Server.room.handleNewSession(v1_id, v1_socket) - v1Server.room.handleMessage(v1_id, { - type: 'connect', - connectRequestId: 'test', - lastServerClock: 10, - protocolVersion: TLSYNC_PROTOCOL_VERSION, - schema: schemaV1.serialize(), - }) - - v1Server.room.handleNewSession(v2_id, v2_socket as any) - v1Server.room.handleMessage(v2_id as any, { - type: 'connect', - connectRequestId: 'test', - lastServerClock: 10, - protocolVersion: TLSYNC_PROTOCOL_VERSION, - schema: schemaV2.serialize(), - }) - - expect(v2_socket.sendMessage).toHaveBeenCalledWith({ - type: 'connect', - connectRequestId: 'test', - hydrationType: 'wipe_presence', - diff: {}, - protocolVersion: TLSYNC_PROTOCOL_VERSION, - schema: schemaV1.serialize(), - serverClock: 10, - } satisfies TLSocketServerSentEvent) - - expect(v1_socket.sendMessage).toHaveBeenCalledWith({ - type: 'connect', - connectRequestId: 'test', - hydrationType: 'wipe_presence', - diff: {}, - protocolVersion: TLSYNC_PROTOCOL_VERSION, - schema: schemaV1.serialize(), - serverClock: 10, - } satisfies TLSocketServerSentEvent) - ;(v2_socket.sendMessage as jest.Mock).mockClear() - ;(v1_socket.sendMessage as jest.Mock).mockClear() - - return { - v1Server, - v1_id, - v2_id, - v2SendMessage: v2_socket.sendMessage as jest.Mock, - v1SendMessage: v1_socket.sendMessage as jest.Mock, - steve, - jeff, - annie, - } - } - - let data: ReturnType - - beforeEach(() => { - data = setup() +test('when the client is too new it cannot connect', () => { + const steve = UserV1.create({ id: UserV1.createId('steve'), name: 'steve', age: 23 }) + const jeff = UserV1.create({ id: UserV1.createId('jeff'), name: 'jeff', age: 23 }) + const annie = UserV1.create({ id: UserV1.createId('annie'), name: 'annie', age: 23 }) + const v1Server = new TestServer(schemaV1, { + clock: 10, + documents: [ + { + state: steve, + lastChangedClock: 10, + }, + { + state: jeff, + lastChangedClock: 10, + }, + { + state: annie, + lastChangedClock: 10, + }, + ], + schema: schemaV1.serialize(), + tombstones: {}, }) - it('allows deletions from v2 client', () => { - const { v1Server, v2_id, v2SendMessage, steve } = data - v1Server.room.handleMessage(v2_id as any, { - type: 'push', - clientClock: 1, - diff: { - [steve.id]: [RecordOpType.Remove], - }, - }) + const v2_id = 'test_upgrade_v2' + const v2_socket = mockSocket() - expect(v2SendMessage).toHaveBeenCalledWith({ - type: 'data', - data: [ - { - type: 'push_result', - action: 'commit', - clientClock: 1, - serverClock: 11, - }, - ], - } satisfies TLSocketServerSentEvent) + v1Server.room.handleNewSession(v2_id, v2_socket as any) + v1Server.room.handleMessage(v2_id as any, { + type: 'connect', + connectRequestId: 'test', + lastServerClock: 10, + protocolVersion: TLSYNC_PROTOCOL_VERSION, + schema: schemaV2.serialize(), }) - it('applies changes atomically', () => { - data.v1Server.room.handleMessage(data.v2_id, { - type: 'push', - clientClock: 1, - diff: { - [data.jeff.id]: [RecordOpType.Remove], - [data.steve.id]: [RecordOpType.Remove], - [data.annie.id]: [RecordOpType.Put, { ...data.annie, birthdate: '1999-02-21' } as any], - }, - }) - - expect(data.v2SendMessage).toHaveBeenCalledWith({ - type: 'incompatibility_error', - reason: TLIncompatibilityReason.ServerTooOld, - } satisfies TLSocketServerSentEvent) - - expect(data.v1SendMessage).not.toHaveBeenCalled() - expect(data.v1Server.room.state.get().documents[data.jeff.id]).toBeDefined() - expect(data.v1Server.room.state.get().documents[data.steve.id]).toBeDefined() - }) - - it('cannot send patches to v2 clients', () => { - data.v1Server.room.handleMessage(data.v1_id, { - type: 'push', - clientClock: 1, - diff: { - [data.steve.id]: [RecordOpType.Patch, { age: [ValueOpType.Put, 24] }], - }, - }) - - expect(data.v1SendMessage).toHaveBeenCalledWith({ - type: 'data', - data: [ - { - type: 'push_result', - action: 'commit', - clientClock: 1, - serverClock: 11, - }, - ], - } satisfies TLSocketServerSentEvent) - - expect(data.v2SendMessage).toHaveBeenCalledWith({ - type: 'incompatibility_error', - reason: TLIncompatibilityReason.ServerTooOld, - } satisfies TLSocketServerSentEvent) - }) - - it('cannot apply patches from v2 clients', () => { - data.v1Server.room.handleMessage(data.v2_id, { - type: 'push', - clientClock: 1, - diff: { - [data.steve.id]: [RecordOpType.Patch, { birthdate: [ValueOpType.Put, 'tomorrow'] }], - }, - }) - - expect(data.v2SendMessage).toHaveBeenCalledWith({ - type: 'incompatibility_error', - reason: TLIncompatibilityReason.ServerTooOld, - } satisfies TLSocketServerSentEvent) - - expect(data.v1SendMessage).not.toHaveBeenCalled() - }) - - it('cannot apply puts from v2 clients', () => { - data.v1Server.room.handleMessage(data.v2_id, { - type: 'push', - clientClock: 1, - diff: { - [data.steve.id]: [RecordOpType.Put, { ...data.steve, birthdate: 'today' } as any], - }, - }) - - expect(data.v2SendMessage).toHaveBeenCalledWith({ - type: 'incompatibility_error', - reason: TLIncompatibilityReason.ServerTooOld, - } satisfies TLSocketServerSentEvent) - - expect(data.v1SendMessage).not.toHaveBeenCalled() + expect(v2_socket.sendMessage).toHaveBeenCalledWith({ + type: 'incompatibility_error', + // this should really be 'serverTooOld' but our schema format is a bit too loose to + // accurately determine that now. + reason: 'clientTooOld', }) }) diff --git a/packages/tlsync/src/test/validation.test.ts b/packages/tlsync/src/test/validation.test.ts index bcac51cb5..372068dbe 100644 --- a/packages/tlsync/src/test/validation.test.ts +++ b/packages/tlsync/src/test/validation.test.ts @@ -1,12 +1,5 @@ import { computed } from '@tldraw/state' -import { - RecordId, - Store, - StoreSchema, - UnknownRecord, - createRecordType, - defineMigrations, -} from '@tldraw/store' +import { RecordId, Store, StoreSchema, UnknownRecord, createRecordType } from '@tldraw/store' import { TLSyncClient } from '../lib/TLSyncClient' import { RecordOpType } from '../lib/diff' import { TestServer } from './TestServer' @@ -49,18 +42,11 @@ const presenceType = createRecordType('presence', { validator: { validate: (record) => record as Presence }, }) -const schema = StoreSchema.create( - { book: Book, presence: presenceType }, - { - snapshotMigrations: defineMigrations({}), - } -) -const schemaWithoutValidator = StoreSchema.create( - { book: BookWithoutValidator, presence: presenceType }, - { - snapshotMigrations: defineMigrations({}), - } -) +const schema = StoreSchema.create({ book: Book, presence: presenceType }) +const schemaWithoutValidator = StoreSchema.create({ + book: BookWithoutValidator, + presence: presenceType, +}) const disposables: Array<() => void> = [] afterEach(() => { diff --git a/packages/utils/api-report.md b/packages/utils/api-report.md index 022651e9a..961caae88 100644 --- a/packages/utils/api-report.md +++ b/packages/utils/api-report.md @@ -45,8 +45,8 @@ export function deleteFromSessionStorage(key: string): void; // @public (undocumented) export type ErrorResult = { - readonly ok: false; readonly error: E; + readonly ok: false; }; // @internal (undocumented) @@ -188,12 +188,12 @@ export function measureDuration(_target: any, propertyKey: string, descriptor: P // @public export class MediaHelpers { static getImageSize(blob: Blob): Promise<{ - w: number; h: number; + w: number; }>; static getVideoSize(blob: Blob): Promise<{ - w: number; h: number; + w: number; }>; static loadImage(src: string): Promise; static loadVideo(src: string): Promise; @@ -272,8 +272,8 @@ export class PngHelpers { // @internal (undocumented) export function promiseWithResolve(): Promise & { - resolve: (value: T) => void; reject: (reason?: any) => void; + resolve: (value: T) => void; }; // @public (undocumented) @@ -290,8 +290,8 @@ export type Result = ErrorResult | OkResult; // @public (undocumented) export const Result: { - ok(value: T): OkResult; err(error: E): ErrorResult; + ok(value: T): OkResult; }; // @public diff --git a/packages/utils/api/api.json b/packages/utils/api/api.json index a018ba983..6d94200c1 100644 --- a/packages/utils/api/api.json +++ b/packages/utils/api/api.json @@ -1,7 +1,7 @@ { "metadata": { "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.41.0", + "toolVersion": "7.43.1", "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { @@ -368,7 +368,7 @@ }, { "kind": "Content", - "text": "{\n readonly ok: false;\n readonly error: E;\n}" + "text": "{\n readonly error: E;\n readonly ok: false;\n}" }, { "kind": "Content", @@ -1919,7 +1919,7 @@ }, { "kind": "Content", - "text": "<{\n w: number;\n h: number;\n }>" + "text": "<{\n h: number;\n w: number;\n }>" }, { "kind": "Content", @@ -1973,7 +1973,7 @@ }, { "kind": "Content", - "text": "<{\n w: number;\n h: number;\n }>" + "text": "<{\n h: number;\n w: number;\n }>" }, { "kind": "Content", @@ -2908,16 +2908,7 @@ }, { "kind": "Content", - "text": "{\n ok(value: T): " - }, - { - "kind": "Reference", - "text": "OkResult", - "canonicalReference": "@tldraw/utils!OkResult:type" - }, - { - "kind": "Content", - "text": ";\n err(error: E): " + "text": "{\n err(error: E): " }, { "kind": "Reference", @@ -2926,7 +2917,16 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n ok(value: T): " + }, + { + "kind": "Reference", + "text": "OkResult", + "canonicalReference": "@tldraw/utils!OkResult:type" + }, + { + "kind": "Content", + "text": ";\n}" } ], "fileUrlPath": "packages/utils/src/lib/control.ts", diff --git a/packages/validate/api-report.md b/packages/validate/api-report.md index 885de46eb..584047196 100644 --- a/packages/validate/api-report.md +++ b/packages/validate/api-report.md @@ -191,8 +191,8 @@ const unknownObject: Validator>; // @public (undocumented) type Validatable = { - validate: (value: unknown) => T; validateUsingKnownGoodVersion?: (knownGoodValue: T, newValue: unknown) => T; + validate: (value: unknown) => T; }; // @public (undocumented) diff --git a/packages/validate/api/api.json b/packages/validate/api/api.json index e74978d0e..1bdd27588 100644 --- a/packages/validate/api/api.json +++ b/packages/validate/api/api.json @@ -1,7 +1,7 @@ { "metadata": { "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.41.0", + "toolVersion": "7.43.1", "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { @@ -3211,7 +3211,7 @@ }, { "kind": "Content", - "text": "{\n validate: (value: unknown) => T;\n validateUsingKnownGoodVersion?: (knownGoodValue: T, newValue: unknown) => T;\n}" + "text": "{\n validateUsingKnownGoodVersion?: (knownGoodValue: T, newValue: unknown) => T;\n validate: (value: unknown) => T;\n}" }, { "kind": "Content", diff --git a/scripts/lib/sort-unions.ts b/scripts/lib/sort-unions.ts index df4494323..436db5a31 100644 --- a/scripts/lib/sort-unions.ts +++ b/scripts/lib/sort-unions.ts @@ -19,6 +19,16 @@ export function sortUnions(tsbuildDir: string) { }) return false }, + visitTSTypeLiteral(path) { + this.traverse(path) + const val = path.value as namedTypes.TSTypeLiteral + val.members = val.members.sort((a, b) => { + const aText = print(a).code + const bText = print(b).code + return aText.localeCompare(bText) + }) + return false + }, }) writeFileSync(file, print(code).code) diff --git a/yarn.lock b/yarn.lock index 9d9713c93..0b94e4b30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4180,36 +4180,37 @@ __metadata: languageName: node linkType: hard -"@microsoft/api-extractor-model@npm:7.28.13, @microsoft/api-extractor-model@npm:^7.26.4": - version: 7.28.13 - resolution: "@microsoft/api-extractor-model@npm:7.28.13" +"@microsoft/api-extractor-model@npm:7.28.14, @microsoft/api-extractor-model@npm:^7.26.4": + version: 7.28.14 + resolution: "@microsoft/api-extractor-model@npm:7.28.14" dependencies: "@microsoft/tsdoc": "npm:0.14.2" "@microsoft/tsdoc-config": "npm:~0.16.1" - "@rushstack/node-core-library": "npm:4.0.2" - checksum: af1d0457d76b909ac870c7c895caf773a3348312d8c308f73bf160c8b85ab6c0be6ed6c5568a5ee5ccedf29ee1b6826af0bb241264b02ed9f5f5bba49981e631 + "@rushstack/node-core-library": "npm:4.1.0" + checksum: 9866d7c185bfd164df6a23c976571708b592dfbe9e455feb0b10692ca778a05abbd542f965e1d32f03707d2fab0b1d5bc506d67849f234bcd97772faab25db46 languageName: node linkType: hard -"@microsoft/api-extractor@npm:^7.41.0": - version: 7.41.0 - resolution: "@microsoft/api-extractor@npm:7.41.0" +"@microsoft/api-extractor@npm:^7.43.1": + version: 7.43.1 + resolution: "@microsoft/api-extractor@npm:7.43.1" dependencies: - "@microsoft/api-extractor-model": "npm:7.28.13" + "@microsoft/api-extractor-model": "npm:7.28.14" "@microsoft/tsdoc": "npm:0.14.2" "@microsoft/tsdoc-config": "npm:~0.16.1" - "@rushstack/node-core-library": "npm:4.0.2" + "@rushstack/node-core-library": "npm:4.1.0" "@rushstack/rig-package": "npm:0.5.2" - "@rushstack/terminal": "npm:0.10.0" - "@rushstack/ts-command-line": "npm:4.17.4" + "@rushstack/terminal": "npm:0.10.1" + "@rushstack/ts-command-line": "npm:4.19.2" lodash: "npm:~4.17.15" + minimatch: "npm:~3.0.3" resolve: "npm:~1.22.1" semver: "npm:~7.5.4" source-map: "npm:~0.6.1" - typescript: "npm:5.3.3" + typescript: "npm:5.4.2" bin: api-extractor: bin/api-extractor - checksum: 494feabecec7f1e0993255c9f74d3bebf7d129e5fecc9742f1c4d64d11fd772bd8d993b4e78518993afadb17bf15c9a24f3d5b0eee34bd919fd714a759c83881 + checksum: 05342aa3abd0d8f852a3d4e0c6ca3d1275f772e8d2845c28b52f5df2c72173fd4b7c815545df5760c8fe4d23de0450d66a94e4711502f101b000c9a9fdb1f292 languageName: node linkType: hard @@ -6114,9 +6115,9 @@ __metadata: languageName: node linkType: hard -"@rushstack/node-core-library@npm:4.0.2": - version: 4.0.2 - resolution: "@rushstack/node-core-library@npm:4.0.2" +"@rushstack/node-core-library@npm:4.1.0": + version: 4.1.0 + resolution: "@rushstack/node-core-library@npm:4.1.0" dependencies: fs-extra: "npm:~7.0.1" import-lazy: "npm:~4.0.0" @@ -6129,7 +6130,7 @@ __metadata: peerDependenciesMeta: "@types/node": optional: true - checksum: d28ba48e4cb755f39ccc9050f0bbc2cdabe7e706b2e7ee2f7dd2c851129f2198e024c2b1f3b5932a0689c9b86d07ae72e58a6bd62f9349f398dbbcf85d399b85 + checksum: eb2a263ba60124585b476dcbebbd49c03ca78cc02c6de5cfcceefcb4ce8d7ab1398ec48b8e67f020bbaec6cee940a5d990929a64a21d3092952c25f8dfcfb269 languageName: node linkType: hard @@ -6143,30 +6144,30 @@ __metadata: languageName: node linkType: hard -"@rushstack/terminal@npm:0.10.0": - version: 0.10.0 - resolution: "@rushstack/terminal@npm:0.10.0" +"@rushstack/terminal@npm:0.10.1": + version: 0.10.1 + resolution: "@rushstack/terminal@npm:0.10.1" dependencies: - "@rushstack/node-core-library": "npm:4.0.2" + "@rushstack/node-core-library": "npm:4.1.0" supports-color: "npm:~8.1.1" peerDependencies: "@types/node": "*" peerDependenciesMeta: "@types/node": optional: true - checksum: 4fb496558f4bf03235a6716fac3bbdefa92209c8ba05838b34b8986eaec59961938cb7b3ae5e7dfa4d96b692696291894b0cb7090d76ff29753e8c54624e5343 + checksum: aa5d15ed1609b02d0c813d6292491163f1ec85cea209e8f8be4568a740b1ff757d9940d02f8189a6c0430cb28adbb22fb2620bffe8a4f7995f710861b7452786 languageName: node linkType: hard -"@rushstack/ts-command-line@npm:4.17.4": - version: 4.17.4 - resolution: "@rushstack/ts-command-line@npm:4.17.4" +"@rushstack/ts-command-line@npm:4.19.2": + version: 4.19.2 + resolution: "@rushstack/ts-command-line@npm:4.19.2" dependencies: - "@rushstack/terminal": "npm:0.10.0" + "@rushstack/terminal": "npm:0.10.1" "@types/argparse": "npm:1.0.38" argparse: "npm:~1.0.9" string-argv: "npm:~0.3.1" - checksum: 32bfc274bf41bce3eba72e3c950e392cb636ea39b2e830e9247da163d7f46077b74373743b383833cbb95cd0322a17fe78a87b2d32af8aa87d793cd276ac2888 + checksum: 720d7519fd9887aa0e7c0f79cedc09ea2c237b32d59b0a75fec6c1666c8a577fe8b1fec97f010fae5723d3df209c07affcbed32cf4e3753538f6836aedf328cd languageName: node linkType: hard @@ -7516,7 +7517,7 @@ __metadata: version: 0.0.0-use.local resolution: "@tldraw/monorepo@workspace:." dependencies: - "@microsoft/api-extractor": "npm:^7.41.0" + "@microsoft/api-extractor": "npm:^7.43.1" "@next/eslint-plugin-next": "npm:^13.3.0" "@sentry/cli": "npm:^2.25.0" "@swc/core": "npm:^1.3.55" @@ -19016,6 +19017,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:~3.0.3": + version: 3.0.8 + resolution: "minimatch@npm:3.0.8" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 6df5373cb1ea79020beb6887ff5576c58cfabcfd32c5a65c2cf58f326e4ee8eae84f129e5fa50b8a4347fa1d1e583f931285c9fb3040d984bdfb5109ef6607ec + languageName: node + linkType: hard + "minimist@npm:^1.2.0, minimist@npm:^1.2.3, minimist@npm:^1.2.5, minimist@npm:^1.2.6, minimist@npm:^1.2.8": version: 1.2.8 resolution: "minimist@npm:1.2.8" @@ -23527,6 +23537,7 @@ __metadata: "@testing-library/jest-dom": "npm:^5.16.5" "@testing-library/react": "npm:^14.0.0" "@tldraw/editor": "workspace:*" + "@tldraw/store": "workspace:*" "@types/canvas-size": "npm:^1.2.0" "@types/classnames": "npm:^2.3.1" "@types/lz-string": "npm:^1.3.34" @@ -24132,13 +24143,13 @@ __metadata: languageName: node linkType: hard -"typescript@npm:5.3.3, typescript@npm:^5.3.3": - version: 5.3.3 - resolution: "typescript@npm:5.3.3" +"typescript@npm:5.4.2, typescript@npm:^5.3.3": + version: 5.4.2 + resolution: "typescript@npm:5.4.2" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 6e4e6a14a50c222b3d14d4ea2f729e79f972fa536ac1522b91202a9a65af3605c2928c4a790a4a50aa13694d461c479ba92cedaeb1e7b190aadaa4e4b96b8e18 + checksum: f8cfdc630ab1672f004e9561eb2916935b2d267792d07ce93e97fc601c7a65191af32033d5e9c0169b7dc37da7db9bf320f7432bc84527cb7697effaa4e4559d languageName: node linkType: hard @@ -24152,13 +24163,13 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.3.3#optional!builtin, typescript@patch:typescript@npm%3A^5.3.3#optional!builtin": - version: 5.3.3 - resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" +"typescript@patch:typescript@npm%3A5.4.2#optional!builtin, typescript@patch:typescript@npm%3A^5.3.3#optional!builtin": + version: 5.4.2 + resolution: "typescript@patch:typescript@npm%3A5.4.2#optional!builtin::version=5.4.2&hash=e012d7" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: c93786fcc9a70718ba1e3819bab56064ead5817004d1b8186f8ca66165f3a2d0100fee91fa64c840dcd45f994ca5d615d8e1f566d39a7470fc1e014dbb4cf15d + checksum: ef4fc2994cc0219dc9ada94c92106ba8d44cbfd7a0328ed6f8d730311caf66e114cdfa07fbc6f369bfc0fc182d9493851b3bf1644c06fc5818690b19ee960d72 languageName: node linkType: hard