From bfc8b6a9014fb0e7e84561bb685a3e6d73c61414 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 24 Apr 2024 15:36:08 +0100 Subject: [PATCH 01/15] fix migration exports (#3586) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We're missing the export for `createShapePropsMigrationIds`, so lets add it. This also fixes some other bits that were used in examples but not exported properly from tldraw. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `bugfix` — Bug fix ### Release Notes - Expose `createShapePropsMigrationIds`, `defaultEditorAssetUrls`, `PORTRAIT_BREAKPOINT`, `useDefaultColorTheme`, & `getPerfectDashProps` --- .eslintrc.js | 3 +- apps/dotcom/src/utils/assetUrls.ts | 1 - .../CardShape/card-shape-migrations.ts | 3 +- .../src/examples/exploded/ExplodedExample.tsx | 2 +- .../image-annotator/ImageAnnotationEditor.tsx | 2 +- .../src/examples/pdf-editor/PdfEditor.tsx | 2 +- .../ShapeWithMigrationsExample.tsx | 140 +++--- .../ShapeWithTldrawStylesExample.tsx | 2 +- .../src/examples/slides/SlideShapeUtil.tsx | 2 +- .../SpeechBubble/SpeechBubbleUtil.tsx | 2 +- apps/examples/src/misc/EndToEndApi.tsx | 2 +- apps/vscode/editor/src/app.tsx | 4 +- packages/tldraw/api-report.md | 62 +++ packages/tldraw/api/api.json | 475 +++++++++++++++++- packages/tldraw/src/index.ts | 10 +- .../src/lib/shapes/shared/ShapeFill.tsx | 1 + .../lib/shapes/shared/getPerfectDashProps.ts | 1 + packages/tldraw/src/lib/ui/constants.ts | 1 + packages/tlschema/api-report.md | 5 + packages/tlschema/api/api.json | 106 ++++ packages/tlschema/src/index.ts | 1 + scripts/lib/eslint-plugin.ts | 44 ++ 22 files changed, 782 insertions(+), 89 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 64fab1966..374c45544 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -46,12 +46,12 @@ module.exports = { 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'error', 'import/no-extraneous-dependencies': 'error', - 'import/no-internal-modules': ['error', { forbid: ['@tldraw/*/**', 'tldraw/**'] }], '@typescript-eslint/consistent-type-exports': [ 'error', { fixMixedExportsWithInlineTypeSpecifier: true }, ], 'local/no-export-star': 'error', + 'local/no-internal-imports': 'error', 'no-only-tests/no-only-tests': 'error', 'no-restricted-syntax': [ 'error', @@ -99,7 +99,6 @@ module.exports = { { files: ['apps/examples/**/*'], rules: { - 'import/no-internal-modules': 'off', 'no-restricted-syntax': 'off', }, }, diff --git a/apps/dotcom/src/utils/assetUrls.ts b/apps/dotcom/src/utils/assetUrls.ts index d3616dde2..84ac31694 100644 --- a/apps/dotcom/src/utils/assetUrls.ts +++ b/apps/dotcom/src/utils/assetUrls.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-internal-modules import { getAssetUrlsByImport } from '@tldraw/assets/imports.vite' export const assetUrls = getAssetUrlsByImport() 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 9fa1186c0..9e032e506 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,5 +1,4 @@ -import { createShapePropsMigrationIds } from '@tldraw/tlschema/src/records/TLShape' -import { createShapePropsMigrationSequence } from 'tldraw' +import { createShapePropsMigrationIds, createShapePropsMigrationSequence } from 'tldraw' const versions = createShapePropsMigrationIds( // this must match the shape type in the shape definition diff --git a/apps/examples/src/examples/exploded/ExplodedExample.tsx b/apps/examples/src/examples/exploded/ExplodedExample.tsx index 5f9d0e09b..8a8fa7812 100644 --- a/apps/examples/src/examples/exploded/ExplodedExample.tsx +++ b/apps/examples/src/examples/exploded/ExplodedExample.tsx @@ -9,12 +9,12 @@ import { TldrawSelectionBackground, TldrawSelectionForeground, TldrawUi, + defaultEditorAssetUrls, defaultShapeTools, defaultShapeUtils, defaultTools, usePreloadAssets, } from 'tldraw' -import { defaultEditorAssetUrls } from 'tldraw/src/lib/utils/static-assets/assetUrls' import 'tldraw/tldraw.css' // There's a guide at the bottom of this file! diff --git a/apps/examples/src/examples/image-annotator/ImageAnnotationEditor.tsx b/apps/examples/src/examples/image-annotator/ImageAnnotationEditor.tsx index 827a545a3..5c2ebb941 100644 --- a/apps/examples/src/examples/image-annotator/ImageAnnotationEditor.tsx +++ b/apps/examples/src/examples/image-annotator/ImageAnnotationEditor.tsx @@ -3,6 +3,7 @@ import { AssetRecordType, Box, Editor, + PORTRAIT_BREAKPOINT, SVGContainer, TLImageShape, TLShapeId, @@ -16,7 +17,6 @@ import { useBreakpoint, useEditor, } from 'tldraw' -import { PORTRAIT_BREAKPOINT } from 'tldraw/src/lib/ui/constants' import { AnnotatorImage } from './types' // TODO: diff --git a/apps/examples/src/examples/pdf-editor/PdfEditor.tsx b/apps/examples/src/examples/pdf-editor/PdfEditor.tsx index 8a56ea07f..99086838e 100644 --- a/apps/examples/src/examples/pdf-editor/PdfEditor.tsx +++ b/apps/examples/src/examples/pdf-editor/PdfEditor.tsx @@ -1,6 +1,7 @@ import { useCallback, useEffect, useMemo } from 'react' import { Box, + PORTRAIT_BREAKPOINT, SVGContainer, TLImageShape, TLShapeId, @@ -15,7 +16,6 @@ import { useBreakpoint, useEditor, } from 'tldraw' -import { PORTRAIT_BREAKPOINT } from 'tldraw/src/lib/ui/constants' import { ExportPdfButton } from './ExportPdfButton' import { Pdf } from './PdfPicker' diff --git a/apps/examples/src/examples/shape-with-migrations/ShapeWithMigrationsExample.tsx b/apps/examples/src/examples/shape-with-migrations/ShapeWithMigrationsExample.tsx index 42d72fac5..79885eb22 100644 --- a/apps/examples/src/examples/shape-with-migrations/ShapeWithMigrationsExample.tsx +++ b/apps/examples/src/examples/shape-with-migrations/ShapeWithMigrationsExample.tsx @@ -6,6 +6,8 @@ import { TLOnResizeHandler, TLStoreSnapshot, Tldraw, + createShapePropsMigrationIds, + createShapePropsMigrationSequence, resizeBox, } from 'tldraw' import 'tldraw/tldraw.css' @@ -22,6 +24,31 @@ export type IMyShape = TLBaseShape< } > +// [1] +const versions = createShapePropsMigrationIds( + // this must match the shape type in the shape definition + 'myshape', + { + AddColor: 1, + } +) + +// [2] +export const cardShapeMigrations = createShapePropsMigrationSequence({ + sequence: [ + { + id: versions.AddColor, + up(props) { + // it is safe to mutate the props object here + props.color = 'lightblue' + }, + down(props) { + delete props.color + }, + }, + ], +}) + export class MigratedShapeUtil extends BaseBoxShapeUtil { static override type = 'myshape' as const @@ -31,31 +58,8 @@ export class MigratedShapeUtil extends BaseBoxShapeUtil { color: T.string, } - // [1] - static override migrations = { - firstVersion: 0, - currentVersion: 1, - migrators: { - 1: { - up(shape: IMyShape) { - return { - ...shape, - props: { - ...shape.props, - color: 'lightblue', - }, - } - }, - down(shape: IMyShape) { - const { color: _, ...propsWithoutColor } = shape.props - return { - ...shape, - props: propsWithoutColor, - } - }, - }, - }, - } + // [3] + static override migrations = cardShapeMigrations getDefaultProps(): IMyShape['props'] { return { @@ -104,59 +108,56 @@ export default function ShapeWithMigrationsExample() { /* Introduction: -Sometimes you'll want to update the way a shape works in your application without -breaking older versions of the shape that a user may have stored or persisted in -memory. +Sometimes you'll want to update the way a shape works in your application without breaking older +versions of the shape that a user may have stored or persisted in memory. -This example shows how you can use our migrations system to upgrade (or downgrade) -user's data between different versions. Most of the code above is general "custom -shape" code—see our custom shape example for more details. +This example shows how you can use our migrations system to upgrade (or downgrade) user's data +between different versions. Most of the code above is general "custom shape" code—see our custom +shape example for more details. -[1] -To define migrations, we can override the migrations property of our shape util. Each migration -had two parts: an `up` migration and `down` migration. In this case, the `up` migration adds -the `color` prop to the shape, and the `down` migration removes it. +[1] First, we need IDs for each migration. List each change with its version number. Once you've +added a migration, it should not change again. -In some cases (mainly in multiplayer sessions) a peer or server may need to take a later -version of a shape and migrate it down to an older version—in this case, it would run the -down migrations in order to get it to the needed version. +[2] Next, we create a migration sequence. This is where we actually write our migration logic. Each +migration had three parts: an `id` (created in [1]), an `up` migration and `down` migration. In this +case, the `up` migration adds the `color` prop to the shape, and the `down` migration removes it. + +In some cases (mainly in multiplayer sessions) a peer or server may need to take a later version of +a shape and migrate it down to an older version—in this case, it would run the down migrations in +order to get it to the needed version. + +[3] Finally, we add our migrations to the ShapeUtil. This tells tldraw about the migrations so they +can be used with your shapes. How it works: -Each time the editor's store creates a snapshot (`editor.store.createSnapshot`), it -serializes all of the records (the snapshot's `store`) as well as versions of each -record that it contains (the snapshot's `scena`). When the editor loads a snapshot, -it compares its current schema with the snapshot's schema to determine which migrations -to apply to each record. +Each time the editor's store creates a snapshot (`editor.store.createSnapshot`), it serializes all +of the records (the snapshot's `store`) as well as versions of each record that it contains (the +snapshot's `scena`). When the editor loads a snapshot, it compares its current schema with the +snapshot's schema to determine which migrations to apply to each record. -In this example, we have a snapshot (snapshot.json) that we created in version 0, -however our shape now has a 'color' prop that was added in version 1. +In this example, we have a snapshot (snapshot.json) that we created in version 0, however our shape +now has a 'color' prop that was added in version 1. The snapshot looks something like this: ```json{ { - "store": { - "shape:BqG5uIAa9ig2-ukfnxwBX": { + "store": { + "shape:BqG5uIAa9ig2-ukfnxwBX": { + ..., + "props": { + "w": 300, + "h": 300 + }, + }, + }, + "schema": { + ..., + "sequences": { ..., - "props": { - "w": 300, - "h": 300 - }, - }, - "schema": { - ..., - "recordVersions": { - ..., - "shape": { - "version": 3, - "subTypeKey": "type", - "subTypeVersions": { - ..., - "myshape": 0 - } - } - } + "com.tldraw.shape.arrow": 4, + "com.tldraw.shape.myshape": 0 } } } @@ -166,9 +167,8 @@ Note that the shape in the snapshot doesn't have a 'color' prop. Note also that the schema's version for this shape is 0. -When the editor loads the snapshot, it will compare the serialzied schema's version with -its current schema's version for the shape, which is 1 as defined in our shape's migrations. -Since the serialized version is older than its current version, it will use our migration -to bring it up to date: it will run the migration's `up` function, which will add the 'color' -prop to the shape. +When the editor loads the snapshot, it will compare the serialzied schema's version with its current +schema's version for the shape, which is 1 as defined in our shape's migrations. Since the +serialized version is older than its current version, it will use our migration to bring it up to +date: it will run the migration's `up` function, which will add the 'color' prop to the shape. */ diff --git a/apps/examples/src/examples/shape-with-tldraw-styles/ShapeWithTldrawStylesExample.tsx b/apps/examples/src/examples/shape-with-tldraw-styles/ShapeWithTldrawStylesExample.tsx index 150c0b2ae..9f79f5ca5 100644 --- a/apps/examples/src/examples/shape-with-tldraw-styles/ShapeWithTldrawStylesExample.tsx +++ b/apps/examples/src/examples/shape-with-tldraw-styles/ShapeWithTldrawStylesExample.tsx @@ -8,8 +8,8 @@ import { TLDefaultColorStyle, TLDefaultSizeStyle, Tldraw, + useDefaultColorTheme, } from 'tldraw' -import { useDefaultColorTheme } from 'tldraw/src/lib/shapes/shared/ShapeFill' import 'tldraw/tldraw.css' // There's a guide at the bottom of this file! diff --git a/apps/examples/src/examples/slides/SlideShapeUtil.tsx b/apps/examples/src/examples/slides/SlideShapeUtil.tsx index 7f826024a..e2c01542b 100644 --- a/apps/examples/src/examples/slides/SlideShapeUtil.tsx +++ b/apps/examples/src/examples/slides/SlideShapeUtil.tsx @@ -8,10 +8,10 @@ import { T, TLBaseShape, TLOnResizeHandler, + getPerfectDashProps, resizeBox, useValue, } from 'tldraw' -import { getPerfectDashProps } from 'tldraw/src/lib/shapes/shared/getPerfectDashProps' import { moveToSlide, useSlides } from './useSlides' export type SlideShape = TLBaseShape< diff --git a/apps/examples/src/examples/speech-bubble/SpeechBubble/SpeechBubbleUtil.tsx b/apps/examples/src/examples/speech-bubble/SpeechBubble/SpeechBubbleUtil.tsx index 7d63acdc3..1c0d3e1f0 100644 --- a/apps/examples/src/examples/speech-bubble/SpeechBubble/SpeechBubbleUtil.tsx +++ b/apps/examples/src/examples/speech-bubble/SpeechBubble/SpeechBubbleUtil.tsx @@ -22,9 +22,9 @@ import { ZERO_INDEX_KEY, resizeBox, structuredClone, + useDefaultColorTheme, vecModelValidator, } from 'tldraw' -import { useDefaultColorTheme } from 'tldraw/src/lib/shapes/shared/ShapeFill' import { getSpeechBubbleVertices, getTailIntersectionPoint } from './helpers' // Copied from tldraw/tldraw diff --git a/apps/examples/src/misc/EndToEndApi.tsx b/apps/examples/src/misc/EndToEndApi.tsx index 42f2eabab..b5a6e60a9 100644 --- a/apps/examples/src/misc/EndToEndApi.tsx +++ b/apps/examples/src/misc/EndToEndApi.tsx @@ -1,4 +1,4 @@ -import { TLExportType } from 'tldraw/src/lib/utils/export/exportAs' +import { TLExportType } from 'tldraw' export interface EndToEndApi { exportAsSvg: () => void diff --git a/apps/vscode/editor/src/app.tsx b/apps/vscode/editor/src/app.tsx index 1b6195d01..be1bc9261 100644 --- a/apps/vscode/editor/src/app.tsx +++ b/apps/vscode/editor/src/app.tsx @@ -1,6 +1,3 @@ -// eslint-disable-next-line import/no-internal-modules -import 'tldraw/tldraw.css' -// eslint-disable-next-line import/no-internal-modules import { getAssetUrlsByImport } from '@tldraw/assets/imports' import { useCallback, useEffect, useMemo, useState } from 'react' import { @@ -13,6 +10,7 @@ import { TldrawUiMenuGroup, setRuntimeOverrides, } from 'tldraw' +import 'tldraw/tldraw.css' import { VscodeMessage } from '../../messages' import '../public/index.css' import { ChangeResponder } from './ChangeResponder' diff --git a/packages/tldraw/api-report.md b/packages/tldraw/api-report.md index d48e31f58..a5a6b46d1 100644 --- a/packages/tldraw/api-report.md +++ b/packages/tldraw/api-report.md @@ -63,6 +63,8 @@ import { TLCancelEvent } from '@tldraw/editor'; import { TLClickEvent } from '@tldraw/editor'; import { TLClickEventInfo } from '@tldraw/editor'; import { TLDefaultColorTheme } from '@tldraw/editor'; +import { TLDefaultColorThemeColor } from '@tldraw/editor'; +import { TLDefaultDashStyle } from '@tldraw/editor'; import { TLDefaultFillStyle } from '@tldraw/editor'; import { TLDefaultFontStyle } from '@tldraw/editor'; import { TLDefaultHorizontalAlignStyle } from '@tldraw/editor'; @@ -372,6 +374,9 @@ export function DefaultDebugMenu({ children }: TLUiDebugMenuProps): JSX_2.Elemen // @public (undocumented) export function DefaultDebugMenuContent(): JSX_2.Element; +// @public (undocumented) +export let defaultEditorAssetUrls: TLEditorAssetUrls; + // @public (undocumented) export function DefaultHelperButtons({ children }: TLUiHelperButtonsProps): JSX_2.Element; @@ -835,6 +840,19 @@ export function getEmbedInfo(inputUrl: string): TLEmbedResult; // @public (undocumented) export function getOccludedChildren(editor: Editor, parent: TLShape): TLShapeId[]; +// @public (undocumented) +export function getPerfectDashProps(totalLength: number, strokeWidth: number, opts?: Partial<{ + closed: boolean; + end: 'none' | 'outset' | 'skip'; + lengthRatio: number; + snap: number; + start: 'none' | 'outset' | 'skip'; + style: TLDefaultDashStyle; +}>): { + strokeDasharray: string; + strokeDashoffset: string; +}; + // @public (undocumented) export function getSvgAsImage(svgString: string, isSafari: boolean, options: { height: number; @@ -1216,6 +1234,26 @@ export function parseTldrawJsonFile({ json, schema, }: { // @public (undocumented) export function PasteMenuItem(): JSX_2.Element; +// @public (undocumented) +export enum PORTRAIT_BREAKPOINT { + // (undocumented) + DESKTOP = 7, + // (undocumented) + MOBILE = 4, + // (undocumented) + MOBILE_SM = 3, + // (undocumented) + MOBILE_XS = 2, + // (undocumented) + MOBILE_XXS = 1, + // (undocumented) + TABLET = 6, + // (undocumented) + TABLET_SM = 5, + // (undocumented) + ZERO = 0 +} + // @public (undocumented) export function PreferencesGroup(): JSX_2.Element; @@ -1720,6 +1758,9 @@ export type TldrawUiProps = Expand; +// @public (undocumented) +export type TLExportType = 'jpeg' | 'json' | 'png' | 'svg' | 'webp'; + // @public (undocumented) export interface TLUiActionItem { // (undocumented) @@ -2486,6 +2527,27 @@ export function useCopyAs(): (ids: TLShapeId[], format?: TLCopyType) => void; // @public (undocumented) export const useCurrentTranslation: () => TLUiTranslation; +// @public (undocumented) +export function useDefaultColorTheme(): { + "light-blue": TLDefaultColorThemeColor; + "light-green": TLDefaultColorThemeColor; + "light-red": TLDefaultColorThemeColor; + "light-violet": TLDefaultColorThemeColor; + background: string; + black: TLDefaultColorThemeColor; + blue: TLDefaultColorThemeColor; + green: TLDefaultColorThemeColor; + grey: TLDefaultColorThemeColor; + id: "dark" | "light"; + orange: TLDefaultColorThemeColor; + red: TLDefaultColorThemeColor; + solid: string; + text: string; + violet: TLDefaultColorThemeColor; + white: TLDefaultColorThemeColor; + yellow: TLDefaultColorThemeColor; +}; + // @public (undocumented) export function useDefaultHelpers(): { addDialog: (dialog: Omit & { diff --git a/packages/tldraw/api/api.json b/packages/tldraw/api/api.json index 1210a98fc..63e0a868f 100644 --- a/packages/tldraw/api/api.json +++ b/packages/tldraw/api/api.json @@ -3358,6 +3358,30 @@ "parameters": [], "name": "DefaultDebugMenuContent" }, + { + "kind": "Variable", + "canonicalReference": "tldraw!defaultEditorAssetUrls:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultEditorAssetUrls: " + }, + { + "kind": "Reference", + "text": "TLEditorAssetUrls", + "canonicalReference": "tldraw!~TLEditorAssetUrls:type" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/static-assets/assetUrls.ts", + "isReadonly": false, + "releaseTag": "Public", + "name": "defaultEditorAssetUrls", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, { "kind": "Function", "canonicalReference": "tldraw!DefaultHelperButtons:function(1)", @@ -6450,7 +6474,7 @@ { "kind": "Reference", "text": "TLExportType", - "canonicalReference": "tldraw!~TLExportType:type" + "canonicalReference": "tldraw!TLExportType:type" }, { "kind": "Content", @@ -9202,6 +9226,97 @@ ], "name": "getOccludedChildren" }, + { + "kind": "Function", + "canonicalReference": "tldraw!getPerfectDashProps:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getPerfectDashProps(totalLength: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", strokeWidth: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n closed: boolean;\n end: 'none' | 'outset' | 'skip';\n lengthRatio: number;\n snap: number;\n start: 'none' | 'outset' | 'skip';\n style: " + }, + { + "kind": "Reference", + "text": "TLDefaultDashStyle", + "canonicalReference": "@tldraw/tlschema!TLDefaultDashStyle:type" + }, + { + "kind": "Content", + "text": ";\n}>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n strokeDasharray: string;\n strokeDashoffset: string;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/getPerfectDashProps.ts", + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "totalLength", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "strokeWidth", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "isOptional": true + } + ], + "name": "getPerfectDashProps" + }, { "kind": "Function", "canonicalReference": "tldraw!getSvgAsImage:function(1)", @@ -13950,6 +14065,191 @@ "parameters": [], "name": "PasteMenuItem" }, + { + "kind": "Enum", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT:enum", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum PORTRAIT_BREAKPOINT " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/constants.ts", + "releaseTag": "Public", + "name": "PORTRAIT_BREAKPOINT", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.DESKTOP:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "DESKTOP = " + }, + { + "kind": "Content", + "text": "7" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "DESKTOP" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.MOBILE:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "MOBILE = " + }, + { + "kind": "Content", + "text": "4" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "MOBILE" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.MOBILE_SM:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "MOBILE_SM = " + }, + { + "kind": "Content", + "text": "3" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "MOBILE_SM" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.MOBILE_XS:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "MOBILE_XS = " + }, + { + "kind": "Content", + "text": "2" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "MOBILE_XS" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.MOBILE_XXS:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "MOBILE_XXS = " + }, + { + "kind": "Content", + "text": "1" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "MOBILE_XXS" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.TABLET:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "TABLET = " + }, + { + "kind": "Content", + "text": "6" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "TABLET" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.TABLET_SM:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "TABLET_SM = " + }, + { + "kind": "Content", + "text": "5" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "TABLET_SM" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.ZERO:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "ZERO = " + }, + { + "kind": "Content", + "text": "0" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "ZERO" + } + ] + }, { "kind": "Function", "canonicalReference": "tldraw!PreferencesGroup:function(1)", @@ -19960,6 +20260,32 @@ "endIndex": 7 } }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLExportType:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLExportType = " + }, + { + "kind": "Content", + "text": "'jpeg' | 'json' | 'png' | 'svg' | 'webp'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/export/exportAs.ts", + "releaseTag": "Public", + "name": "TLExportType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, { "kind": "Interface", "canonicalReference": "tldraw!TLUiActionItem:interface", @@ -27339,6 +27665,151 @@ "parameters": [], "name": "useCurrentTranslation" }, + { + "kind": "Function", + "canonicalReference": "tldraw!useDefaultColorTheme:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useDefaultColorTheme(): " + }, + { + "kind": "Content", + "text": "{\n \"light-blue\": import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n \"light-green\": import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n \"light-red\": import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n \"light-violet\": import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n background: string;\n black: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n blue: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n green: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n grey: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n id: \"dark\" | \"light\";\n orange: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n red: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n solid: string;\n text: string;\n violet: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n white: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n yellow: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/ShapeFill.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 28 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useDefaultColorTheme" + }, { "kind": "Function", "canonicalReference": "tldraw!useDefaultHelpers:function(1)", @@ -27625,7 +28096,7 @@ { "kind": "Reference", "text": "TLExportType", - "canonicalReference": "tldraw!~TLExportType:type" + "canonicalReference": "tldraw!TLExportType:type" }, { "kind": "Content", diff --git a/packages/tldraw/src/index.ts b/packages/tldraw/src/index.ts index 6f37098e5..03e5643ab 100644 --- a/packages/tldraw/src/index.ts +++ b/packages/tldraw/src/index.ts @@ -32,7 +32,9 @@ export { LineShapeTool } from './lib/shapes/line/LineShapeTool' export { LineShapeUtil } from './lib/shapes/line/LineShapeUtil' export { NoteShapeTool } from './lib/shapes/note/NoteShapeTool' export { NoteShapeUtil } from './lib/shapes/note/NoteShapeUtil' +export { useDefaultColorTheme } from './lib/shapes/shared/ShapeFill' export { TextLabel } from './lib/shapes/shared/TextLabel' +export { getPerfectDashProps } from './lib/shapes/shared/getPerfectDashProps' export { TextShapeTool } from './lib/shapes/text/TextShapeTool' export { TextShapeUtil } from './lib/shapes/text/TextShapeUtil' export { VideoShapeUtil } from './lib/shapes/video/VideoShapeUtil' @@ -48,6 +50,7 @@ export { TldrawUi, type TldrawUiBaseProps, type TldrawUiProps } from './lib/ui/T export { setDefaultUiAssetUrls, type TLUiAssetUrlOverrides } from './lib/ui/assetUrls' export { OfflineIndicator } from './lib/ui/components/OfflineIndicator/OfflineIndicator' export { Spinner } from './lib/ui/components/Spinner' +export { PORTRAIT_BREAKPOINT } from './lib/ui/constants' export { TldrawUiContextProvider, type TldrawUiContextProviderProps, @@ -115,9 +118,12 @@ export { export { getEmbedInfo } from './lib/utils/embeds/embeds' export { copyAs } from './lib/utils/export/copyAs' export { exportToBlob, getSvgAsImage } from './lib/utils/export/export' -export { exportAs } from './lib/utils/export/exportAs' +export { exportAs, type TLExportType } from './lib/utils/export/exportAs' export { fitFrameToContent, removeFrame } from './lib/utils/frames/frames' -export { setDefaultEditorAssetUrls } from './lib/utils/static-assets/assetUrls' +export { + defaultEditorAssetUrls, + setDefaultEditorAssetUrls, +} from './lib/utils/static-assets/assetUrls' export { truncateStringWithEllipsis } from './lib/utils/text/text' export { buildFromV1Document, diff --git a/packages/tldraw/src/lib/shapes/shared/ShapeFill.tsx b/packages/tldraw/src/lib/shapes/shared/ShapeFill.tsx index abf831b0e..dfc58ae3e 100644 --- a/packages/tldraw/src/lib/shapes/shared/ShapeFill.tsx +++ b/packages/tldraw/src/lib/shapes/shared/ShapeFill.tsx @@ -18,6 +18,7 @@ export interface ShapeFillProps { theme: TLDefaultColorTheme } +/** @public */ export function useDefaultColorTheme() { return getDefaultColorTheme({ isDarkMode: useIsDarkMode() }) } diff --git a/packages/tldraw/src/lib/shapes/shared/getPerfectDashProps.ts b/packages/tldraw/src/lib/shapes/shared/getPerfectDashProps.ts index ecac502fa..d3a36eeeb 100644 --- a/packages/tldraw/src/lib/shapes/shared/getPerfectDashProps.ts +++ b/packages/tldraw/src/lib/shapes/shared/getPerfectDashProps.ts @@ -1,5 +1,6 @@ import { TLDefaultDashStyle } from '@tldraw/editor' +/** @public */ export function getPerfectDashProps( totalLength: number, strokeWidth: number, diff --git a/packages/tldraw/src/lib/ui/constants.ts b/packages/tldraw/src/lib/ui/constants.ts index 2cd8056e5..f39bbafbf 100644 --- a/packages/tldraw/src/lib/ui/constants.ts +++ b/packages/tldraw/src/lib/ui/constants.ts @@ -2,6 +2,7 @@ export const PORTRAIT_BREAKPOINTS = [0, 390, 428, 468, 580, 640, 840, 1023] // Mapping for above array -- needs to be kept in sync! +/** @public */ export enum PORTRAIT_BREAKPOINT { ZERO = 0, MOBILE_XXS = 1, diff --git a/packages/tlschema/api-report.md b/packages/tlschema/api-report.md index 86936de6c..ef8fe79b8 100644 --- a/packages/tlschema/api-report.md +++ b/packages/tlschema/api-report.md @@ -142,6 +142,11 @@ export const createPresenceStateDerivation: ($user: Signal<{ // @public (undocumented) export function createShapeId(id?: string): TLShapeId; +// @public (undocumented) +export function createShapePropsMigrationIds>(shapeType: S, ids: T): { + [k in keyof T]: `com.tldraw.shape.${S}/${T[k]}`; +}; + // @public (undocumented) export function createShapePropsMigrationSequence(migrations: TLShapePropsMigrations): TLShapePropsMigrations; diff --git a/packages/tlschema/api/api.json b/packages/tlschema/api/api.json index 94c56e457..1aa0ca10f 100644 --- a/packages/tlschema/api/api.json +++ b/packages/tlschema/api/api.json @@ -1114,6 +1114,112 @@ ], "name": "createShapeId" }, + { + "kind": "Function", + "canonicalReference": "@tldraw/tlschema!createShapePropsMigrationIds:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function createShapePropsMigrationIds" + }, + { + "kind": "Content", + "text": ">(shapeType: " + }, + { + "kind": "Content", + "text": "S" + }, + { + "kind": "Content", + "text": ", ids: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n [k in keyof T]: `com.tldraw.shape.${S}/${T[k]}`;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "shapeType", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "ids", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "S", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "createShapePropsMigrationIds" + }, { "kind": "Function", "canonicalReference": "@tldraw/tlschema!createShapePropsMigrationSequence:function(1)", diff --git a/packages/tlschema/src/index.ts b/packages/tlschema/src/index.ts index a4c61e4d7..fde1f809a 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, + createShapePropsMigrationIds, createShapePropsMigrationSequence, getShapePropKeysByStyle, isShape, diff --git a/scripts/lib/eslint-plugin.ts b/scripts/lib/eslint-plugin.ts index 389ddb82e..83946e268 100644 --- a/scripts/lib/eslint-plugin.ts +++ b/scripts/lib/eslint-plugin.ts @@ -59,4 +59,48 @@ exports.rules = { }, defaultOptions: [], }), + 'no-internal-imports': ESLintUtils.RuleCreator.withoutDocs({ + create(context) { + return { + ImportDeclaration(node) { + const path = node.source.value + + const parts = path.split('/') + + switch (parts[0]) { + case 'tldraw': + // 'tldraw' + if (parts.length === 1) return + // 'tldraw/**/*.css' + if (path.endsWith('.css')) return + break + case '@tldraw': + // '@tldraw/*' + if (parts.length === 2) return + // '@tldraw/**/*.css' + if (path.endsWith('.css')) return + // '@tldraw/assets/*' + if (parts[1] === 'assets' && parts.length === 3) return + break + default: + return + } + + context.report({ + messageId: 'internal', + node: node.source, + data: { path }, + }) + }, + } + }, + meta: { + messages: { + internal: "Don't import from internal tldraw source ({{path}})", + }, + type: 'problem', + schema: [], + }, + defaultOptions: [], + }), } From 59b7c2527069a0762817c05875a86c320b0a4b86 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 24 Apr 2024 16:52:57 +0100 Subject: [PATCH 02/15] Fix patch release script (#3597) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We upgraded our version of `tar`, but forgot to update this import. This fixes that. ### Change Type - [x] `internal` — Does not affect user-facing stuff - [x] `bugfix` — Bug fix --- scripts/lib/didAnyPackageChange.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/didAnyPackageChange.ts b/scripts/lib/didAnyPackageChange.ts index ce20bba0f..95eba281e 100644 --- a/scripts/lib/didAnyPackageChange.ts +++ b/scripts/lib/didAnyPackageChange.ts @@ -1,5 +1,5 @@ import { writeFileSync } from 'fs' -import tar from 'tar' +import * as tar from 'tar' import tmp from 'tmp' import { exec } from './exec' import { PackageDetails, getAllPackageDetails } from './publishing' From c9b7d328fe9ffefcfc804d5499d34fbcdca5c100 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 24 Apr 2024 16:58:26 +0100 Subject: [PATCH 03/15] Don't check api.json files into git (#3565) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These were needed when the docs lived in a different repo, but they don't any more so we can get rid of them. ### Change Type - [x] `internal` — Does not affect user-facing stuff - [x] `chore` — Updating dependencies, other boring stuff --- .gitignore | 3 + .husky/pre-commit | 1 - apps/docs/api/editor.api.json | 50904 ---------------- apps/docs/api/store.api.json | 5854 -- apps/docs/api/tldraw.api.json | 29539 --------- apps/docs/api/tlschema.api.json | 9998 --- apps/docs/api/validate.api.json | 5017 -- .../getting-started/releases-versioning.mdx | 668 + apps/docs/content/releases/v2.0.0.mdx | 24 - apps/docs/content/releases/v2.0.1.mdx | 24 - apps/docs/content/releases/v2.0.2.mdx | 26 - apps/docs/package.json | 4 +- apps/docs/scripts/functions/connect.ts | 6 +- apps/docs/scripts/functions/refreshContent.ts | 2 +- apps/docs/scripts/reset-db.ts | 2 +- apps/docs/utils/ContentDatabase.ts | 6 +- apps/docs/utils/ContentVectorDatabase.ts | 2 +- lazy.config.ts | 1 + lerna.json | 4 +- packages/editor/api/api.json | 50904 ---------------- packages/namespaced-tldraw/api/api.json | 177 - packages/state/api/api.json | 3140 - packages/store/api/api.json | 5854 -- packages/tldraw/api/api.json | 30010 --------- packages/tlschema/api/api.json | 10104 --- packages/utils/api/api.json | 3414 -- packages/validate/api/api.json | 5017 -- scripts/vercel/build-docs.sh | 1 + 28 files changed, 687 insertions(+), 210019 deletions(-) delete mode 100644 apps/docs/api/editor.api.json delete mode 100644 apps/docs/api/store.api.json delete mode 100644 apps/docs/api/tldraw.api.json delete mode 100644 apps/docs/api/tlschema.api.json delete mode 100644 apps/docs/api/validate.api.json delete mode 100644 apps/docs/content/releases/v2.0.0.mdx delete mode 100644 apps/docs/content/releases/v2.0.1.mdx delete mode 100644 apps/docs/content/releases/v2.0.2.mdx delete mode 100644 packages/editor/api/api.json delete mode 100644 packages/namespaced-tldraw/api/api.json delete mode 100644 packages/state/api/api.json delete mode 100644 packages/store/api/api.json delete mode 100644 packages/tldraw/api/api.json delete mode 100644 packages/tlschema/api/api.json delete mode 100644 packages/utils/api/api.json delete mode 100644 packages/validate/api/api.json diff --git a/.gitignore b/.gitignore index e7979e574..cf55eb9ab 100644 --- a/.gitignore +++ b/.gitignore @@ -74,6 +74,7 @@ apps/examples/www/translations !.yarn/versions packages/*/api/temp +packages/*/api/api.json packages/*/api/internal.d.ts packages/*/api/public.d.ts @@ -87,6 +88,8 @@ apps/examples/e2e/test-results apps/examples/playwright-report apps/docs/content/gen +apps/docs/content/releases +apps/docs/api .dev.vars .env.local diff --git a/.husky/pre-commit b/.husky/pre-commit index 89e26cc81..58cc5d090 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -4,5 +4,4 @@ yarn install --immutable npx lazy run build-api git add packages/*/api-report.md -git add packages/*/api/api.json npx lint-staged diff --git a/apps/docs/api/editor.api.json b/apps/docs/api/editor.api.json deleted file mode 100644 index 39c886c37..000000000 --- a/apps/docs/api/editor.api.json +++ /dev/null @@ -1,50904 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.43.1", - "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 end: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "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", - "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": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "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": "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 isFilled: boolean;\n radius: number;\n x?: number;\n y?: 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!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 isFilled: boolean;\n radius: number;\n x?: number;\n y?: 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!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": ", 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!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 setUserPreferences?: ((userPreferences: " - }, - { - "kind": "Reference", - "text": "TLUserPreferences", - "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" - }, - { - "kind": "Content", - "text": ") => void) | 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}" - }, - { - "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 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 start: " - }, - { - "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": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "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": "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!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 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", - "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 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", - "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 end: " - }, - { - "kind": "Reference", - "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 }" - }, - { - "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": ", 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": "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.\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.deleteShape(shape.id)\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": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCollaborators:member(1)", - "docComment": "/**\n * Returns a list of presence records for all peer collaborators. This will return the latest presence record for each connected user.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCollaborators(): " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/tlschema\")." - }, - { - "kind": "Reference", - "text": "TLInstancePresence", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCollaborators" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCollaboratorsOnCurrentPage:member(1)", - "docComment": "/**\n * Returns a list of presence records for all peer collaborators on the current page. This will return the latest presence record for each connected user.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCollaboratorsOnCurrentPage(): " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/tlschema\")." - }, - { - "kind": "Reference", - "text": "TLInstancePresence", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCollaboratorsOnCurrentPage" - }, - { - "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#getCulledShapes:member(1)", - "docComment": "/**\n * Get culled shapes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCulledShapes(): " - }, - { - "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": "getCulledShapes" - }, - { - "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.getIsMenuOpen()\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#getOnlySelectedShapeId:member(1)", - "docComment": "/**\n * The id of 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's id.\n *\n * @public @readonly\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getOnlySelectedShapeId(): " - }, - { - "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": "getOnlySelectedShapeId" - }, - { - "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#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 backgroundIndex: number;\n id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n index: number;\n opacity: number;\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 }[]" - }, - { - "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 filter?: ((shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "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", - "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 hitInside?: boolean | undefined;\n margin?: number | 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} or {@link Editor.getSvgElement} 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#getSvgElement:member(1)", - "docComment": "/**\n * Get an exported SVG element 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": "getSvgElement(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 height: number;\n svg: " - }, - { - "kind": "Reference", - "text": "SVGSVGElement", - "canonicalReference": "!SVGSVGElement:interface" - }, - { - "kind": "Content", - "text": ";\n width: number;\n } | 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": "getSvgElement" - }, - { - "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 height: number;\n svg: string;\n width: 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 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", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n originPagePoint: " - }, - { - "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 currentPagePoint: " - }, - { - "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 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", - "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#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 hitInside?: boolean | undefined;\n margin?: number | 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 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 preserveIds?: boolean;\n preservePosition?: boolean;\n select?: 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 direction: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n friction: number;\n speed: 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 inset?: number;\n targetZoom?: 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 height: number;\n width: 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 height: number;\n width: 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": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "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": "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 direction: 'horizontal' | 'vertical';\n gaps: " - }, - { - "kind": "Reference", - "text": "Array", - "canonicalReference": "!Array:interface" - }, - { - "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 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 }>;\n id: string;\n type: 'gaps';\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 end: " - }, - { - "kind": "Reference", - "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}" - }, - { - "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 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", - "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 mid: number;\n min: 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 rotation: number;\n scaleX: number;\n scaleY: number;\n x: number;\n y: 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 rotation: number;\n scaleX: number;\n scaleY: number;\n x: number;\n y: 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 rotation: number;\n scaleX: number;\n scaleY: number;\n x: number;\n y: 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, cx: number, cy: number): " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": ";\n (x: number, y: 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 points: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[];\n type: 'points';\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!polygonIntersectsPolyline:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function polygonIntersectsPolyline(polygon: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", polyline: " - }, - { - "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": "polygon", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "polyline", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "polygonIntersectsPolyline" - }, - { - "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": ", 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": "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 height: number;\n width: number;\n x?: number;\n y?: 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 handle: " - }, - { - "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 initialShape: " - }, - { - "kind": "Reference", - "text": "TLBaseBoxShape", - "canonicalReference": "@tldraw/editor!TLBaseBoxShape:type" - }, - { - "kind": "Content", - "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", - "text": ", opts?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n maxHeight: number;\n maxWidth: number;\n minHeight: number;\n minWidth: number;\n}>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n props: {\n h: number;\n w: number;\n };\n x: number;\n y: number;\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 maxHeight: number;\n maxWidth: number;\n minHeight: number;\n minWidth: 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 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", - "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 hardReset: () => void;\n openWindow: (url: string, target: string) => void;\n refreshPage: () => 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) => 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 * @example\n * ```ts\n * onDragShapesOver = (shape, shapes) => {\n * \tthis.editor.reparentShapes(shapes, shape.id)\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 store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";\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": "Variable", - "canonicalReference": "@tldraw/editor!SIDES:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "SIDES: " - }, - { - "kind": "Content", - "text": "readonly [\"top\", \"right\", \"bottom\", \"left\"]" - } - ], - "fileUrlPath": "packages/editor/src/lib/constants.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "SIDES", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "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 height: number;\n width: 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 height: number;\n width: 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 bodyArc: " - }, - { - "kind": "Reference", - "text": "TLArcInfo", - "canonicalReference": "@tldraw/editor!TLArcInfo:interface" - }, - { - "kind": "Content", - "text": ";\n end: " - }, - { - "kind": "Reference", - "text": "TLArrowPoint", - "canonicalReference": "@tldraw/editor!TLArrowPoint:type" - }, - { - "kind": "Content", - "text": ";\n handleArc: " - }, - { - "kind": "Reference", - "text": "TLArcInfo", - "canonicalReference": "@tldraw/editor!TLArcInfo:interface" - }, - { - "kind": "Content", - "text": ";\n isStraight: false;\n isValid: boolean;\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} | {\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", - "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 arrowhead: " - }, - { - "kind": "Reference", - "text": "TLArrowShapeArrowheadStyle", - "canonicalReference": "@tldraw/tlschema!TLArrowShapeArrowheadStyle:type" - }, - { - "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}" - }, - { - "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 className?: string;\n color?: string;\n opacity?: number;\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 name: 'cancel';\n type: 'misc';\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 button: number;\n name: " - }, - { - "kind": "Reference", - "text": "TLCLickEventName", - "canonicalReference": "@tldraw/editor!TLCLickEventName:type" - }, - { - "kind": "Content", - "text": ";\n phase: 'down' | 'settle' | 'up';\n point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n pointerId: number;\n type: 'click';\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 color: string;\n opacity?: number;\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}" - }, - { - "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 preservesRedoStack?: boolean;\n data: Data;\n name: Name;\n type: 'command';\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 squash?: (prevData: Data, nextData: Data) => Data;\n do: (data: Data) => void;\n redo?: (data: Data) => void;\n undo: (data: Data) => void;\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 preservesRedoStack: boolean;\n squashing: boolean;\n ephemeral: 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 name: 'complete';\n type: 'misc';\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 chatMessage: string;\n className?: string;\n color?: string;\n name: null | string;\n point: null | " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n zoom: number;\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 defaultName?: string;\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 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", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", - "releaseTag": "Public", - "name": "TldrawEditorProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 19 - } - }, - { - "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 markId?: string;\n reason: 'bail';\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 count: number;\n name: string;\n pageId: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";\n }]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"max-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#\"select-all-text\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'select-all-text': " - }, - { - "kind": "Content", - "text": "[{\n shapeId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n }]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"select-all-text\"", - "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 file: " - }, - { - "kind": "Reference", - "text": "File", - "canonicalReference": "!File:interface" - }, - { - "kind": "Content", - "text": ";\n type: 'file';\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 point?: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n sources?: " - }, - { - "kind": "Reference", - "text": "TLExternalContentSource", - "canonicalReference": "@tldraw/editor!TLExternalContentSource:type" - }, - { - "kind": "Content", - "text": "[];\n} & ({\n embed: " - }, - { - "kind": "Reference", - "text": "EmbedDefinition", - "canonicalReference": "@tldraw/tlschema!EmbedDefinition:type" - }, - { - "kind": "Content", - "text": ";\n type: 'embed';\n url: string;\n} | {\n files: " - }, - { - "kind": "Reference", - "text": "File", - "canonicalReference": "!File:interface" - }, - { - "kind": "Content", - "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", - "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 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", - "text": "TLContent", - "canonicalReference": "@tldraw/editor!TLContent:interface" - }, - { - "kind": "Content", - "text": ";\n type: 'tldraw';\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 size: number;\n x: number;\n y: number;\n z: 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 className?: string;\n handle: " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": ";\n isCoarse: boolean;\n shapeId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n zoom: number;\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 id: string;\n onRedo: boolean;\n onUndo: boolean;\n type: 'STOP';\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!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 name: 'interrupt';\n type: 'misc';\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 code: string;\n key: string;\n name: " - }, - { - "kind": "Reference", - "text": "TLKeyboardEventName", - "canonicalReference": "@tldraw/editor!TLKeyboardEventName:type" - }, - { - "kind": "Content", - "text": ";\n type: 'keyboard';\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 initial?: T | undefined;\n isPrecise: boolean;\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 delta: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\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 type: 'pinch';\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 button: number;\n isPen: boolean;\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 type: 'pointer';\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 handle: " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": ";\n shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "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", - "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 handle: " - }, - { - "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 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", - "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 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 initialPageTransform: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": ";\n initialShape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ";\n mode: " - }, - { - "kind": "Reference", - "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}>" - }, - { - "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 initialCursorAngle: number;\n initialSelectionRotation: number;\n selectionPageCenter: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "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 }[];\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 className?: string;\n color?: string;\n opacity?: number;\n scribble: " - }, - { - "kind": "Reference", - "text": "TLScribble", - "canonicalReference": "@tldraw/tlschema!TLScribble:type" - }, - { - "kind": "Content", - "text": ";\n zoom: number;\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 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", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";\n selectedShapeIds: " - }, - { - "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 className?: string;\n color?: string | undefined;\n hidden?: boolean;\n opacity?: number;\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/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": "MigrationSequence", - "canonicalReference": "@tldraw/store!MigrationSequence: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": 6 - } - }, - { - "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 defaultName?: string;\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} & ({\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", - "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})" - }, - { - "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 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", - "text": "Error", - "canonicalReference": "!Error:interface" - }, - { - "kind": "Content", - "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", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";\n} | {\n readonly error?: undefined;\n readonly status: 'synced-local';\n readonly store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";\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 background: boolean;\n bounds: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";\n darkMode?: boolean;\n padding: number;\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 scale: number;\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 delta: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n name: 'wheel';\n point: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n type: 'wheel';\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 [n: number]: T;\n readonly length: number;\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 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 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 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: " - }, - { - "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 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 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 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 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", - "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 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 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 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 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 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", - "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": 86 - }, - "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.DistMin:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static DistMin(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": ", n: " - }, - { - "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": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "DistMin" - }, - { - "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 deleted file mode 100644 index 59d4cc8bf..000000000 --- a/apps/docs/api/store.api.json +++ /dev/null @@ -1,5854 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.43.1", - "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": "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 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)", - "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 scope: " - }, - { - "kind": "Reference", - "text": "RecordScope", - "canonicalReference": "@tldraw/store!~RecordScope:type" - }, - { - "kind": "Content", - "text": ";\n validator?: " - }, - { - "kind": "Reference", - "text": "StoreValidator", - "canonicalReference": "@tldraw/store!StoreValidator: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 currentVersion?: number;\n firstVersion?: 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 down: (newState: After) => Before;\n up: (oldState: Before) => After;\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 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", - "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 reason: " - }, - { - "kind": "Reference", - "text": "MigrationFailureReason", - "canonicalReference": "@tldraw/store!MigrationFailureReason:enum" - }, - { - "kind": "Content", - "text": ";\n type: 'error';\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 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: " - }, - { - "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}" - }, - { - "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 scope?: " - }, - { - "kind": "Reference", - "text": "RecordScope", - "canonicalReference": "@tldraw/store!~RecordScope:type" - }, - { - "kind": "Content", - "text": ";\n readonly validator?: " - }, - { - "kind": "Reference", - "text": "StoreValidator", - "canonicalReference": "@tldraw/store!StoreValidator: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 version: number;\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]: 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", - "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 schema: " - }, - { - "kind": "Reference", - "text": "StoreSchema", - "canonicalReference": "@tldraw/store!StoreSchema:class" - }, - { - "kind": "Content", - "text": ";\n initialData?: " - }, - { - "kind": "Reference", - "text": "SerializedStore", - "canonicalReference": "@tldraw/store!SerializedStore:type" - }, - { - "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 removed: { [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 } | 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 isExistingValidationIssue: boolean;\n phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord';\n recordAfter: unknown;\n recordBefore?: unknown;\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 createIntegrityChecker?: (store: " - }, - { - "kind": "Reference", - "text": "Store", - "canonicalReference": "@tldraw/store!Store:class" - }, - { - "kind": "Content", - "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", - "text": "Store", - "canonicalReference": "@tldraw/store!Store:class" - }, - { - "kind": "Content", - "text": ";\n }) => R;\n migrations?: " - }, - { - "kind": "Reference", - "text": "MigrationSequence", - "canonicalReference": "@tldraw/store!MigrationSequence:interface" - }, - { - "kind": "Content", - "text": "[];\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 schema: " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:type" - }, - { - "kind": "Content", - "text": ";\n store: " - }, - { - "kind": "Reference", - "text": "SerializedStore", - "canonicalReference": "@tldraw/store!SerializedStore: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 deleted file mode 100644 index 9298e6b7a..000000000 --- a/apps/docs/api/tldraw.api.json +++ /dev/null @@ -1,29539 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.43.1", - "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 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 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 bend: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "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 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 boundShapeId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n normalizedAnchor: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n type: \"binding\";\n }>;\n point: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "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", - "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 boundShapeId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n normalizedAnchor: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n type: \"binding\";\n }>;\n point: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"point\";\n x: number;\n y: number;\n }>;\n }, never>;\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": 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 assetId: " - }, - { - "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 w: " - }, - { - "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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n forceMobile?: boolean;\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 quality?: number | undefined;\n type?: string | 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 dash: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n fill: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n isClosed: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\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 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", - "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 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 w: 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 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}" - }, - { - "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 body?: string;\n cancel?: string;\n confirm?: string;\n displayDontShowAgain?: boolean;\n onCancel: () => void;\n onContinue: () => void;\n title?: string;\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 format: 'jpeg' | 'json' | 'png' | 'svg' | 'webp';\n ids: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[];\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": "[]) => void" - }, - { - "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.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "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 w: 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 id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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 id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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 id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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: \"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", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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 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 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 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 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 growY: 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 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", - "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 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", - "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!getOccludedChildren:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getOccludedChildren(editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ", parent: " - }, - { - "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": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/tools/SelectTool/selectHelpers.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "editor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "parent", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "getOccludedChildren" - }, - { - "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 height: number;\n quality: number;\n scale: number;\n type: 'jpeg' | 'png' | 'webp';\n width: 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 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 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", - "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 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 bottomRight: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n topLeft: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "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", - "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 points: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "DictValidator", - "canonicalReference": "@tldraw/validate!DictValidator: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 spline: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"cubic\" | \"line\">;\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": "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!NoteShapeUtil#getHandles:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHandles(shape: " - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape: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!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 id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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 id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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 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 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 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", - "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 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", - "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 verticalAlign: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end\" | \"middle\" | \"start\">;\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!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 id: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";\n isCurrentPage: boolean;\n name: string;\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 json: string;\n schema: " - }, - { - "kind": "Reference", - "text": "TLSchema", - "canonicalReference": "@tldraw/tlschema!TLSchema:type" - }, - { - "kind": "Content", - "text": ";\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 - tldraw 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 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", - "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 id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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 id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n props: {\n autoSize: boolean;\n scale?: undefined;\n };\n type: \"text\";\n } | {\n id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n props: {\n autoSize?: undefined;\n scale: number;\n };\n type: \"text\";\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 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 autoSize: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "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 font: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "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", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n text: 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", - "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 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": " | 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": "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 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", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">;\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 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", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord: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 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 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", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/Tldraw.tsx", - "releaseTag": "Public", - "name": "TldrawProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 27 - } - }, - { - "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 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 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", - "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 addToast: (toast: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\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", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\n }>;\n tools: import(\"./overrides\")." - }, - { - "kind": "Reference", - "text": "TLUiOverride", - "canonicalReference": "tldraw!~TLUiOverride:type" - }, - { - "kind": "Content", - "text": " 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", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\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", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\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 addToast: (toast: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\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", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\n }>;\n tools: import(\"./overrides\")." - }, - { - "kind": "Reference", - "text": "TLUiOverride", - "canonicalReference": "tldraw!~TLUiOverride:type" - }, - { - "kind": "Content", - "text": " 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", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\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", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\n }>;\n translations: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "> | undefined;\n }>[] | undefined;\n renderDebugMenuItems?: (() => " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ") | 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 invertIcon?: boolean;\n small?: 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 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}" - }, - { - "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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n className?: string;\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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n className?: string;\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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n className?: string;\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 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", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiDialog", - "canonicalReference": "tldraw!TLUiDialog:interface" - }, - { - "kind": "Content", - "text": ">) => string;\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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n className?: string;\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 align?: 'center' | 'end' | 'start';\n alignOffset?: number;\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n id?: string;\n side?: 'bottom' | 'left' | 'right' | 'top';\n sideOffset?: number;\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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n debugOpen?: boolean;\n id: string;\n modal?: 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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n id: string;\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 disabled?: boolean;\n id?: string;\n label: string;\n title?: string;\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 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", - "text": "TLUiEventSource", - "canonicalReference": "tldraw!TLUiEventSource:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": " | void;\n readonlyOk?: boolean;\n title?: string;\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 children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n sourceId: " - }, - { - "kind": "Reference", - "text": "TLUiEventSource", - "canonicalReference": "tldraw!TLUiEventSource:type" - }, - { - "kind": "Content", - "text": ";\n type: " - }, - { - "kind": "Reference", - "text": "TldrawUiMenuContextType", - "canonicalReference": "tldraw!~TldrawUiMenuContextType: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 label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n id: string;\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 readonlyOk?: boolean;\n noClose?: 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 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", - "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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n disabled?: boolean;\n id: string;\n label?: {\n [key: string]: Translation;\n } | Translation;\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 align?: 'center' | 'end' | 'start';\n alignOffset?: number;\n children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n side: 'bottom' | 'left' | 'right' | 'top';\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 children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n id: string;\n onOpenChange?: (isOpen: boolean) => void;\n open?: boolean;\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 clearToasts: () => void;\n removeToast: (id: " - }, - { - "kind": "Reference", - "text": "TLUiToast", - "canonicalReference": "tldraw!TLUiToast:interface" - }, - { - "kind": "Content", - "text": "['id']) => string;\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 children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "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}" - }, - { - "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 dir: 'ltr' | 'rtl';\n readonly label: string;\n readonly locale: 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!useCurrentTranslation:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "useCurrentTranslation: () => " - }, - { - "kind": "Reference", - "text": "TLUiTranslation", - "canonicalReference": "tldraw!TLUiTranslation:type" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTranslation/useTranslation.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useCurrentTranslation" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useDefaultHelpers:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useDefaultHelpers(): " - }, - { - "kind": "Content", - "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", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\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", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\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 handleBlur: () => 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 handleDoubleClick: (e: any) => any;\n handleFocus: typeof " - }, - { - "kind": "Reference", - "text": "noop", - "canonicalReference": "tldraw!~noop:function" - }, - { - "kind": "Content", - "text": ";\n handleInputPointerDown: (e: " - }, - { - "kind": "Reference", - "text": "React.PointerEvent", - "canonicalReference": "@types/react!React.PointerEvent:interface" - }, - { - "kind": "Content", - "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", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/useEditableText.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 24 - }, - "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!usePreloadAssets:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function usePreloadAssets(assetUrls: " - }, - { - "kind": "Reference", - "text": "TLEditorAssetUrls", - "canonicalReference": "tldraw!~TLEditorAssetUrls:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n done: boolean;\n error: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/usePreloadAssets.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "assetUrls", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "usePreloadAssets" - }, - { - "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 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", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiContextMenuProps", - "canonicalReference": "tldraw!TLUiContextMenuProps:interface" - }, - { - "kind": "Content", - "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", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiHelperButtonsProps", - "canonicalReference": "tldraw!TLUiHelperButtonsProps: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 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 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 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", - "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 Toolbar: " - }, - { - "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 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}>" - }, - { - "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 assetId: 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 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", - "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 deleted file mode 100644 index 1d3da2dd3..000000000 --- a/apps/docs/api/tlschema.api.json +++ /dev/null @@ -1,9998 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.43.1", - "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 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 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 bend: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "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 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 boundShapeId: import(\"../records/TLShape\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n normalizedAnchor: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n type: \"binding\";\n } & {}>;\n point: " - }, - { - "kind": "Reference", - "text": "T.ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "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", - "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 boundShapeId: import(\"../records/TLShape\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n normalizedAnchor: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n type: \"binding\";\n } & {}>;\n point: " - }, - { - "kind": "Reference", - "text": "T.ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"point\";\n x: number;\n y: number;\n } & {}>;\n }, never>;\n text: " - }, - { - "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 assetId: " - }, - { - "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 w: " - }, - { - "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 meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "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", - "text": "TLAssetId", - "canonicalReference": "@tldraw/tlschema!TLAssetId:type" - }, - { - "kind": "Content", - "text": ";\n meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n props: Props;\n type: Type;\n typeName: 'asset';\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 color: string;\n id: 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 migrations?: readonly " - }, - { - "kind": "Reference", - "text": "MigrationSequence", - "canonicalReference": "@tldraw/store!MigrationSequence:interface" - }, - { - "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": 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 darkMode: " - }, - { - "kind": "Reference", - "text": "TLDefaultColorTheme", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type" - }, - { - "kind": "Content", - "text": ";\n lightMode: " - }, - { - "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 mono: string;\n sans: string;\n serif: 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 dash: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n fill: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n isClosed: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\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 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", - "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 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", - "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 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", - "text": "TLEmbedShapePermissions", - "canonicalReference": "@tldraw/tlschema!TLEmbedShapePermissions:type" - }, - { - "kind": "Content", - "text": ";\n readonly title: string;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: string;\n readonly width: number;\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-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", - "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 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 w: " - }, - { - "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 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 w: " - }, - { - "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 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 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 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 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 growY: " - }, - { - "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 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", - "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 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", - "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 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 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", - "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 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 bottomRight: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n topLeft: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "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", - "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 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", - "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 points: " - }, - { - "kind": "Reference", - "text": "T.DictValidator", - "canonicalReference": "@tldraw/validate!DictValidator: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 spline: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"cubic\" | \"line\">;\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 align: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\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 font: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n fontSizeAdjustment: " - }, - { - "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 size: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n text: " - }, - { - "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 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", - "isReadonly": true, - "releaseTag": "Public", - "name": "noteShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 20 - } - }, - { - "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 meta?: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "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", - "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": 16 - } - }, - { - "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": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!ShapePropsType:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type ShapePropsType>" - }, - { - "kind": "Content", - "text": "> = " - }, - { - "kind": "Reference", - "text": "Expand", - "canonicalReference": "@tldraw/utils!Expand:type" - }, - { - "kind": "Content", - "text": "<{\n [K in keyof Config]: " - }, - { - "kind": "Reference", - "text": "T.TypeOf", - "canonicalReference": "@tldraw/validate!TypeOf:type" - }, - { - "kind": "Content", - "text": ";\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLBaseShape.ts", - "releaseTag": "Public", - "name": "ShapePropsType", - "typeParameters": [ - { - "typeParameterName": "Config", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 6, - "endIndex": 10 - } - }, - { - "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 align: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "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", - "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 font: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "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", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n text: " - }, - { - "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/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 meta?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ";\n props?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ";\n type: T['type'];\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 description: string;\n image: string;\n src: null | string;\n title: 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 background: string;\n id: 'dark' | 'light';\n solid: string;\n text: 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 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", - "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 h: number;\n isAnimated: boolean;\n mimeType: null | string;\n name: string;\n src: null | string;\n w: number;\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 offset: {\n x: number;\n y: number;\n };\n shapeIds: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[];\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 rotation: number;\n type: " - }, - { - "kind": "Reference", - "text": "TLCursor", - "canonicalReference": "@tldraw/tlschema!TLCursor:interface" - }, - { - "kind": "Content", - "text": "['type'];\n x: number;\n y: 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 color: " - }, - { - "kind": "Reference", - "text": "TLCanvasUiColor", - "canonicalReference": "@tldraw/tlschema!TLCanvasUiColor:type" - }, - { - "kind": "Content", - "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", - "text": "SetValue", - "canonicalReference": "@tldraw/tlschema!~SetValue:type" - }, - { - "kind": "Content", - "text": ";\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 meta?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ";\n props?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ";\n type: T['type'];\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 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", - "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 h: number;\n isAnimated: boolean;\n mimeType: null | string;\n name: string;\n src: null | string;\n w: number;\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 assetId: " - }, - { - "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 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", - "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 deleted file mode 100644 index c77296339..000000000 --- a/apps/docs/api/validate.api.json +++ /dev/null @@ -1,5017 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.43.1", - "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": ", useNumberKeys: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "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 - }, - { - "parameterName": "useNumberKeys", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "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 validateUsingKnownGoodVersion?: (knownGoodValue: T, newValue: unknown) => T;\n validate: (value: 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": ", useNumberKeys: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "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 - }, - { - "parameterName": "useNumberKeys", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "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/getting-started/releases-versioning.mdx b/apps/docs/content/getting-started/releases-versioning.mdx index 6500688a6..ac83ce419 100644 --- a/apps/docs/content/getting-started/releases-versioning.mdx +++ b/apps/docs/content/getting-started/releases-versioning.mdx @@ -17,6 +17,674 @@ order: 3 {/* START AUTO-GENERATED CHANGELOG */} +### [v2.1.0](/releases/v2.1.0) + +#### Make note handles show only one when zoomed out ([#3562](https://github.com/tldraw/tldraw/pull/3562)) + +- Show only the bottom handle on notes when zoomed between .25 and .5 + +#### Perf: minor drawing speedup ([#3464](https://github.com/tldraw/tldraw/pull/3464)) + +- Improve performance of draw shapes. + +#### Prevent default on native clipboard events ([#3536](https://github.com/tldraw/tldraw/pull/3536)) + +- Fix copy sound on clipboard events. + +#### WebGL Minimap ([#3510](https://github.com/tldraw/tldraw/pull/3510)) + +- Add a brief release note for your PR here. + +#### arrows: fix bound arrow labels going over text shape ([#3512](https://github.com/tldraw/tldraw/pull/3512)) + +- Arrows: fix label positioning when bound. + +#### arrows: still use Dist instead of Dist2 ([#3511](https://github.com/tldraw/tldraw/pull/3511)) + +- Fix arrow label positioning + +#### Fix culling. ([#3504](https://github.com/tldraw/tldraw/pull/3504)) + +- Fix culling. + +#### "Soft preload" icons ([#3507](https://github.com/tldraw/tldraw/pull/3507)) + +- Improve icon preloading + +#### Color tweaks (light and dark mode) ([#3486](https://github.com/tldraw/tldraw/pull/3486)) + +- Adjusts colors + +#### Add slides example ([#3467](https://github.com/tldraw/tldraw/pull/3467)) + +- Docs: Added a slideshow example + +#### Only show cursor chat button in select mode ([#3485](https://github.com/tldraw/tldraw/pull/3485)) + +- Fix cursor chat button appearing when not in select tool. + +#### Fix alt-duplicating shapes sometimes not working ([#3488](https://github.com/tldraw/tldraw/pull/3488)) + +- Add a brief release note for your PR here. + +#### [perf] faster signia capture (again) ([#3487](https://github.com/tldraw/tldraw/pull/3487)) + +- Add a brief release note for your PR here. + +#### [perf] faster signia capture ([#3471](https://github.com/tldraw/tldraw/pull/3471)) + +- Slight performance improvement to reactivity bookkeeping. + +#### New migrations again ([#3220](https://github.com/tldraw/tldraw/pull/3220)) + +#### 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 gone. Comparing the schemas directly is no longer really possible since we introduced some fuzziness. The best thing to do now to check compatibility is to call `schema.getMigraitonsSince(prevSchema)` and it will return an error if the schemas are not compatible, an empty array if there are no migrations to apply since the prev schema, and a nonempty array otherwise. + + 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` + +#### Stickies: release candidate ([#3249](https://github.com/tldraw/tldraw/pull/3249)) + +- Improves sticky notes (see list) + +#### Cancel pointer velocity while pinching ([#3462](https://github.com/tldraw/tldraw/pull/3462)) + +- Fixed a bug that could occur while pinching with the hand tool selected. + +#### conditionally use star-history dark theme ([#3461](https://github.com/tldraw/tldraw/pull/3461)) + +updates the star-history image in the README to conditionally show a dark theme image based on the user's `prefers-color-scheme` + +#### Allow users to edit the document title by double clicking it even when editing a shape. ([#3459](https://github.com/tldraw/tldraw/pull/3459)) + +- Allow users to editing document name by double clicking even when previously editing text. + +#### Don't show edit link for locked shapes. ([#3457](https://github.com/tldraw/tldraw/pull/3457)) + +- Hide edit link context menu option for locked shapes. + +#### Faster selection / erasing ([#3454](https://github.com/tldraw/tldraw/pull/3454)) + +- Improve performance of minimum distance checks. + +#### Make minimap display sharp rectangles. ([#3434](https://github.com/tldraw/tldraw/pull/3434)) + +- Improve + +#### Update font import URL in quick-start.mdx ([#3430](https://github.com/tldraw/tldraw/pull/3430)) + +- Fixes font import link in tldraw.dev quickstart guide + +#### Perf: Improve text outline performance ([#3429](https://github.com/tldraw/tldraw/pull/3429)) + +- Improves performance of text shapes on iOS / Safari. + +#### Perf: throttle `updateHoveredId` ([#3419](https://github.com/tldraw/tldraw/pull/3419)) + +- Improves canvas performance by throttling the update to the editor's hovered id. + +#### Perf: block hit tests while moving camera ([#3418](https://github.com/tldraw/tldraw/pull/3418)) + +- Improves performance of canvas while the camera is moving. + +#### Perf: (slightly) faster min dist checks ([#3401](https://github.com/tldraw/tldraw/pull/3401)) + +- Performance: small improvements to hit testing. + +#### Examples: update kbd shortcuts, add actions overrides example ([#3330](https://github.com/tldraw/tldraw/pull/3330)) + +- Add action overrides example, update keyboard shortcuts example + +#### Add long press event ([#3275](https://github.com/tldraw/tldraw/pull/3275)) + +- Add support for long pressing on desktop. + +#### Tool with child states ([#3074](https://github.com/tldraw/tldraw/pull/3074)) + +- Add an example of a tool with child states + +#### Fix text resizing bug ([#3327](https://github.com/tldraw/tldraw/pull/3327)) + +- Fixes an issue with text shapes overflowing their bounds when resized. + +#### Input buffering ([#3223](https://github.com/tldraw/tldraw/pull/3223)) + +- Add a brief release note for your PR here. + +#### Add white ([#3321](https://github.com/tldraw/tldraw/pull/3321)) + +- Adds secret white color. + +#### Don't trigger pointer move on zoom ([#3305](https://github.com/tldraw/tldraw/pull/3305)) + +- Improve performance of zooming. + +#### Decrease the number of rendered dom nodes for geo shape and arrows ([#3283](https://github.com/tldraw/tldraw/pull/3283)) + +- Reduce the number of rendered dom nodes for geo shapes and arrows without text. + +#### Improve performance of culling ([#3272](https://github.com/tldraw/tldraw/pull/3272)) + +- Improve performance of the canvas when many shapes are present. + +#### styling: make dotcom and examples site have consistent font styling ([#3271](https://github.com/tldraw/tldraw/pull/3271)) + +- Add a brief release note for your PR here. + +#### ui: make toasts look more toasty ([#2988](https://github.com/tldraw/tldraw/pull/2988)) + +- UI: Add severity to toasts. + +#### textfields [1 of 3]: add text into speech bubble; also add rich text example ([#3050](https://github.com/tldraw/tldraw/pull/3050)) + +- Refactor textfields be composable/swappable. + +#### Update romanian translations ([#3269](https://github.com/tldraw/tldraw/pull/3269)) + +- Update Romanian translation. + +#### Allow hiding debug panel. ([#3261](https://github.com/tldraw/tldraw/pull/3261)) + +- Allow users to fully override the `DebugPanel`. + +#### Add inline behaviour example ([#3113](https://github.com/tldraw/tldraw/pull/3113)) + +- Docs: Added an example for inline behaviour. + +#### toolbar: fix missing title attributes ([#3244](https://github.com/tldraw/tldraw/pull/3244)) + +- Fix title's being missing on toolbar items. + +#### Don't double squash ([#3182](https://github.com/tldraw/tldraw/pull/3182)) + +- Minor improvement when modifying multiple shapes at once. + +#### Fix lag while panning + translating at the same time ([#3186](https://github.com/tldraw/tldraw/pull/3186)) + +- Add a brief release note for your PR here. + +#### fix docs build ([#3201](https://github.com/tldraw/tldraw/pull/3201)) + +- Add a brief release note for your PR here. + +#### Update the document title to include the document name. ([#3197](https://github.com/tldraw/tldraw/pull/3197)) + +- Use the document name in the `document.title`. + +#### Remove access token logic. ([#3187](https://github.com/tldraw/tldraw/pull/3187)) + +- Remove some leftover logic from pro days. + +#### [fix] Batch tick events ([#3181](https://github.com/tldraw/tldraw/pull/3181)) + +- Fix a performance issue effecting resizing multiple shapes. + +#### [tinyish] Simplify / skip some work in Shape ([#3176](https://github.com/tldraw/tldraw/pull/3176)) + +- SDK: minor improvements to the Shape component + +#### [tiny] Slightly more efficient selection rotated page bounds / page bounds ([#3178](https://github.com/tldraw/tldraw/pull/3178)) + +- SDK, slightly more performant selection bounds calculations. + +#### [sync] allow connections from v4 clients ([#3173](https://github.com/tldraw/tldraw/pull/3173)) + +- Add a brief release note for your PR here. + +#### [fix] Handles extra renders ([#3172](https://github.com/tldraw/tldraw/pull/3172)) + +- SDK: Fixed a minor rendering issue related to handles. + +#### [fix] Cleanup text measures ([#3169](https://github.com/tldraw/tldraw/pull/3169)) + +- Fixed a bug that could cause multiple text measurement divs in development mode. + +#### [perf] Reinstate render throttling ([#3160](https://github.com/tldraw/tldraw/pull/3160)) + +- Add a brief release note for your PR here. + +#### Fix release eliding ([#3156](https://github.com/tldraw/tldraw/pull/3156)) + +- Add a brief release note for your PR here. + +#### Updated exploded example link from installation page. ([#3138](https://github.com/tldraw/tldraw/pull/3138)) + +- Add a brief release note for your PR here. + Installation docs has a link to example for exploded which points to github 404. I have updated the working link. + +#### Make the custom menu examples a bit clearer ([#3106](https://github.com/tldraw/tldraw/pull/3106)) + +- Add a brief release note for your PR here. + +#### Menu updates / fix flip / add export / remove Shape menu ([#3115](https://github.com/tldraw/tldraw/pull/3115)) + +- Revert some changes in the menu. + +#### Performance improvements ([#2977](https://github.com/tldraw/tldraw/pull/2977)) + +- Improves the performance of rendering. + +#### [fix] Rotated crop handle ([#3093](https://github.com/tldraw/tldraw/pull/3093)) + +- Fixed a bug that could cause rotated cropping images to have incorrectly rotated handles. + +#### Fix typo in useValue comment ([#3088](https://github.com/tldraw/tldraw/pull/3088)) + +- Fix typo in useValue comment. + +#### Shape with Migrations ([#3078](https://github.com/tldraw/tldraw/pull/3078)) + +- Adds a shape with migrations example + +#### Fix viewport params for pages. ([#3079](https://github.com/tldraw/tldraw/pull/3079)) + +- Fixes an issue with url params in the share links. The viewport params only worked on the first page in the document. + +#### Fix typo ([#3069](https://github.com/tldraw/tldraw/pull/3069)) + +N/A + +#### Add custom tool examples ([#3064](https://github.com/tldraw/tldraw/pull/3064)) + +- Adds a simple custom tool example + +#### Fix validation errors for `duplicateProps` ([#3065](https://github.com/tldraw/tldraw/pull/3065)) + +- Add a brief release note for your PR here. + +#### Shorten url state ([#3041](https://github.com/tldraw/tldraw/pull/3041)) + +- Shortens url parameters for dot com. + +#### Fix an issue where the video size was not drawn correctly ([#3047](https://github.com/tldraw/tldraw/pull/3047)) + +- Fix an issue where the video size was not drawn correctly. + +#### [fix] Input tags ([#3038](https://github.com/tldraw/tldraw/pull/3038)) + +- Fixed autocomplete, autocapitalize, and autocorrect tags on text inputs. + +#### Lokalise: Translations update ([#3049](https://github.com/tldraw/tldraw/pull/3049)) + +- Updated Hungarian translations. + +#### [terrible] Firefox: Allow scrolling on keyboard shortcuts dialog ([#2974](https://github.com/tldraw/tldraw/pull/2974)) + +- Add a brief release note for your PR here. + +#### Fix cursor chat bubble position. ([#3042](https://github.com/tldraw/tldraw/pull/3042)) + +- Fixed a bug where cursor chat bubble position could be wrong when a sidebar was open. + +#### Fix broken link for shape example ([#3046](https://github.com/tldraw/tldraw/pull/3046)) + +- Fix a link that was pointing to a 404 on GitHub + +#### Protect local storage calls ([#3043](https://github.com/tldraw/tldraw/pull/3043)) + +- Fixes a bug that could cause crashes in React Native webviews. + +#### Custom shape examples ([#2994](https://github.com/tldraw/tldraw/pull/2994)) + +- adds a simple custom shape example +- adds an interactive shape example +- updates editable shape example + +#### Expose `getStyleForNextShape` ([#3039](https://github.com/tldraw/tldraw/pull/3039)) + +- Expose the API for `Editor.getStyleForNextShape`, previously marked as internal. + +#### [fix] Missing element crash (rare) on video shapes. ([#3037](https://github.com/tldraw/tldraw/pull/3037)) + +- Fixed a rare crash with video shapes. + +#### Example of using tldraw styles ([#3017](https://github.com/tldraw/tldraw/pull/3017)) + +- shape with tldraw styles example + +#### Show a broken image for files without assets ([#2990](https://github.com/tldraw/tldraw/pull/2990)) + +- Better handling of broken images / videos. + +#### Selection UI example (plus fixes to pageToScreen) ([#3015](https://github.com/tldraw/tldraw/pull/3015)) + +- Adds selection UI example. +- Adds `Editor.getSelectionRotatedScreenBounds` method +- Fixes a bug with `pageToScreen`. + +#### [bugfix] Avoid randomness at init time to allow running on cloudflare. ([#3016](https://github.com/tldraw/tldraw/pull/3016)) + +- Prevent using randomness API at init time, to allow importing the tldraw package in a cloudflare worker. + +--- + +#### 💥 Breaking Change + +- `@tldraw/editor`, `tldraw`, `@tldraw/validate` + - React-powered SVG exports [#3117](https://github.com/tldraw/tldraw/pull/3117) ([@SomeHats](https://github.com/SomeHats) [@huppy-bot[bot]](https://github.com/huppy-bot[bot])) +- `@tldraw/editor`, `tldraw` + - Component-based toolbar customisation API [#3067](https://github.com/tldraw/tldraw/pull/3067) ([@SomeHats](https://github.com/SomeHats) [@steveruizok](https://github.com/steveruizok)) +- `tldraw` + - Menu updates / fix flip / add export / remove Shape menu [#3115](https://github.com/tldraw/tldraw/pull/3115) ([@steveruizok](https://github.com/steveruizok)) +- `@tldraw/state`, `@tldraw/store`, `tldraw`, `@tldraw/utils` + - Performance improvements [#2977](https://github.com/tldraw/tldraw/pull/2977) ([@MitjaBezensek](https://github.com/MitjaBezensek) [@steveruizok](https://github.com/steveruizok)) + +#### 🚀 Enhancement + +- squish sync data events before sending them out [#3118](https://github.com/tldraw/tldraw/pull/3118) ([@si14](https://github.com/si14)) +- `@tldraw/editor`, `tldraw` + - textfields [1 of 3]: add text into speech bubble; also add rich text example [#3050](https://github.com/tldraw/tldraw/pull/3050) ([@mimecuvalo](https://github.com/mimecuvalo)) +- `@tldraw/editor` + - Selection UI example (plus fixes to pageToScreen) [#3015](https://github.com/tldraw/tldraw/pull/3015) ([@steveruizok](https://github.com/steveruizok)) + +#### 🐛 Bug Fix + +- Revert "squish sync data events before sending them out" [#3331](https://github.com/tldraw/tldraw/pull/3331) ([@ds300](https://github.com/ds300)) +- docs: fix up github link [#3108](https://github.com/tldraw/tldraw/pull/3108) ([@mimecuvalo](https://github.com/mimecuvalo)) +- Bump the npm_and_yarn group across 3 directories with 3 updates [#3087](https://github.com/tldraw/tldraw/pull/3087) ([@dependabot[bot]](https://github.com/dependabot[bot]) [@github-actions[bot]](https://github.com/github-actions[bot]) [@MitjaBezensek](https://github.com/MitjaBezensek)) +- simplify fnmatch pattern ([@ds300](https://github.com/ds300)) +- Bump the npm_and_yarn group group with 7 updates [#2982](https://github.com/tldraw/tldraw/pull/2982) ([@dependabot[bot]](https://github.com/dependabot[bot]) [@MitjaBezensek](https://github.com/MitjaBezensek)) +- `tldraw` + - quick fixes [#3128](https://github.com/tldraw/tldraw/pull/3128) ([@steveruizok](https://github.com/steveruizok)) + +#### 📚 SDK Changes + +- Update useFileSystem.tsx [#3371](https://github.com/tldraw/tldraw/pull/3371) ([@steveruizok](https://github.com/steveruizok)) +- only buffer pointer events [#3337](https://github.com/tldraw/tldraw/pull/3337) ([@steveruizok](https://github.com/steveruizok)) +- `tldraw` + - Fix collaborator size with zoom [#3563](https://github.com/tldraw/tldraw/pull/3563) ([@steveruizok](https://github.com/steveruizok)) + - Make note handles show only one when zoomed out [#3562](https://github.com/tldraw/tldraw/pull/3562) ([@steveruizok](https://github.com/steveruizok)) + - Fix transparent colors in the minimap [#3561](https://github.com/tldraw/tldraw/pull/3561) ([@steveruizok](https://github.com/steveruizok)) + - Expose `usePreloadAssets` [#3545](https://github.com/tldraw/tldraw/pull/3545) ([@SomeHats](https://github.com/SomeHats)) + - Prevent default on native clipboard events [#3536](https://github.com/tldraw/tldraw/pull/3536) ([@steveruizok](https://github.com/steveruizok)) + - Improve back to content [#3532](https://github.com/tldraw/tldraw/pull/3532) ([@steveruizok](https://github.com/steveruizok)) + - arrows: fix bound arrow labels going over text shape [#3512](https://github.com/tldraw/tldraw/pull/3512) ([@mimecuvalo](https://github.com/mimecuvalo)) + - textfields: fix Safari cursor rendering bug, take 2 [#3513](https://github.com/tldraw/tldraw/pull/3513) ([@mimecuvalo](https://github.com/mimecuvalo)) + - geo: fix double unique id on DOM [#3514](https://github.com/tldraw/tldraw/pull/3514) ([@mimecuvalo](https://github.com/mimecuvalo)) + - arrows: still use Dist instead of Dist2 [#3511](https://github.com/tldraw/tldraw/pull/3511) ([@mimecuvalo](https://github.com/mimecuvalo)) + - textfields: nix disableTab option; make TextShapes have custom Tab behavior as intended [#3506](https://github.com/tldraw/tldraw/pull/3506) ([@mimecuvalo](https://github.com/mimecuvalo)) + - "Soft preload" icons [#3507](https://github.com/tldraw/tldraw/pull/3507) ([@steveruizok](https://github.com/steveruizok)) + - textfields: wait a tick before selecting all to fix iOS [#3501](https://github.com/tldraw/tldraw/pull/3501) ([@mimecuvalo](https://github.com/mimecuvalo)) + - textfields: fix dragging selected shape behind another [#3498](https://github.com/tldraw/tldraw/pull/3498) ([@mimecuvalo](https://github.com/mimecuvalo)) + - stickies: a bit of fuzziness when calculating certain text [#3493](https://github.com/tldraw/tldraw/pull/3493) ([@mimecuvalo](https://github.com/mimecuvalo)) + - Fix alt-duplicating shapes sometimes not working [#3488](https://github.com/tldraw/tldraw/pull/3488) ([@TodePond](https://github.com/TodePond)) + - stickies: dont remove selection ranges when edit->edit [#3484](https://github.com/tldraw/tldraw/pull/3484) ([@mimecuvalo](https://github.com/mimecuvalo)) + - stickies: hide clone handles on mobile [#3478](https://github.com/tldraw/tldraw/pull/3478) ([@mimecuvalo](https://github.com/mimecuvalo)) + - Don't show edit link for locked shapes. [#3457](https://github.com/tldraw/tldraw/pull/3457) ([@MitjaBezensek](https://github.com/MitjaBezensek)) + - Performance measurement tool (for unit tests) [#3447](https://github.com/tldraw/tldraw/pull/3447) ([@steveruizok](https://github.com/steveruizok)) + - Remove minimap throttling [#3438](https://github.com/tldraw/tldraw/pull/3438) ([@steveruizok](https://github.com/steveruizok)) + - Make minimap display sharp rectangles. [#3434](https://github.com/tldraw/tldraw/pull/3434) ([@steveruizok](https://github.com/steveruizok)) + - Perf: throttle `updateHoveredId` [#3419](https://github.com/tldraw/tldraw/pull/3419) ([@steveruizok](https://github.com/steveruizok)) + - Revert "Fix text resizing bug (#3327)" [#3332](https://github.com/tldraw/tldraw/pull/3332) ([@mimecuvalo](https://github.com/mimecuvalo)) + - Fix text resizing bug [#3327](https://github.com/tldraw/tldraw/pull/3327) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git)) + - Fix count shapes and nodes [#3318](https://github.com/tldraw/tldraw/pull/3318) ([@steveruizok](https://github.com/steveruizok)) + - Decrease the number of rendered dom nodes for geo shape and arrows [#3283](https://github.com/tldraw/tldraw/pull/3283) ([@MitjaBezensek](https://github.com/MitjaBezensek)) + - styling: make dotcom and examples site have consistent font styling [#3271](https://github.com/tldraw/tldraw/pull/3271) ([@mimecuvalo](https://github.com/mimecuvalo) [@steveruizok](https://github.com/steveruizok)) + - Allow hiding debug panel. [#3261](https://github.com/tldraw/tldraw/pull/3261) ([@MitjaBezensek](https://github.com/MitjaBezensek)) + - toolbar: fix missing title attributes [#3244](https://github.com/tldraw/tldraw/pull/3244) ([@mimecuvalo](https://github.com/mimecuvalo) [@steveruizok](https://github.com/steveruizok)) + - Fix jpg export and tests [#3198](https://github.com/tldraw/tldraw/pull/3198) ([@SomeHats](https://github.com/SomeHats)) + - [tiny] lift theme in style panel [#3170](https://github.com/tldraw/tldraw/pull/3170) ([@steveruizok](https://github.com/steveruizok)) +- `tldraw`, `@tldraw/utils` + - Perf: minor drawing speedup [#3464](https://github.com/tldraw/tldraw/pull/3464) ([@steveruizok](https://github.com/steveruizok)) + - fixup file helpers [#3130](https://github.com/tldraw/tldraw/pull/3130) ([@SomeHats](https://github.com/SomeHats)) +- `@tldraw/editor`, `tldraw` + - WebGL Minimap [#3510](https://github.com/tldraw/tldraw/pull/3510) ([@ds300](https://github.com/ds300)) + - textfields: on mobile edit->edit, allow going to empty geo [#3469](https://github.com/tldraw/tldraw/pull/3469) ([@mimecuvalo](https://github.com/mimecuvalo)) + - Faster selection / erasing [#3454](https://github.com/tldraw/tldraw/pull/3454) ([@steveruizok](https://github.com/steveruizok)) + - Fix SVG exports in Next.js [#3446](https://github.com/tldraw/tldraw/pull/3446) ([@SomeHats](https://github.com/SomeHats)) + - Perf: Incremental culled shapes calculation. [#3411](https://github.com/tldraw/tldraw/pull/3411) ([@MitjaBezensek](https://github.com/MitjaBezensek) [@steveruizok](https://github.com/steveruizok)) + - Fix some tests [#3403](https://github.com/tldraw/tldraw/pull/3403) ([@steveruizok](https://github.com/steveruizok)) + - Add long press event [#3275](https://github.com/tldraw/tldraw/pull/3275) ([@steveruizok](https://github.com/steveruizok)) + - textfields: fix regression with Text shape and resizing [#3333](https://github.com/tldraw/tldraw/pull/3333) ([@mimecuvalo](https://github.com/mimecuvalo)) + - Add image annotator example [#3147](https://github.com/tldraw/tldraw/pull/3147) ([@SomeHats](https://github.com/SomeHats)) + - [fix] Batch tick events [#3181](https://github.com/tldraw/tldraw/pull/3181) ([@steveruizok](https://github.com/steveruizok)) + - [tinyish] Simplify / skip some work in Shape [#3176](https://github.com/tldraw/tldraw/pull/3176) ([@steveruizok](https://github.com/steveruizok)) +- `@tldraw/state` + - [signia] Smart dirty checking of active computeds [#3516](https://github.com/tldraw/tldraw/pull/3516) ([@ds300](https://github.com/ds300)) + - [perf] faster signia capture (again) [#3487](https://github.com/tldraw/tldraw/pull/3487) ([@ds300](https://github.com/ds300)) + - [perf] faster signia capture [#3471](https://github.com/tldraw/tldraw/pull/3471) ([@ds300](https://github.com/ds300)) +- `tldraw`, `@tldraw/validate` + - [fix] allow loading files [#3517](https://github.com/tldraw/tldraw/pull/3517) ([@ds300](https://github.com/ds300)) +- `@tldraw/editor`, `@tldraw/tlschema` + - Color tweaks (light and dark mode) [#3486](https://github.com/tldraw/tldraw/pull/3486) ([@steveruizok](https://github.com/steveruizok) [@huppy-bot[bot]](https://github.com/huppy-bot[bot])) +- `@tldraw/editor` + - Stickies: fix sticky note clipping [#3503](https://github.com/tldraw/tldraw/pull/3503) ([@steveruizok](https://github.com/steveruizok)) + - css more shapes that need transparent behavior [#3497](https://github.com/tldraw/tldraw/pull/3497) ([@mimecuvalo](https://github.com/mimecuvalo)) + - [fix] use page point for pointer [#3476](https://github.com/tldraw/tldraw/pull/3476) ([@ds300](https://github.com/ds300)) + - perf: calculate hypoteneuse manually instead of using hypot [#3468](https://github.com/tldraw/tldraw/pull/3468) ([@mimecuvalo](https://github.com/mimecuvalo)) + - Cancel pointer velocity while pinching [#3462](https://github.com/tldraw/tldraw/pull/3462) ([@steveruizok](https://github.com/steveruizok)) + - Perf: Use a computed cache for masked shape page bounds [#3460](https://github.com/tldraw/tldraw/pull/3460) ([@steveruizok](https://github.com/steveruizok)) + - Remove docs for Editor.batch [#3451](https://github.com/tldraw/tldraw/pull/3451) ([@steveruizok](https://github.com/steveruizok)) + - Fix panning. [#3445](https://github.com/tldraw/tldraw/pull/3445) ([@MitjaBezensek](https://github.com/MitjaBezensek)) + - Perf: Improve text outline performance [#3429](https://github.com/tldraw/tldraw/pull/3429) ([@steveruizok](https://github.com/steveruizok)) + - Fix text bug on iOS [#3423](https://github.com/tldraw/tldraw/pull/3423) ([@steveruizok](https://github.com/steveruizok)) + - Perf: block hit tests while moving camera [#3418](https://github.com/tldraw/tldraw/pull/3418) ([@steveruizok](https://github.com/steveruizok)) + - Fix an issue with layers when moving shapes. [#3380](https://github.com/tldraw/tldraw/pull/3380) ([@MitjaBezensek](https://github.com/MitjaBezensek)) + - [culling] minimal culled diff with webgl [#3377](https://github.com/tldraw/tldraw/pull/3377) ([@steveruizok](https://github.com/steveruizok)) + - put `getCurrentPageId` into a computed [#3378](https://github.com/tldraw/tldraw/pull/3378) ([@steveruizok](https://github.com/steveruizok)) + - Don't trigger pointer move on zoom [#3305](https://github.com/tldraw/tldraw/pull/3305) ([@steveruizok](https://github.com/steveruizok)) + - Improve performance of culling [#3272](https://github.com/tldraw/tldraw/pull/3272) ([@steveruizok](https://github.com/steveruizok)) + - Skip the random ID for regular history entries [#3183](https://github.com/tldraw/tldraw/pull/3183) ([@steveruizok](https://github.com/steveruizok)) + - [tiny] Slightly more efficient selection rotated page bounds / page bounds [#3178](https://github.com/tldraw/tldraw/pull/3178) ([@steveruizok](https://github.com/steveruizok)) + - [fix] handles [#3177](https://github.com/tldraw/tldraw/pull/3177) ([@steveruizok](https://github.com/steveruizok)) + - [fix] Handles extra renders [#3172](https://github.com/tldraw/tldraw/pull/3172) ([@steveruizok](https://github.com/steveruizok)) + - [tiny] remove unused shape indicator equality checker [#3171](https://github.com/tldraw/tldraw/pull/3171) ([@steveruizok](https://github.com/steveruizok)) + - [fix] Cleanup text measures [#3169](https://github.com/tldraw/tldraw/pull/3169) ([@steveruizok](https://github.com/steveruizok)) +- `@tldraw/editor`, `@tldraw/tldraw`, `@tldraw/state`, `@tldraw/store`, `tldraw`, `@tldraw/tlschema`, `@tldraw/utils`, `@tldraw/validate` + - New migrations again [#3220](https://github.com/tldraw/tldraw/pull/3220) ([@ds300](https://github.com/ds300) [@steveruizok](https://github.com/steveruizok)) +- `@tldraw/store` + - undo devFreeze unintentional commit [#3466](https://github.com/tldraw/tldraw/pull/3466) ([@mimecuvalo](https://github.com/mimecuvalo)) + - Fix typo. [#3306](https://github.com/tldraw/tldraw/pull/3306) ([@MitjaBezensek](https://github.com/MitjaBezensek)) + - Don't double squash [#3182](https://github.com/tldraw/tldraw/pull/3182) ([@steveruizok](https://github.com/steveruizok)) +- `@tldraw/editor`, `tldraw`, `@tldraw/tlschema` + - Stickies: release candidate [#3249](https://github.com/tldraw/tldraw/pull/3249) ([@steveruizok](https://github.com/steveruizok) [@mimecuvalo](https://github.com/mimecuvalo) [@TodePond](https://github.com/TodePond) [@huppy-bot[bot]](https://github.com/huppy-bot[bot])) +- `@tldraw/editor`, `@tldraw/store`, `tldraw` + - Improve hand dragging with long press [#3432](https://github.com/tldraw/tldraw/pull/3432) ([@steveruizok](https://github.com/steveruizok)) + - Perf: (slightly) faster min dist checks [#3401](https://github.com/tldraw/tldraw/pull/3401) ([@steveruizok](https://github.com/steveruizok)) +- `@tldraw/editor`, `@tldraw/utils` + - Perf: slightly faster `getShapeAtPoint` [#3416](https://github.com/tldraw/tldraw/pull/3416) ([@steveruizok](https://github.com/steveruizok)) +- `@tldraw/state`, `@tldraw/tlschema` + - Add white migration [#3334](https://github.com/tldraw/tldraw/pull/3334) ([@steveruizok](https://github.com/steveruizok)) +- `@tldraw/editor`, `@tldraw/state`, `tldraw` + - Fix blur bug in editable text [#3343](https://github.com/tldraw/tldraw/pull/3343) ([@steveruizok](https://github.com/steveruizok)) +- `@tldraw/editor`, `tldraw`, `@tldraw/utils` + - Input buffering [#3223](https://github.com/tldraw/tldraw/pull/3223) ([@MitjaBezensek](https://github.com/MitjaBezensek) [@steveruizok](https://github.com/steveruizok)) + - Fix lag while panning + translating at the same time [#3186](https://github.com/tldraw/tldraw/pull/3186) ([@ds300](https://github.com/ds300) [@steveruizok](https://github.com/steveruizok)) +- `tldraw`, `@tldraw/tlschema` + - Add white [#3321](https://github.com/tldraw/tldraw/pull/3321) ([@steveruizok](https://github.com/steveruizok)) +- `@tldraw/editor`, `@tldraw/tldraw`, `@tldraw/store`, `tldraw`, `@tldraw/tlschema`, `@tldraw/utils`, `@tldraw/validate` + - use native structuredClone on node, cloudflare workers, and in tests [#3166](https://github.com/tldraw/tldraw/pull/3166) ([@si14](https://github.com/si14)) +- `@tldraw/editor`, `@tldraw/state` + - [perf] Reinstate render throttling [#3160](https://github.com/tldraw/tldraw/pull/3160) ([@ds300](https://github.com/ds300)) + +#### 🖥️ tldraw.com Changes + +- fix document name alignment [#3559](https://github.com/tldraw/tldraw/pull/3559) ([@SomeHats](https://github.com/SomeHats)) +- Fix version [#3521](https://github.com/tldraw/tldraw/pull/3521) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- Only show cursor chat button in select mode [#3485](https://github.com/tldraw/tldraw/pull/3485) ([@TodePond](https://github.com/TodePond)) +- Allow users to edit the document title by double clicking it even when editing a shape. [#3459](https://github.com/tldraw/tldraw/pull/3459) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- Fix cursor chat in context menu. [#3435](https://github.com/tldraw/tldraw/pull/3435) ([@steveruizok](https://github.com/steveruizok)) +- Update romanian translations [#3269](https://github.com/tldraw/tldraw/pull/3269) ([@TodePond](https://github.com/TodePond)) +- fix document name overflow [#3263](https://github.com/tldraw/tldraw/pull/3263) ([@SomeHats](https://github.com/SomeHats)) +- top bar design tweaks [#3205](https://github.com/tldraw/tldraw/pull/3205) ([@SomeHats](https://github.com/SomeHats)) +- Update the document title to include the document name. [#3197](https://github.com/tldraw/tldraw/pull/3197) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- Remove access token logic. [#3187](https://github.com/tldraw/tldraw/pull/3187) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- [sync] allow connections from v4 clients [#3173](https://github.com/tldraw/tldraw/pull/3173) ([@ds300](https://github.com/ds300)) +- `@tldraw/editor` + - Enable document name [#3150](https://github.com/tldraw/tldraw/pull/3150) ([@ds300](https://github.com/ds300)) + +#### 📖 Documentation changes + +- Add releases section to docs [#3564](https://github.com/tldraw/tldraw/pull/3564) ([@SomeHats](https://github.com/SomeHats)) +- conditionally use star-history dark theme [#3461](https://github.com/tldraw/tldraw/pull/3461) ([@sunnyzanchi](https://github.com/sunnyzanchi)) +- Update font import URL in quick-start.mdx [#3430](https://github.com/tldraw/tldraw/pull/3430) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git)) +- Examples: update kbd shortcuts, add actions overrides example [#3330](https://github.com/tldraw/tldraw/pull/3330) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git) [@steveruizok](https://github.com/steveruizok)) +- Tool with child states [#3074](https://github.com/tldraw/tldraw/pull/3074) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git) [@steveruizok](https://github.com/steveruizok)) +- Add inline behaviour example [#3113](https://github.com/tldraw/tldraw/pull/3113) ([@TodePond](https://github.com/TodePond)) +- docs: make header fixed instead of sticky [#3228](https://github.com/tldraw/tldraw/pull/3228) ([@mimecuvalo](https://github.com/mimecuvalo)) +- fix docs slugs [#3227](https://github.com/tldraw/tldraw/pull/3227) ([@SomeHats](https://github.com/SomeHats)) +- docs: work around browser bug with input+scrolling [#3209](https://github.com/tldraw/tldraw/pull/3209) ([@mimecuvalo](https://github.com/mimecuvalo)) +- PDF editor example [#3159](https://github.com/tldraw/tldraw/pull/3159) ([@SomeHats](https://github.com/SomeHats)) +- fix docs build [#3201](https://github.com/tldraw/tldraw/pull/3201) ([@ds300](https://github.com/ds300)) +- [example] culling [#3174](https://github.com/tldraw/tldraw/pull/3174) ([@steveruizok](https://github.com/steveruizok)) +- Fix release eliding [#3156](https://github.com/tldraw/tldraw/pull/3156) ([@ds300](https://github.com/ds300)) +- [docs] Sync docs deploy with npm deploy [#3153](https://github.com/tldraw/tldraw/pull/3153) ([@ds300](https://github.com/ds300)) +- Updated exploded example link from installation page. [#3138](https://github.com/tldraw/tldraw/pull/3138) ([@Kesavaraja](https://github.com/Kesavaraja)) +- Make the custom menu examples a bit clearer [#3106](https://github.com/tldraw/tldraw/pull/3106) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git)) +- Custom renderer example [#3091](https://github.com/tldraw/tldraw/pull/3091) ([@steveruizok](https://github.com/steveruizok)) +- Shape with Migrations [#3078](https://github.com/tldraw/tldraw/pull/3078) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git) [@steveruizok](https://github.com/steveruizok)) +- Fix typo [#3069](https://github.com/tldraw/tldraw/pull/3069) ([@calebeby](https://github.com/calebeby)) +- Add custom tool examples [#3064](https://github.com/tldraw/tldraw/pull/3064) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git)) +- Fix broken link for shape example [#3046](https://github.com/tldraw/tldraw/pull/3046) ([@lorenzolewis](https://github.com/lorenzolewis)) +- Custom shape examples [#2994](https://github.com/tldraw/tldraw/pull/2994) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git) [@steveruizok](https://github.com/steveruizok)) +- Example of using tldraw styles [#3017](https://github.com/tldraw/tldraw/pull/3017) ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git) [@steveruizok](https://github.com/steveruizok)) +- `@tldraw/editor` + - Add slides example [#3467](https://github.com/tldraw/tldraw/pull/3467) ([@MitjaBezensek](https://github.com/MitjaBezensek) [@TodePond](https://github.com/TodePond)) + - side effects reference docs & examples [#3258](https://github.com/tldraw/tldraw/pull/3258) ([@SomeHats](https://github.com/SomeHats)) + - fix docs not building due to typo [#3259](https://github.com/tldraw/tldraw/pull/3259) ([@SomeHats](https://github.com/SomeHats)) +- `@tldraw/store` + - Fix typo in Store.ts [#3385](https://github.com/tldraw/tldraw/pull/3385) ([@OrionReed](https://github.com/OrionReed)) +- `tldraw` + - docs: fix missing API entries [#3111](https://github.com/tldraw/tldraw/pull/3111) ([@mimecuvalo](https://github.com/mimecuvalo) [@steveruizok](https://github.com/steveruizok)) +- `@tldraw/state` + - Fix typo in useValue comment [#3088](https://github.com/tldraw/tldraw/pull/3088) ([@Slowhand0309](https://github.com/Slowhand0309)) + +#### 🏠 Internal + +- Fix deploy script [#3550](https://github.com/tldraw/tldraw/pull/3550) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- [internal] Add license report scripts [#2751](https://github.com/tldraw/tldraw/pull/2751) ([@steveruizok](https://github.com/steveruizok)) +- [chore] Bump browser-fs-access. [#3277](https://github.com/tldraw/tldraw/pull/3277) ([@steveruizok](https://github.com/steveruizok)) +- log message size in worker analytics [#3274](https://github.com/tldraw/tldraw/pull/3274) ([@SomeHats](https://github.com/SomeHats)) +- Add yarn immutable check to pre-commit. [#3218](https://github.com/tldraw/tldraw/pull/3218) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- tooling: prettier ignore pr template [#3210](https://github.com/tldraw/tldraw/pull/3210) ([@mimecuvalo](https://github.com/mimecuvalo)) +- Add release docs [#3158](https://github.com/tldraw/tldraw/pull/3158) ([@ds300](https://github.com/ds300)) +- Simplify tlsync types [#3139](https://github.com/tldraw/tldraw/pull/3139) ([@si14](https://github.com/si14)) +- [DX] PR labels revamp [#3112](https://github.com/tldraw/tldraw/pull/3112) ([@ds300](https://github.com/ds300)) +- Restore export menu content [#3126](https://github.com/tldraw/tldraw/pull/3126) ([@steveruizok](https://github.com/steveruizok)) +- Don't import package.json in scripts/refresh-assets.ts, just read it [#3116](https://github.com/tldraw/tldraw/pull/3116) ([@si14](https://github.com/si14)) +- [dx] Allow vscode to search inside md files by default [#3105](https://github.com/tldraw/tldraw/pull/3105) ([@ds300](https://github.com/ds300)) +- Debounce/aggregate tlsync messages [#3012](https://github.com/tldraw/tldraw/pull/3012) ([@si14](https://github.com/si14)) +- [infra] Fix patch release script [#3095](https://github.com/tldraw/tldraw/pull/3095) ([@ds300](https://github.com/ds300)) +- [infra] Patch release scripting [#3072](https://github.com/tldraw/tldraw/pull/3072) ([@ds300](https://github.com/ds300)) +- Shorten url state [#3041](https://github.com/tldraw/tldraw/pull/3041) ([@steveruizok](https://github.com/steveruizok)) +- Fix cursor chat bubble position. [#3042](https://github.com/tldraw/tldraw/pull/3042) ([@steveruizok](https://github.com/steveruizok)) +- Configure dependabot. [#2980](https://github.com/tldraw/tldraw/pull/2980) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- [infra] fix canary dist tag [#3048](https://github.com/tldraw/tldraw/pull/3048) ([@ds300](https://github.com/ds300)) +- `@tldraw/editor` + - Use computed cache for getting the parent child relationships [#3508](https://github.com/tldraw/tldraw/pull/3508) ([@MitjaBezensek](https://github.com/MitjaBezensek)) + - Perf: Improve perf of `getCurrentPageShapesSorted` [#3453](https://github.com/tldraw/tldraw/pull/3453) ([@MitjaBezensek](https://github.com/MitjaBezensek) [@steveruizok](https://github.com/steveruizok)) + - Only run when shapes change. [#3456](https://github.com/tldraw/tldraw/pull/3456) ([@MitjaBezensek](https://github.com/MitjaBezensek)) + - Reorder dom elements. [#3431](https://github.com/tldraw/tldraw/pull/3431) ([@MitjaBezensek](https://github.com/MitjaBezensek) [@steveruizok](https://github.com/steveruizok)) + - fix export preview size [#3264](https://github.com/tldraw/tldraw/pull/3264) ([@SomeHats](https://github.com/SomeHats)) + - A few more async routes [#3023](https://github.com/tldraw/tldraw/pull/3023) ([@steveruizok](https://github.com/steveruizok)) +- `@tldraw/editor`, `tldraw` + - Fix culling. [#3504](https://github.com/tldraw/tldraw/pull/3504) ([@MitjaBezensek](https://github.com/MitjaBezensek)) + - Revert "RBush again? (#3439)" [#3481](https://github.com/tldraw/tldraw/pull/3481) ([@MitjaBezensek](https://github.com/MitjaBezensek)) + - RBush again? [#3439](https://github.com/tldraw/tldraw/pull/3439) ([@MitjaBezensek](https://github.com/MitjaBezensek) [@steveruizok](https://github.com/steveruizok)) + - [culling] Improve setting of display none. [#3376](https://github.com/tldraw/tldraw/pull/3376) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- `@tldraw/state` + - Revert "[perf] faster signia capture (#3471)" [#3480](https://github.com/tldraw/tldraw/pull/3480) ([@ds300](https://github.com/ds300)) +- `@tldraw/utils` + - Add two simple perf helpers. [#3399](https://github.com/tldraw/tldraw/pull/3399) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- `@tldraw/editor`, `tldraw`, `@tldraw/tlschema` + - Display none for culled shapes [#3291](https://github.com/tldraw/tldraw/pull/3291) ([@MitjaBezensek](https://github.com/MitjaBezensek) [@steveruizok](https://github.com/steveruizok)) +- `@tldraw/editor`, `@tldraw/state`, `tldraw` + - Revert perf changes [#3217](https://github.com/tldraw/tldraw/pull/3217) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- `@tldraw/tldraw` + - Remove namespaced-tldraw/tldraw.css [#3068](https://github.com/tldraw/tldraw/pull/3068) ([@SomeHats](https://github.com/SomeHats)) +- `@tldraw/tlschema` + - Remove dependabot config since it only controls version updates? [#3057](https://github.com/tldraw/tldraw/pull/3057) ([@MitjaBezensek](https://github.com/MitjaBezensek)) + +#### 🐛 Bug Fixes + +- VS Code 2.0.30 [#3519](https://github.com/tldraw/tldraw/pull/3519) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- [hotfix] Panning fix for VS Code [#3452](https://github.com/tldraw/tldraw/pull/3452) (huppy+SomeHats@tldraw.com huppy+ds300@tldraw.com [@SomeHats](https://github.com/SomeHats) [@web-flow](https://github.com/web-flow) huppy+mimecuvalo@tldraw.com [@steveruizok](https://github.com/steveruizok) [@MitjaBezensek](https://github.com/MitjaBezensek) [@ds300](https://github.com/ds300) huppy+steveruizok@tldraw.com) +- Fix viewport params for pages. [#3079](https://github.com/tldraw/tldraw/pull/3079) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- Better websocket reconnection handling [#2960](https://github.com/tldraw/tldraw/pull/2960) ([@si14](https://github.com/si14) [@ds300](https://github.com/ds300)) +- Lokalise: Translations update [#3049](https://github.com/tldraw/tldraw/pull/3049) ([@TodePond](https://github.com/TodePond)) +- `@tldraw/assets`, `@tldraw/editor`, `tldraw` + - ui: make toasts look more toasty [#2988](https://github.com/tldraw/tldraw/pull/2988) ([@mimecuvalo](https://github.com/mimecuvalo)) +- `@tldraw/state` + - Revert throttling of useValue and useStateTracking. [#3129](https://github.com/tldraw/tldraw/pull/3129) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- `tldraw`, `@tldraw/utils` + - chore: cleanup multiple uses of FileReader [#3110](https://github.com/tldraw/tldraw/pull/3110) ([@mimecuvalo](https://github.com/mimecuvalo)) +- `tldraw` + - [fix] Rotated crop handle [#3093](https://github.com/tldraw/tldraw/pull/3093) ([@steveruizok](https://github.com/steveruizok)) + - Fix an issue where the video size was not drawn correctly [#3047](https://github.com/tldraw/tldraw/pull/3047) ([@bubweiser](https://github.com/bubweiser) [@steveruizok](https://github.com/steveruizok)) + - [fix] Input tags [#3038](https://github.com/tldraw/tldraw/pull/3038) ([@steveruizok](https://github.com/steveruizok)) + - [terrible] Firefox: Allow scrolling on keyboard shortcuts dialog [#2974](https://github.com/tldraw/tldraw/pull/2974) ([@TodePond](https://github.com/TodePond) [@steveruizok](https://github.com/steveruizok)) + - [fix] Missing element crash (rare) on video shapes. [#3037](https://github.com/tldraw/tldraw/pull/3037) ([@steveruizok](https://github.com/steveruizok)) +- `@tldraw/editor`, `tldraw` + - Fix validation errors for `duplicateProps` [#3065](https://github.com/tldraw/tldraw/pull/3065) ([@MitjaBezensek](https://github.com/MitjaBezensek)) + - children: any -> children: ReactNode [#3061](https://github.com/tldraw/tldraw/pull/3061) ([@SomeHats](https://github.com/SomeHats)) +- `@tldraw/editor`, `tldraw`, `@tldraw/utils` + - Wrap local/session storage calls in try/catch (take 2) [#3066](https://github.com/tldraw/tldraw/pull/3066) ([@SomeHats](https://github.com/SomeHats)) + - Revert "Protect local storage calls (#3043)" [#3063](https://github.com/tldraw/tldraw/pull/3063) ([@SomeHats](https://github.com/SomeHats)) + - Protect local storage calls [#3043](https://github.com/tldraw/tldraw/pull/3043) ([@steveruizok](https://github.com/steveruizok)) +- `@tldraw/editor` + - Expose `getStyleForNextShape` [#3039](https://github.com/tldraw/tldraw/pull/3039) ([@steveruizok](https://github.com/steveruizok)) + - [bugfix] Avoid randomness at init time to allow running on cloudflare. [#3016](https://github.com/tldraw/tldraw/pull/3016) ([@ds300](https://github.com/ds300)) +- `@tldraw/editor`, `@tldraw/tldraw`, `tldraw` + - Show a broken image for files without assets [#2990](https://github.com/tldraw/tldraw/pull/2990) ([@steveruizok](https://github.com/steveruizok)) + +#### 🧹 Chores + +- VS Code 2.0.29 [#3515](https://github.com/tldraw/tldraw/pull/3515) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- VS Code 2.0.27 [#3442](https://github.com/tldraw/tldraw/pull/3442) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- VS Code 2.0.26 [#3148](https://github.com/tldraw/tldraw/pull/3148) ([@MitjaBezensek](https://github.com/MitjaBezensek)) + +#### 🧪 Tests + +- attempted fix of a flaky ClientWebSocketAdapter test [#3114](https://github.com/tldraw/tldraw/pull/3114) ([@si14](https://github.com/si14)) +- `@tldraw/editor` + - Add tests for Vec.Average [#3071](https://github.com/tldraw/tldraw/pull/3071) ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- `@tldraw/editor`, `@tldraw/tlschema` + - [fix] Routes check on e2e tests [#3022](https://github.com/tldraw/tldraw/pull/3022) ([@steveruizok](https://github.com/steveruizok)) + +#### 🔩 Dependency Updates + +- Bump the npm_and_yarn group across 1 directory with 2 updates [#3505](https://github.com/tldraw/tldraw/pull/3505) ([@dependabot[bot]](https://github.com/dependabot[bot]) [@mimecuvalo](https://github.com/mimecuvalo) [@steveruizok](https://github.com/steveruizok)) +- Bump the npm_and_yarn group across 1 directory with 2 updates [#3443](https://github.com/tldraw/tldraw/pull/3443) ([@dependabot[bot]](https://github.com/dependabot[bot])) +- Bump the npm_and_yarn group across 1 directory with 1 update [#3348](https://github.com/tldraw/tldraw/pull/3348) ([@dependabot[bot]](https://github.com/dependabot[bot])) +- Bump the npm_and_yarn group across 1 directory with 2 updates [#3304](https://github.com/tldraw/tldraw/pull/3304) ([@dependabot[bot]](https://github.com/dependabot[bot]) [@github-actions[bot]](https://github.com/github-actions[bot]) [@MitjaBezensek](https://github.com/MitjaBezensek)) +- Bump the npm_and_yarn group across 1 directory with 2 updates [#3165](https://github.com/tldraw/tldraw/pull/3165) ([@dependabot[bot]](https://github.com/dependabot[bot])) + +#### Authors: 23 + +- [@dependabot[bot]](https://github.com/dependabot[bot]) +- [@github-actions[bot]](https://github.com/github-actions[bot]) +- [@huppy-bot[bot]](https://github.com/huppy-bot[bot]) +- alex ([@SomeHats](https://github.com/SomeHats)) +- Caleb Eby ([@calebeby](https://github.com/calebeby)) +- Dan Groshev ([@si14](https://github.com/si14)) +- David Sheldrick ([@ds300](https://github.com/ds300)) +- ds300 (huppy+ds300@tldraw.com) +- GitHub Web Flow ([@web-flow](https://github.com/web-flow)) +- hirano ([@bubweiser](https://github.com/bubweiser)) +- Kesavaraja Krishnan ([@Kesavaraja](https://github.com/Kesavaraja)) +- Lorenzo Lewis ([@lorenzolewis](https://github.com/lorenzolewis)) +- Lu Wilson ([@TodePond](https://github.com/TodePond)) +- Mime Čuvalo ([@mimecuvalo](https://github.com/mimecuvalo)) +- mimecuvalo (huppy+mimecuvalo@tldraw.com) +- Mitja Bezenšek ([@MitjaBezensek](https://github.com/MitjaBezensek)) +- Orion Reed ([@OrionReed](https://github.com/OrionReed)) +- Slowhand ([@Slowhand0309](https://github.com/Slowhand0309)) +- SomeHats (huppy+SomeHats@tldraw.com) +- Steve Ruiz ([@steveruizok](https://github.com/steveruizok)) +- steveruizok (huppy+steveruizok@tldraw.com) +- Sunny Zanchi ([@sunnyzanchi](https://github.com/sunnyzanchi)) +- Taha ([@Taha-Hassan-Git](https://github.com/Taha-Hassan-Git)) + ### [v2.0.2](/releases/v2.0.2) #### 🐛 Bug Fix diff --git a/apps/docs/content/releases/v2.0.0.mdx b/apps/docs/content/releases/v2.0.0.mdx deleted file mode 100644 index 2d90d61c5..000000000 --- a/apps/docs/content/releases/v2.0.0.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: v2.0.0 -description: Examples -author: tldraw -date: 2/29/2024 -order: 2 -status: published ---- - -[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.0) - -#### ⚠️ Pushed to `main` - -- `@tldraw/tldraw`, `tldraw` - - updatereadmes ([@steveruizok](https://github.com/steveruizok)) - -#### 📝 Documentation - -- `@tldraw/tldraw` - - Update readmes / docs for 2.0 [#3011](https://github.com/tldraw/tldraw/pull/3011) ([@steveruizok](https://github.com/steveruizok)) - -#### Authors: 1 - -- Steve Ruiz ([@steveruizok](https://github.com/steveruizok)) diff --git a/apps/docs/content/releases/v2.0.1.mdx b/apps/docs/content/releases/v2.0.1.mdx deleted file mode 100644 index 58bc85d2b..000000000 --- a/apps/docs/content/releases/v2.0.1.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: v2.0.1 -description: Examples -author: tldraw -date: 3/11/2024 -order: 1 -status: published ---- - -[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.1) - -#### 🐛 Bug Fix - -- `@tldraw/editor` - - [patch 2.0.1] Cherry-pick 'Avoid randomness at init time...' [#3076](https://github.com/tldraw/tldraw/pull/3076) ([@ds300](https://github.com/ds300)) - -#### ⚠️ Pushed to `v2.0.x` - -- fetch main during patch publish ([@ds300](https://github.com/ds300)) -- cherry-pick tooling changes too i guess ([@ds300](https://github.com/ds300)) - -#### Authors: 1 - -- David Sheldrick ([@ds300](https://github.com/ds300)) diff --git a/apps/docs/content/releases/v2.0.2.mdx b/apps/docs/content/releases/v2.0.2.mdx deleted file mode 100644 index 17991d05a..000000000 --- a/apps/docs/content/releases/v2.0.2.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: v2.0.2 -description: Examples -author: tldraw -date: 3/18/2024 -order: 0 -status: published ---- - -[View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v2.0.2) - -#### 🐛 Bug Fix - -- [docs] Sync docs deploy with npm deploy [#3153](https://github.com/tldraw/tldraw/pull/3153) ([@ds300](https://github.com/ds300)) -- `tldraw` - - Fix jpg export and tests (#3198) [#3199](https://github.com/tldraw/tldraw/pull/3199) ([@SomeHats](https://github.com/SomeHats)) - -#### ⚠️ Pushed to `v2.0.x` - -- empty commit ([@SomeHats](https://github.com/SomeHats)) -- fix release eliding ([@ds300](https://github.com/ds300)) - -#### Authors: 2 - -- alex ([@SomeHats](https://github.com/SomeHats)) -- David Sheldrick ([@ds300](https://github.com/ds300)) diff --git a/apps/docs/package.json b/apps/docs/package.json index 2ab775178..4b888627c 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -29,8 +29,8 @@ "dev": "concurrently \"NODE_ENV=development next dev --port=3001\" \"tsx ./watcher.ts\" --kill-others", "next-dev": "next dev", "lint": "yarn run -T tsx ../../scripts/lint.ts", - "build": "yarn create-api-markdown && yarn refresh-content && next build && yarn check-links", - "start": "yarn create-api-markdown && yarn refresh-content && next start", + "build": "yarn refresh-everything && next build && yarn check-links", + "start": "yarn refresh-everything && next start", "fetch-api-source": "yarn run -T tsx --tsconfig ./tsconfig.content.json ./scripts/fetch-api-source.ts", "fetch-releases": "yarn run -T tsx --tsconfig ./tsconfig.content.json ./scripts/fetch-releases.ts", "check-links": "yarn run -T tsx --tsconfig ./tsconfig.content.json ./scripts/check-broken-links.ts", diff --git a/apps/docs/scripts/functions/connect.ts b/apps/docs/scripts/functions/connect.ts index 35b5b7419..82ff044e8 100644 --- a/apps/docs/scripts/functions/connect.ts +++ b/apps/docs/scripts/functions/connect.ts @@ -2,10 +2,14 @@ import path from 'path' import { open } from 'sqlite' import sqlite3 from 'sqlite3' -export async function connect(opts = {} as { reset?: boolean }) { +export async function connect(opts: { reset?: boolean; mode: 'readonly' | 'readwrite' }) { const db = await open({ filename: path.join(process.cwd(), 'content.db'), driver: sqlite3.Database, + mode: + opts.mode === 'readonly' + ? sqlite3.OPEN_READONLY + : sqlite3.OPEN_CREATE | sqlite3.OPEN_READWRITE, }) if (opts.reset) { diff --git a/apps/docs/scripts/functions/refreshContent.ts b/apps/docs/scripts/functions/refreshContent.ts index 27b08a422..8b99ae78a 100644 --- a/apps/docs/scripts/functions/refreshContent.ts +++ b/apps/docs/scripts/functions/refreshContent.ts @@ -9,7 +9,7 @@ import { generateExamplesContent } from './generateExamplesContent' export async function refreshContent(opts = {} as { silent: boolean }) { if (!opts.silent) nicelog('◦ Resetting database...') - const db = await connect({ reset: true }) + const db = await connect({ reset: true, mode: 'readwrite' }) if (!opts.silent) nicelog('◦ Adding authors to db...') await addAuthors(db, await require('../../content/authors.json')) diff --git a/apps/docs/scripts/reset-db.ts b/apps/docs/scripts/reset-db.ts index 1734fafce..7373ec877 100644 --- a/apps/docs/scripts/reset-db.ts +++ b/apps/docs/scripts/reset-db.ts @@ -2,7 +2,7 @@ import { nicelog } from '@/utils/nicelog' import { connect } from './functions/connect' ;(async function () { nicelog('◦ Resetting database...') - await connect({ reset: true }) + await connect({ reset: true, mode: 'readwrite' }) nicelog('✔ Complete!') process.exit() })() diff --git a/apps/docs/utils/ContentDatabase.ts b/apps/docs/utils/ContentDatabase.ts index ee3d3dbf8..eb2e5d72c 100644 --- a/apps/docs/utils/ContentDatabase.ts +++ b/apps/docs/utils/ContentDatabase.ts @@ -295,9 +295,9 @@ export class ContentDatabase { let contentDatabase: ContentDatabase | null = null -export async function getDb(opts = {} as { reset?: boolean }) { - if (!contentDatabase || opts.reset) { - const db = await connect(opts) +export async function getDb() { + if (!contentDatabase) { + const db = await connect({ mode: 'readonly' }) contentDatabase = new ContentDatabase(db) } diff --git a/apps/docs/utils/ContentVectorDatabase.ts b/apps/docs/utils/ContentVectorDatabase.ts index 1608cc038..7eceff036 100644 --- a/apps/docs/utils/ContentVectorDatabase.ts +++ b/apps/docs/utils/ContentVectorDatabase.ts @@ -210,7 +210,7 @@ export async function getVectorDb( if (opts.updateContent || opts.rebuildIndex) { nicelog(`Rebuilding index`) - const db = await connect({ reset: false }) + const db = await connect({ reset: false, mode: 'readonly' }) nicelog(`Getting articles`) const articles = diff --git a/lazy.config.ts b/lazy.config.ts index c711860f4..aae6c4934 100644 --- a/lazy.config.ts +++ b/lazy.config.ts @@ -30,6 +30,7 @@ const config = { }, }, 'apps/docs': { + runsAfter: { 'build-api': { in: 'all-packages' } }, cache: { inputs: [ 'app/**/*', diff --git a/lerna.json b/lerna.json index 836b76006..49742f4af 100644 --- a/lerna.json +++ b/lerna.json @@ -1,7 +1,5 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "packages": [ - "packages/*" - ], + "packages": ["packages/*"], "version": "2.1.0" } diff --git a/packages/editor/api/api.json b/packages/editor/api/api.json deleted file mode 100644 index 7dc444dd9..000000000 --- a/packages/editor/api/api.json +++ /dev/null @@ -1,50904 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.43.1", - "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 end: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "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", - "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": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "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": "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 isFilled: boolean;\n radius: number;\n x?: number;\n y?: 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!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 isFilled: boolean;\n radius: number;\n x?: number;\n y?: 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!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": ", 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!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 setUserPreferences?: ((userPreferences: " - }, - { - "kind": "Reference", - "text": "TLUserPreferences", - "canonicalReference": "@tldraw/editor!TLUserPreferences:interface" - }, - { - "kind": "Content", - "text": ") => void) | 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}" - }, - { - "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 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 start: " - }, - { - "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": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "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": "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!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 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", - "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 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", - "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 end: " - }, - { - "kind": "Reference", - "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 }" - }, - { - "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": ", 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": "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.\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.deleteShape(shape.id)\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": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCollaborators:member(1)", - "docComment": "/**\n * Returns a list of presence records for all peer collaborators. This will return the latest presence record for each connected user.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCollaborators(): " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/tlschema\")." - }, - { - "kind": "Reference", - "text": "TLInstancePresence", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCollaborators" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/editor!Editor#getCollaboratorsOnCurrentPage:member(1)", - "docComment": "/**\n * Returns a list of presence records for all peer collaborators on the current page. This will return the latest presence record for each connected user.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCollaboratorsOnCurrentPage(): " - }, - { - "kind": "Content", - "text": "import(\"@tldraw/tlschema\")." - }, - { - "kind": "Reference", - "text": "TLInstancePresence", - "canonicalReference": "@tldraw/tlschema!TLInstancePresence:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "getCollaboratorsOnCurrentPage" - }, - { - "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#getCulledShapes:member(1)", - "docComment": "/**\n * Get culled shapes.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getCulledShapes(): " - }, - { - "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": "getCulledShapes" - }, - { - "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.getIsMenuOpen()\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#getOnlySelectedShapeId:member(1)", - "docComment": "/**\n * The id of 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's id.\n *\n * @public @readonly\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getOnlySelectedShapeId(): " - }, - { - "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": "getOnlySelectedShapeId" - }, - { - "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#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 backgroundIndex: number;\n id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n index: number;\n opacity: number;\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 }[]" - }, - { - "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 filter?: ((shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "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", - "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 hitInside?: boolean | undefined;\n margin?: number | 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} or {@link Editor.getSvgElement} 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#getSvgElement:member(1)", - "docComment": "/**\n * Get an exported SVG element 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": "getSvgElement(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 height: number;\n svg: " - }, - { - "kind": "Reference", - "text": "SVGSVGElement", - "canonicalReference": "!SVGSVGElement:interface" - }, - { - "kind": "Content", - "text": ";\n width: number;\n } | 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": "getSvgElement" - }, - { - "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 height: number;\n svg: string;\n width: 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 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", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "text": ";\n originPagePoint: " - }, - { - "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 currentPagePoint: " - }, - { - "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 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", - "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#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 hitInside?: boolean | undefined;\n margin?: number | 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 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 preserveIds?: boolean;\n preservePosition?: boolean;\n select?: 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 direction: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n friction: number;\n speed: 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 inset?: number;\n targetZoom?: 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 height: number;\n width: 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 height: number;\n width: 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": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "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": "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 direction: 'horizontal' | 'vertical';\n gaps: " - }, - { - "kind": "Reference", - "text": "Array", - "canonicalReference": "!Array:interface" - }, - { - "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 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 }>;\n id: string;\n type: 'gaps';\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 end: " - }, - { - "kind": "Reference", - "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}" - }, - { - "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 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", - "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 mid: number;\n min: 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 rotation: number;\n scaleX: number;\n scaleY: number;\n x: number;\n y: 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 rotation: number;\n scaleX: number;\n scaleY: number;\n x: number;\n y: 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 rotation: number;\n scaleX: number;\n scaleY: number;\n x: number;\n y: 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, cx: number, cy: number): " - }, - { - "kind": "Reference", - "text": "MatModel", - "canonicalReference": "@tldraw/editor!MatModel:interface" - }, - { - "kind": "Content", - "text": ";\n (x: number, y: 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 points: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[];\n type: 'points';\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!polygonIntersectsPolyline:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function polygonIntersectsPolyline(polygon: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", polyline: " - }, - { - "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": "polygon", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "polyline", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "polygonIntersectsPolyline" - }, - { - "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": ", 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": "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 height: number;\n width: number;\n x?: number;\n y?: 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 handle: " - }, - { - "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 initialShape: " - }, - { - "kind": "Reference", - "text": "TLBaseBoxShape", - "canonicalReference": "@tldraw/editor!TLBaseBoxShape:type" - }, - { - "kind": "Content", - "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", - "text": ", opts?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n maxHeight: number;\n maxWidth: number;\n minHeight: number;\n minWidth: number;\n}>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n props: {\n h: number;\n w: number;\n };\n x: number;\n y: number;\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 maxHeight: number;\n maxWidth: number;\n minHeight: number;\n minWidth: 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 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", - "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 hardReset: () => void;\n openWindow: (url: string, target: string) => void;\n refreshPage: () => 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) => 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 * @example\n * ```ts\n * onDragShapesOver = (shape, shapes) => {\n * \tthis.editor.reparentShapes(shapes, shape.id)\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 store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";\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": "Variable", - "canonicalReference": "@tldraw/editor!SIDES:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "SIDES: " - }, - { - "kind": "Content", - "text": "readonly [\"top\", \"right\", \"bottom\", \"left\"]" - } - ], - "fileUrlPath": "packages/editor/src/lib/constants.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "SIDES", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "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 height: number;\n width: 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 height: number;\n width: 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 bodyArc: " - }, - { - "kind": "Reference", - "text": "TLArcInfo", - "canonicalReference": "@tldraw/editor!TLArcInfo:interface" - }, - { - "kind": "Content", - "text": ";\n end: " - }, - { - "kind": "Reference", - "text": "TLArrowPoint", - "canonicalReference": "@tldraw/editor!TLArrowPoint:type" - }, - { - "kind": "Content", - "text": ";\n handleArc: " - }, - { - "kind": "Reference", - "text": "TLArcInfo", - "canonicalReference": "@tldraw/editor!TLArcInfo:interface" - }, - { - "kind": "Content", - "text": ";\n isStraight: false;\n isValid: boolean;\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} | {\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", - "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 arrowhead: " - }, - { - "kind": "Reference", - "text": "TLArrowShapeArrowheadStyle", - "canonicalReference": "@tldraw/tlschema!TLArrowShapeArrowheadStyle:type" - }, - { - "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}" - }, - { - "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 className?: string;\n color?: string;\n opacity?: number;\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 name: 'cancel';\n type: 'misc';\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 button: number;\n name: " - }, - { - "kind": "Reference", - "text": "TLCLickEventName", - "canonicalReference": "@tldraw/editor!TLCLickEventName:type" - }, - { - "kind": "Content", - "text": ";\n phase: 'down' | 'settle' | 'up';\n point: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n pointerId: number;\n type: 'click';\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 color: string;\n opacity?: number;\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}" - }, - { - "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 preservesRedoStack?: boolean;\n data: Data;\n name: Name;\n type: 'command';\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 squash?: (prevData: Data, nextData: Data) => Data;\n do: (data: Data) => void;\n redo?: (data: Data) => void;\n undo: (data: Data) => void;\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 preservesRedoStack: boolean;\n squashing: boolean;\n ephemeral: 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 name: 'complete';\n type: 'misc';\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 chatMessage: string;\n className?: string;\n color?: string;\n name: null | string;\n point: null | " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n zoom: number;\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 defaultName?: string;\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 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", - "text": ";" - } - ], - "fileUrlPath": "packages/editor/src/lib/TldrawEditor.tsx", - "releaseTag": "Public", - "name": "TldrawEditorProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 19 - } - }, - { - "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 markId?: string;\n reason: 'bail';\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 count: number;\n name: string;\n pageId: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";\n }]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"max-shapes\"", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/editor!TLEventMap#\"select-all-text\":member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "'select-all-text': " - }, - { - "kind": "Content", - "text": "[{\n shapeId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n }]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "\"select-all-text\"", - "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 file: " - }, - { - "kind": "Reference", - "text": "File", - "canonicalReference": "!File:interface" - }, - { - "kind": "Content", - "text": ";\n type: 'file';\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 point?: " - }, - { - "kind": "Reference", - "text": "VecLike", - "canonicalReference": "@tldraw/editor!VecLike:type" - }, - { - "kind": "Content", - "text": ";\n sources?: " - }, - { - "kind": "Reference", - "text": "TLExternalContentSource", - "canonicalReference": "@tldraw/editor!TLExternalContentSource:type" - }, - { - "kind": "Content", - "text": "[];\n} & ({\n embed: " - }, - { - "kind": "Reference", - "text": "EmbedDefinition", - "canonicalReference": "@tldraw/tlschema!EmbedDefinition:type" - }, - { - "kind": "Content", - "text": ";\n type: 'embed';\n url: string;\n} | {\n files: " - }, - { - "kind": "Reference", - "text": "File", - "canonicalReference": "!File:interface" - }, - { - "kind": "Content", - "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", - "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 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", - "text": "TLContent", - "canonicalReference": "@tldraw/editor!TLContent:interface" - }, - { - "kind": "Content", - "text": ";\n type: 'tldraw';\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 size: number;\n x: number;\n y: number;\n z: 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 className?: string;\n handle: " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": ";\n isCoarse: boolean;\n shapeId: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n zoom: number;\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 id: string;\n onRedo: boolean;\n onUndo: boolean;\n type: 'STOP';\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!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 name: 'interrupt';\n type: 'misc';\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 code: string;\n key: string;\n name: " - }, - { - "kind": "Reference", - "text": "TLKeyboardEventName", - "canonicalReference": "@tldraw/editor!TLKeyboardEventName:type" - }, - { - "kind": "Content", - "text": ";\n type: 'keyboard';\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 initial?: T | undefined;\n isPrecise: boolean;\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 delta: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\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 type: 'pinch';\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 button: number;\n isPen: boolean;\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 type: 'pointer';\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 handle: " - }, - { - "kind": "Reference", - "text": "TLHandle", - "canonicalReference": "@tldraw/tlschema!TLHandle:interface" - }, - { - "kind": "Content", - "text": ";\n shape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "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", - "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 handle: " - }, - { - "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 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", - "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 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 initialPageTransform: " - }, - { - "kind": "Reference", - "text": "MatLike", - "canonicalReference": "@tldraw/editor!MatLike:type" - }, - { - "kind": "Content", - "text": ";\n initialShape: " - }, - { - "kind": "Reference", - "text": "TLShape", - "canonicalReference": "@tldraw/tlschema!TLShape:type" - }, - { - "kind": "Content", - "text": ";\n mode: " - }, - { - "kind": "Reference", - "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}>" - }, - { - "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 initialCursorAngle: number;\n initialSelectionRotation: number;\n selectionPageCenter: " - }, - { - "kind": "Reference", - "text": "Vec", - "canonicalReference": "@tldraw/editor!Vec:class" - }, - { - "kind": "Content", - "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 }[];\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 className?: string;\n color?: string;\n opacity?: number;\n scribble: " - }, - { - "kind": "Reference", - "text": "TLScribble", - "canonicalReference": "@tldraw/tlschema!TLScribble:type" - }, - { - "kind": "Content", - "text": ";\n zoom: number;\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 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", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";\n selectedShapeIds: " - }, - { - "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 className?: string;\n color?: string | undefined;\n hidden?: boolean;\n opacity?: number;\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/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": "MigrationSequence", - "canonicalReference": "@tldraw/store!MigrationSequence: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": 6 - } - }, - { - "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 defaultName?: string;\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} & ({\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", - "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})" - }, - { - "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 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", - "text": "Error", - "canonicalReference": "!Error:interface" - }, - { - "kind": "Content", - "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", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";\n} | {\n readonly error?: undefined;\n readonly status: 'synced-local';\n readonly store: " - }, - { - "kind": "Reference", - "text": "TLStore", - "canonicalReference": "@tldraw/tlschema!TLStore:type" - }, - { - "kind": "Content", - "text": ";\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 background: boolean;\n bounds: " - }, - { - "kind": "Reference", - "text": "Box", - "canonicalReference": "@tldraw/editor!Box:class" - }, - { - "kind": "Content", - "text": ";\n darkMode?: boolean;\n padding: number;\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 scale: number;\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 delta: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n name: 'wheel';\n point: " - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n type: 'wheel';\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 [n: number]: T;\n readonly length: number;\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 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 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 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: " - }, - { - "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 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 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 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 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", - "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 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 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 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 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 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", - "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": 86 - }, - "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.DistMin:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static DistMin(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": ", n: " - }, - { - "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": "B", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "DistMin" - }, - { - "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/packages/namespaced-tldraw/api/api.json b/packages/namespaced-tldraw/api/api.json deleted file mode 100644 index b648fcf70..000000000 --- a/packages/namespaced-tldraw/api/api.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.43.1", - "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/tldraw!", - "docComment": "", - "name": "@tldraw/tldraw", - "preserveMemberOrder": false, - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "@tldraw/tldraw!", - "name": "", - "preserveMemberOrder": false, - "members": [] - } - ] -} diff --git a/packages/state/api/api.json b/packages/state/api/api.json deleted file mode 100644 index d6a63c578..000000000 --- a/packages/state/api/api.json +++ /dev/null @@ -1,3140 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.43.1", - "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/state!", - "docComment": "", - "name": "@tldraw/state", - "preserveMemberOrder": false, - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "@tldraw/state!", - "name": "", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Function", - "canonicalReference": "@tldraw/state!atom:function(1)", - "docComment": "/**\n * Creates a new [[Atom]].\n *\n * An Atom is a signal that can be updated directly by calling [[Atom.set]] or [[Atom.update]].\n *\n * @example\n * ```ts\n * const name = atom('name', 'John')\n *\n * name.get() // 'John'\n *\n * name.set('Jane')\n *\n * name.get() // 'Jane'\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function atom(\nname: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", \ninitialValue: " - }, - { - "kind": "Content", - "text": "Value" - }, - { - "kind": "Content", - "text": ", \noptions?: " - }, - { - "kind": "Reference", - "text": "AtomOptions", - "canonicalReference": "@tldraw/state!AtomOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Atom", - "canonicalReference": "@tldraw/state!Atom:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/Atom.ts", - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 12 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "initialValue", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "isOptional": true - } - ], - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Diff", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "name": "atom" - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/state!Atom:interface", - "docComment": "/**\n * An Atom is a signal that can be updated directly by calling [[Atom.set]] or [[Atom.update]].\n *\n * Atoms are created using the [[atom]] function.\n *\n * @example\n * ```ts\n * const name = atom('name', 'John')\n *\n * print(name.get()) // 'John'\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface Atom extends " - }, - { - "kind": "Reference", - "text": "Signal", - "canonicalReference": "@tldraw/state!Signal:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/state/src/lib/core/Atom.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Diff", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "name": "Atom", - "preserveMemberOrder": false, - "members": [ - { - "kind": "MethodSignature", - "canonicalReference": "@tldraw/state!Atom#set:member(1)", - "docComment": "/**\n * Sets the value of this atom to the given value. If the value is the same as the current value, this is a no-op.\n *\n * @param value - The new value to set.\n *\n * @param diff - The diff to use for the update. If not provided, the diff will be computed using [[AtomOptions.computeDiff]].\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "set(value: " - }, - { - "kind": "Content", - "text": "Value" - }, - { - "kind": "Content", - "text": ", diff?: " - }, - { - "kind": "Content", - "text": "Diff" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "Value" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "diff", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "name": "set" - }, - { - "kind": "MethodSignature", - "canonicalReference": "@tldraw/state!Atom#update:member(1)", - "docComment": "/**\n * Updates the value of this atom using the given updater function. If the returned value is the same as the current value, this is a no-op.\n *\n * @param updater - A function that takes the current value and returns the new value.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "update(updater: " - }, - { - "kind": "Content", - "text": "(value: Value) => Value" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "Value" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "updater", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "update" - } - ], - "extendsTokenRanges": [ - { - "startIndex": 3, - "endIndex": 5 - } - ] - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/state!AtomOptions:interface", - "docComment": "/**\n * The options to configure an atom, passed into the [[atom]] function.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface AtomOptions " - } - ], - "fileUrlPath": "packages/state/src/lib/core/Atom.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Diff", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "AtomOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/state!AtomOptions#computeDiff:member", - "docComment": "/**\n * A method used to compute a diff between the atom's old and new values. If provided, it will not be used unless you also specify [[AtomOptions.historyLength]].\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "computeDiff?: " - }, - { - "kind": "Reference", - "text": "ComputeDiff", - "canonicalReference": "@tldraw/state!~ComputeDiff:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "computeDiff", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/state!AtomOptions#historyLength:member", - "docComment": "/**\n * The maximum number of diffs to keep in the history buffer.\n *\n * If you don't need to compute diffs, or if you will supply diffs manually via [[Atom.set]], you can leave this as `undefined` and no history buffer will be created.\n *\n * If you expect the value to be part of an active effect subscription all the time, and to not change multiple times inside of a single transaction, you can set this to a relatively low number (e.g. 10).\n *\n * Otherwise, set this to a higher number based on your usage pattern and memory constraints.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "historyLength?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "historyLength", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/state!AtomOptions#isEqual:member", - "docComment": "/**\n * If provided, this will be used to compare the old and new values of the atom to determine if the value has changed. By default, values are compared using first using strict equality (`===`), then `Object.is`, and finally any `.equals` method present in the object's prototype chain.\n *\n * @param a - The old value\n *\n * @param b - The new value\n *\n * @returns \n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isEqual?: " - }, - { - "kind": "Content", - "text": "(a: any, b: any) => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "isEqual", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!computed:function(1)", - "docComment": "/**\n * Creates a computed signal.\n *\n * @param name - The name of the signal.\n *\n * @param compute - The function that computes the value of the signal.\n *\n * @param options - Options for the signal.\n *\n * @example\n * ```ts\n * const name = atom('name', 'John')\n * const greeting = computed('greeting', () => `Hello ${name.get()}!`)\n * console.log(greeting.get()) // 'Hello John!'\n * ```\n *\n * `computed` may also be used as a decorator for creating computed getter methods.\n *\n * @example\n * ```ts\n * class Counter {\n * max = 100\n * count = atom(0)\n *\n * @computed getRemaining() {\n * return this.max - this.count.get()\n * }\n * }\n * ```\n *\n * You may optionally pass in a [[ComputedOptions]] when used as a decorator:\n *\n * @example\n * ```ts\n * class Counter {\n * max = 100\n * count = atom(0)\n *\n * @computed({isEqual: (a, b) => a === b})\n * getRemaining() {\n * return this.max - this.count.get()\n * }\n * }\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function computed(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", compute: " - }, - { - "kind": "Content", - "text": "(previousValue: typeof " - }, - { - "kind": "Reference", - "text": "UNINITIALIZED", - "canonicalReference": "@tldraw/state!~UNINITIALIZED:var" - }, - { - "kind": "Content", - "text": " | Value, lastComputedEpoch: number) => Value | " - }, - { - "kind": "Reference", - "text": "WithDiff", - "canonicalReference": "@tldraw/state!~WithDiff:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Reference", - "text": "ComputedOptions", - "canonicalReference": "@tldraw/state!ComputedOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Computed", - "canonicalReference": "@tldraw/state!Computed:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/Computed.ts", - "returnTypeTokenRange": { - "startIndex": 14, - "endIndex": 16 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "compute", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 10 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 13 - }, - "isOptional": true - } - ], - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Diff", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "name": "computed" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!computed:function(2)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function computed(target: " - }, - { - "kind": "Content", - "text": "any" - }, - { - "kind": "Content", - "text": ", key: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", descriptor: " - }, - { - "kind": "Reference", - "text": "PropertyDescriptor", - "canonicalReference": "!PropertyDescriptor:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "PropertyDescriptor", - "canonicalReference": "!PropertyDescriptor:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/Computed.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "target", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "key", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "descriptor", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "computed" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!computed:function(3)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function computed(options?: " - }, - { - "kind": "Reference", - "text": "ComputedOptions", - "canonicalReference": "@tldraw/state!ComputedOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "(target: any, key: string, descriptor: " - }, - { - "kind": "Reference", - "text": "PropertyDescriptor", - "canonicalReference": "!PropertyDescriptor:interface" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "PropertyDescriptor", - "canonicalReference": "!PropertyDescriptor:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/Computed.ts", - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 3, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": true - } - ], - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Diff", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "name": "computed" - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/state!Computed:interface", - "docComment": "/**\n * A computed signal created via [[computed]].\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface Computed extends " - }, - { - "kind": "Reference", - "text": "Signal", - "canonicalReference": "@tldraw/state!Signal:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "packages/state/src/lib/core/Computed.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Diff", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "name": "Computed", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/state!Computed#isActivelyListening:member", - "docComment": "/**\n * Whether this computed child is involved in an actively-running effect graph.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "readonly isActivelyListening: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "isActivelyListening", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 3, - "endIndex": 5 - } - ] - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/state!ComputedOptions:interface", - "docComment": "/**\n * Options for creating computed signals. Used when calling [[computed]].\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface ComputedOptions " - } - ], - "fileUrlPath": "packages/state/src/lib/core/Computed.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Diff", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "ComputedOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/state!ComputedOptions#computeDiff:member", - "docComment": "/**\n * A method used to compute a diff between the atom's old and new values. If provided, it will not be used unless you also specify [[AtomOptions.historyLength]].\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "computeDiff?: " - }, - { - "kind": "Reference", - "text": "ComputeDiff", - "canonicalReference": "@tldraw/state!~ComputeDiff:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "computeDiff", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/state!ComputedOptions#historyLength:member", - "docComment": "/**\n * The maximum number of diffs to keep in the history buffer.\n *\n * If you don't need to compute diffs, or if you will supply diffs manually via [[Atom.set]], you can leave this as `undefined` and no history buffer will be created.\n *\n * If you expect the value to be part of an active effect subscription all the time, and to not change multiple times inside of a single transaction, you can set this to a relatively low number (e.g. 10).\n *\n * Otherwise, set this to a higher number based on your usage pattern and memory constraints.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "historyLength?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "historyLength", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/state!ComputedOptions#isEqual:member", - "docComment": "/**\n * If provided, this will be used to compare the old and new values of the atom to determine if the value has changed. By default, values are compared using first using strict equality (`===`), then `Object.is`, and finally any `.equals` method present in the object's prototype chain.\n *\n * @param a - The old value\n *\n * @param b - The new value\n *\n * @returns \n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isEqual?: " - }, - { - "kind": "Content", - "text": "(a: any, b: any) => boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "isEqual", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/state!EffectScheduler:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type EffectScheduler = " - }, - { - "kind": "Reference", - "text": "__EffectScheduler__", - "canonicalReference": "@tldraw/state!~__EffectScheduler__:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/EffectScheduler.ts", - "releaseTag": "Public", - "name": "EffectScheduler", - "typeParameters": [ - { - "typeParameterName": "Result", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/state!EffectScheduler:var", - "docComment": "/**\n * An EffectScheduler is responsible for executing side effects in response to changes in state.\n *\n * You probably don't need to use this directly unless you're integrating this library with a framework of some kind.\n *\n * Instead, use the [[react]] and [[reactor]] functions.\n *\n * @example\n * ```ts\n * const render = new EffectScheduler('render', drawToCanvas)\n *\n * render.attach()\n * render.execute()\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "EffectScheduler: " - }, - { - "kind": "Content", - "text": "typeof " - }, - { - "kind": "Reference", - "text": "__EffectScheduler__", - "canonicalReference": "@tldraw/state!~__EffectScheduler__:class" - } - ], - "fileUrlPath": "packages/state/src/lib/core/EffectScheduler.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "EffectScheduler", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/state!EMPTY_ARRAY:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "EMPTY_ARRAY: " - }, - { - "kind": "Content", - "text": "[]" - } - ], - "fileUrlPath": "packages/state/src/lib/core/helpers.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "EMPTY_ARRAY", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!getComputedInstance:function(1)", - "docComment": "/**\n * Retrieves the underlying computed instance for a given property created with the [[computed]] decorator.\n *\n * @param obj - The object\n *\n * @param propertyName - The property name\n *\n * @example\n * ```ts\n * class Counter {\n * max = 100\n * count = atom(0)\n *\n * @computed getRemaining() {\n * return this.max - this.count.get()\n * }\n * }\n *\n * const c = new Counter()\n * const remaining = getComputedInstance(c, 'getRemaining')\n * remaining.get() === 100 // true\n * c.count.set(13)\n * remaining.get() === 87 // true\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getComputedInstance(obj: " - }, - { - "kind": "Content", - "text": "Obj" - }, - { - "kind": "Content", - "text": ", propertyName: " - }, - { - "kind": "Content", - "text": "Prop" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Computed", - "canonicalReference": "@tldraw/state!Computed:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/Computed.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "obj", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "propertyName", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "Obj", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Prop", - "constraintTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "getComputedInstance" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!isAtom:function(1)", - "docComment": "/**\n * Returns true if the given value is an [[Atom]].\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function isAtom(value: " - }, - { - "kind": "Content", - "text": "unknown" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "value", - "canonicalReference": "@tldraw/state!~value" - }, - { - "kind": "Content", - "text": " is " - }, - { - "kind": "Reference", - "text": "Atom", - "canonicalReference": "@tldraw/state!Atom:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/Atom.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "isAtom" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!isSignal:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function isSignal(value: " - }, - { - "kind": "Content", - "text": "any" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "value", - "canonicalReference": "@tldraw/state!~value" - }, - { - "kind": "Content", - "text": " is " - }, - { - "kind": "Reference", - "text": "Signal", - "canonicalReference": "@tldraw/state!Signal:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/isSignal.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "isSignal" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!isUninitialized:function(1)", - "docComment": "/**\n * Call this inside a computed signal function to determine whether it is the first time the function is being called.\n *\n * Mainly useful for incremental signal computation.\n *\n * @param value - The value to check.\n *\n * @example\n * ```ts\n * const count = atom('count', 0)\n * const double = computed('double', (prevValue) => {\n * if (isUninitialized(prevValue)) {\n * print('First time!')\n * }\n * return count.get() * 2\n * })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "isUninitialized: (value: " - }, - { - "kind": "Content", - "text": "any" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "value", - "canonicalReference": "@tldraw/state!~value" - }, - { - "kind": "Content", - "text": " is typeof " - }, - { - "kind": "Reference", - "text": "UNINITIALIZED", - "canonicalReference": "@tldraw/state!~UNINITIALIZED:var" - } - ], - "fileUrlPath": "packages/state/src/lib/core/Computed.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "isUninitialized" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!react:function(1)", - "docComment": "/**\n * Starts a new effect scheduler, scheduling the effect immediately.\n *\n * Returns a function that can be called to stop the scheduler.\n *\n * @example\n * ```ts\n * const color = atom('color', 'red')\n * const stop = react('set style', () => {\n * divElem.style.color = color.get()\n * })\n * color.set('blue')\n * // divElem.style.color === 'blue'\n * stop()\n * color.set('green')\n * // divElem.style.color === 'blue'\n * ```\n *\n * Also useful in React applications for running effects outside of the render cycle.\n *\n * @example\n * ```ts\n * useEffect(() => react('set style', () => {\n * divRef.current.style.color = color.get()\n * }), [])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function react(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", fn: " - }, - { - "kind": "Content", - "text": "(lastReactedEpoch: number) => any" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Reference", - "text": "EffectSchedulerOptions", - "canonicalReference": "@tldraw/state!~EffectSchedulerOptions:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/EffectScheduler.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "fn", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "name": "react" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!reactor:function(1)", - "docComment": "/**\n * Creates a [[Reactor]], which is a thin wrapper around an [[EffectScheduler]].\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function reactor(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", fn: " - }, - { - "kind": "Content", - "text": "(lastReactedEpoch: number) => Result" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Reference", - "text": "EffectSchedulerOptions", - "canonicalReference": "@tldraw/state!~EffectSchedulerOptions:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Reactor", - "canonicalReference": "@tldraw/state!Reactor:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/EffectScheduler.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "fn", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "typeParameters": [ - { - "typeParameterName": "Result", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "reactor" - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/state!Reactor:interface", - "docComment": "/**\n * The reactor is a user-friendly interface for starting and stopping an [[EffectScheduler]].\n *\n * Calling .start() will attach the scheduler and execute the effect immediately the first time it is called.\n *\n * If the reactor is stopped, calling `.start()` will re-attach the scheduler but will only execute the effect if any of its parents have changed since it was stopped.\n *\n * You can create a reactor with [[reactor]].\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface Reactor " - } - ], - "fileUrlPath": "packages/state/src/lib/core/EffectScheduler.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "name": "Reactor", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/state!Reactor#scheduler:member", - "docComment": "/**\n * The underlying effect scheduler.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "scheduler: " - }, - { - "kind": "Reference", - "text": "EffectScheduler", - "canonicalReference": "@tldraw/state!EffectScheduler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "scheduler", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "MethodSignature", - "canonicalReference": "@tldraw/state!Reactor#start:member(1)", - "docComment": "/**\n * Start the scheduler. The first time this is called the effect will be scheduled immediately.\n *\n * If the reactor is stopped, calling this will start the scheduler again but will only execute the effect if any of its parents have changed since it was stopped.\n *\n * If you need to force re-execution of the effect, pass `{ force: true }`.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "start(options?: " - }, - { - "kind": "Content", - "text": "{\n force?: boolean;\n }" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "name": "start" - }, - { - "kind": "MethodSignature", - "canonicalReference": "@tldraw/state!Reactor#stop:member(1)", - "docComment": "/**\n * Stop the scheduler.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "stop(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "stop" - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/state!RESET_VALUE:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type RESET_VALUE = " - }, - { - "kind": "Content", - "text": "typeof " - }, - { - "kind": "Reference", - "text": "RESET_VALUE", - "canonicalReference": "@tldraw/state!RESET_VALUE:var" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/types.ts", - "releaseTag": "Public", - "name": "RESET_VALUE", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/state!RESET_VALUE:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "RESET_VALUE: " - }, - { - "kind": "Content", - "text": "unique symbol" - } - ], - "fileUrlPath": "packages/state/src/lib/core/types.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "RESET_VALUE", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Interface", - "canonicalReference": "@tldraw/state!Signal:interface", - "docComment": "/**\n * A Signal is a reactive value container. The value may change over time, and it may keep track of the diffs between sequential values.\n *\n * There are two types of signal:\n *\n * - Atomic signals, created using [[atom]]. These are mutable references to values that can be changed using [[Atom.set]]. - Computed signals, created using [[computed]]. These are values that are computed from other signals. They are recomputed lazily if their dependencies change.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface Signal " - } - ], - "fileUrlPath": "packages/state/src/lib/core/types.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Diff", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "name": "Signal", - "preserveMemberOrder": false, - "members": [ - { - "kind": "MethodSignature", - "canonicalReference": "@tldraw/state!Signal#__unsafe__getWithoutCapture:member(1)", - "docComment": "/**\n * Returns the current value of the signal without capturing it as a dependency. Use this if you need to retrieve the signal's value in a hot loop where the performance overhead of dependency tracking is too high.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "__unsafe__getWithoutCapture(ignoreErrors?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "Value" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "ignoreErrors", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "name": "__unsafe__getWithoutCapture" - }, - { - "kind": "MethodSignature", - "canonicalReference": "@tldraw/state!Signal#get:member(1)", - "docComment": "/**\n * The current value of the signal. This is a reactive value, and will update when the signal changes. Any computed signal that depends on this signal will be lazily recomputed if this signal changes. Any effect that depends on this signal will be rescheduled if this signal changes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get(): " - }, - { - "kind": "Content", - "text": "Value" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "get" - }, - { - "kind": "MethodSignature", - "canonicalReference": "@tldraw/state!Signal#getDiffSince:member(1)", - "docComment": "/**\n * Returns the sequence of diffs between the the value at the given epoch and the current value. Returns the [[RESET_VALUE]] constant if there is not enough information to compute the diff sequence.\n *\n * @param epoch - The epoch to get diffs since.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "getDiffSince(epoch: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "Diff[] | " - }, - { - "kind": "Reference", - "text": "RESET_VALUE", - "canonicalReference": "@tldraw/state!RESET_VALUE:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "epoch", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "getDiffSince" - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/state!Signal#lastChangedEpoch:member", - "docComment": "/**\n * The epoch when this signal's value last changed. Note tha this is not the same as when the value was last computed. A signal may recopmute it's value without changing it.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "lastChangedEpoch: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "lastChangedEpoch", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@tldraw/state!Signal#name:member", - "docComment": "/**\n * The name of the signal. This is used at runtime for debugging and perf profiling only. It does not need to be globally unique.\n */\n", - "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": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!track:function(1)", - "docComment": "/**\n * Returns a tracked version of the given component. Any signals whose values are read while the component renders will be tracked. If any of the tracked signals change later it will cause the component to re-render.\n *\n * This also wraps the component in a React.memo() call, so it will only re-render if the props change.\n *\n * @param baseComponent - The base component to track.\n *\n * @example\n * ```ts\n * const Counter = track(function Counter(props: CounterProps) {\n * const count = useAtom('count', 0)\n * const increment = useCallback(() => count.set(count.get() + 1), [count])\n * return \n * })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function track" - }, - { - "kind": "Content", - "text": ">(baseComponent: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T extends " - }, - { - "kind": "Reference", - "text": "React.MemoExoticComponent", - "canonicalReference": "@types/react!React.MemoExoticComponent:type" - }, - { - "kind": "Content", - "text": " ? T : " - }, - { - "kind": "Reference", - "text": "React.MemoExoticComponent", - "canonicalReference": "@types/react!React.MemoExoticComponent:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/react/track.ts", - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "baseComponent", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "track" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!transact:function(1)", - "docComment": "/**\n * Like [transaction](#transaction), but does not create a new transaction if there is already one in progress.\n *\n * @param fn - The function to run in a transaction.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function transact(fn: " - }, - { - "kind": "Content", - "text": "() => T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/transactions.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "fn", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "transact" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!transaction:function(1)", - "docComment": "/**\n * Batches state updates, deferring side effects until after the transaction completes.\n *\n * @param fn - The function to run in a transaction, called with a function to roll back the change.\n *\n * @example\n * ```ts\n * const firstName = atom('John')\n * const lastName = atom('Doe')\n *\n * react('greet', () => {\n * print(`Hello, ${firstName.get()} ${lastName.get()}!`)\n * })\n *\n * // Logs \"Hello, John Doe!\"\n *\n * transaction(() => {\n * firstName.set('Jane')\n * lastName.set('Smith')\n * })\n *\n * // Logs \"Hello, Jane Smith!\"\n * ```\n *\n * If the function throws, the transaction is aborted and any signals that were updated during the transaction revert to their state before the transaction began.\n *\n * @example\n * ```ts\n * const firstName = atom('John')\n * const lastName = atom('Doe')\n *\n * react('greet', () => {\n * print(`Hello, ${firstName.get()} ${lastName.get()}!`)\n * })\n *\n * // Logs \"Hello, John Doe!\"\n *\n * transaction(() => {\n * firstName.set('Jane')\n * throw new Error('oops')\n * })\n *\n * // Does not log\n * // firstName.get() === 'John'\n * ```\n *\n * A `rollback` callback is passed into the function. Calling this will prevent the transaction from committing and will revert any signals that were updated during the transaction to their state before the transaction began.\n *\n * *\n *\n * @example\n * ```ts\n * const firstName = atom('John')\n * const lastName = atom('Doe')\n *\n * react('greet', () => {\n * print(`Hello, ${firstName.get()} ${lastName.get()}!`)\n * })\n *\n * // Logs \"Hello, John Doe!\"\n *\n * transaction((rollback) => {\n * firstName.set('Jane')\n * lastName.set('Smith')\n * rollback()\n * })\n *\n * // Does not log\n * // firstName.get() === 'John'\n * // lastName.get() === 'Doe'\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function transaction(fn: " - }, - { - "kind": "Content", - "text": "(rollback: () => void) => T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/transactions.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "fn", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "transaction" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!unsafe__withoutCapture:function(1)", - "docComment": "/**\n * Executes the given function without capturing any parents in the current capture context.\n *\n * This is mainly useful if you want to run an effect only when certain signals change while also dereferencing other signals which should not cause the effect to rerun on their own.\n *\n * @example\n * ```ts\n * const name = atom('name', 'Sam')\n * const time = atom('time', () => new Date().getTime())\n *\n * setInterval(() => {\n * time.set(new Date().getTime())\n * })\n *\n * react('log name changes', () => {\n * \t print(name.get(), 'was changed at', unsafe__withoutCapture(() => time.get()))\n * })\n *\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function unsafe__withoutCapture(fn: " - }, - { - "kind": "Content", - "text": "() => T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/capture.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "fn", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "unsafe__withoutCapture" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!useAtom:function(1)", - "docComment": "/**\n * Creates a new atom and returns it. The atom will be created only once.\n *\n * See [[atom]]\n *\n * @example\n * ```ts\n * const Counter = track(function Counter () {\n * const count = useAtom('count', 0)\n * const increment = useCallback(() => count.set(count.get() + 1), [count])\n * return \n * })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useAtom(\nname: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", \nvalueOrInitialiser: " - }, - { - "kind": "Content", - "text": "(() => Value) | Value" - }, - { - "kind": "Content", - "text": ", \noptions?: " - }, - { - "kind": "Reference", - "text": "AtomOptions", - "canonicalReference": "@tldraw/state!AtomOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Atom", - "canonicalReference": "@tldraw/state!Atom:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/react/useAtom.ts", - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 12 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "valueOrInitialiser", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "isOptional": true - } - ], - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Diff", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "name": "useAtom" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!useComputed:function(1)", - "docComment": "/**\n * Creates a new computed signal and returns it. The computed signal will be created only once.\n *\n * See [[computed]]\n *\n * @example\n * ```ts\n * type GreeterProps = {\n * firstName: Signal\n * lastName: Signal\n * }\n *\n * const Greeter = track(function Greeter ({firstName, lastName}: GreeterProps) {\n * const fullName = useComputed('fullName', () => `${firstName.get()} ${lastName.get()}`)\n * return

Hello {fullName.get()}!
\n * })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useComputed(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", compute: " - }, - { - "kind": "Content", - "text": "() => Value" - }, - { - "kind": "Content", - "text": ", deps: " - }, - { - "kind": "Content", - "text": "any[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Computed", - "canonicalReference": "@tldraw/state!Computed:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/react/useComputed.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "compute", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "deps", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "useComputed" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!useComputed:function(2)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useComputed(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", compute: " - }, - { - "kind": "Content", - "text": "() => Value" - }, - { - "kind": "Content", - "text": ", opts: " - }, - { - "kind": "Reference", - "text": "ComputedOptions", - "canonicalReference": "@tldraw/state!ComputedOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", deps: " - }, - { - "kind": "Content", - "text": "any[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Computed", - "canonicalReference": "@tldraw/state!Computed:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/react/useComputed.ts", - "returnTypeTokenRange": { - "startIndex": 12, - "endIndex": 14 - }, - "releaseTag": "Public", - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "compute", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "isOptional": false - }, - { - "parameterName": "deps", - "parameterTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Diff", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "name": "useComputed" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!useQuickReactor:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useQuickReactor(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", reactFn: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ", deps?: " - }, - { - "kind": "Content", - "text": "any[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/react/useQuickReactor.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "reactFn", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "deps", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "name": "useQuickReactor" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!useReactor:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useReactor(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", reactFn: " - }, - { - "kind": "Content", - "text": "() => void" - }, - { - "kind": "Content", - "text": ", deps?: " - }, - { - "kind": "Content", - "text": "any[] | undefined" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/react/useReactor.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "reactFn", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "deps", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "name": "useReactor" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!useValue:function(1)", - "docComment": "/**\n * Extracts the value from a signal and subscribes to it.\n *\n * Note that you do not need to use this hook if you are wrapping the component with [[track]]\n *\n * @example\n * ```ts\n * const Counter: React.FC = () => {\n * const $count = useAtom('count', 0)\n * const increment = useCallback(() => $count.set($count.get() + 1), [count])\n * const currentCount = useValue($count)\n * return \n * }\n * ```\n *\n * You can also pass a function to compute the value and it will be memoized as in [[useComputed]]:\n *\n * @example\n * ```ts\n * type GreeterProps = {\n * firstName: Signal\n * lastName: Signal\n * }\n *\n * const Greeter = track(function Greeter({ firstName, lastName }: GreeterProps) {\n * const fullName = useValue('fullName', () => `${firstName.get()} ${lastName.get()}`, [\n * firstName,\n * lastName,\n * ])\n * return
Hello {fullName}!
\n * })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useValue(value: " - }, - { - "kind": "Reference", - "text": "Signal", - "canonicalReference": "@tldraw/state!Signal:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "Value" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/react/useValue.ts", - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "useValue" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!useValue:function(2)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useValue(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", fn: " - }, - { - "kind": "Content", - "text": "() => Value" - }, - { - "kind": "Content", - "text": ", deps: " - }, - { - "kind": "Content", - "text": "unknown[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "Value" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/react/useValue.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "fn", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "deps", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "useValue" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!whyAmIRunning:function(1)", - "docComment": "/**\n * A debugging tool that tells you why a computed signal or effect is running. Call in the body of a computed signal or effect function.\n *\n * @example\n * ```ts\n * const name = atom('name', 'Bob')\n * react('greeting', () => {\n * \twhyAmIRunning()\n * \tprint('Hello', name.get())\n * })\n *\n * name.set('Alice')\n *\n * // 'greeting' is running because:\n * // 'name' changed => 'Alice'\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function whyAmIRunning(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/capture.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "whyAmIRunning" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/state!withDiff:function(1)", - "docComment": "/**\n * When writing incrementally-computed signals it is convenient (and usually more performant) to incrementally compute the diff too.\n *\n * You can use this function to wrap the return value of a computed signal function to indicate that the diff should be used instead of calculating a new one with [[AtomOptions.computeDiff]].\n *\n * @param value - The value.\n *\n * @param diff - The diff.\n *\n * @example\n * ```ts\n * const count = atom('count', 0)\n * const double = computed('double', (prevValue) => {\n * const nextValue = count.get() * 2\n * if (isUninitialized(prevValue)) {\n * return nextValue\n * }\n * return withDiff(nextValue, nextValue - prevValue)\n * }, { historyLength: 10 })\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function withDiff(value: " - }, - { - "kind": "Content", - "text": "Value" - }, - { - "kind": "Content", - "text": ", diff: " - }, - { - "kind": "Content", - "text": "Diff" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "WithDiff", - "canonicalReference": "@tldraw/state!~WithDiff:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/state/src/lib/core/Computed.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "diff", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "Value", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "Diff", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "withDiff" - } - ] - } - ] -} diff --git a/packages/store/api/api.json b/packages/store/api/api.json deleted file mode 100644 index 40acd8982..000000000 --- a/packages/store/api/api.json +++ /dev/null @@ -1,5854 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.43.1", - "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": "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 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)", - "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 scope: " - }, - { - "kind": "Reference", - "text": "RecordScope", - "canonicalReference": "@tldraw/store!~RecordScope:type" - }, - { - "kind": "Content", - "text": ";\n validator?: " - }, - { - "kind": "Reference", - "text": "StoreValidator", - "canonicalReference": "@tldraw/store!StoreValidator: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 currentVersion?: number;\n firstVersion?: 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 down: (newState: After) => Before;\n up: (oldState: Before) => After;\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 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", - "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 reason: " - }, - { - "kind": "Reference", - "text": "MigrationFailureReason", - "canonicalReference": "@tldraw/store!MigrationFailureReason:enum" - }, - { - "kind": "Content", - "text": ";\n type: 'error';\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 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: " - }, - { - "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}" - }, - { - "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 scope?: " - }, - { - "kind": "Reference", - "text": "RecordScope", - "canonicalReference": "@tldraw/store!~RecordScope:type" - }, - { - "kind": "Content", - "text": ";\n readonly validator?: " - }, - { - "kind": "Reference", - "text": "StoreValidator", - "canonicalReference": "@tldraw/store!StoreValidator: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 version: number;\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]: 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", - "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 schema: " - }, - { - "kind": "Reference", - "text": "StoreSchema", - "canonicalReference": "@tldraw/store!StoreSchema:class" - }, - { - "kind": "Content", - "text": ";\n initialData?: " - }, - { - "kind": "Reference", - "text": "SerializedStore", - "canonicalReference": "@tldraw/store!SerializedStore:type" - }, - { - "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 removed: { [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 } | 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 isExistingValidationIssue: boolean;\n phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord';\n recordAfter: unknown;\n recordBefore?: unknown;\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 createIntegrityChecker?: (store: " - }, - { - "kind": "Reference", - "text": "Store", - "canonicalReference": "@tldraw/store!Store:class" - }, - { - "kind": "Content", - "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", - "text": "Store", - "canonicalReference": "@tldraw/store!Store:class" - }, - { - "kind": "Content", - "text": ";\n }) => R;\n migrations?: " - }, - { - "kind": "Reference", - "text": "MigrationSequence", - "canonicalReference": "@tldraw/store!MigrationSequence:interface" - }, - { - "kind": "Content", - "text": "[];\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 schema: " - }, - { - "kind": "Reference", - "text": "SerializedSchema", - "canonicalReference": "@tldraw/store!SerializedSchema:type" - }, - { - "kind": "Content", - "text": ";\n store: " - }, - { - "kind": "Reference", - "text": "SerializedStore", - "canonicalReference": "@tldraw/store!SerializedStore: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/packages/tldraw/api/api.json b/packages/tldraw/api/api.json deleted file mode 100644 index 63e0a868f..000000000 --- a/packages/tldraw/api/api.json +++ /dev/null @@ -1,30010 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.43.1", - "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 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 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 bend: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "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 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 boundShapeId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n normalizedAnchor: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n type: \"binding\";\n }>;\n point: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "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", - "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 boundShapeId: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n normalizedAnchor: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n type: \"binding\";\n }>;\n point: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"point\";\n x: number;\n y: number;\n }>;\n }, never>;\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": 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 assetId: " - }, - { - "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 w: " - }, - { - "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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n forceMobile?: boolean;\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": "Variable", - "canonicalReference": "tldraw!defaultEditorAssetUrls:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "defaultEditorAssetUrls: " - }, - { - "kind": "Reference", - "text": "TLEditorAssetUrls", - "canonicalReference": "tldraw!~TLEditorAssetUrls:type" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/static-assets/assetUrls.ts", - "isReadonly": false, - "releaseTag": "Public", - "name": "defaultEditorAssetUrls", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "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 quality?: number | undefined;\n type?: string | 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 dash: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n fill: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n isClosed: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\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 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", - "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 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 w: 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 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}" - }, - { - "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 body?: string;\n cancel?: string;\n confirm?: string;\n displayDontShowAgain?: boolean;\n onCancel: () => void;\n onContinue: () => void;\n title?: string;\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 format: 'jpeg' | 'json' | 'png' | 'svg' | 'webp';\n ids: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[];\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": "[]) => void" - }, - { - "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.props:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static props: " - }, - { - "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 w: 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 id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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 id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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 id: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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: \"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", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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 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 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 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 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 growY: 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 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", - "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 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", - "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!getOccludedChildren:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getOccludedChildren(editor: " - }, - { - "kind": "Reference", - "text": "Editor", - "canonicalReference": "@tldraw/editor!Editor:class" - }, - { - "kind": "Content", - "text": ", parent: " - }, - { - "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": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/tools/SelectTool/selectHelpers.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "editor", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "parent", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "getOccludedChildren" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!getPerfectDashProps:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getPerfectDashProps(totalLength: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", strokeWidth: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", opts?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<{\n closed: boolean;\n end: 'none' | 'outset' | 'skip';\n lengthRatio: number;\n snap: number;\n start: 'none' | 'outset' | 'skip';\n style: " - }, - { - "kind": "Reference", - "text": "TLDefaultDashStyle", - "canonicalReference": "@tldraw/tlschema!TLDefaultDashStyle:type" - }, - { - "kind": "Content", - "text": ";\n}>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n strokeDasharray: string;\n strokeDashoffset: string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/getPerfectDashProps.ts", - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "totalLength", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "strokeWidth", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 9 - }, - "isOptional": true - } - ], - "name": "getPerfectDashProps" - }, - { - "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 height: number;\n quality: number;\n scale: number;\n type: 'jpeg' | 'png' | 'webp';\n width: 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 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 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", - "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 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 bottomRight: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n topLeft: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "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", - "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 points: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "DictValidator", - "canonicalReference": "@tldraw/validate!DictValidator: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 spline: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"cubic\" | \"line\">;\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": "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!NoteShapeUtil#getHandles:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "getHandles(shape: " - }, - { - "kind": "Reference", - "text": "TLNoteShape", - "canonicalReference": "@tldraw/tlschema!TLNoteShape: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!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 id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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 id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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 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 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 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", - "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 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", - "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 verticalAlign: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end\" | \"middle\" | \"start\">;\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!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 id: " - }, - { - "kind": "Reference", - "text": "TLPageId", - "canonicalReference": "@tldraw/tlschema!TLPageId:type" - }, - { - "kind": "Content", - "text": ";\n isCurrentPage: boolean;\n name: string;\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 json: string;\n schema: " - }, - { - "kind": "Reference", - "text": "TLSchema", - "canonicalReference": "@tldraw/tlschema!TLSchema:type" - }, - { - "kind": "Content", - "text": ";\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": "Enum", - "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT:enum", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum PORTRAIT_BREAKPOINT " - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/constants.ts", - "releaseTag": "Public", - "name": "PORTRAIT_BREAKPOINT", - "preserveMemberOrder": false, - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.DESKTOP:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "DESKTOP = " - }, - { - "kind": "Content", - "text": "7" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "DESKTOP" - }, - { - "kind": "EnumMember", - "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.MOBILE:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "MOBILE = " - }, - { - "kind": "Content", - "text": "4" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "MOBILE" - }, - { - "kind": "EnumMember", - "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.MOBILE_SM:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "MOBILE_SM = " - }, - { - "kind": "Content", - "text": "3" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "MOBILE_SM" - }, - { - "kind": "EnumMember", - "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.MOBILE_XS:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "MOBILE_XS = " - }, - { - "kind": "Content", - "text": "2" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "MOBILE_XS" - }, - { - "kind": "EnumMember", - "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.MOBILE_XXS:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "MOBILE_XXS = " - }, - { - "kind": "Content", - "text": "1" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "MOBILE_XXS" - }, - { - "kind": "EnumMember", - "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.TABLET:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "TABLET = " - }, - { - "kind": "Content", - "text": "6" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "TABLET" - }, - { - "kind": "EnumMember", - "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.TABLET_SM:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "TABLET_SM = " - }, - { - "kind": "Content", - "text": "5" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "TABLET_SM" - }, - { - "kind": "EnumMember", - "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.ZERO:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "ZERO = " - }, - { - "kind": "Content", - "text": "0" - } - ], - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "name": "ZERO" - } - ] - }, - { - "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 - tldraw 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 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", - "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 id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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 id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "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", - "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: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n props: {\n autoSize: boolean;\n scale?: undefined;\n };\n type: \"text\";\n } | {\n id: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n props: {\n autoSize?: undefined;\n scale: number;\n };\n type: \"text\";\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 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 autoSize: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "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 font: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "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", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n text: 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", - "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 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": " | 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": "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 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", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord:type" - }, - { - "kind": "Content", - "text": ">;\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 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", - "text": "StoreSnapshot", - "canonicalReference": "@tldraw/store!StoreSnapshot:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLRecord", - "canonicalReference": "@tldraw/tlschema!TLRecord: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 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 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", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/Tldraw.tsx", - "releaseTag": "Public", - "name": "TldrawProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 27 - } - }, - { - "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 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 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", - "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 addToast: (toast: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\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", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\n }>;\n tools: import(\"./overrides\")." - }, - { - "kind": "Reference", - "text": "TLUiOverride", - "canonicalReference": "tldraw!~TLUiOverride:type" - }, - { - "kind": "Content", - "text": " 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", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\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", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\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 addToast: (toast: " - }, - { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\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", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\n }>;\n tools: import(\"./overrides\")." - }, - { - "kind": "Reference", - "text": "TLUiOverride", - "canonicalReference": "tldraw!~TLUiOverride:type" - }, - { - "kind": "Content", - "text": " 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", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\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", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\n }>;\n translations: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "> | undefined;\n }>[] | undefined;\n renderDebugMenuItems?: (() => " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ") | 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": "TypeAlias", - "canonicalReference": "tldraw!TLExportType:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TLExportType = " - }, - { - "kind": "Content", - "text": "'jpeg' | 'json' | 'png' | 'svg' | 'webp'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/utils/export/exportAs.ts", - "releaseTag": "Public", - "name": "TLExportType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "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 invertIcon?: boolean;\n small?: 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 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}" - }, - { - "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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n className?: string;\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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n className?: string;\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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n className?: string;\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 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", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiDialog", - "canonicalReference": "tldraw!TLUiDialog:interface" - }, - { - "kind": "Content", - "text": ">) => string;\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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n className?: string;\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 align?: 'center' | 'end' | 'start';\n alignOffset?: number;\n children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n id?: string;\n side?: 'bottom' | 'left' | 'right' | 'top';\n sideOffset?: number;\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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n debugOpen?: boolean;\n id: string;\n modal?: 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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n id: string;\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 disabled?: boolean;\n id?: string;\n label: string;\n title?: string;\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 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", - "text": "TLUiEventSource", - "canonicalReference": "tldraw!TLUiEventSource:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": " | void;\n readonlyOk?: boolean;\n title?: string;\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 children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n sourceId: " - }, - { - "kind": "Reference", - "text": "TLUiEventSource", - "canonicalReference": "tldraw!TLUiEventSource:type" - }, - { - "kind": "Content", - "text": ";\n type: " - }, - { - "kind": "Reference", - "text": "TldrawUiMenuContextType", - "canonicalReference": "tldraw!~TldrawUiMenuContextType: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 label?: {\n [key: string]: TranslationKey;\n } | TranslationKey;\n children?: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n id: string;\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 readonlyOk?: boolean;\n noClose?: 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 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", - "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 children: " - }, - { - "kind": "Reference", - "text": "ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n disabled?: boolean;\n id: string;\n label?: {\n [key: string]: Translation;\n } | Translation;\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 align?: 'center' | 'end' | 'start';\n alignOffset?: number;\n children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n side: 'bottom' | 'left' | 'right' | 'top';\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 children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "kind": "Content", - "text": ";\n id: string;\n onOpenChange?: (isOpen: boolean) => void;\n open?: boolean;\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 clearToasts: () => void;\n removeToast: (id: " - }, - { - "kind": "Reference", - "text": "TLUiToast", - "canonicalReference": "tldraw!TLUiToast:interface" - }, - { - "kind": "Content", - "text": "['id']) => string;\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 children: " - }, - { - "kind": "Reference", - "text": "React.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" - }, - { - "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}" - }, - { - "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 dir: 'ltr' | 'rtl';\n readonly label: string;\n readonly locale: 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!useCurrentTranslation:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "useCurrentTranslation: () => " - }, - { - "kind": "Reference", - "text": "TLUiTranslation", - "canonicalReference": "tldraw!TLUiTranslation:type" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/useTranslation/useTranslation.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useCurrentTranslation" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useDefaultColorTheme:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useDefaultColorTheme(): " - }, - { - "kind": "Content", - "text": "{\n \"light-blue\": import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ";\n \"light-green\": import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ";\n \"light-red\": import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ";\n \"light-violet\": import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ";\n background: string;\n black: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ";\n blue: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ";\n green: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ";\n grey: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ";\n id: \"dark\" | \"light\";\n orange: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ";\n red: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ";\n solid: string;\n text: string;\n violet: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ";\n white: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ";\n yellow: import(\"@tldraw/editor\")." - }, - { - "kind": "Reference", - "text": "TLDefaultColorThemeColor", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/ShapeFill.tsx", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 28 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "useDefaultColorTheme" - }, - { - "kind": "Function", - "canonicalReference": "tldraw!useDefaultHelpers:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function useDefaultHelpers(): " - }, - { - "kind": "Content", - "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", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, - { - "kind": "Content", - "text": " & {\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", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ") => string;\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 handleBlur: () => 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 handleDoubleClick: (e: any) => any;\n handleFocus: typeof " - }, - { - "kind": "Reference", - "text": "noop", - "canonicalReference": "tldraw!~noop:function" - }, - { - "kind": "Content", - "text": ";\n handleInputPointerDown: (e: " - }, - { - "kind": "Reference", - "text": "React.PointerEvent", - "canonicalReference": "@types/react!React.PointerEvent:interface" - }, - { - "kind": "Content", - "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", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/useEditableText.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 24 - }, - "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!usePreloadAssets:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function usePreloadAssets(assetUrls: " - }, - { - "kind": "Reference", - "text": "TLEditorAssetUrls", - "canonicalReference": "tldraw!~TLEditorAssetUrls:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n done: boolean;\n error: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tldraw/src/lib/ui/hooks/usePreloadAssets.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "assetUrls", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "usePreloadAssets" - }, - { - "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 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", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiContextMenuProps", - "canonicalReference": "tldraw!TLUiContextMenuProps:interface" - }, - { - "kind": "Content", - "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", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TLUiHelperButtonsProps", - "canonicalReference": "tldraw!TLUiHelperButtonsProps: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 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 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 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", - "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 Toolbar: " - }, - { - "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 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}>" - }, - { - "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 assetId: 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 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", - "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/packages/tlschema/api/api.json b/packages/tlschema/api/api.json deleted file mode 100644 index 1aa0ca10f..000000000 --- a/packages/tlschema/api/api.json +++ /dev/null @@ -1,10104 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.43.1", - "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 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 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 bend: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "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 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 boundShapeId: import(\"../records/TLShape\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n normalizedAnchor: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n type: \"binding\";\n } & {}>;\n point: " - }, - { - "kind": "Reference", - "text": "T.ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "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", - "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 boundShapeId: import(\"../records/TLShape\")." - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": ";\n isExact: boolean;\n isPrecise: boolean;\n normalizedAnchor: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n type: \"binding\";\n } & {}>;\n point: " - }, - { - "kind": "Reference", - "text": "T.ObjectValidator", - "canonicalReference": "@tldraw/validate!ObjectValidator:class" - }, - { - "kind": "Content", - "text": "<{\n type: \"point\";\n x: number;\n y: number;\n } & {}>;\n }, never>;\n text: " - }, - { - "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 assetId: " - }, - { - "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 w: " - }, - { - "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 meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "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", - "text": "TLAssetId", - "canonicalReference": "@tldraw/tlschema!TLAssetId:type" - }, - { - "kind": "Content", - "text": ";\n meta: " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": ";\n props: Props;\n type: Type;\n typeName: 'asset';\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 color: string;\n id: 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!createShapePropsMigrationIds:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function createShapePropsMigrationIds" - }, - { - "kind": "Content", - "text": ">(shapeType: " - }, - { - "kind": "Content", - "text": "S" - }, - { - "kind": "Content", - "text": ", ids: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n [k in keyof T]: `com.tldraw.shape.${S}/${T[k]}`;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/records/TLShape.ts", - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "shapeType", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - }, - { - "parameterName": "ids", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "S", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "createShapePropsMigrationIds" - }, - { - "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 migrations?: readonly " - }, - { - "kind": "Reference", - "text": "MigrationSequence", - "canonicalReference": "@tldraw/store!MigrationSequence:interface" - }, - { - "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": 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 darkMode: " - }, - { - "kind": "Reference", - "text": "TLDefaultColorTheme", - "canonicalReference": "@tldraw/tlschema!TLDefaultColorTheme:type" - }, - { - "kind": "Content", - "text": ";\n lightMode: " - }, - { - "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 mono: string;\n sans: string;\n serif: 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 dash: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"dashed\" | \"dotted\" | \"draw\" | \"solid\">;\n fill: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"none\" | \"pattern\" | \"semi\" | \"solid\">;\n isClosed: " - }, - { - "kind": "Reference", - "text": "T.Validator", - "canonicalReference": "@tldraw/validate!Validator:class" - }, - { - "kind": "Content", - "text": ";\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 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", - "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 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", - "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 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", - "text": "TLEmbedShapePermissions", - "canonicalReference": "@tldraw/tlschema!TLEmbedShapePermissions:type" - }, - { - "kind": "Content", - "text": ";\n readonly title: string;\n readonly toEmbedUrl: (url: string) => string | undefined;\n readonly type: string;\n readonly width: number;\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-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", - "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 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 w: " - }, - { - "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 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 w: " - }, - { - "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 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 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 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 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 growY: " - }, - { - "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 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", - "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 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", - "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 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 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", - "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 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 bottomRight: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "text": ";\n topLeft: import(\"../misc/geometry-types\")." - }, - { - "kind": "Reference", - "text": "VecModel", - "canonicalReference": "@tldraw/tlschema!VecModel:interface" - }, - { - "kind": "Content", - "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", - "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 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", - "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 points: " - }, - { - "kind": "Reference", - "text": "T.DictValidator", - "canonicalReference": "@tldraw/validate!DictValidator: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 spline: import(\"../styles/StyleProp\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"cubic\" | \"line\">;\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 align: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"end-legacy\" | \"end\" | \"middle-legacy\" | \"middle\" | \"start-legacy\" | \"start\">;\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 font: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"draw\" | \"mono\" | \"sans\" | \"serif\">;\n fontSizeAdjustment: " - }, - { - "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 size: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n text: " - }, - { - "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 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", - "isReadonly": true, - "releaseTag": "Public", - "name": "noteShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 20 - } - }, - { - "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 meta?: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "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", - "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": 16 - } - }, - { - "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": "TypeAlias", - "canonicalReference": "@tldraw/tlschema!ShapePropsType:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type ShapePropsType>" - }, - { - "kind": "Content", - "text": "> = " - }, - { - "kind": "Reference", - "text": "Expand", - "canonicalReference": "@tldraw/utils!Expand:type" - }, - { - "kind": "Content", - "text": "<{\n [K in keyof Config]: " - }, - { - "kind": "Reference", - "text": "T.TypeOf", - "canonicalReference": "@tldraw/validate!TypeOf:type" - }, - { - "kind": "Content", - "text": ";\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/tlschema/src/shapes/TLBaseShape.ts", - "releaseTag": "Public", - "name": "ShapePropsType", - "typeParameters": [ - { - "typeParameterName": "Config", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 6, - "endIndex": 10 - } - }, - { - "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 align: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "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", - "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 font: import(\"..\")." - }, - { - "kind": "Reference", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "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", - "text": "EnumStyleProp", - "canonicalReference": "@tldraw/tlschema!EnumStyleProp:class" - }, - { - "kind": "Content", - "text": "<\"l\" | \"m\" | \"s\" | \"xl\">;\n text: " - }, - { - "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/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 meta?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ";\n props?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ";\n type: T['type'];\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 description: string;\n image: string;\n src: null | string;\n title: 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 background: string;\n id: 'dark' | 'light';\n solid: string;\n text: 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 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", - "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 h: number;\n isAnimated: boolean;\n mimeType: null | string;\n name: string;\n src: null | string;\n w: number;\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 offset: {\n x: number;\n y: number;\n };\n shapeIds: " - }, - { - "kind": "Reference", - "text": "TLShapeId", - "canonicalReference": "@tldraw/tlschema!TLShapeId:type" - }, - { - "kind": "Content", - "text": "[];\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 rotation: number;\n type: " - }, - { - "kind": "Reference", - "text": "TLCursor", - "canonicalReference": "@tldraw/tlschema!TLCursor:interface" - }, - { - "kind": "Content", - "text": "['type'];\n x: number;\n y: 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 color: " - }, - { - "kind": "Reference", - "text": "TLCanvasUiColor", - "canonicalReference": "@tldraw/tlschema!TLCanvasUiColor:type" - }, - { - "kind": "Content", - "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", - "text": "SetValue", - "canonicalReference": "@tldraw/tlschema!~SetValue:type" - }, - { - "kind": "Content", - "text": ";\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 meta?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ";\n props?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": ";\n type: T['type'];\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 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", - "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 h: number;\n isAnimated: boolean;\n mimeType: null | string;\n name: string;\n src: null | string;\n w: number;\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 assetId: " - }, - { - "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 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", - "isReadonly": true, - "releaseTag": "Public", - "name": "videoShapeProps", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 16 - } - } - ] - } - ] -} diff --git a/packages/utils/api/api.json b/packages/utils/api/api.json deleted file mode 100644 index 6d94200c1..000000000 --- a/packages/utils/api/api.json +++ /dev/null @@ -1,3414 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.43.1", - "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/utils!", - "docComment": "", - "name": "@tldraw/utils", - "preserveMemberOrder": false, - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "@tldraw/utils!", - "name": "", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!debounce:function(1)", - "docComment": "/**\n * Debounce a function.\n *\n * @example\n * ```ts\n * const A = debounce(myFunction, 1000)\n * ```\n *\n * @see\n *\n * source - https://gist.github.com/ca0v/73a31f57b397606c9813472f7493a940\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function debounce(callback: " - }, - { - "kind": "Content", - "text": "(...args: T) => " - }, - { - "kind": "Reference", - "text": "PromiseLike", - "canonicalReference": "!PromiseLike:interface" - }, - { - "kind": "Content", - "text": " | U" - }, - { - "kind": "Content", - "text": ", wait: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n (...args: T): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": ";\n cancel(): void;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/debounce.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 12 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "callback", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "wait", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "U", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "debounce" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!dedupe:function(1)", - "docComment": "/**\n * Deduplicate the items in an array\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function dedupe(input: " - }, - { - "kind": "Content", - "text": "T[]" - }, - { - "kind": "Content", - "text": ", equals?: " - }, - { - "kind": "Content", - "text": "(a: any, b: any) => boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/array.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "input", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "equals", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "dedupe" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/utils!ErrorResult:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type ErrorResult = " - }, - { - "kind": "Content", - "text": "{\n readonly error: E;\n readonly ok: false;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/control.ts", - "releaseTag": "Public", - "name": "ErrorResult", - "typeParameters": [ - { - "typeParameterName": "E", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/utils!Expand:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type Expand = " - }, - { - "kind": "Content", - "text": "T extends infer O ? {\n [K in keyof O]: O[K];\n} : never" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/types.ts", - "releaseTag": "Public", - "name": "Expand", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/utils!FileHelpers:class", - "docComment": "/**\n * Helpers for files\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class FileHelpers " - } - ], - "fileUrlPath": "packages/utils/src/lib/file.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "FileHelpers", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!FileHelpers.blobToDataUrl:member(1)", - "docComment": "/**\n * Convert a file to a base64 encoded data url.\n *\n * @param value - The file as a blob.\n *\n * @example\n * ```ts\n * const A = FileHelpers.toDataUrl(myImageFile)\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static blobToDataUrl(file: " - }, - { - "kind": "Reference", - "text": "Blob", - "canonicalReference": "!Blob:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "file", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "blobToDataUrl" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!FileHelpers.blobToText:member(1)", - "docComment": "/**\n * Convert a file to a unicode text string.\n *\n * @param value - The file as a blob.\n *\n * @example\n * ```ts\n * const A = FileHelpers.fileToDataUrl(myTextFile)\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static blobToText(file: " - }, - { - "kind": "Reference", - "text": "Blob", - "canonicalReference": "!Blob:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "file", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "blobToText" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!FileHelpers.dataUrlToArrayBuffer:member(1)", - "docComment": "/**\n * @param dataURL - The file as a string.\n *\n * from https://stackoverflow.com/a/53817185\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static dataUrlToArrayBuffer(dataURL: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ArrayBuffer", - "canonicalReference": "!ArrayBuffer:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "dataURL", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "dataUrlToArrayBuffer" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!getFirstFromIterable:function(1)", - "docComment": "/**\n * Get the first item from an iterable Set or Map.\n *\n * @param value - The iterable Set or Map.\n *\n * @example\n * ```ts\n * const A = getFirstItem(new Set([1, 2, 3])) // 1\n * const B = getFirstItem(\n * \tnew Map([\n * \t\t['a', 1],\n * \t\t['b', 2],\n * \t])\n * ) // 1\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getFirstFromIterable(set: " - }, - { - "kind": "Reference", - "text": "Map", - "canonicalReference": "!Map:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "Set", - "canonicalReference": "!Set:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/iterable.ts", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "set", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "name": "getFirstFromIterable" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!getHashForBuffer:function(1)", - "docComment": "/**\n * Hash an ArrayBuffer using the FNV-1a algorithm.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getHashForBuffer(buffer: " - }, - { - "kind": "Reference", - "text": "ArrayBuffer", - "canonicalReference": "!ArrayBuffer:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/hash.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "buffer", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "getHashForBuffer" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!getHashForObject:function(1)", - "docComment": "/**\n * Hash a string using the FNV-1a algorithm.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getHashForObject(obj: " - }, - { - "kind": "Content", - "text": "any" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/hash.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "obj", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "getHashForObject" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!getHashForString:function(1)", - "docComment": "/**\n * Hash a string using the FNV-1a algorithm.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getHashForString(string: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/hash.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "string", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "getHashForString" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!getIndexAbove:function(1)", - "docComment": "/**\n * Get the index above a given index.\n *\n * @param below - The index below.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getIndexAbove(below: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/reordering/reordering.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "below", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "getIndexAbove" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!getIndexBelow:function(1)", - "docComment": "/**\n * Get the index below a given index.\n *\n * @param above - The index above.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getIndexBelow(above: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/reordering/reordering.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "above", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "getIndexBelow" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!getIndexBetween:function(1)", - "docComment": "/**\n * Get the index between two indices.\n *\n * @param below - The index below.\n *\n * @param above - The index above.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getIndexBetween(below: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ", above?: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/reordering/reordering.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "below", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "above", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "name": "getIndexBetween" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!getIndices:function(1)", - "docComment": "/**\n * Get n number of indices, starting at an index.\n *\n * @param n - The number of indices to get.\n *\n * @param start - The index to start at.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getIndices(n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", start?: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/reordering/reordering.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "start", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "name": "getIndices" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!getIndicesAbove:function(1)", - "docComment": "/**\n * Get a number of indices above an index.\n *\n * @param below - The index below.\n *\n * @param n - The number of indices to get.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getIndicesAbove(below: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ", n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/reordering/reordering.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "below", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "getIndicesAbove" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!getIndicesBelow:function(1)", - "docComment": "/**\n * Get a number of indices below an index.\n *\n * @param above - The index above.\n *\n * @param n - The number of indices to get.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getIndicesBelow(above: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": ", n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/reordering/reordering.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "above", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "getIndicesBelow" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!getIndicesBetween:function(1)", - "docComment": "/**\n * Get a number of indices between two indices.\n *\n * @param below - The index below.\n *\n * @param above - The index above.\n *\n * @param n - The number of indices to get.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function getIndicesBetween(below: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ", above: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ", n: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/reordering/reordering.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "below", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "above", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "n", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - } - ], - "name": "getIndicesBetween" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/utils!IndexKey:type", - "docComment": "/**\n * A string made up of an integer part followed by a fraction part. The fraction point consists of zero or more digits with no trailing zeros. Based on {@link https://observablehq.com/@dgreensp/implementing-fractional-indexing}.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type IndexKey = " - }, - { - "kind": "Content", - "text": "string & {\n __orderKey: true;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/reordering/IndexKey.ts", - "releaseTag": "Public", - "name": "IndexKey", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!invLerp:function(1)", - "docComment": "/**\n * Inverse lerp between two values. Given a value `n` in the range [a, b], returns a number between 0 and 1.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function invLerp(a: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", t: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/number.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": "t", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "invLerp" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!isDefined:function(1)", - "docComment": "/**\n * Get whether a value is not undefined.\n *\n * @param value - The value to check.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function isDefined(value: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "value", - "canonicalReference": "@tldraw/utils!~value" - }, - { - "kind": "Content", - "text": " is typeof " - }, - { - "kind": "Reference", - "text": "value", - "canonicalReference": "@tldraw/utils!~value:var" - }, - { - "kind": "Content", - "text": " extends undefined ? never : T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/value.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "isDefined" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!isNonNull:function(1)", - "docComment": "/**\n * Get whether a value is null\n *\n * @param value - The value to check.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function isNonNull(value: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "value", - "canonicalReference": "@tldraw/utils!~value" - }, - { - "kind": "Content", - "text": " is typeof " - }, - { - "kind": "Reference", - "text": "value", - "canonicalReference": "@tldraw/utils!~value:var" - }, - { - "kind": "Content", - "text": " extends null ? never : T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/value.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "isNonNull" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!isNonNullish:function(1)", - "docComment": "/**\n * Get whether a value is nullish (null, undefined).\n *\n * @param value - The value to check.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function isNonNullish(value: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "value", - "canonicalReference": "@tldraw/utils!~value" - }, - { - "kind": "Content", - "text": " is typeof " - }, - { - "kind": "Reference", - "text": "value", - "canonicalReference": "@tldraw/utils!~value:var" - }, - { - "kind": "Content", - "text": " extends undefined ? never : typeof " - }, - { - "kind": "Reference", - "text": "value", - "canonicalReference": "@tldraw/utils!~value:var" - }, - { - "kind": "Content", - "text": " extends null ? never : T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/value.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "isNonNullish" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/utils!JsonArray:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type JsonArray = " - }, - { - "kind": "Reference", - "text": "JsonValue", - "canonicalReference": "@tldraw/utils!JsonValue:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/json-value.ts", - "releaseTag": "Public", - "name": "JsonArray", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/utils!JsonObject:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type JsonObject = " - }, - { - "kind": "Content", - "text": "{\n [key: string]: " - }, - { - "kind": "Reference", - "text": "JsonValue", - "canonicalReference": "@tldraw/utils!JsonValue:type" - }, - { - "kind": "Content", - "text": " | undefined;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/json-value.ts", - "releaseTag": "Public", - "name": "JsonObject", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/utils!JsonPrimitive:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type JsonPrimitive = " - }, - { - "kind": "Content", - "text": "boolean | null | number | string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/json-value.ts", - "releaseTag": "Public", - "name": "JsonPrimitive", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/utils!JsonValue:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type JsonValue = " - }, - { - "kind": "Reference", - "text": "JsonArray", - "canonicalReference": "@tldraw/utils!JsonArray:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "JsonObject", - "canonicalReference": "@tldraw/utils!JsonObject:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "JsonPrimitive", - "canonicalReference": "@tldraw/utils!JsonPrimitive:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/json-value.ts", - "releaseTag": "Public", - "name": "JsonValue", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!lerp:function(1)", - "docComment": "/**\n * Linear interpolate between two values.\n *\n * @example\n * ```ts\n * const A = lerp(0, 1, 0.5)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function lerp(a: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", t: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/number.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": "t", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "lerp" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!lns:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function lns(str: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/hash.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "str", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "lns" - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/utils!MediaHelpers:class", - "docComment": "/**\n * Helpers for media\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class MediaHelpers " - } - ], - "fileUrlPath": "packages/utils/src/lib/media.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "MediaHelpers", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!MediaHelpers.getImageSize:member(1)", - "docComment": "/**\n * Get the size of an image blob\n *\n * @param dataURL - A Blob containing the image.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static getImageSize(blob: " - }, - { - "kind": "Reference", - "text": "Blob", - "canonicalReference": "!Blob:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<{\n h: number;\n w: number;\n }>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "blob", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getImageSize" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!MediaHelpers.getVideoSize:member(1)", - "docComment": "/**\n * Get the size of a video blob\n *\n * @param src - A SharedBlob containing the video\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static getVideoSize(blob: " - }, - { - "kind": "Reference", - "text": "Blob", - "canonicalReference": "!Blob:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<{\n h: number;\n w: number;\n }>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "blob", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getVideoSize" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!MediaHelpers.loadImage:member(1)", - "docComment": "/**\n * Load an image from a url.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static loadImage(src: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HTMLImageElement", - "canonicalReference": "!HTMLImageElement:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "src", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "loadImage" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!MediaHelpers.loadVideo:member(1)", - "docComment": "/**\n * Load a video from a url.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static loadVideo(src: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HTMLVideoElement", - "canonicalReference": "!HTMLVideoElement:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "src", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "loadVideo" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!MediaHelpers.usingObjectURL:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static usingObjectURL(blob: " - }, - { - "kind": "Reference", - "text": "Blob", - "canonicalReference": "!Blob:interface" - }, - { - "kind": "Content", - "text": ", fn: " - }, - { - "kind": "Content", - "text": "(url: string) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "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": "blob", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "fn", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "usingObjectURL" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!modulate:function(1)", - "docComment": "/**\n * Modulate a value between two ranges.\n *\n * @param value - The interpolation value.\n *\n * @param rangeA - From [low, high]\n *\n * @param rangeB - To [low, high]\n *\n * @param clamp - Whether to clamp the the result to [low, high]\n *\n * @example\n * ```ts\n * const A = modulate(0, [0, 1], [0, 100])\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function modulate(value: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", rangeA: " - }, - { - "kind": "Content", - "text": "number[]" - }, - { - "kind": "Content", - "text": ", rangeB: " - }, - { - "kind": "Content", - "text": "number[]" - }, - { - "kind": "Content", - "text": ", clamp?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/number.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "rangeA", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "rangeB", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "clamp", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": true - } - ], - "name": "modulate" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/utils!OkResult:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type OkResult = " - }, - { - "kind": "Content", - "text": "{\n readonly ok: true;\n readonly value: T;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/control.ts", - "releaseTag": "Public", - "name": "OkResult", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Class", - "canonicalReference": "@tldraw/utils!PngHelpers:class", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class PngHelpers " - } - ], - "fileUrlPath": "packages/utils/src/lib/png.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "PngHelpers", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!PngHelpers.findChunk:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static findChunk(view: " - }, - { - "kind": "Reference", - "text": "DataView", - "canonicalReference": "!DataView:interface" - }, - { - "kind": "Content", - "text": ", type: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n dataOffset: number;\n size: number;\n start: number;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "view", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "findChunk" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!PngHelpers.getChunkType:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static getChunkType(view: " - }, - { - "kind": "Reference", - "text": "DataView", - "canonicalReference": "!DataView:interface" - }, - { - "kind": "Content", - "text": ", offset: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "view", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "offset", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getChunkType" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!PngHelpers.isPng:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static isPng(view: " - }, - { - "kind": "Reference", - "text": "DataView", - "canonicalReference": "!DataView:interface" - }, - { - "kind": "Content", - "text": ", offset: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "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": "view", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "offset", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "isPng" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!PngHelpers.parsePhys:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static parsePhys(view: " - }, - { - "kind": "Reference", - "text": "DataView", - "canonicalReference": "!DataView:interface" - }, - { - "kind": "Content", - "text": ", offset: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n ppux: number;\n ppuy: number;\n unit: number;\n }" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "view", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "offset", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "parsePhys" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!PngHelpers.readChunks:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static readChunks(view: " - }, - { - "kind": "Reference", - "text": "DataView", - "canonicalReference": "!DataView:interface" - }, - { - "kind": "Content", - "text": ", offset?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "view", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "offset", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "readChunks" - }, - { - "kind": "Method", - "canonicalReference": "@tldraw/utils!PngHelpers.setPhysChunk:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "static setPhysChunk(view: " - }, - { - "kind": "Reference", - "text": "DataView", - "canonicalReference": "!DataView:interface" - }, - { - "kind": "Content", - "text": ", dpr?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Reference", - "text": "BlobPropertyBag", - "canonicalReference": "!BlobPropertyBag:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Blob", - "canonicalReference": "!Blob:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "view", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "dpr", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "setPhysChunk" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/utils!RecursivePartial:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type RecursivePartial = " - }, - { - "kind": "Content", - "text": "{\n [P in keyof T]?: " - }, - { - "kind": "Reference", - "text": "RecursivePartial", - "canonicalReference": "@tldraw/utils!RecursivePartial:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/types.ts", - "releaseTag": "Public", - "name": "RecursivePartial", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@tldraw/utils!Result:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type Result = " - }, - { - "kind": "Reference", - "text": "ErrorResult", - "canonicalReference": "@tldraw/utils!ErrorResult:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "OkResult", - "canonicalReference": "@tldraw/utils!OkResult:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/control.ts", - "releaseTag": "Public", - "name": "Result", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "E", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/utils!Result:var", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "Result: " - }, - { - "kind": "Content", - "text": "{\n err(error: E): " - }, - { - "kind": "Reference", - "text": "ErrorResult", - "canonicalReference": "@tldraw/utils!ErrorResult:type" - }, - { - "kind": "Content", - "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", - "isReadonly": true, - "releaseTag": "Public", - "name": "Result", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!rng:function(1)", - "docComment": "/**\n * Seeded random number generator, using [xorshift](https://en.wikipedia.org/wiki/Xorshift). The result will always be betweeen -1 and 1.\n *\n * Adapted from [seedrandom](https://github.com/davidbau/seedrandom).\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function rng(seed?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "() => number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/number.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "seed", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "name": "rng" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!rotateArray:function(1)", - "docComment": "/**\n * Rotate the contents of an array.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function rotateArray(arr: " - }, - { - "kind": "Content", - "text": "T[]" - }, - { - "kind": "Content", - "text": ", offset: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/array.ts", - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "arr", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "offset", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "rotateArray" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!sortById:function(1)", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function sortById(a: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "-1 | 1" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/sort.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "sortById" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!sortByIndex:function(1)", - "docComment": "/**\n * Sort by index.\n *\n * @param a - An object with an index property.\n *\n * @param b - An object with an index property.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function sortByIndex(a: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "-1 | 0 | 1" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/reordering/reordering.ts", - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "sortByIndex" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!structuredClone_2:function(1)", - "docComment": "/**\n * Create a deep copy of a value. Uses the structuredClone API if available, otherwise uses JSON.parse(JSON.stringify()).\n *\n * @param i - The value to clone.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "structuredClone: (i: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Content", - "text": "T" - } - ], - "fileUrlPath": "packages/utils/src/lib/value.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "i", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "structuredClone_2" - }, - { - "kind": "Function", - "canonicalReference": "@tldraw/utils!throttle:function(1)", - "docComment": "/**\n * Throttle a function.\n *\n * @example\n * ```ts\n * const A = throttle(myFunction, 1000)\n * ```\n *\n * @see\n *\n * source - https://github.com/bameyrick/throttle-typescript\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function throttle any" - }, - { - "kind": "Content", - "text": ">(func: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ", limit: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "(...args: " - }, - { - "kind": "Reference", - "text": "Parameters", - "canonicalReference": "!Parameters:type" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "ReturnType", - "canonicalReference": "!ReturnType:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "packages/utils/src/lib/function.ts", - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 12 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "func", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "limit", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "throttle" - }, - { - "kind": "Variable", - "canonicalReference": "@tldraw/utils!ZERO_INDEX_KEY:var", - "docComment": "/**\n * The index key for the first index - 'a0'.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "ZERO_INDEX_KEY: " - }, - { - "kind": "Reference", - "text": "IndexKey", - "canonicalReference": "@tldraw/utils!IndexKey:type" - } - ], - "fileUrlPath": "packages/utils/src/lib/reordering/reordering.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "ZERO_INDEX_KEY", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - } - ] -} diff --git a/packages/validate/api/api.json b/packages/validate/api/api.json deleted file mode 100644 index 0aedb8cb6..000000000 --- a/packages/validate/api/api.json +++ /dev/null @@ -1,5017 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.43.1", - "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": ", useNumberKeys: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "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 - }, - { - "parameterName": "useNumberKeys", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "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 validateUsingKnownGoodVersion?: (knownGoodValue: T, newValue: unknown) => T;\n validate: (value: 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": ", useNumberKeys: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "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 - }, - { - "parameterName": "useNumberKeys", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "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/scripts/vercel/build-docs.sh b/scripts/vercel/build-docs.sh index 43dc3c4a2..e363007df 100755 --- a/scripts/vercel/build-docs.sh +++ b/scripts/vercel/build-docs.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -eux +yarn run -T lazy build-api yarn run -T lazy refresh-everything --filter=apps/docs yarn run -T lazy build --filter=apps/docs \ No newline at end of file From 8151e6f586149e4447149d25bd70868a5a4e8838 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 24 Apr 2024 19:26:10 +0100 Subject: [PATCH 04/15] Automatic undo/redo (#3364) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our undo-redo system before this diff is based on commands. A command is: - A function that produces some data required to perform and undo a change - A function that actually performs the change, based on the data - Another function that undoes the change, based on the data - Optionally, a function to _redo_ the change, although in practice we never use this Each command that gets run is added to the undo/redo stack unless it says it shouldn't be. This diff replaces this system of commands with a new one where all changes to the store are automatically recorded in the undo/redo stack. You can imagine the new history manager like a tape recorder - it automatically records everything that happens to the store in a special diff, unless you "pause" the recording and ask it not to. Undo and redo rewind/fast-forward the tape to certain marks. As the command concept is gone, the things that were commands are now just functions that manipulate the store. One other change here is that the store's after-phase callbacks (and the after-phase side-effects as a result) are now batched up and called at the end of certain key operations. For example, `applyDiff` would previously call all the `afterCreate` callbacks before making any removals from the diff. Now, it (and anything else that uses `store.atomic(fn)` will defer firing any after callbacks until the end of an operation. before callbacks are still called part-way through operations. ## Design options Automatic recording is a fairly large big semantic change, particularly to the standalone `store.put`/`store.remove` etc. commands. We could instead make not-recording the default, and make recording opt-in instead. However, I think auto-record-by-default is the right choice for a few reasons: 1. Switching to a recording-based vs command-based undo-redo model is fundamentally a big semantic change. In the past, `store.put` etc. were always ignored. Now, regardless of whether we choose record-by-default or ignore-by-default, the behaviour of `store.put` is _context_ dependant. 2. Switching to ignore-by-default means that either our commands don't record undo/redo history any more (unless wrapped in `editor.history.record`, a far larger semantic change) or they have to always-record/all accept a history options bag. If we choose always-record, we can't use commands within `history.ignore` as they'll start recording again. If we choose the history options bag, we have to accept those options in 10s of methods - basically the entire `Editor` api surface. Overall, given that some breaking semantic change here is unavoidable, I think that record-by-default hits the right balance of tradeoffs. I think it's a better API going forward, whilst also not being too disruptive as the APIs it affects are very "deep" ones that we don't typically encourage people to use. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `improvement` — Improving existing features - [x] `galaxy brain` — Architectural changes ### Release Note #### Breaking changes ##### 1. History Options Previously, some (not all!) commands accepted a history options object with `squashing`, `ephemeral`, and `preserveRedoStack` flags. Squashing enabled/disabled a memory optimisation (storing individual commands vs squashing them together). Ephemeral stopped a command from affecting the undo/redo stack at all. Preserve redo stack stopped commands from wiping the redo stack. These flags were never available consistently - some commands had them and others didn't. In this version, most of these flags have been removed. `squashing` is gone entirely (everything squashes & does so much faster than before). There were a couple of commands that had a special default - for example, `updateInstanceState` used to default to being `ephemeral`. Those maintain the defaults, but the options look a little different now - `{ephemeral: true}` is now `{history: 'ignore'}` and `{preserveRedoStack: true}` is now `{history: 'record-preserveRedoStack'}`. If you were previously using these options in places where they've now been removed, you can use wrap them with `editor.history.ignore(fn)` or `editor.history.batch(fn, {history: 'record-preserveRedoStack'})`. For example, ```ts editor.nudgeShapes(..., { ephemeral: true }) ``` can now be written as ```ts editor.history.ignore(() => { editor.nudgeShapes(...) }) ``` ##### 2. Automatic recording Previously, only commands (e.g. `editor.updateShapes` and things that use it) were added to the undo/redo stack. Everything else (e.g. `editor.store.put`) wasn't. Now, _everything_ that touches the store is recorded in the undo/redo stack (unless it's part of `mergeRemoteChanges`). You can use `editor.history.ignore(fn)` as above if you want to make other changes to the store that aren't recorded - this is short for `editor.history.batch(fn, {history: 'ignore'})` When upgrading to this version of tldraw, you shouldn't need to change anything unless you're using `store.put`, `store.remove`, or `store.applyDiff` outside of `store.mergeRemoteChanges`. If you are, you can preserve the functionality of those not being recorded by wrapping them either in `mergeRemoteChanges` (if they're multiplayer-related) or `history.ignore` as appropriate. ##### 3. Side effects Before this diff, any changes in side-effects weren't captured by the undo-redo stack. This was actually the motivation for this change in the first place! But it's a pretty big change, and if you're using side effects we recommend you double-check how they interact with undo/redo before/after this change. To get the old behaviour back, wrap your side effects in `editor.history.ignore`. ##### 4. Mark options Previously, `editor.mark(id)` accepted two additional boolean parameters: `onUndo` and `onRedo`. If these were set to false, then when undoing or redoing we'd skip over that mark and keep going until we found one with those values set to true. We've removed those options - if you're using them, let us know and we'll figure out an alternative! --- .../context-toolbar/ContextToolbar.tsx | 4 +- .../CustomStylePanelExample.tsx | 4 +- .../user-presence/UserPresenceExample.tsx | 30 +- apps/vscode/editor/src/ChangeResponder.tsx | 4 +- packages/editor/api-report.md | 145 +- packages/editor/src/index.ts | 8 +- packages/editor/src/lib/TldrawEditor.tsx | 7 +- .../editor/src/lib/config/createTLStore.ts | 9 +- packages/editor/src/lib/editor/Editor.ts | 1564 +++++++---------- .../editor/managers/HistoryManager.test.ts | 309 ++-- .../src/lib/editor/managers/HistoryManager.ts | 445 ++--- .../lib/editor/managers/SideEffectManager.ts | 60 +- .../editor/src/lib/editor/types/emit-types.ts | 2 - .../src/lib/editor/types/history-types.ts | 59 +- packages/store/api-report.md | 36 +- packages/store/src/index.ts | 11 +- packages/store/src/lib/RecordType.ts | 18 +- packages/store/src/lib/RecordsDiff.ts | 107 ++ packages/store/src/lib/Store.ts | 272 ++- packages/store/src/lib/StoreQueries.ts | 3 +- packages/store/src/lib/StoreSchema.ts | 7 + .../store/src/lib/test/recordStore.test.ts | 270 ++- packages/tldraw/api-report.md | 6 +- .../lib/shapes/arrow/toolStates/Pointing.ts | 6 +- .../src/lib/shapes/draw/toolStates/Drawing.ts | 10 +- .../frame/components/FrameLabelInput.tsx | 34 +- .../src/lib/shapes/note/NoteShapeTool.test.ts | 1 - .../tools/HandTool/childStates/Pointing.ts | 5 +- .../tools/SelectTool/childStates/Brushing.ts | 4 +- .../childStates/Crop/children/Idle.ts | 14 +- .../Crop/children/TranslatingCrop.ts | 7 +- .../tools/SelectTool/childStates/Cropping.ts | 9 +- .../SelectTool/childStates/DraggingHandle.tsx | 12 +- .../lib/tools/SelectTool/childStates/Idle.ts | 5 +- .../childStates/PointingArrowLabel.ts | 14 +- .../childStates/PointingCropHandle.ts | 12 +- .../SelectTool/childStates/PointingHandle.ts | 10 +- .../childStates/PointingResizeHandle.ts | 8 +- .../childStates/PointingRotateHandle.ts | 13 +- .../tools/SelectTool/childStates/Resizing.ts | 10 +- .../tools/SelectTool/childStates/Rotating.ts | 16 +- .../childStates/ScribbleBrushing.ts | 4 +- .../SelectTool/childStates/Translating.ts | 3 +- .../tldraw/src/lib/tools/ZoomTool/ZoomTool.ts | 15 +- .../lib/ui/components/MobileStylePanel.tsx | 2 +- .../ui/components/PageMenu/PageItemInput.tsx | 17 +- .../StylePanel/DefaultStylePanel.tsx | 2 +- .../StylePanel/DefaultStylePanelContent.tsx | 20 +- .../StylePanel/DoubleDropdownPicker.tsx | 6 +- .../components/StylePanel/DropdownPicker.tsx | 4 +- .../primitives/TldrawUiButtonPicker.tsx | 10 +- .../components/primitives/TldrawUiInput.tsx | 5 +- .../components/primitives/TldrawUiSlider.tsx | 6 +- .../tldraw/src/lib/ui/context/actions.tsx | 15 +- .../ui/hooks/clipboard/pasteTldrawContent.ts | 4 +- packages/tldraw/src/lib/ui/hooks/usePrint.ts | 2 +- packages/tldraw/src/lib/ui/hooks/useTools.tsx | 10 +- .../tldraw/src/test/TldrawEditor.test.tsx | 10 +- .../src/test/commands/alignShapes.test.tsx | 2 +- .../test/commands/distributeShapes.test.ts | 2 +- .../test/commands/moveShapesToPage.test.ts | 3 +- .../tldraw/src/test/commands/squash.test.ts | 13 - .../src/test/commands/stackShapes.test.ts | 2 +- .../tldraw/src/test/commands/stretch.test.tsx | 2 +- packages/tldraw/src/test/testutils/pretty.ts | 129 ++ packages/tlschema/src/records/TLInstance.ts | 33 +- packages/tlschema/src/records/TLPageState.ts | 12 + packages/tlsync/src/lib/TLSyncClient.ts | 28 +- packages/tlsync/src/test/syncFuzz.test.ts | 82 +- 69 files changed, 2106 insertions(+), 1907 deletions(-) create mode 100644 packages/store/src/lib/RecordsDiff.ts delete mode 100644 packages/tldraw/src/test/commands/squash.test.ts create mode 100644 packages/tldraw/src/test/testutils/pretty.ts diff --git a/apps/examples/src/examples/context-toolbar/ContextToolbar.tsx b/apps/examples/src/examples/context-toolbar/ContextToolbar.tsx index 4a92f88ba..c28cb4763 100644 --- a/apps/examples/src/examples/context-toolbar/ContextToolbar.tsx +++ b/apps/examples/src/examples/context-toolbar/ContextToolbar.tsx @@ -77,9 +77,7 @@ const ContextToolbarComponent = track(() => { width: 32, background: isActive ? 'var(--color-muted-2)' : 'transparent', }} - onClick={() => - editor.setStyleForSelectedShapes(DefaultSizeStyle, value, { squashing: false }) - } + onClick={() => editor.setStyleForSelectedShapes(DefaultSizeStyle, value)} > diff --git a/apps/examples/src/examples/custom-style-panel/CustomStylePanelExample.tsx b/apps/examples/src/examples/custom-style-panel/CustomStylePanelExample.tsx index c8d27b5c3..f8df67102 100644 --- a/apps/examples/src/examples/custom-style-panel/CustomStylePanelExample.tsx +++ b/apps/examples/src/examples/custom-style-panel/CustomStylePanelExample.tsx @@ -25,7 +25,7 @@ function CustomStylePanel(props: TLUiStylePanelProps) { { - editor.setStyleForSelectedShapes(DefaultColorStyle, 'red', { squashing: true }) + editor.setStyleForSelectedShapes(DefaultColorStyle, 'red') }} > Red @@ -35,7 +35,7 @@ function CustomStylePanel(props: TLUiStylePanelProps) { { - editor.setStyleForSelectedShapes(DefaultColorStyle, 'green', { squashing: true }) + editor.setStyleForSelectedShapes(DefaultColorStyle, 'green') }} > Green diff --git a/apps/examples/src/examples/user-presence/UserPresenceExample.tsx b/apps/examples/src/examples/user-presence/UserPresenceExample.tsx index 070e6b7a5..1816c3e99 100644 --- a/apps/examples/src/examples/user-presence/UserPresenceExample.tsx +++ b/apps/examples/src/examples/user-presence/UserPresenceExample.tsx @@ -29,7 +29,9 @@ export default function UserPresenceExample() { chatMessage: CURSOR_CHAT_MESSAGE, }) - editor.store.put([peerPresence]) + editor.store.mergeRemoteChanges(() => { + editor.store.put([peerPresence]) + }) // [b] const raf = rRaf.current @@ -67,23 +69,29 @@ export default function UserPresenceExample() { ) } - editor.store.put([ - { - ...peerPresence, - cursor, - chatMessage, - lastActivityTimestamp: now, - }, - ]) + editor.store.mergeRemoteChanges(() => { + editor.store.put([ + { + ...peerPresence, + cursor, + chatMessage, + lastActivityTimestamp: now, + }, + ]) + }) rRaf.current = requestAnimationFrame(loop) } rRaf.current = requestAnimationFrame(loop) } else { - editor.store.put([{ ...peerPresence, lastActivityTimestamp: Date.now() }]) - rRaf.current = setInterval(() => { + editor.store.mergeRemoteChanges(() => { editor.store.put([{ ...peerPresence, lastActivityTimestamp: Date.now() }]) + }) + rRaf.current = setInterval(() => { + editor.store.mergeRemoteChanges(() => { + editor.store.put([{ ...peerPresence, lastActivityTimestamp: Date.now() }]) + }) }, 1000) } }} diff --git a/apps/vscode/editor/src/ChangeResponder.tsx b/apps/vscode/editor/src/ChangeResponder.tsx index 7cb77f6c7..a0bbb5cdd 100644 --- a/apps/vscode/editor/src/ChangeResponder.tsx +++ b/apps/vscode/editor/src/ChangeResponder.tsx @@ -57,11 +57,11 @@ export const ChangeResponder = () => { type: 'vscode:editor-loaded', }) - editor.on('change-history', handleChange) + const dispose = editor.store.listen(handleChange, { scope: 'document' }) return () => { handleChange() - editor.off('change-history', handleChange) + dispose() } }, [editor]) diff --git a/packages/editor/api-report.md b/packages/editor/api-report.md index a8039822c..99c6779e9 100644 --- a/packages/editor/api-report.md +++ b/packages/editor/api-report.md @@ -29,10 +29,12 @@ import { default as React_2 } from 'react'; import * as React_3 from 'react'; import { ReactElement } from 'react'; import { ReactNode } from 'react'; +import { RecordsDiff } from '@tldraw/store'; import { SerializedSchema } from '@tldraw/store'; import { SerializedStore } from '@tldraw/store'; import { ShapeProps } from '@tldraw/tlschema'; import { Signal } from '@tldraw/state'; +import { Store } from '@tldraw/store'; import { StoreSchema } from '@tldraw/store'; import { StoreSnapshot } from '@tldraw/store'; import { StyleProp } from '@tldraw/tlschema'; @@ -375,7 +377,7 @@ export function counterClockwiseAngleDist(a0: number, a1: number): number; export function createSessionStateSnapshotSignal(store: TLStore): Signal; // @public -export function createTLStore({ initialData, defaultName, ...rest }: TLStoreOptions): TLStore; +export function createTLStore({ initialData, defaultName, id, ...rest }: TLStoreOptions): TLStore; // @public (undocumented) export function createTLUser(opts?: { @@ -602,7 +604,7 @@ export class Editor extends EventEmitter { }): this; bail(): this; bailToMark(id: string): this; - batch(fn: () => void): this; + batch(fn: () => void, opts?: TLHistoryBatchOptions): this; bringForward(shapes: TLShape[] | TLShapeId[]): this; bringToFront(shapes: TLShape[] | TLShapeId[]): this; cancel(): this; @@ -810,7 +812,7 @@ export class Editor extends EventEmitter { getZoomLevel(): number; groupShapes(shapes: TLShape[] | TLShapeId[], groupId?: TLShapeId): this; hasAncestor(shape: TLShape | TLShapeId | undefined, ancestorId: TLShapeId): boolean; - readonly history: HistoryManager; + readonly history: HistoryManager; inputs: { buttons: Set; keys: Set; @@ -832,6 +834,7 @@ export class Editor extends EventEmitter { isPointing: boolean; }; interrupt(): this; + isAncestorSelected(shape: TLShape | TLShapeId): boolean; isIn(path: string): boolean; isInAny(...paths: string[]): boolean; isPointInShape(shape: TLShape | TLShapeId, point: VecLike, opts?: { @@ -845,9 +848,9 @@ export class Editor extends EventEmitter { isShapeOrAncestorLocked(shape?: TLShape): boolean; // (undocumented) isShapeOrAncestorLocked(id?: TLShapeId): boolean; - mark(markId?: string, onUndo?: boolean, onRedo?: boolean): this; + mark(markId?: string): this; moveShapesToPage(shapes: TLShape[] | TLShapeId[], pageId: TLPageId): this; - nudgeShapes(shapes: TLShape[] | TLShapeId[], offset: VecLike, historyOptions?: TLCommandHistoryOptions): this; + nudgeShapes(shapes: TLShape[] | TLShapeId[], offset: VecLike): this; packShapes(shapes: TLShape[] | TLShapeId[], gap: number): this; pageToScreen(point: VecLike): { x: number; @@ -876,7 +879,7 @@ export class Editor extends EventEmitter { registerExternalContentHandler(type: T, handler: ((info: T extends TLExternalContent['type'] ? TLExternalContent & { type: T; } : TLExternalContent) => void) | null): this; - renamePage(page: TLPage | TLPageId, name: string, historyOptions?: TLCommandHistoryOptions): this; + renamePage(page: TLPage | TLPageId, name: string): this; renderingBoundsMargin: number; reparentShapes(shapes: TLShape[] | TLShapeId[], parentId: TLParentId, insertIndex?: IndexKey): this; resetZoom(point?: Vec, animation?: TLAnimationOptions): this; @@ -896,7 +899,7 @@ export class Editor extends EventEmitter { sendToBack(shapes: TLShape[] | TLShapeId[]): this; setCamera(point: VecLike, animation?: TLAnimationOptions): this; setCroppingShape(shape: null | TLShape | TLShapeId): this; - setCurrentPage(page: TLPage | TLPageId, historyOptions?: TLCommandHistoryOptions): this; + setCurrentPage(page: TLPage | TLPageId): this; setCurrentTool(id: string, info?: {}): this; setCursor: (cursor: Partial) => this; setEditingShape(shape: null | TLShape | TLShapeId): this; @@ -904,11 +907,11 @@ export class Editor extends EventEmitter { setFocusedGroup(shape: null | TLGroupShape | TLShapeId): this; setHintingShapes(shapes: TLShape[] | TLShapeId[]): this; setHoveredShape(shape: null | TLShape | TLShapeId): this; - setOpacityForNextShapes(opacity: number, historyOptions?: TLCommandHistoryOptions): this; - setOpacityForSelectedShapes(opacity: number, historyOptions?: TLCommandHistoryOptions): this; - setSelectedShapes(shapes: TLShape[] | TLShapeId[], historyOptions?: TLCommandHistoryOptions): this; - setStyleForNextShapes(style: StyleProp, value: T, historyOptions?: TLCommandHistoryOptions): this; - setStyleForSelectedShapes>(style: S, value: StylePropValue, historyOptions?: TLCommandHistoryOptions): this; + setOpacityForNextShapes(opacity: number, historyOptions?: TLHistoryBatchOptions): this; + setOpacityForSelectedShapes(opacity: number): this; + setSelectedShapes(shapes: TLShape[] | TLShapeId[]): this; + setStyleForNextShapes(style: StyleProp, value: T, historyOptions?: TLHistoryBatchOptions): this; + setStyleForSelectedShapes>(style: S, value: StylePropValue): this; shapeUtils: { readonly [K in string]?: ShapeUtil; }; @@ -937,14 +940,16 @@ export class Editor extends EventEmitter { // (undocumented) ungroupShapes(ids: TLShape[]): this; updateAssets(assets: TLAssetPartial[]): this; - updateCurrentPageState(partial: Partial>, historyOptions?: TLCommandHistoryOptions): this; + updateCurrentPageState(partial: Partial>, historyOptions?: TLHistoryBatchOptions): this; + // (undocumented) + _updateCurrentPageState: (partial: Partial>, historyOptions?: TLHistoryBatchOptions) => void; updateDocumentSettings(settings: Partial): this; - updateInstanceState(partial: Partial>, historyOptions?: TLCommandHistoryOptions): this; - updatePage(partial: RequiredKeys, historyOptions?: TLCommandHistoryOptions): this; + updateInstanceState(partial: Partial>, historyOptions?: TLHistoryBatchOptions): this; + updatePage(partial: RequiredKeys): this; // @internal updateRenderingBounds(): this; - updateShape(partial: null | TLShapePartial | undefined, historyOptions?: TLCommandHistoryOptions): this; - updateShapes(partials: (null | TLShapePartial | undefined)[], historyOptions?: TLCommandHistoryOptions): this; + updateShape(partial: null | TLShapePartial | undefined): this; + updateShapes(partials: (null | TLShapePartial | undefined)[]): this; updateViewportScreenBounds(screenBounds: Box, center?: boolean): this; readonly user: UserPreferencesManager; visitDescendants(parent: TLPage | TLParentId | TLShape, visitor: (id: TLShapeId) => false | void): this; @@ -1208,6 +1213,55 @@ export function hardResetEditor(): void; // @internal (undocumented) export const HASH_PATTERN_ZOOM_NAMES: Record; +// @public (undocumented) +export class HistoryManager { + constructor(opts: { + annotateError?: (error: unknown) => void; + store: Store; + }); + // (undocumented) + bail: () => this; + // (undocumented) + bailToMark: (id: string) => this; + // (undocumented) + batch: (fn: () => void, opts?: TLHistoryBatchOptions) => this; + // (undocumented) + clear(): void; + // @internal (undocumented) + debug(): { + pendingDiff: { + diff: RecordsDiff; + isEmpty: boolean; + }; + redos: (NonNullable> | undefined)[]; + state: HistoryRecorderState; + undos: (NonNullable> | undefined)[]; + }; + // (undocumented) + readonly dispose: () => void; + // (undocumented) + getNumRedos(): number; + // (undocumented) + getNumUndos(): number; + // (undocumented) + ignore(fn: () => void): this; + // @internal (undocumented) + _isInBatch: boolean; + // (undocumented) + mark: (id?: string) => string; + // (undocumented) + onBatchComplete: () => void; + // (undocumented) + redo: () => this | undefined; + // @internal (undocumented) + stacks: Atom< { + redos: Stack>; + undos: Stack>; + }, unknown>; + // (undocumented) + undo: () => this; +} + // @public (undocumented) export const HIT_TEST_MARGIN = 8; @@ -1723,6 +1777,17 @@ export class SideEffectManager; + afterCreate?: TLAfterCreateHandler; + afterDelete?: TLAfterDeleteHandler; + beforeChange?: TLBeforeChangeHandler; + beforeCreate?: TLBeforeCreateHandler; + beforeDelete?: TLBeforeDeleteHandler; + }; + }): () => void; registerAfterChangeHandler(typeName: T, handler: TLAfterChangeHandler): () => void; @@ -2037,29 +2102,6 @@ export type TLCollaboratorHintProps = { zoom: number; }; -// @public (undocumented) -export type TLCommand = { - preservesRedoStack?: boolean; - data: Data; - name: Name; - type: 'command'; -}; - -// @public (undocumented) -export type TLCommandHandler = { - 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; -}>; - // @public (undocumented) export type TLCompleteEvent = (info: TLCompleteEventInfo) => void; @@ -2193,17 +2235,6 @@ export type TLEventInfo = TLCancelEventInfo | TLClickEventInfo | TLCompleteEvent // @public (undocumented) export interface TLEventMap { - // (undocumented) - 'change-history': [{ - markId?: string; - reason: 'bail'; - } | { - reason: 'push' | 'redo' | 'undo'; - }]; - // (undocumented) - 'mark-history': [{ - id: string; - }]; // (undocumented) 'max-shapes': [{ count: number; @@ -2316,17 +2347,6 @@ export type TLHandlesProps = { children: ReactNode; }; -// @public (undocumented) -export type TLHistoryEntry = TLCommand | TLHistoryMark; - -// @public (undocumented) -export type TLHistoryMark = { - id: string; - onRedo: boolean; - onUndo: boolean; - type: 'STOP'; -}; - // @public (undocumented) export type TLInterruptEvent = (info: TLInterruptEventInfo) => void; @@ -2610,6 +2630,7 @@ export type TLStoreEventInfo = HistoryEntry; // @public (undocumented) export type TLStoreOptions = { defaultName?: string; + id?: string; initialData?: SerializedStore; } & ({ migrations?: readonly MigrationSequence[]; diff --git a/packages/editor/src/index.ts b/packages/editor/src/index.ts index 4577b1395..d89708f3e 100644 --- a/packages/editor/src/index.ts +++ b/packages/editor/src/index.ts @@ -17,7 +17,6 @@ export { type Atom, type Signal, } from '@tldraw/state' -export type { TLCommandHistoryOptions } from './lib/editor/types/history-types' // eslint-disable-next-line local/no-export-star export * from '@tldraw/store' // eslint-disable-next-line local/no-export-star @@ -131,6 +130,7 @@ export { type TLEditorOptions, type TLResizeShapeOptions, } from './lib/editor/Editor' +export { HistoryManager } from './lib/editor/managers/HistoryManager' export type { SideEffectManager, TLAfterChangeHandler, @@ -235,12 +235,6 @@ export { type TLExternalContent, type TLExternalContentSource, } from './lib/editor/types/external-content' -export { - type TLCommand, - type TLCommandHandler, - type TLHistoryEntry, - type TLHistoryMark, -} from './lib/editor/types/history-types' export { type RequiredKeys, type TLSvgOptions } from './lib/editor/types/misc-types' export { type TLResizeHandle, type TLSelectionHandle } from './lib/editor/types/selection-types' export { ContainerProvider, useContainer } from './lib/hooks/useContainer' diff --git a/packages/editor/src/lib/TldrawEditor.tsx b/packages/editor/src/lib/TldrawEditor.tsx index 32e47764d..87ea9b1fe 100644 --- a/packages/editor/src/lib/TldrawEditor.tsx +++ b/packages/editor/src/lib/TldrawEditor.tsx @@ -380,8 +380,11 @@ function useOnMount(onMount?: TLOnMountHandler) { const editor = useEditor() const onMountEvent = useEvent((editor: Editor) => { - const teardown = onMount?.(editor) - editor.emit('mount') + let teardown: (() => void) | void = undefined + editor.history.ignore(() => { + teardown = onMount?.(editor) + editor.emit('mount') + }) window.tldrawReady = true return teardown }) diff --git a/packages/editor/src/lib/config/createTLStore.ts b/packages/editor/src/lib/config/createTLStore.ts index b910b6561..3361a18a5 100644 --- a/packages/editor/src/lib/config/createTLStore.ts +++ b/packages/editor/src/lib/config/createTLStore.ts @@ -14,6 +14,7 @@ import { TLAnyShapeUtilConstructor, checkShapesAndAddCore } from './defaultShape export type TLStoreOptions = { initialData?: SerializedStore defaultName?: string + id?: string } & ( | { shapeUtils?: readonly TLAnyShapeUtilConstructor[]; migrations?: readonly MigrationSequence[] } | { schema?: StoreSchema } @@ -28,7 +29,12 @@ export type TLStoreEventInfo = HistoryEntry * @param opts - Options for creating the store. * * @public */ -export function createTLStore({ initialData, defaultName = '', ...rest }: TLStoreOptions): TLStore { +export function createTLStore({ + initialData, + defaultName = '', + id, + ...rest +}: TLStoreOptions): TLStore { const schema = 'schema' in rest && rest.schema ? // we have a schema @@ -42,6 +48,7 @@ export function createTLStore({ initialData, defaultName = '', ...rest }: TLStor }) return new Store({ + id, schema, initialData, props: { diff --git a/packages/editor/src/lib/editor/Editor.ts b/packages/editor/src/lib/editor/Editor.ts index c74be045e..88e44208f 100644 --- a/packages/editor/src/lib/editor/Editor.ts +++ b/packages/editor/src/lib/editor/Editor.ts @@ -52,7 +52,6 @@ import { getIndicesBetween, getOwnProperty, hasOwnProperty, - objectMapValues, sortById, sortByIndex, structuredClone, @@ -129,7 +128,7 @@ import { TLWheelEventInfo, } from './types/event-types' import { TLExternalAssetContent, TLExternalContent } from './types/external-content' -import { TLCommandHistoryOptions } from './types/history-types' +import { TLHistoryBatchOptions } from './types/history-types' import { OptionalKeys, RequiredKeys, TLSvgOptions } from './types/misc-types' import { TLResizeHandle } from './types/selection-types' @@ -198,6 +197,13 @@ export class Editor extends EventEmitter { super() this.store = store + this.history = new HistoryManager({ + store, + annotateError: (error) => { + this.annotateError(error, { origin: 'history.batch', willCrashApp: true }) + this.crash(error) + }, + }) this.snaps = new SnapManager(this) @@ -421,168 +427,204 @@ export class Editor extends EventEmitter { this.sideEffects = new SideEffectManager(this) - this.sideEffects.registerBatchCompleteHandler(() => { - for (const parentId of invalidParents) { - invalidParents.delete(parentId) - const parent = this.getShape(parentId) - if (!parent) continue + this.disposables.add( + this.sideEffects.registerBatchCompleteHandler(() => { + for (const parentId of invalidParents) { + invalidParents.delete(parentId) + const parent = this.getShape(parentId) + if (!parent) continue - const util = this.getShapeUtil(parent) - const changes = util.onChildrenChange?.(parent) + const util = this.getShapeUtil(parent) + const changes = util.onChildrenChange?.(parent) - if (changes?.length) { - this.updateShapes(changes, { squashing: true }) + if (changes?.length) { + this.updateShapes(changes) + } } - } - this.emit('update') - }) + this.emit('update') + }) + ) - this.sideEffects.registerBeforeDeleteHandler('shape', (record) => { - // if the deleted shape has a parent shape make sure we call it's onChildrenChange callback - if (record.parentId && isShapeId(record.parentId)) { - invalidParents.add(record.parentId) - } - // clean up any arrows bound to this shape - const bindings = this._getArrowBindingsIndex().get()[record.id] - if (bindings?.length) { - for (const { arrowId, handleId } of bindings) { - const arrow = this.getShape(arrowId) - if (!arrow) continue - unbindArrowTerminal(arrow, handleId) - } - } - const deletedIds = new Set([record.id]) - const updates = compact( - this.getPageStates().map((pageState) => { - return cleanupInstancePageState(pageState, deletedIds) - }) - ) - - if (updates.length) { - this.store.put(updates) - } - }) - - this.sideEffects.registerBeforeDeleteHandler('page', (record) => { - // page was deleted, need to check whether it's the current page and select another one if so - if (this.getInstanceState().currentPageId !== record.id) return - - const backupPageId = this.getPages().find((p) => p.id !== record.id)?.id - if (!backupPageId) return - this.store.put([{ ...this.getInstanceState(), currentPageId: backupPageId }]) - - // delete the camera and state for the page if necessary - const cameraId = CameraRecordType.createId(record.id) - const instance_PageStateId = InstancePageStateRecordType.createId(record.id) - this.store.remove([cameraId, instance_PageStateId]) - }) - - this.sideEffects.registerAfterChangeHandler('shape', (prev, next) => { - if (this.isShapeOfType(next, 'arrow')) { - arrowDidUpdate(next) - } - - // if the shape's parent changed and it is bound to an arrow, update the arrow's parent - if (prev.parentId !== next.parentId) { - const reparentBoundArrows = (id: TLShapeId) => { - const boundArrows = this._getArrowBindingsIndex().get()[id] - if (boundArrows?.length) { - for (const arrow of boundArrows) { - reparentArrow(arrow.arrowId) + this.disposables.add( + this.sideEffects.register({ + shape: { + afterCreate: (record) => { + if (this.isShapeOfType(record, 'arrow')) { + arrowDidUpdate(record) } - } - } - reparentBoundArrows(next.id) - this.visitDescendants(next.id, reparentBoundArrows) - } - - // if this shape moved to a new page, clean up any previous page's instance state - if (prev.parentId !== next.parentId && isPageId(next.parentId)) { - const allMovingIds = new Set([prev.id]) - this.visitDescendants(prev.id, (id) => { - allMovingIds.add(id) - }) - - for (const instancePageState of this.getPageStates()) { - if (instancePageState.pageId === next.parentId) continue - const nextPageState = cleanupInstancePageState(instancePageState, allMovingIds) - - if (nextPageState) { - this.store.put([nextPageState]) - } - } - } - - if (prev.parentId && isShapeId(prev.parentId)) { - invalidParents.add(prev.parentId) - } - - if (next.parentId !== prev.parentId && isShapeId(next.parentId)) { - invalidParents.add(next.parentId) - } - }) - - this.sideEffects.registerAfterChangeHandler('instance_page_state', (prev, next) => { - if (prev?.selectedShapeIds !== next?.selectedShapeIds) { - // ensure that descendants and ancestors are not selected at the same time - const filtered = next.selectedShapeIds.filter((id) => { - let parentId = this.getShape(id)?.parentId - while (isShapeId(parentId)) { - if (next.selectedShapeIds.includes(parentId)) { - return false + }, + afterChange: (prev, next) => { + if (this.isShapeOfType(next, 'arrow')) { + arrowDidUpdate(next) } - parentId = this.getShape(parentId)?.parentId - } - return true - }) - let nextFocusedGroupId: null | TLShapeId = null + // if the shape's parent changed and it is bound to an arrow, update the arrow's parent + if (prev.parentId !== next.parentId) { + const reparentBoundArrows = (id: TLShapeId) => { + const boundArrows = this._getArrowBindingsIndex().get()[id] + if (boundArrows?.length) { + for (const arrow of boundArrows) { + reparentArrow(arrow.arrowId) + } + } + } + reparentBoundArrows(next.id) + this.visitDescendants(next.id, reparentBoundArrows) + } - if (filtered.length > 0) { - const commonGroupAncestor = this.findCommonAncestor( - compact(filtered.map((id) => this.getShape(id))), - (shape) => this.isShapeOfType(shape, 'group') - ) + // if this shape moved to a new page, clean up any previous page's instance state + if (prev.parentId !== next.parentId && isPageId(next.parentId)) { + const allMovingIds = new Set([prev.id]) + this.visitDescendants(prev.id, (id) => { + allMovingIds.add(id) + }) - if (commonGroupAncestor) { - nextFocusedGroupId = commonGroupAncestor - } - } else { - if (next?.focusedGroupId) { - nextFocusedGroupId = next.focusedGroupId - } - } + for (const instancePageState of this.getPageStates()) { + if (instancePageState.pageId === next.parentId) continue + const nextPageState = cleanupInstancePageState(instancePageState, allMovingIds) - if ( - filtered.length !== next.selectedShapeIds.length || - nextFocusedGroupId !== next.focusedGroupId - ) { - this.store.put([ - { ...next, selectedShapeIds: filtered, focusedGroupId: nextFocusedGroupId ?? null }, - ]) - } - } - }) + if (nextPageState) { + this.store.put([nextPageState]) + } + } + } - this.sideEffects.registerAfterCreateHandler('shape', (record) => { - if (this.isShapeOfType(record, 'arrow')) { - arrowDidUpdate(record) - } - }) + if (prev.parentId && isShapeId(prev.parentId)) { + invalidParents.add(prev.parentId) + } - this.sideEffects.registerAfterCreateHandler('page', (record) => { - const cameraId = CameraRecordType.createId(record.id) - const _pageStateId = InstancePageStateRecordType.createId(record.id) - if (!this.store.has(cameraId)) { - this.store.put([CameraRecordType.create({ id: cameraId })]) - } - if (!this.store.has(_pageStateId)) { - this.store.put([ - InstancePageStateRecordType.create({ id: _pageStateId, pageId: record.id }), - ]) - } - }) + if (next.parentId !== prev.parentId && isShapeId(next.parentId)) { + invalidParents.add(next.parentId) + } + }, + beforeDelete: (record) => { + // if the deleted shape has a parent shape make sure we call it's onChildrenChange callback + if (record.parentId && isShapeId(record.parentId)) { + invalidParents.add(record.parentId) + } + // clean up any arrows bound to this shape + const bindings = this._getArrowBindingsIndex().get()[record.id] + if (bindings?.length) { + for (const { arrowId, handleId } of bindings) { + const arrow = this.getShape(arrowId) + if (!arrow) continue + unbindArrowTerminal(arrow, handleId) + } + } + const deletedIds = new Set([record.id]) + const updates = compact( + this.getPageStates().map((pageState) => { + return cleanupInstancePageState(pageState, deletedIds) + }) + ) + + if (updates.length) { + this.store.put(updates) + } + }, + }, + page: { + afterCreate: (record) => { + const cameraId = CameraRecordType.createId(record.id) + const _pageStateId = InstancePageStateRecordType.createId(record.id) + if (!this.store.has(cameraId)) { + this.store.put([CameraRecordType.create({ id: cameraId })]) + } + if (!this.store.has(_pageStateId)) { + this.store.put([ + InstancePageStateRecordType.create({ id: _pageStateId, pageId: record.id }), + ]) + } + }, + afterDelete: (record, source) => { + // page was deleted, need to check whether it's the current page and select another one if so + if (this.getInstanceState()?.currentPageId === record.id) { + const backupPageId = this.getPages().find((p) => p.id !== record.id)?.id + if (backupPageId) { + this.store.put([{ ...this.getInstanceState(), currentPageId: backupPageId }]) + } else if (source === 'user') { + // fall back to ensureStoreIsUsable: + this.store.ensureStoreIsUsable() + } + } + + // delete the camera and state for the page if necessary + const cameraId = CameraRecordType.createId(record.id) + const instance_PageStateId = InstancePageStateRecordType.createId(record.id) + this.store.remove([cameraId, instance_PageStateId]) + }, + }, + instance: { + afterChange: (prev, next, source) => { + // instance should never be updated to a page that no longer exists (this can + // happen when undoing a change that involves switching to a page that has since + // been deleted by another user) + if (!this.store.has(next.currentPageId)) { + const backupPageId = this.store.has(prev.currentPageId) + ? prev.currentPageId + : this.getPages()[0]?.id + if (backupPageId) { + this.store.update(next.id, (instance) => ({ + ...instance, + currentPageId: backupPageId, + })) + } else if (source === 'user') { + // fall back to ensureStoreIsUsable: + this.store.ensureStoreIsUsable() + } + } + }, + }, + instance_page_state: { + afterChange: (prev, next) => { + if (prev?.selectedShapeIds !== next?.selectedShapeIds) { + // ensure that descendants and ancestors are not selected at the same time + const filtered = next.selectedShapeIds.filter((id) => { + let parentId = this.getShape(id)?.parentId + while (isShapeId(parentId)) { + if (next.selectedShapeIds.includes(parentId)) { + return false + } + parentId = this.getShape(parentId)?.parentId + } + return true + }) + + let nextFocusedGroupId: null | TLShapeId = null + + if (filtered.length > 0) { + const commonGroupAncestor = this.findCommonAncestor( + compact(filtered.map((id) => this.getShape(id))), + (shape) => this.isShapeOfType(shape, 'group') + ) + + if (commonGroupAncestor) { + nextFocusedGroupId = commonGroupAncestor + } + } else { + if (next?.focusedGroupId) { + nextFocusedGroupId = next.focusedGroupId + } + } + + if ( + filtered.length !== next.selectedShapeIds.length || + nextFocusedGroupId !== next.focusedGroupId + ) { + this.store.put([ + { + ...next, + selectedShapeIds: filtered, + focusedGroupId: nextFocusedGroupId ?? null, + }, + ]) + } + } + }, + }, + }) + ) this._currentPageShapeIds = deriveShapeIdsInCurrentPage(this.store, () => this.getCurrentPageId() @@ -594,18 +636,18 @@ export class Editor extends EventEmitter { this.emit('change', changes) }) ) + this.disposables.add(this.history.dispose) - this.store.ensureStoreIsUsable() + this.history.ignore(() => { + this.store.ensureStoreIsUsable() - // clear ephemeral state - this._setInstancePageState( - { + // clear ephemeral state + this._updateCurrentPageState({ editingShapeId: null, hoveredShapeId: null, erasingShapeIds: [], - }, - { ephemeral: true } - ) + }) + }) if (initialState && this.root.children[initialState] === undefined) { throw Error(`No state found for initialState "${initialState}".`) @@ -757,14 +799,7 @@ export class Editor extends EventEmitter { * * @readonly */ - readonly history = new HistoryManager( - this, - // () => this._complete(), - (error) => { - this.annotateError(error, { origin: 'history.batch', willCrashApp: true }) - this.crash(error) - } - ) + readonly history: HistoryManager /** * Undo to the last mark. @@ -827,13 +862,11 @@ export class Editor extends EventEmitter { * ``` * * @param markId - The mark's id, usually the reason for adding the mark. - * @param onUndo - Whether to stop at the mark when undoing. - * @param onRedo - Whether to stop at the mark when redoing. * * @public */ - mark(markId?: string, onUndo?: boolean, onRedo?: boolean): this { - this.history.mark(markId, onUndo, onRedo) + mark(markId?: string): this { + this.history.mark(markId) return this } @@ -872,8 +905,8 @@ export class Editor extends EventEmitter { * * @public */ - batch(fn: () => void): this { - this.history.batch(fn) + batch(fn: () => void, opts?: TLHistoryBatchOptions): this { + this.history.batch(fn, opts) return this } @@ -1155,7 +1188,9 @@ export class Editor extends EventEmitter { * @public **/ updateDocumentSettings(settings: Partial): this { - this.store.put([{ ...this.getDocumentSettings(), ...settings }]) + this.history.ignore(() => { + this.store.put([{ ...this.getDocumentSettings(), ...settings }]) + }) return this } @@ -1174,22 +1209,21 @@ export class Editor extends EventEmitter { * Update the instance's state. * * @param partial - A partial object to update the instance state with. - * @param historyOptions - The history options for the change. * * @public */ updateInstanceState( partial: Partial>, - historyOptions?: TLCommandHistoryOptions + historyOptions?: TLHistoryBatchOptions ): this { - this._updateInstanceState(partial, { ephemeral: true, squashing: true, ...historyOptions }) + this._updateInstanceState(partial, { history: 'ignore', ...historyOptions }) if (partial.isChangingStyle !== undefined) { clearTimeout(this._isChangingStyleTimeout) if (partial.isChangingStyle === true) { // If we've set to true, set a new reset timeout to change the value back to false after 2 seconds this._isChangingStyleTimeout = setTimeout(() => { - this.updateInstanceState({ isChangingStyle: false }, { ephemeral: true }) + this._updateInstanceState({ isChangingStyle: false }, { history: 'ignore' }) }, 2000) } } @@ -1198,34 +1232,19 @@ export class Editor extends EventEmitter { } /** @internal */ - private _updateInstanceState = this.history.createCommand( - 'updateInstanceState', - ( - partial: Partial>, - historyOptions?: TLCommandHistoryOptions - ) => { - const prev = this.store.get(this.getInstanceState().id)! - const next = { ...prev, ...partial } - - return { - data: { prev, next }, - ephemeral: false, - squashing: false, - ...historyOptions, - } - }, - { - do: ({ next }) => { - this.store.put([next]) - }, - undo: ({ prev }) => { - this.store.put([prev]) - }, - squash({ prev }, { next }) { - return { prev, next } - }, - } - ) + private _updateInstanceState = ( + partial: Partial>, + opts?: TLHistoryBatchOptions + ) => { + this.batch(() => { + this.store.put([ + { + ...this.getInstanceState(), + ...partial, + }, + ]) + }, opts) + } /** @internal */ private _isChangingStyleTimeout = -1 as any @@ -1327,10 +1346,7 @@ export class Editor extends EventEmitter { * @public */ setCursor = (cursor: Partial): this => { - this.updateInstanceState( - { cursor: { ...this.getInstanceState().cursor, ...cursor } }, - { ephemeral: true } - ) + this.updateInstanceState({ cursor: { ...this.getInstanceState().cursor, ...cursor } }) return this } @@ -1382,31 +1398,22 @@ export class Editor extends EventEmitter { partial: Partial< Omit >, - historyOptions?: TLCommandHistoryOptions + historyOptions?: TLHistoryBatchOptions ): this { - this._setInstancePageState(partial, historyOptions) + this._updateCurrentPageState(partial, historyOptions) return this } - - /** @internal */ - private _setInstancePageState = this.history.createCommand( - 'setInstancePageState', - ( - partial: Partial>, - historyOptions?: TLCommandHistoryOptions - ) => { - const prev = this.store.get(partial.id ?? this.getCurrentPageState().id)! - return { data: { prev, partial }, ...historyOptions } - }, - { - do: ({ prev, partial }) => { - this.store.update(prev.id, (state) => ({ ...state, ...partial })) - }, - undo: ({ prev }) => { - this.store.update(prev.id, () => prev) - }, - } - ) + _updateCurrentPageState = ( + partial: Partial>, + historyOptions?: TLHistoryBatchOptions + ) => { + this.batch(() => { + this.store.update(partial.id ?? this.getCurrentPageState().id, (state) => ({ + ...state, + ...partial, + })) + }, historyOptions) + } /** * The current selected ids. @@ -1438,54 +1445,35 @@ export class Editor extends EventEmitter { * ``` * * @param ids - The ids to select. - * @param historyOptions - The history options for the change. * * @public */ - setSelectedShapes( - shapes: TLShapeId[] | TLShape[], - historyOptions?: TLCommandHistoryOptions - ): this { - const ids = shapes.map((shape) => (typeof shape === 'string' ? shape : shape.id)) - this._setSelectedShapes(ids, historyOptions) - return this - } - - /** @internal */ - private _setSelectedShapes = this.history.createCommand( - 'setSelectedShapes', - (ids: TLShapeId[], historyOptions?: TLCommandHistoryOptions) => { + setSelectedShapes(shapes: TLShapeId[] | TLShape[]): this { + return this.batch(() => { + const ids = shapes.map((shape) => (typeof shape === 'string' ? shape : shape.id)) const { selectedShapeIds: prevSelectedShapeIds } = this.getCurrentPageState() const prevSet = new Set(prevSelectedShapeIds) if (ids.length === prevSet.size && ids.every((id) => prevSet.has(id))) return null - return { - data: { selectedShapeIds: ids, prevSelectedShapeIds }, - preservesRedoStack: true, - ...historyOptions, - } - }, - { - do: ({ selectedShapeIds }) => { - this.store.put([{ ...this.getCurrentPageState(), selectedShapeIds }]) - }, - undo: ({ prevSelectedShapeIds }) => { - this.store.put([ - { - ...this.getCurrentPageState(), - selectedShapeIds: prevSelectedShapeIds, - }, - ]) - }, - squash({ prevSelectedShapeIds }, { selectedShapeIds }) { - return { - selectedShapeIds, - prevSelectedShapeIds, - } - }, - } - ) + this.store.put([{ ...this.getCurrentPageState(), selectedShapeIds: ids }]) + }) + } + + /** + * Determine whether or not any of a shape's ancestors are selected. + * + * @param id - The id of the shape to check. + * + * @public + */ + isAncestorSelected(shape: TLShape | TLShapeId): boolean { + const id = typeof shape === 'string' ? shape : shape?.id ?? null + const _shape = this.getShape(id) + if (!_shape) return false + const selectedShapeIds = this.getSelectedShapeIds() + return !!this.findShapeAncestor(_shape, (parent) => selectedShapeIds.includes(parent.id)) + } /** * Select one or more shapes. @@ -1736,37 +1724,14 @@ export class Editor extends EventEmitter { } if (id === this.getFocusedGroupId()) return this - this._setFocusedGroupId(id) - return this - } - /** @internal */ - private _setFocusedGroupId = this.history.createCommand( - 'setFocusedGroupId', - (next: TLShapeId | null) => { - const prev = this.getCurrentPageState().focusedGroupId - if (prev === next) return - return { - data: { - prev, - next, - }, - preservesRedoStack: true, - squashing: true, - } - }, - { - do: ({ next }) => { - this.store.update(this.getCurrentPageState().id, (s) => ({ ...s, focusedGroupId: next })) + return this.batch( + () => { + this.store.update(this.getCurrentPageState().id, (s) => ({ ...s, focusedGroupId: id })) }, - undo: ({ prev }) => { - this.store.update(this.getCurrentPageState().id, (s) => ({ ...s, focusedGroupId: prev })) - }, - squash({ prev }, { next }) { - return { prev, next } - }, - } - ) + { history: 'record-preserveRedoStack' } + ) + } /** * Exit the current focused group, moving up to the next parent group if there is one. @@ -1831,13 +1796,13 @@ export class Editor extends EventEmitter { if (id) { const shape = this.getShape(id) if (shape && this.getShapeUtil(shape).canEdit(shape)) { - this._setInstancePageState({ editingShapeId: id }) + this._updateCurrentPageState({ editingShapeId: id }) return this } } // Either we just set the editing id to null, or the shape was missing or not editable - this._setInstancePageState({ editingShapeId: null }) + this._updateCurrentPageState({ editingShapeId: null }) } return this } @@ -1879,7 +1844,7 @@ export class Editor extends EventEmitter { setHoveredShape(shape: TLShapeId | TLShape | null): this { const id = typeof shape === 'string' ? shape : shape?.id ?? null if (id === this.getHoveredShapeId()) return this - this.updateCurrentPageState({ hoveredShapeId: id }, { ephemeral: true }) + this.updateCurrentPageState({ hoveredShapeId: id }) return this } @@ -1922,7 +1887,7 @@ export class Editor extends EventEmitter { ? (shapes as TLShapeId[]) : (shapes as TLShape[]).map((shape) => shape.id) // always ephemeral - this.updateCurrentPageState({ hintingShapeIds: dedupe(ids) }, { ephemeral: true }) + this.updateCurrentPageState({ hintingShapeIds: dedupe(ids) }, { history: 'ignore' }) return this } @@ -1967,20 +1932,22 @@ export class Editor extends EventEmitter { : (shapes as TLShape[]).map((shape) => shape.id) ids.sort() // sort the incoming ids const erasingShapeIds = this.getErasingShapeIds() - if (ids.length === erasingShapeIds.length) { - // if the new ids are the same length as the current ids, they might be the same. - // presuming the current ids are also sorted, check each item to see if it's the same; - // if we find any unequal, then we know the new ids are different. - for (let i = 0; i < ids.length; i++) { - if (ids[i] !== erasingShapeIds[i]) { - this._setInstancePageState({ erasingShapeIds: ids }, { ephemeral: true }) - break + this.history.ignore(() => { + if (ids.length === erasingShapeIds.length) { + // if the new ids are the same length as the current ids, they might be the same. + // presuming the current ids are also sorted, check each item to see if it's the same; + // if we find any unequal, then we know the new ids are different. + for (let i = 0; i < ids.length; i++) { + if (ids[i] !== erasingShapeIds[i]) { + this._updateCurrentPageState({ erasingShapeIds: ids }) + break + } } + } else { + // if the ids are a different length, then we know they're different. + this._updateCurrentPageState({ erasingShapeIds: ids }) } - } else { - // if the ids are a different length, then we know they're different. - this._setInstancePageState({ erasingShapeIds: ids }, { ephemeral: true }) - } + }) return this } @@ -2738,25 +2705,16 @@ export class Editor extends EventEmitter { if (_willSetInitialBounds) { // If we have just received the initial bounds, don't center the camera. this._willSetInitialBounds = false - this.updateInstanceState( - { screenBounds: screenBounds.toJson(), insets }, - { squashing: true, ephemeral: true } - ) + this.updateInstanceState({ screenBounds: screenBounds.toJson(), insets }) } else { if (center && !this.getInstanceState().followingUserId) { // Get the page center before the change, make the change, and restore it const before = this.getViewportPageCenter() - this.updateInstanceState( - { screenBounds: screenBounds.toJson(), insets }, - { squashing: true, ephemeral: true } - ) + this.updateInstanceState({ screenBounds: screenBounds.toJson(), insets }) this.centerOnPoint(before) } else { // Otherwise, - this.updateInstanceState( - { screenBounds: screenBounds.toJson(), insets }, - { squashing: true, ephemeral: true } - ) + this.updateInstanceState({ screenBounds: screenBounds.toJson(), insets }) } } } @@ -2943,7 +2901,7 @@ export class Editor extends EventEmitter { transact(() => { this.stopFollowingUser() - this.updateInstanceState({ followingUserId: userId }, { ephemeral: true }) + this.updateInstanceState({ followingUserId: userId }) }) const cancel = () => { @@ -3048,7 +3006,7 @@ export class Editor extends EventEmitter { * @public */ stopFollowingUser(): this { - this.updateInstanceState({ followingUserId: null }, { ephemeral: true }) + this.updateInstanceState({ followingUserId: null }) this.emit('stop-following') return this } @@ -3349,70 +3307,24 @@ export class Editor extends EventEmitter { * ``` * * @param page - The page (or page id) to set as the current page. - * @param historyOptions - The history options for the change. * * @public */ - setCurrentPage(page: TLPageId | TLPage, historyOptions?: TLCommandHistoryOptions): this { + setCurrentPage(page: TLPageId | TLPage): this { const pageId = typeof page === 'string' ? page : page.id - this._setCurrentPageId(pageId, historyOptions) - return this - } - /** @internal */ - private _setCurrentPageId = this.history.createCommand( - 'setCurrentPage', - (pageId: TLPageId, historyOptions?: TLCommandHistoryOptions) => { - if (!this.store.has(pageId)) { - console.error("Tried to set the current page id to a page that doesn't exist.") - return - } - this.stopFollowingUser() - - return { - data: { toId: pageId, fromId: this.getCurrentPageId() }, - squashing: true, - preservesRedoStack: true, - ...historyOptions, - } - }, - { - do: ({ toId }) => { - if (!this.store.has(toId)) { - // in multiplayer contexts this page might have been deleted - return - } - if (!this.getPageStates().find((p) => p.pageId === toId)) { - const camera = CameraRecordType.create({ - id: CameraRecordType.createId(toId), - }) - this.store.put([ - camera, - InstancePageStateRecordType.create({ - id: InstancePageStateRecordType.createId(toId), - pageId: toId, - }), - ]) - } - - this.store.put([{ ...this.getInstanceState(), currentPageId: toId }]) - - this.updateRenderingBounds() - }, - undo: ({ fromId }) => { - if (!this.store.has(fromId)) { - // in multiplayer contexts this page might have been deleted - return - } - this.store.put([{ ...this.getInstanceState(), currentPageId: fromId }]) - - this.updateRenderingBounds() - }, - squash: ({ fromId }, { toId }) => { - return { toId, fromId } - }, + if (!this.store.has(pageId)) { + console.error("Tried to set the current page id to a page that doesn't exist.") + return this } - ) + + this.stopFollowingUser() + + return this.batch( + () => this.store.put([{ ...this.getInstanceState(), currentPageId: pageId }]), + { history: 'record-preserveRedoStack' } + ) + } /** * Update a page. @@ -3420,45 +3332,20 @@ export class Editor extends EventEmitter { * @example * ```ts * editor.updatePage({ id: 'page2', name: 'Page 2' }) - * editor.updatePage({ id: 'page2', name: 'Page 2' }, { squashing: true }) * ``` * * @param partial - The partial of the shape to update. - * @param historyOptions - The history options for the change. * * @public */ - updatePage(partial: RequiredKeys, historyOptions?: TLCommandHistoryOptions): this { - this._updatePage(partial, historyOptions) - return this + updatePage(partial: RequiredKeys): this { + if (this.getInstanceState().isReadonly) return this + + const prev = this.getPage(partial.id) + if (!prev) return this + + return this.batch(() => this.store.update(partial.id, (page) => ({ ...page, ...partial }))) } - /** @internal */ - private _updatePage = this.history.createCommand( - 'updatePage', - (partial: RequiredKeys, historyOptions?: TLCommandHistoryOptions) => { - if (this.getInstanceState().isReadonly) return null - - const prev = this.getPage(partial.id) - - if (!prev) return null - - return { data: { prev, partial }, ...historyOptions } - }, - { - do: ({ partial }) => { - this.store.update(partial.id, (page) => ({ ...page, ...partial })) - }, - undo: ({ prev, partial }) => { - this.store.update(partial.id, () => prev) - }, - squash(prevData, nextData) { - return { - prev: { ...prevData.prev, ...nextData.prev }, - partial: nextData.partial, - } - }, - } - ) /** * Create a page. @@ -3474,15 +3361,9 @@ export class Editor extends EventEmitter { * @public */ createPage(page: Partial): this { - this._createPage(page) - return this - } - /** @internal */ - private _createPage = this.history.createCommand( - 'createPage', - (page: Partial) => { - if (this.getInstanceState().isReadonly) return null - if (this.getPages().length >= MAX_PAGES) return null + this.history.batch(() => { + if (this.getInstanceState().isReadonly) return + if (this.getPages().length >= MAX_PAGES) return const pages = this.getPages() const name = getIncrementedName( @@ -3503,33 +3384,10 @@ export class Editor extends EventEmitter { index, }) - const newCamera = CameraRecordType.create({ - id: CameraRecordType.createId(newPage.id), - }) - - const newTabPageState = InstancePageStateRecordType.create({ - id: InstancePageStateRecordType.createId(newPage.id), - pageId: newPage.id, - }) - - return { - data: { - newPage, - newTabPageState, - newCamera, - }, - } - }, - { - do: ({ newPage, newTabPageState, newCamera }) => { - this.store.put([newPage, newCamera, newTabPageState]) - }, - undo: ({ newPage, newTabPageState, newCamera }) => { - if (this.getPages().length === 1) return - this.store.remove([newTabPageState.id, newPage.id, newCamera.id]) - }, - } - ) + this.store.put([newPage]) + }) + return this + } /** * Delete a page. @@ -3545,21 +3403,13 @@ export class Editor extends EventEmitter { */ deletePage(page: TLPageId | TLPage): this { const id = typeof page === 'string' ? page : page.id - this._deletePage(id) - return this - } - /** @internal */ - private _deletePage = this.history.createCommand( - 'delete_page', - (id: TLPageId) => { - if (this.getInstanceState().isReadonly) return null + this.batch(() => { + if (this.getInstanceState().isReadonly) return const pages = this.getPages() - if (pages.length === 1) return null + if (pages.length === 1) return const deletedPage = this.getPage(id) - const deletedPageStates = this.getPageStates().filter((s) => s.pageId === id) - - if (!deletedPage) return null + if (!deletedPage) return if (id === this.getCurrentPageId()) { const index = pages.findIndex((page) => page.id === id) @@ -3567,30 +3417,11 @@ export class Editor extends EventEmitter { this.setCurrentPage(next.id) } - return { data: { id, deletedPage, deletedPageStates } } - }, - { - do: ({ deletedPage, deletedPageStates }) => { - const pages = this.getPages() - if (pages.length === 1) return - - if (deletedPage.id === this.getCurrentPageId()) { - const index = pages.findIndex((page) => page.id === deletedPage.id) - const next = pages[index - 1] ?? pages[index + 1] - this.setCurrentPage(next.id) - } - - this.store.remove(deletedPageStates.map((s) => s.id)) // remove the page state - this.store.remove([deletedPage.id]) // remove the page - this.updateRenderingBounds() - }, - undo: ({ deletedPage, deletedPageStates }) => { - this.store.put([deletedPage]) - this.store.put(deletedPageStates) - this.updateRenderingBounds() - }, - } - ) + this.store.remove([deletedPage.id]) + this.updateRenderingBounds() + }) + return this + } /** * Duplicate a page. @@ -3642,10 +3473,10 @@ export class Editor extends EventEmitter { * * @public */ - renamePage(page: TLPageId | TLPage, name: string, historyOptions?: TLCommandHistoryOptions) { + renamePage(page: TLPageId | TLPage, name: string) { const id = typeof page === 'string' ? page : page.id if (this.getInstanceState().isReadonly) return this - this.updatePage({ id, name }, historyOptions) + this.updatePage({ id, name }) return this } @@ -3678,28 +3509,10 @@ export class Editor extends EventEmitter { * @public */ createAssets(assets: TLAsset[]): this { - this._createAssets(assets) - return this + if (this.getInstanceState().isReadonly) return this + if (assets.length <= 0) return this + return this.batch(() => this.store.put(assets)) } - /** @internal */ - private _createAssets = this.history.createCommand( - 'createAssets', - (assets: TLAsset[]) => { - if (this.getInstanceState().isReadonly) return null - if (assets.length <= 0) return null - - return { data: { assets } } - }, - { - do: ({ assets }) => { - this.store.put(assets) - }, - undo: ({ assets }) => { - // todo: should we actually remove assets here? or on cleanup elsewhere? - this.store.remove(assets.map((a) => a.id)) - }, - } - ) /** * Update one or more assets. @@ -3714,39 +3527,17 @@ export class Editor extends EventEmitter { * @public */ updateAssets(assets: TLAssetPartial[]): this { - this._updateAssets(assets) - return this + if (this.getInstanceState().isReadonly) return this + if (assets.length <= 0) return this + return this.batch(() => { + this.store.put( + assets.map((partial) => ({ + ...this.store.get(partial.id)!, + ...partial, + })) + ) + }) } - /** @internal */ - private _updateAssets = this.history.createCommand( - 'updateAssets', - (assets: TLAssetPartial[]) => { - if (this.getInstanceState().isReadonly) return - if (assets.length <= 0) return - - const snapshots: Record = {} - - return { data: { snapshots, assets } } - }, - { - do: ({ assets, snapshots }) => { - this.store.put( - assets.map((a) => { - const asset = this.store.get(a.id)! - snapshots[a.id] = asset - - return { - ...asset, - ...a, - } - }) - ) - }, - undo: ({ snapshots }) => { - this.store.put(Object.values(snapshots)) - }, - } - ) /** * Delete one or more assets. @@ -3761,33 +3552,16 @@ export class Editor extends EventEmitter { * @public */ deleteAssets(assets: TLAssetId[] | TLAsset[]): this { + if (this.getInstanceState().isReadonly) return this + const ids = typeof assets[0] === 'string' ? (assets as TLAssetId[]) : (assets as TLAsset[]).map((a) => a.id) - this._deleteAssets(ids) - return this + if (ids.length <= 0) return this + + return this.batch(() => this.store.remove(ids)) } - /** @internal */ - private _deleteAssets = this.history.createCommand( - 'deleteAssets', - (ids: TLAssetId[]) => { - if (this.getInstanceState().isReadonly) return - if (ids.length <= 0) return - - const prev = compact(ids.map((id) => this.store.get(id))) - - return { data: { ids, prev } } - }, - { - do: ({ ids }) => { - this.store.remove(ids) - }, - undo: ({ prev }) => { - this.store.put(prev) - }, - } - ) /** * Get an asset by its id. @@ -5127,18 +4901,13 @@ export class Editor extends EventEmitter { * @example * ```ts * editor.nudgeShapes(['box1', 'box2'], { x: 8, y: 8 }) - * editor.nudgeShapes(editor.getSelectedShapes(), { x: 8, y: 8 }, { squashing: true }) * ``` * * @param shapes - The shapes (or shape ids) to move. * @param direction - The direction in which to move the shapes. * @param historyOptions - The history options for the change. */ - nudgeShapes( - shapes: TLShapeId[] | TLShape[], - offset: VecLike, - historyOptions?: TLCommandHistoryOptions - ): this { + nudgeShapes(shapes: TLShapeId[] | TLShape[], offset: VecLike): this { const ids = typeof shapes[0] === 'string' ? (shapes as TLShapeId[]) @@ -5156,10 +4925,7 @@ export class Editor extends EventEmitter { changes.push(this.getChangesToTranslateShape(shape, localDelta.add(shape))) } - this.updateShapes(changes, { - squashing: true, - ...historyOptions, - }) + this.updateShapes(changes) return this } @@ -6141,7 +5907,7 @@ export class Editor extends EventEmitter { if (parentTransform) localOffset.rot(-parentTransform.rotation()) const { x, y } = Vec.Add(localOffset, shape) - this.updateShapes([{ id: shape.id, type: shape.type, x, y }], { squashing: true }) + this.updateShapes([{ id: shape.id, type: shape.type, x, y }]) const scale = new Vec(1, commonBounds.height / pageBounds.height) this.resizeShape(shape.id, scale, { initialBounds: bounds, @@ -6164,7 +5930,7 @@ export class Editor extends EventEmitter { if (parentTransform) localOffset.rot(-parentTransform.rotation()) const { x, y } = Vec.Add(localOffset, shape) - this.updateShapes([{ id: shape.id, type: shape.type, x, y }], { squashing: true }) + this.updateShapes([{ id: shape.id, type: shape.type, x, y }]) const scale = new Vec(commonBounds.width / pageBounds.width, 1) this.resizeShape(shape.id, scale, { initialBounds: bounds, @@ -6277,30 +6043,27 @@ export class Editor extends EventEmitter { // need to adjust the shape's x and y points in case the parent has moved since start of resizing const { x, y } = this.getPointInParentSpace(initialShape.id, initialPagePoint) - this.updateShapes( - [ - { - id, - type: initialShape.type as any, - x: newLocalPoint.x, - y: newLocalPoint.y, - ...util.onResize( - { ...initialShape, x, y }, - { - newPoint: newLocalPoint, - handle: options.dragHandle ?? 'bottom_right', - // don't set isSingle to true for children - mode: options.mode ?? 'scale_shape', - scaleX: myScale.x, - scaleY: myScale.y, - initialBounds, - initialShape, - } - ), - }, - ], - { squashing: true } - ) + this.updateShapes([ + { + id, + type: initialShape.type as any, + x: newLocalPoint.x, + y: newLocalPoint.y, + ...util.onResize( + { ...initialShape, x, y }, + { + newPoint: newLocalPoint, + handle: options.dragHandle ?? 'bottom_right', + // don't set isSingle to true for children + mode: options.mode ?? 'scale_shape', + scaleX: myScale.x, + scaleY: myScale.y, + initialBounds, + initialShape, + } + ), + }, + ]) } else { const initialPageCenter = Mat.applyToPoint(pageTransform, initialBounds.center) // get the model changes from the shape util @@ -6319,17 +6082,14 @@ export class Editor extends EventEmitter { const delta = Vec.Sub(newPageCenterInParentSpace, initialPageCenterInParentSpace) // apply the changes to the model - this.updateShapes( - [ - { - id, - type: initialShape.type as any, - x: initialShape.x + delta.x, - y: initialShape.y + delta.y, - }, - ], - { squashing: true } - ) + this.updateShapes([ + { + id, + type: initialShape.type as any, + x: initialShape.x + delta.x, + y: initialShape.y + delta.y, + }, + ]) } return this @@ -6395,7 +6155,7 @@ export class Editor extends EventEmitter { if (Math.sign(scale.x) * Math.sign(scale.y) < 0) { let { rotation } = Mat.Decompose(options.initialPageTransform) rotation -= 2 * rotation - this.updateShapes([{ id, type, rotation }], { squashing: true }) + this.updateShapes([{ id, type, rotation }]) } // Next we need to translate the shape so that it's center point ends up in the right place. @@ -6425,7 +6185,7 @@ export class Editor extends EventEmitter { const postScaleShapePagePoint = Vec.Add(shapePageTransformOrigin, pageDelta) const { x, y } = this.getPointInParentSpace(id, postScaleShapePagePoint) - this.updateShapes([{ id, type, x, y }], { squashing: true }) + this.updateShapes([{ id, type, x, y }]) return this } @@ -6464,7 +6224,7 @@ export class Editor extends EventEmitter { * @public */ createShape(shape: OptionalKeys, 'id'>): this { - this._createShapes([shape]) + this.createShapes([shape]) return this } @@ -6482,204 +6242,184 @@ export class Editor extends EventEmitter { * * @public */ - createShapes(shapes: OptionalKeys, 'id'>[]) { + createShapes(shapes: OptionalKeys, 'id'>[]): this { if (!Array.isArray(shapes)) { throw Error('Editor.createShapes: must provide an array of shapes or shape partials') } - this._createShapes(shapes) - return this - } + if (this.getInstanceState().isReadonly) return this + if (shapes.length <= 0) return this - /** @internal */ - private _createShapes = this.history.createCommand( - 'createShapes', - (partials: OptionalKeys[]) => { - if (this.getInstanceState().isReadonly) return null - if (partials.length <= 0) return null + const currentPageShapeIds = this.getCurrentPageShapeIds() - const currentPageShapeIds = this.getCurrentPageShapeIds() + const maxShapesReached = shapes.length + currentPageShapeIds.size > MAX_SHAPES_PER_PAGE - const maxShapesReached = partials.length + currentPageShapeIds.size > MAX_SHAPES_PER_PAGE + if (maxShapesReached) { + // can't create more shapes than fit on the page + alertMaxShapes(this) + return this + } - if (maxShapesReached) { - // can't create more shapes than fit on the page - alertMaxShapes(this) - return - } + const focusedGroupId = this.getFocusedGroupId() - if (partials.length === 0) return null + return this.batch(() => { + // 1. Parents - return { - data: { - currentPageId: this.getCurrentPageId(), - partials: partials.map((p) => - p.id ? p : { ...p, id: createShapeId() } - ) as TLShapePartial[], - }, - } - }, - { - do: ({ partials }) => { - const focusedGroupId = this.getFocusedGroupId() + // Make sure that each partial will become the child of either the + // page or another shape that exists (or that will exist) in this page. - // 1. Parents + // find last parent id + const currentPageShapesSorted = this.getCurrentPageShapesSorted() - // Make sure that each partial will become the child of either the - // page or another shape that exists (or that will exist) in this page. - - // find last parent id - const currentPageShapesSorted = this.getCurrentPageShapesSorted() - - partials = partials.map((partial) => { - // If the partial does not provide the parentId OR if the provided - // parentId is NOT in the store AND NOT among the other shapes being - // created, then we need to find a parent for the shape. This can be - // another shape that exists under that point and which can receive - // children of the creating shape's type, or else the page itself. - if ( - !partial.parentId || - !(this.store.has(partial.parentId) || partials.some((p) => p.id === partial.parentId)) - ) { - let parentId: TLParentId = this.getFocusedGroupId() - - for (let i = currentPageShapesSorted.length - 1; i >= 0; i--) { - const parent = currentPageShapesSorted[i] - if ( - // parent.type === 'frame' - this.getShapeUtil(parent).canReceiveNewChildrenOfType(parent, partial.type) && - this.isPointInShape( - parent, - // If no parent is provided, then we can treat the - // shape's provided x/y as being in the page's space. - { x: partial.x ?? 0, y: partial.y ?? 0 }, - { - margin: 0, - hitInside: true, - } - ) - ) { - parentId = parent.id - break - } - } - - const prevParentId = partial.parentId - - // a shape cannot be it's own parent. This was a rare issue with frames/groups in the syncFuzz tests. - if (parentId === partial.id) { - parentId = focusedGroupId - } - - // If the parentid has changed... - if (parentId !== prevParentId) { - partial = { ...partial } - - partial.parentId = parentId - - // If the parent is a shape (rather than a page) then insert the - // shapes into the shape's children. Adjust the point and page rotation to be - // preserved relative to the parent. - if (isShapeId(parentId)) { - const point = this.getPointInShapeSpace(this.getShape(parentId)!, { - x: partial.x ?? 0, - y: partial.y ?? 0, - }) - partial.x = point.x - partial.y = point.y - partial.rotation = - -this.getShapePageTransform(parentId)!.rotation() + (partial.rotation ?? 0) - } - } - } - - return partial - }) - - // 2. Indices - - // Get the highest index among the parents of each of the - // the shapes being created; we'll increment from there. - - const parentIndices = new Map() - - const shapeRecordsToCreate: TLShape[] = [] - - for (const partial of partials) { - const util = this.getShapeUtil(partial) - - // If an index is not explicitly provided, then add the - // shapes to the top of their parents' children; using the - // value in parentsMappedToIndex, get the index above, use it, - // and set it back to parentsMappedToIndex for next time. - let index = partial.index - - if (!index) { - // Hello bug-seeker: have you just created a frame and then a shape - // and found that the shape is automatically the child of the frame? - // this is the reason why! It would be harder to have each shape specify - // the frame as the parent when creating a shape inside of a frame, so - // we do it here. - const parentId = partial.parentId ?? focusedGroupId - - if (!parentIndices.has(parentId)) { - parentIndices.set(parentId, this.getHighestIndexForParent(parentId)) - } - index = parentIndices.get(parentId)! - parentIndices.set(parentId, getIndexAbove(index)) - } - - // The initial props starts as the shape utility's default props - const initialProps = util.getDefaultProps() - - // We then look up each key in the tab state's styles; and if it's there, - // we use the value from the tab state's styles instead of the default. - for (const [style, propKey] of this.styleProps[partial.type]) { - ;(initialProps as any)[propKey] = this.getStyleForNextShape(style) - } - - // When we create the shape, take in the partial (the props coming into the - // function) and merge it with the default props. - let shapeRecordToCreate = ( - this.store.schema.types.shape as RecordType< - TLShape, - 'type' | 'props' | 'index' | 'parentId' - > - ).create({ - ...partial, - index, - opacity: partial.opacity ?? this.getInstanceState().opacityForNextShape, - parentId: partial.parentId ?? focusedGroupId, - props: 'props' in partial ? { ...initialProps, ...partial.props } : initialProps, - }) - - if (shapeRecordToCreate.index === undefined) { - throw Error('no index!') - } - - const next = this.getShapeUtil(shapeRecordToCreate).onBeforeCreate?.(shapeRecordToCreate) - - if (next) { - shapeRecordToCreate = next - } - - shapeRecordsToCreate.push(shapeRecordToCreate) + const partials = shapes.map((partial) => { + if (!partial.id) { + partial = { id: createShapeId(), ...partial } } - // Add meta properties, if any, to the shapes - shapeRecordsToCreate.forEach((shape) => { - shape.meta = { - ...this.getInitialMetaForShape(shape), - ...shape.meta, + // If the partial does not provide the parentId OR if the provided + // parentId is NOT in the store AND NOT among the other shapes being + // created, then we need to find a parent for the shape. This can be + // another shape that exists under that point and which can receive + // children of the creating shape's type, or else the page itself. + if ( + !partial.parentId || + !(this.store.has(partial.parentId) || shapes.some((p) => p.id === partial.parentId)) + ) { + let parentId: TLParentId = this.getFocusedGroupId() + + for (let i = currentPageShapesSorted.length - 1; i >= 0; i--) { + const parent = currentPageShapesSorted[i] + if ( + // parent.type === 'frame' + this.getShapeUtil(parent).canReceiveNewChildrenOfType(parent, partial.type) && + this.isPointInShape( + parent, + // If no parent is provided, then we can treat the + // shape's provided x/y as being in the page's space. + { x: partial.x ?? 0, y: partial.y ?? 0 }, + { + margin: 0, + hitInside: true, + } + ) + ) { + parentId = parent.id + break + } } + + const prevParentId = partial.parentId + + // a shape cannot be it's own parent. This was a rare issue with frames/groups in the syncFuzz tests. + if (parentId === partial.id) { + parentId = focusedGroupId + } + + // If the parentid has changed... + if (parentId !== prevParentId) { + partial = { ...partial } + + partial.parentId = parentId + + // If the parent is a shape (rather than a page) then insert the + // shapes into the shape's children. Adjust the point and page rotation to be + // preserved relative to the parent. + if (isShapeId(parentId)) { + const point = this.getPointInShapeSpace(this.getShape(parentId)!, { + x: partial.x ?? 0, + y: partial.y ?? 0, + }) + partial.x = point.x + partial.y = point.y + partial.rotation = + -this.getShapePageTransform(parentId)!.rotation() + (partial.rotation ?? 0) + } + } + } + + return partial + }) + + // 2. Indices + + // Get the highest index among the parents of each of the + // the shapes being created; we'll increment from there. + + const parentIndices = new Map() + + const shapeRecordsToCreate: TLShape[] = [] + + for (const partial of partials) { + const util = this.getShapeUtil(partial as TLShapePartial) + + // If an index is not explicitly provided, then add the + // shapes to the top of their parents' children; using the + // value in parentsMappedToIndex, get the index above, use it, + // and set it back to parentsMappedToIndex for next time. + let index = partial.index + + if (!index) { + // Hello bug-seeker: have you just created a frame and then a shape + // and found that the shape is automatically the child of the frame? + // this is the reason why! It would be harder to have each shape specify + // the frame as the parent when creating a shape inside of a frame, so + // we do it here. + const parentId = partial.parentId ?? focusedGroupId + + if (!parentIndices.has(parentId)) { + parentIndices.set(parentId, this.getHighestIndexForParent(parentId)) + } + index = parentIndices.get(parentId)! + parentIndices.set(parentId, getIndexAbove(index)) + } + + // The initial props starts as the shape utility's default props + const initialProps = util.getDefaultProps() + + // We then look up each key in the tab state's styles; and if it's there, + // we use the value from the tab state's styles instead of the default. + for (const [style, propKey] of this.styleProps[partial.type]) { + ;(initialProps as any)[propKey] = this.getStyleForNextShape(style) + } + + // When we create the shape, take in the partial (the props coming into the + // function) and merge it with the default props. + let shapeRecordToCreate = ( + this.store.schema.types.shape as RecordType< + TLShape, + 'type' | 'props' | 'index' | 'parentId' + > + ).create({ + ...partial, + index, + opacity: partial.opacity ?? this.getInstanceState().opacityForNextShape, + parentId: partial.parentId ?? focusedGroupId, + props: 'props' in partial ? { ...initialProps, ...partial.props } : initialProps, }) - this.store.put(shapeRecordsToCreate) - }, - undo: ({ partials }) => { - this.store.remove(partials.map((p) => p.id)) - }, - } - ) + if (shapeRecordToCreate.index === undefined) { + throw Error('no index!') + } + + const next = this.getShapeUtil(shapeRecordToCreate).onBeforeCreate?.(shapeRecordToCreate) + + if (next) { + shapeRecordToCreate = next + } + + shapeRecordsToCreate.push(shapeRecordToCreate) + } + + // Add meta properties, if any, to the shapes + shapeRecordsToCreate.forEach((shape) => { + shape.meta = { + ...this.getInitialMetaForShape(shape), + ...shape.meta, + } + }) + + this.store.put(shapeRecordsToCreate) + }) + } private animatingShapes = new Map() @@ -6771,7 +6511,7 @@ export class Editor extends EventEmitter { (p) => p && animatingShapes.get(p.id) === animationId ) if (partialsToUpdate.length) { - this.updateShapes(partialsToUpdate, { squashing: false }) + this.updateShapes(partialsToUpdate) // update shapes also removes the shape from animating shapes } @@ -6803,7 +6543,7 @@ export class Editor extends EventEmitter { }) } - this._updateShapes(updates, { squashing: true }) + this._updateShapes(updates) } this.addListener('tick', handleTick) @@ -6948,15 +6688,11 @@ export class Editor extends EventEmitter { * ``` * * @param partial - The shape partial to update. - * @param historyOptions - The history options for the change. * * @public */ - updateShape( - partial: TLShapePartial | null | undefined, - historyOptions?: TLCommandHistoryOptions - ) { - this.updateShapes([partial], historyOptions) + updateShape(partial: TLShapePartial | null | undefined) { + this.updateShapes([partial]) return this } @@ -6969,14 +6705,10 @@ export class Editor extends EventEmitter { * ``` * * @param partials - The shape partials to update. - * @param historyOptions - The history options for the change. * * @public */ - updateShapes( - partials: (TLShapePartial | null | undefined)[], - historyOptions?: TLCommandHistoryOptions - ) { + updateShapes(partials: (TLShapePartial | null | undefined)[]) { const compactedPartials: TLShapePartial[] = Array(partials.length) for (let i = 0, n = partials.length; i < n; i++) { @@ -6995,21 +6727,16 @@ export class Editor extends EventEmitter { compactedPartials.push(partial) } - this._updateShapes(compactedPartials, historyOptions) + this._updateShapes(compactedPartials) return this } /** @internal */ - private _updateShapes = this.history.createCommand( - 'updateShapes', - ( - _partials: (TLShapePartial | null | undefined)[], - historyOptions?: TLCommandHistoryOptions - ) => { - if (this.getInstanceState().isReadonly) return null + private _updateShapes = (_partials: (TLShapePartial | null | undefined)[]) => { + if (this.getInstanceState().isReadonly) return - const snapshots: Record = {} - const updates: Record = {} + this.batch(() => { + const updates = [] let shape: TLShape | undefined let updated: TLShape @@ -7029,42 +6756,17 @@ export class Editor extends EventEmitter { updated = applyPartialToShape(shape, partial) if (updated === shape) continue - snapshots[shape.id] = shape - updates[shape.id] = updated + //if any shape has an onBeforeUpdate handler, call it and, if the handler returns a + // new shape, replace the old shape with the new one. This is used for example when + // repositioning a text shape based on its new text content. + updated = this.getShapeUtil(shape).onBeforeUpdate?.(shape, updated) ?? updated + + updates.push(updated) } - return { data: { snapshots, updates }, ...historyOptions } - }, - { - do: ({ updates }) => { - // Iterate through array; if any shape has an onBeforeUpdate handler, call it - // and, if the handler returns a new shape, replace the old shape with - // the new one. This is used for example when repositioning a text shape - // based on its new text content. - this.store.put( - objectMapValues(updates).map((shape) => { - const current = this.store.get(shape.id) - if (current) { - const next = this.getShapeUtil(shape).onBeforeUpdate?.(current, shape) - if (next) return next - } - return shape - }) - ) - }, - undo: ({ snapshots }) => { - this.store.put(Object.values(snapshots)) - }, - squash(prevData, nextData) { - return { - // keep the oldest snapshots - snapshots: { ...nextData.snapshots, ...prevData.snapshots }, - // keep the newest updates - updates: { ...prevData.updates, ...nextData.updates }, - } - }, - } - ) + this.store.put(updates) + }) + } /** @internal */ private _getUnlockedShapeIds(ids: TLShapeId[]): TLShapeId[] { @@ -7085,16 +6787,28 @@ export class Editor extends EventEmitter { */ deleteShapes(ids: TLShapeId[]): this deleteShapes(shapes: TLShape[]): this - deleteShapes(_ids: TLShapeId[] | TLShape[]) { + deleteShapes(_ids: TLShapeId[] | TLShape[]): this { if (!Array.isArray(_ids)) { throw Error('Editor.deleteShapes: must provide an array of shapes or shapeIds') } - this._deleteShapes( - this._getUnlockedShapeIds( - typeof _ids[0] === 'string' ? (_ids as TLShapeId[]) : (_ids as TLShape[]).map((s) => s.id) - ) + + const ids = this._getUnlockedShapeIds( + typeof _ids[0] === 'string' ? (_ids as TLShapeId[]) : (_ids as TLShape[]).map((s) => s.id) ) - return this + + if (this.getInstanceState().isReadonly) return this + if (ids.length === 0) return this + + const allIds = new Set(ids) + + for (const id of ids) { + this.visitDescendants(id, (childId) => { + allIds.add(childId) + }) + } + + const deletedIds = [...allIds] + return this.batch(() => this.store.remove(deletedIds)) } /** @@ -7116,59 +6830,6 @@ export class Editor extends EventEmitter { return this } - /** @internal */ - private _deleteShapes = this.history.createCommand( - 'delete_shapes', - (ids: TLShapeId[]) => { - if (this.getInstanceState().isReadonly) return null - if (ids.length === 0) return null - const prevSelectedShapeIds = [...this.getCurrentPageState().selectedShapeIds] - - const allIds = new Set(ids) - - for (const id of ids) { - this.visitDescendants(id, (childId) => { - allIds.add(childId) - }) - } - - const deletedIds = [...allIds] - const arrowBindings = this._getArrowBindingsIndex().get() - const snapshots = compact( - deletedIds.flatMap((id) => { - const shape = this.getShape(id) - - // Add any bound arrows to the snapshots, so that we can restore the bindings on undo - const bindings = arrowBindings[id] - if (bindings && bindings.length > 0) { - return bindings.map(({ arrowId }) => this.getShape(arrowId)).concat(shape) - } - return shape - }) - ) - - const postSelectedShapeIds = prevSelectedShapeIds.filter((id) => !allIds.has(id)) - - return { data: { deletedIds, snapshots, prevSelectedShapeIds, postSelectedShapeIds } } - }, - { - do: ({ deletedIds, postSelectedShapeIds }) => { - this.store.remove(deletedIds) - this.store.update(this.getCurrentPageState().id, (state) => ({ - ...state, - selectedShapeIds: postSelectedShapeIds, - })) - }, - undo: ({ snapshots, prevSelectedShapeIds }) => { - this.store.put(snapshots) - this.store.update(this.getCurrentPageState().id, (state) => ({ - ...state, - selectedShapeIds: prevSelectedShapeIds, - })) - }, - } - ) - /* --------------------- Styles --------------------- */ /** @@ -7319,13 +6980,12 @@ export class Editor extends EventEmitter { * @example * ```ts * editor.setOpacityForNextShapes(0.5) - * editor.setOpacityForNextShapes(0.5, { squashing: true }) * ``` * * @param opacity - The opacity to set. Must be a number between 0 and 1 inclusive. * @param historyOptions - The history options for the change. */ - setOpacityForNextShapes(opacity: number, historyOptions?: TLCommandHistoryOptions): this { + setOpacityForNextShapes(opacity: number, historyOptions?: TLHistoryBatchOptions): this { this.updateInstanceState({ opacityForNextShape: opacity }, historyOptions) return this } @@ -7336,13 +6996,11 @@ export class Editor extends EventEmitter { * @example * ```ts * editor.setOpacityForSelectedShapes(0.5) - * editor.setOpacityForSelectedShapes(0.5, { squashing: true }) * ``` * * @param opacity - The opacity to set. Must be a number between 0 and 1 inclusive. - * @param historyOptions - The history options for the change. */ - setOpacityForSelectedShapes(opacity: number, historyOptions?: TLCommandHistoryOptions): this { + setOpacityForSelectedShapes(opacity: number): this { const selectedShapes = this.getSelectedShapes() if (selectedShapes.length > 0) { @@ -7372,8 +7030,7 @@ export class Editor extends EventEmitter { type: shape.type, opacity, } - }), - historyOptions + }) ) } @@ -7398,7 +7055,7 @@ export class Editor extends EventEmitter { setStyleForNextShapes( style: StyleProp, value: T, - historyOptions?: TLCommandHistoryOptions + historyOptions?: TLHistoryBatchOptions ): this { const stylesForNextShape = this.getInstanceState().stylesForNextShape @@ -7416,7 +7073,6 @@ export class Editor extends EventEmitter { * @example * ```ts * editor.setStyleForSelectedShapes(DefaultColorStyle, 'red') - * editor.setStyleForSelectedShapes(DefaultColorStyle, 'red', { ephemeral: true }) * ``` * * @param style - The style to set. @@ -7425,11 +7081,7 @@ export class Editor extends EventEmitter { * * @public */ - setStyleForSelectedShapes>( - style: S, - value: StylePropValue, - historyOptions?: TLCommandHistoryOptions - ): this { + setStyleForSelectedShapes>(style: S, value: StylePropValue): this { const selectedShapes = this.getSelectedShapes() if (selectedShapes.length > 0) { @@ -7469,10 +7121,7 @@ export class Editor extends EventEmitter { addShapeById(shape) } - this.updateShapes( - updates.map(({ updatePartial }) => updatePartial), - historyOptions - ) + this.updateShapes(updates.map(({ updatePartial }) => updatePartial)) } return this @@ -8212,22 +7861,24 @@ export class Editor extends EventEmitter { } // todo: We only have to do this if there are multiple users in the document - this.store.put([ - { - id: TLPOINTER_ID, - typeName: 'pointer', - x: currentPagePoint.x, - y: currentPagePoint.y, - lastActivityTimestamp: - // If our pointer moved only because we're following some other user, then don't - // update our last activity timestamp; otherwise, update it to the current timestamp. - info.type === 'pointer' && info.pointerId === INTERNAL_POINTER_IDS.CAMERA_MOVE - ? this.store.unsafeGetWithoutCapture(TLPOINTER_ID)?.lastActivityTimestamp ?? - this._tickManager.now - : this._tickManager.now, - meta: {}, - }, - ]) + this.history.ignore(() => { + this.store.put([ + { + id: TLPOINTER_ID, + typeName: 'pointer', + x: currentPagePoint.x, + y: currentPagePoint.y, + lastActivityTimestamp: + // If our pointer moved only because we're following some other user, then don't + // update our last activity timestamp; otherwise, update it to the current timestamp. + info.type === 'pointer' && info.pointerId === INTERNAL_POINTER_IDS.CAMERA_MOVE + ? this.store.unsafeGetWithoutCapture(TLPOINTER_ID)?.lastActivityTimestamp ?? + this._tickManager.now + : this._tickManager.now, + meta: {}, + }, + ]) + }) } /** @@ -8426,12 +8077,7 @@ export class Editor extends EventEmitter { if (this.inputs.isPanning) { this.inputs.isPanning = false - this.updateInstanceState({ - cursor: { - type: this._prevCursor, - rotation: 0, - }, - }) + this.setCursor({ type: this._prevCursor, rotation: 0 }) } } @@ -8529,14 +8175,14 @@ export class Editor extends EventEmitter { inputs.isPinching = false const { _selectedShapeIdsAtPointerDown } = this - this.setSelectedShapes(this._selectedShapeIdsAtPointerDown, { squashing: true }) + this.setSelectedShapes(this._selectedShapeIdsAtPointerDown) this._selectedShapeIdsAtPointerDown = [] if (this._didPinch) { this._didPinch = false this.once('tick', () => { if (!this._didPinch) { - this.setSelectedShapes(_selectedShapeIdsAtPointerDown, { squashing: true }) + this.setSelectedShapes(_selectedShapeIdsAtPointerDown) } }) } diff --git a/packages/editor/src/lib/editor/managers/HistoryManager.test.ts b/packages/editor/src/lib/editor/managers/HistoryManager.test.ts index 5dd0124df..12429bcf5 100644 --- a/packages/editor/src/lib/editor/managers/HistoryManager.test.ts +++ b/packages/editor/src/lib/editor/managers/HistoryManager.test.ts @@ -1,92 +1,75 @@ -import { TLCommandHistoryOptions } from '../types/history-types' +import { BaseRecord, RecordId, Store, StoreSchema, createRecordType } from '@tldraw/store' +import { TLHistoryBatchOptions } from '../types/history-types' import { HistoryManager } from './HistoryManager' import { stack } from './Stack' +interface TestRecord extends BaseRecord<'test', TestRecordId> { + value: number | string +} +type TestRecordId = RecordId +const testSchema = StoreSchema.create({ + test: createRecordType('test', { scope: 'document' }), +}) + +const ids = { + count: testSchema.types.test.createId('count'), + name: testSchema.types.test.createId('name'), + age: testSchema.types.test.createId('age'), + a: testSchema.types.test.createId('a'), + b: testSchema.types.test.createId('b'), +} + function createCounterHistoryManager() { - const manager = new HistoryManager({ emit: () => void null }, () => { - return - }) - const state = { - count: 0, - name: 'David', - age: 35, + const store = new Store({ schema: testSchema, props: null }) + store.put([ + testSchema.types.test.create({ id: ids.count, value: 0 }), + testSchema.types.test.create({ id: ids.name, value: 'David' }), + testSchema.types.test.create({ id: ids.age, value: 35 }), + ]) + + const manager = new HistoryManager({ store }) + + function getCount() { + return store.get(ids.count)!.value as number + } + function getName() { + return store.get(ids.name)!.value as string + } + function getAge() { + return store.get(ids.age)!.value as number + } + function _setCount(n: number) { + store.update(ids.count, (c) => ({ ...c, value: n })) + } + function _setName(name: string) { + store.update(ids.name, (c) => ({ ...c, value: name })) + } + function _setAge(age: number) { + store.update(ids.age, (c) => ({ ...c, value: age })) } - const increment = manager.createCommand( - 'increment', - (n = 1, squashing = false) => ({ - data: { n }, - squashing, - }), - { - do: ({ n }) => { - state.count += n - }, - undo: ({ n }) => { - state.count -= n - }, - squash: ({ n: n1 }, { n: n2 }) => ({ n: n1 + n2 }), - } - ) - const decrement = manager.createCommand( - 'decrement', - (n = 1, squashing = false) => ({ - data: { n }, - squashing, - }), - { - do: ({ n }) => { - state.count -= n - }, - undo: ({ n }) => { - state.count += n - }, - squash: ({ n: n1 }, { n: n2 }) => ({ n: n1 + n2 }), - } - ) + const increment = (n = 1) => { + _setCount(getCount() + n) + } - const setName = manager.createCommand( - 'setName', - (name = 'David') => ({ - data: { name, prev: state.name }, - ephemeral: true, - }), - { - do: ({ name }) => { - state.name = name - }, - undo: ({ prev }) => { - state.name = prev - }, - } - ) + const decrement = (n = 1) => { + _setCount(getCount() - n) + } - const setAge = manager.createCommand( - 'setAge', - (age = 35) => ({ - data: { age, prev: state.age }, - preservesRedoStack: true, - }), - { - do: ({ age }) => { - state.age = age - }, - undo: ({ prev }) => { - state.age = prev - }, - } - ) + const setName = (name = 'David') => { + manager.ignore(() => _setName(name)) + } - const incrementTwice = manager.createCommand('incrementTwice', () => ({ data: {} }), { - do: () => { + const setAge = (age = 35) => { + manager.batch(() => _setAge(age), { history: 'record-preserveRedoStack' }) + } + + const incrementTwice = () => { + manager.batch(() => { increment() increment() - }, - undo: () => { - decrement() - decrement() - }, - }) + }) + } return { increment, @@ -95,9 +78,9 @@ function createCounterHistoryManager() { setName, setAge, history: manager, - getCount: () => state.count, - getName: () => state.name, - getAge: () => state.age, + getCount, + getName, + getAge, } } @@ -116,9 +99,9 @@ describe(HistoryManager, () => { editor.decrement() expect(editor.getCount()).toBe(3) - const undos = [...editor.history._undos.get()] + const undos = [...editor.history.stacks.get().undos] const parsedUndos = JSON.parse(JSON.stringify(undos)) - editor.history._undos.set(stack(parsedUndos)) + editor.history.stacks.update(({ redos }) => ({ undos: stack(parsedUndos), redos })) editor.history.undo() @@ -200,17 +183,16 @@ describe(HistoryManager, () => { editor.history.mark('stop at 1') expect(editor.getCount()).toBe(1) - editor.increment(1, true) - editor.increment(1, true) - editor.increment(1, true) - editor.increment(1, true) + editor.increment(1) + editor.increment(1) + editor.increment(1) + editor.increment(1) expect(editor.getCount()).toBe(5) expect(editor.history.getNumUndos()).toBe(3) }) - - it('allows ephemeral commands that do not affect the stack', () => { + it('allows ignore commands that do not affect the stack', () => { editor.increment() editor.history.mark('stop at 1') editor.increment() @@ -263,7 +245,7 @@ describe(HistoryManager, () => { editor.history.mark('2') editor.incrementTwice() editor.incrementTwice() - expect(editor.history.getNumUndos()).toBe(5) + expect(editor.history.getNumUndos()).toBe(4) expect(editor.getCount()).toBe(6) editor.history.bail() expect(editor.getCount()).toBe(2) @@ -289,58 +271,35 @@ describe(HistoryManager, () => { }) describe('history options', () => { - let manager: HistoryManager - let state: { a: number; b: number } + let manager: HistoryManager - let setA: (n: number, historyOptions?: TLCommandHistoryOptions) => any - let setB: (n: number, historyOptions?: TLCommandHistoryOptions) => any + let getState: () => { a: number; b: number } + let setA: (n: number, historyOptions?: TLHistoryBatchOptions) => any + let setB: (n: number, historyOptions?: TLHistoryBatchOptions) => any beforeEach(() => { - manager = new HistoryManager({ emit: () => void null }, () => { - return - }) + const store = new Store({ schema: testSchema, props: null }) + store.put([ + testSchema.types.test.create({ id: ids.a, value: 0 }), + testSchema.types.test.create({ id: ids.b, value: 0 }), + ]) - state = { - a: 0, - b: 0, + manager = new HistoryManager({ store }) + + getState = () => { + return { a: store.get(ids.a)!.value as number, b: store.get(ids.b)!.value as number } } - setA = manager.createCommand( - 'setA', - (n: number, historyOptions?: TLCommandHistoryOptions) => ({ - data: { next: n, prev: state.a }, - ...historyOptions, - }), - { - do: ({ next }) => { - state = { ...state, a: next } - }, - undo: ({ prev }) => { - state = { ...state, a: prev } - }, - squash: ({ prev }, { next }) => ({ prev, next }), - } - ) + setA = (n: number, historyOptions?: TLHistoryBatchOptions) => { + manager.batch(() => store.update(ids.a, (s) => ({ ...s, value: n })), historyOptions) + } - setB = manager.createCommand( - 'setB', - (n: number, historyOptions?: TLCommandHistoryOptions) => ({ - data: { next: n, prev: state.b }, - ...historyOptions, - }), - { - do: ({ next }) => { - state = { ...state, b: next } - }, - undo: ({ prev }) => { - state = { ...state, b: prev } - }, - squash: ({ prev }, { next }) => ({ prev, next }), - } - ) + setB = (n: number, historyOptions?: TLHistoryBatchOptions) => { + manager.batch(() => store.update(ids.b, (s) => ({ ...s, value: n })), historyOptions) + } }) - it('sets, undoes, redoes', () => { + it('undos, redoes, separate marks', () => { manager.mark() setA(1) manager.mark() @@ -348,18 +307,18 @@ describe('history options', () => { manager.mark() setB(2) - expect(state).toMatchObject({ a: 1, b: 2 }) + expect(getState()).toMatchObject({ a: 1, b: 2 }) manager.undo() - expect(state).toMatchObject({ a: 1, b: 1 }) + expect(getState()).toMatchObject({ a: 1, b: 1 }) manager.redo() - expect(state).toMatchObject({ a: 1, b: 2 }) + expect(getState()).toMatchObject({ a: 1, b: 2 }) }) - it('sets, undoes, redoes', () => { + it('undos, redos, squashing', () => { manager.mark() setA(1) manager.mark() @@ -369,71 +328,107 @@ describe('history options', () => { setB(3) setB(4) - expect(state).toMatchObject({ a: 1, b: 4 }) + expect(getState()).toMatchObject({ a: 1, b: 4 }) manager.undo() - expect(state).toMatchObject({ a: 1, b: 1 }) + expect(getState()).toMatchObject({ a: 1, b: 1 }) manager.redo() - expect(state).toMatchObject({ a: 1, b: 4 }) + expect(getState()).toMatchObject({ a: 1, b: 4 }) }) - it('sets ephemeral, undoes, redos', () => { + it('undos, redos, ignore', () => { manager.mark() setA(1) manager.mark() setB(1) // B 0->1 manager.mark() - setB(2, { ephemeral: true }) // B 0->2, but ephemeral + setB(2, { history: 'ignore' }) // B 0->2, but ignore - expect(state).toMatchObject({ a: 1, b: 2 }) + expect(getState()).toMatchObject({ a: 1, b: 2 }) manager.undo() // undoes B 2->0 - expect(state).toMatchObject({ a: 1, b: 0 }) + expect(getState()).toMatchObject({ a: 1, b: 0 }) manager.redo() // redoes B 0->1, but not B 1-> 2 - expect(state).toMatchObject({ a: 1, b: 1 }) // no change, b 1->2 was ephemeral + expect(getState()).toMatchObject({ a: 1, b: 1 }) // no change, b 1->2 was ignore }) - it('sets squashing, undoes, redos', () => { + it('squashing, undos, redos', () => { manager.mark() setA(1) manager.mark() setB(1) - setB(2, { squashing: true }) // squashes with the previous command - setB(3, { squashing: true }) // squashes with the previous command + setB(2) // squashes with the previous command + setB(3) // squashes with the previous command - expect(state).toMatchObject({ a: 1, b: 3 }) + expect(getState()).toMatchObject({ a: 1, b: 3 }) manager.undo() - expect(state).toMatchObject({ a: 1, b: 0 }) + expect(getState()).toMatchObject({ a: 1, b: 0 }) manager.redo() - expect(state).toMatchObject({ a: 1, b: 3 }) + expect(getState()).toMatchObject({ a: 1, b: 3 }) }) - it('sets squashing and ephemeral, undoes, redos', () => { + it('squashing, undos, redos, ignore', () => { manager.mark() setA(1) manager.mark() setB(1) - setB(2, { squashing: true }) // squashes with the previous command - setB(3, { squashing: true, ephemeral: true }) // squashes with the previous command + setB(2) // squashes with the previous command + setB(3, { history: 'ignore' }) // squashes with the previous command - expect(state).toMatchObject({ a: 1, b: 3 }) + expect(getState()).toMatchObject({ a: 1, b: 3 }) manager.undo() - expect(state).toMatchObject({ a: 1, b: 0 }) + expect(getState()).toMatchObject({ a: 1, b: 0 }) manager.redo() - expect(state).toMatchObject({ a: 1, b: 2 }) // B2->3 was ephemeral + expect(getState()).toMatchObject({ a: 1, b: 2 }) // B2->3 was ignore + }) + + it('nested ignore', () => { + manager.mark() + manager.batch( + () => { + setA(1) + // even though we set this to record, it will still be ignored + manager.batch(() => setB(1), { history: 'record' }) + setA(2) + }, + { history: 'ignore' } + ) + expect(getState()).toMatchObject({ a: 2, b: 1 }) + + // changes were ignored: + manager.undo() + expect(getState()).toMatchObject({ a: 2, b: 1 }) + + manager.mark() + manager.batch( + () => { + setA(3) + manager.batch(() => setB(2), { history: 'ignore' }) + }, + { history: 'record-preserveRedoStack' } + ) + expect(getState()).toMatchObject({ a: 3, b: 2 }) + + // changes to A were recorded, but changes to B were ignore: + manager.undo() + expect(getState()).toMatchObject({ a: 2, b: 2 }) + + // We can still redo because we preserved the redo stack: + manager.redo() + expect(getState()).toMatchObject({ a: 3, b: 2 }) }) }) diff --git a/packages/editor/src/lib/editor/managers/HistoryManager.ts b/packages/editor/src/lib/editor/managers/HistoryManager.ts index 2b0511598..5a6a7bb29 100644 --- a/packages/editor/src/lib/editor/managers/HistoryManager.ts +++ b/packages/editor/src/lib/editor/managers/HistoryManager.ts @@ -1,156 +1,124 @@ import { atom, transact } from '@tldraw/state' -import { devFreeze } from '@tldraw/store' +import { + RecordsDiff, + Store, + UnknownRecord, + createEmptyRecordsDiff, + isRecordsDiffEmpty, + reverseRecordsDiff, + squashRecordDiffsMutable, +} from '@tldraw/store' +import { exhaustiveSwitchError, noop } from '@tldraw/utils' import { uniqueId } from '../../utils/uniqueId' -import { TLCommandHandler, TLCommandHistoryOptions, TLHistoryEntry } from '../types/history-types' -import { Stack, stack } from './Stack' +import { TLHistoryBatchOptions, TLHistoryEntry } from '../types/history-types' +import { stack } from './Stack' -type CommandFn = (...args: any[]) => - | ({ - data: Data - } & TLCommandHistoryOptions) - | null - | undefined - | void +enum HistoryRecorderState { + Recording = 'recording', + RecordingPreserveRedoStack = 'recordingPreserveRedoStack', + Paused = 'paused', +} -type ExtractData = Fn extends CommandFn ? Data : never -type ExtractArgs = Parameters any>> +/** @public */ +export class HistoryManager { + private readonly store: Store -export class HistoryManager< - CTX extends { - emit: (name: 'change-history' | 'mark-history', ...args: any) => void - }, -> { - _undos = atom>('HistoryManager.undos', stack()) // Updated by each action that includes and undo - _redos = atom>('HistoryManager.redos', stack()) // Updated when a user undoes - _batchDepth = 0 // A flag for whether the user is in a batch operation + readonly dispose: () => void - constructor( - private readonly ctx: CTX, - private readonly annotateError: (error: unknown) => void - ) {} + private state: HistoryRecorderState = HistoryRecorderState.Recording + private readonly pendingDiff = new PendingDiff() + /** @internal */ + stacks = atom( + 'HistoryManager.stacks', + { + undos: stack>(), + redos: stack>(), + }, + { + isEqual: (a, b) => a.undos === b.undos && a.redos === b.redos, + } + ) + + private readonly annotateError: (error: unknown) => void + + constructor(opts: { store: Store; annotateError?: (error: unknown) => void }) { + this.store = opts.store + this.annotateError = opts.annotateError ?? noop + this.dispose = this.store.addHistoryInterceptor((entry, source) => { + if (source !== 'user') return + + switch (this.state) { + case HistoryRecorderState.Recording: + this.pendingDiff.apply(entry.changes) + this.stacks.update(({ undos }) => ({ undos, redos: stack() })) + break + case HistoryRecorderState.RecordingPreserveRedoStack: + this.pendingDiff.apply(entry.changes) + break + case HistoryRecorderState.Paused: + break + default: + exhaustiveSwitchError(this.state) + } + }) + } + + private flushPendingDiff() { + if (this.pendingDiff.isEmpty()) return + + const diff = this.pendingDiff.clear() + this.stacks.update(({ undos, redos }) => ({ + undos: undos.push({ type: 'diff', diff }), + redos, + })) + } onBatchComplete: () => void = () => void null - private _commands: Record> = {} - getNumUndos() { - return this._undos.get().length + return this.stacks.get().undos.length + (this.pendingDiff.isEmpty() ? 0 : 1) } getNumRedos() { - return this._redos.get().length - } - createCommand = >( - name: Name, - constructor: Constructor, - handle: TLCommandHandler> - ) => { - if (this._commands[name]) { - throw new Error(`Duplicate command: ${name}`) - } - this._commands[name] = handle - - const exec = (...args: ExtractArgs) => { - if (!this._batchDepth) { - // If we're not batching, run again in a batch - this.batch(() => exec(...args)) - return this.ctx - } - - const result = constructor(...args) - - if (!result) { - return this.ctx - } - - const { data, ephemeral, squashing, preservesRedoStack } = result - - this.ignoringUpdates((undos, redos) => { - handle.do(data) - return { undos, redos } - }) - - if (!ephemeral) { - const prev = this._undos.get().head - if ( - squashing && - prev && - prev.type === 'command' && - prev.name === name && - prev.preservesRedoStack === preservesRedoStack - ) { - // replace the last command with a squashed version - this._undos.update((undos) => - undos.tail.push({ - ...prev, - data: devFreeze(handle.squash!(prev.data, data)), - }) - ) - } else { - // add to the undo stack - this._undos.update((undos) => - undos.push({ - type: 'command', - name, - data: devFreeze(data), - preservesRedoStack: preservesRedoStack, - }) - ) - } - - if (!result.preservesRedoStack) { - this._redos.set(stack()) - } - - this.ctx.emit('change-history', { reason: 'push' }) - } - - return this.ctx - } - - return exec + return this.stacks.get().redos.length } - batch = (fn: () => void) => { + /** @internal */ + _isInBatch = false + batch = (fn: () => void, opts?: TLHistoryBatchOptions) => { + const previousState = this.state + + // we move to the new state only if we haven't explicitly paused + if (previousState !== HistoryRecorderState.Paused && opts?.history) { + this.state = modeToState[opts.history] + } + try { - this._batchDepth++ - if (this._batchDepth === 1) { - transact(() => { - const mostRecentAction = this._undos.get().head - fn() - if (mostRecentAction !== this._undos.get().head) { - this.onBatchComplete() - } - }) - } else { + if (this._isInBatch) { fn() + return this } - } catch (error) { - this.annotateError(error) - throw error - } finally { - this._batchDepth-- - } - return this + this._isInBatch = true + try { + transact(() => { + fn() + this.onBatchComplete() + }) + } catch (error) { + this.annotateError(error) + throw error + } finally { + this._isInBatch = false + } + + return this + } finally { + this.state = previousState + } } - private ignoringUpdates = ( - fn: ( - undos: Stack, - redos: Stack - ) => { undos: Stack; redos: Stack } - ) => { - let undos = this._undos.get() - let redos = this._redos.get() - - this._undos.set(stack()) - this._redos.set(stack()) - try { - ;({ undos, redos } = transact(() => fn(undos, redos))) - } finally { - this._undos.set(undos) - this._redos.set(redos) - } + ignore(fn: () => void) { + return this.batch(fn, { history: 'ignore' }) } // History @@ -161,62 +129,66 @@ export class HistoryManager< pushToRedoStack: boolean toMark?: string }) => { - this.ignoringUpdates((undos, redos) => { - if (undos.length === 0) { - return { undos, redos } + const previousState = this.state + this.state = HistoryRecorderState.Paused + try { + let { undos, redos } = this.stacks.get() + + // start by collecting the pending diff (everything since the last mark). + // we'll accumulate the diff to undo in this variable so we can apply it atomically. + const pendingDiff = this.pendingDiff.clear() + const isPendingDiffEmpty = isRecordsDiffEmpty(pendingDiff) + const diffToUndo = reverseRecordsDiff(pendingDiff) + + if (pushToRedoStack && !isPendingDiffEmpty) { + redos = redos.push({ type: 'diff', diff: pendingDiff }) } - while (undos.head?.type === 'STOP') { - const mark = undos.head - undos = undos.tail - if (pushToRedoStack) { - redos = redos.push(mark) - } - if (mark.id === toMark) { - this.ctx.emit( - 'change-history', - pushToRedoStack ? { reason: 'undo' } : { reason: 'bail', markId: toMark } - ) - return { undos, redos } - } - } - - if (undos.length === 0) { - this.ctx.emit( - 'change-history', - pushToRedoStack ? { reason: 'undo' } : { reason: 'bail', markId: toMark } - ) - return { undos, redos } - } - - while (undos.head) { - const command = undos.head - undos = undos.tail - - if (pushToRedoStack) { - redos = redos.push(command) - } - - if (command.type === 'STOP') { - if (command.onUndo && (!toMark || command.id === toMark)) { - this.ctx.emit( - 'change-history', - pushToRedoStack ? { reason: 'undo' } : { reason: 'bail', markId: toMark } - ) - return { undos, redos } + let didFindMark = false + if (isPendingDiffEmpty) { + // if nothing has happened since the last mark, pop any intermediate marks off the stack + while (undos.head?.type === 'stop') { + const mark = undos.head + undos = undos.tail + if (pushToRedoStack) { + redos = redos.push(mark) + } + if (mark.id === toMark) { + didFindMark = true + break } - } else { - const handler = this._commands[command.name] - handler.undo(command.data) } } - this.ctx.emit( - 'change-history', - pushToRedoStack ? { reason: 'undo' } : { reason: 'bail', markId: toMark } - ) - return { undos, redos } - }) + if (!didFindMark) { + loop: while (undos.head) { + const undo = undos.head + undos = undos.tail + + if (pushToRedoStack) { + redos = redos.push(undo) + } + + switch (undo.type) { + case 'diff': + squashRecordDiffsMutable(diffToUndo, [reverseRecordsDiff(undo.diff)]) + break + case 'stop': + if (!toMark) break loop + if (undo.id === toMark) break loop + break + default: + exhaustiveSwitchError(undo) + } + } + } + + this.store.applyDiff(diffToUndo, { ignoreEphemeralKeys: true }) + this.store.ensureStoreIsUsable() + this.stacks.set({ undos, redos }) + } finally { + this.state = previousState + } return this } @@ -228,43 +200,43 @@ export class HistoryManager< } redo = () => { - this.ignoringUpdates((undos, redos) => { + const previousState = this.state + this.state = HistoryRecorderState.Paused + try { + this.flushPendingDiff() + + let { undos, redos } = this.stacks.get() if (redos.length === 0) { - return { undos, redos } + return } - while (redos.head?.type === 'STOP') { + // ignore any intermediate marks - this should take us to the first `diff` entry + while (redos.head?.type === 'stop') { undos = undos.push(redos.head) redos = redos.tail } - if (redos.length === 0) { - this.ctx.emit('change-history', { reason: 'redo' }) - return { undos, redos } - } + // accumulate diffs to be redone so they can be applied atomically + const diffToRedo = createEmptyRecordsDiff() while (redos.head) { - const command = redos.head - undos = undos.push(redos.head) + const redo = redos.head + undos = undos.push(redo) redos = redos.tail - if (command.type === 'STOP') { - if (command.onRedo) { - break - } + if (redo.type === 'diff') { + squashRecordDiffsMutable(diffToRedo, [redo.diff]) } else { - const handler = this._commands[command.name] - if (handler.redo) { - handler.redo(command.data) - } else { - handler.do(command.data) - } + break } } - this.ctx.emit('change-history', { reason: 'redo' }) - return { undos, redos } - }) + this.store.applyDiff(diffToRedo, { ignoreEphemeralKeys: true }) + this.store.ensureStoreIsUsable() + this.stacks.set({ undos, redos }) + } finally { + this.state = previousState + } return this } @@ -281,24 +253,59 @@ export class HistoryManager< return this } - mark = (id = uniqueId(), onUndo = true, onRedo = true) => { - const mostRecent = this._undos.get().head - // dedupe marks, why not - if (mostRecent && mostRecent.type === 'STOP') { - if (mostRecent.id === id && mostRecent.onUndo === onUndo && mostRecent.onRedo === onRedo) { - return mostRecent.id - } - } - - this._undos.update((undos) => undos.push({ type: 'STOP', id, onUndo, onRedo })) - - this.ctx.emit('mark-history', { id }) + mark = (id = uniqueId()) => { + transact(() => { + this.flushPendingDiff() + this.stacks.update(({ undos, redos }) => ({ undos: undos.push({ type: 'stop', id }), redos })) + }) return id } clear() { - this._undos.set(stack()) - this._redos.set(stack()) + this.stacks.set({ undos: stack(), redos: stack() }) + this.pendingDiff.clear() + } + + /** @internal */ + debug() { + const { undos, redos } = this.stacks.get() + return { + undos: undos.toArray(), + redos: redos.toArray(), + pendingDiff: this.pendingDiff.debug(), + state: this.state, + } + } +} + +const modeToState = { + record: HistoryRecorderState.Recording, + 'record-preserveRedoStack': HistoryRecorderState.RecordingPreserveRedoStack, + ignore: HistoryRecorderState.Paused, +} as const + +class PendingDiff { + private diff = createEmptyRecordsDiff() + private isEmptyAtom = atom('PendingDiff.isEmpty', true) + + clear() { + const diff = this.diff + this.diff = createEmptyRecordsDiff() + this.isEmptyAtom.set(true) + return diff + } + + isEmpty() { + return this.isEmptyAtom.get() + } + + apply(diff: RecordsDiff) { + squashRecordDiffsMutable(this.diff, [diff]) + this.isEmptyAtom.set(isRecordsDiffEmpty(this.diff)) + } + + debug() { + return { diff: this.diff, isEmpty: this.isEmpty() } } } diff --git a/packages/editor/src/lib/editor/managers/SideEffectManager.ts b/packages/editor/src/lib/editor/managers/SideEffectManager.ts index c7f569eec..51d742bf9 100644 --- a/packages/editor/src/lib/editor/managers/SideEffectManager.ts +++ b/packages/editor/src/lib/editor/managers/SideEffectManager.ts @@ -88,25 +88,13 @@ export class SideEffectManager< return next } - let updateDepth = 0 - editor.store.onAfterChange = (prev, next, source) => { - updateDepth++ - - if (updateDepth > 1000) { - console.error('[CleanupManager.onAfterChange] Maximum update depth exceeded, bailing out.') - } else { - const handlers = this._afterChangeHandlers[ - next.typeName - ] as TLAfterChangeHandler[] - if (handlers) { - for (const handler of handlers) { - handler(prev, next, source) - } + const handlers = this._afterChangeHandlers[next.typeName] as TLAfterChangeHandler[] + if (handlers) { + for (const handler of handlers) { + handler(prev, next, source) } } - - updateDepth-- } editor.store.onBeforeDelete = (record, source) => { @@ -161,6 +149,46 @@ export class SideEffectManager< private _batchCompleteHandlers: TLBatchCompleteHandler[] = [] + /** + * Internal helper for registering a bunch of side effects at once and keeping them organized. + * @internal + */ + register(handlersByType: { + [R in TLRecord as R['typeName']]?: { + beforeCreate?: TLBeforeCreateHandler + afterCreate?: TLAfterCreateHandler + beforeChange?: TLBeforeChangeHandler + afterChange?: TLAfterChangeHandler + beforeDelete?: TLBeforeDeleteHandler + afterDelete?: TLAfterDeleteHandler + } + }) { + const disposes: (() => void)[] = [] + for (const [type, handlers] of Object.entries(handlersByType) as any) { + if (handlers?.beforeCreate) { + disposes.push(this.registerBeforeCreateHandler(type, handlers.beforeCreate)) + } + if (handlers?.afterCreate) { + disposes.push(this.registerAfterCreateHandler(type, handlers.afterCreate)) + } + if (handlers?.beforeChange) { + disposes.push(this.registerBeforeChangeHandler(type, handlers.beforeChange)) + } + if (handlers?.afterChange) { + disposes.push(this.registerAfterChangeHandler(type, handlers.afterChange)) + } + if (handlers?.beforeDelete) { + disposes.push(this.registerBeforeDeleteHandler(type, handlers.beforeDelete)) + } + if (handlers?.afterDelete) { + disposes.push(this.registerAfterDeleteHandler(type, handlers.afterDelete)) + } + } + return () => { + for (const dispose of disposes) dispose() + } + } + /** * 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. diff --git a/packages/editor/src/lib/editor/types/emit-types.ts b/packages/editor/src/lib/editor/types/emit-types.ts index 6a6185d0a..3104f51e9 100644 --- a/packages/editor/src/lib/editor/types/emit-types.ts +++ b/packages/editor/src/lib/editor/types/emit-types.ts @@ -15,8 +15,6 @@ export interface TLEventMap { event: [TLEventInfo] tick: [number] frame: [number] - 'change-history': [{ reason: 'undo' | 'redo' | 'push' } | { reason: 'bail'; markId?: string }] - 'mark-history': [{ id: string }] 'select-all-text': [{ shapeId: TLShapeId }] } diff --git a/packages/editor/src/lib/editor/types/history-types.ts b/packages/editor/src/lib/editor/types/history-types.ts index 6adfa2de7..1df29aaaa 100644 --- a/packages/editor/src/lib/editor/types/history-types.ts +++ b/packages/editor/src/lib/editor/types/history-types.ts @@ -1,50 +1,27 @@ -/** @public */ -export type TLCommandHistoryOptions = Partial<{ - /** - * When true, this command will be squashed with the previous command in the undo / redo stack. - */ - squashing: boolean - /** - * When true, this command will not add anything to the undo / redo stack. Its change will never be undone or redone. - */ - ephemeral: boolean - /** - * When true, adding this this command will not clear out the redo stack. - */ - preservesRedoStack: boolean -}> +import { RecordsDiff, UnknownRecord } from '@tldraw/store' /** @public */ -export type TLHistoryMark = { - type: 'STOP' +export interface TLHistoryMark { + type: 'stop' id: string - onUndo: boolean - onRedo: boolean } /** @public */ -export type TLCommand = { - type: 'command' - data: Data - name: Name +export interface TLHistoryDiff { + type: 'diff' + diff: RecordsDiff +} + +/** @public */ +export type TLHistoryEntry = TLHistoryMark | TLHistoryDiff + +/** @public */ +export interface TLHistoryBatchOptions { /** - * Allows for commands that change state and should be undoable, but are 'inconsequential' and - * should not clear the redo stack. e.g. modifying the set of selected ids. + * How should this change interact with the history stack? + * - record: Add to the undo stack and clear the redo stack + * - record-preserveRedoStack: Add to the undo stack but do not clear the redo stack + * - ignore: Do not add to the undo stack or the redo stack */ - preservesRedoStack?: boolean -} - -/** @public */ -export type TLHistoryEntry = TLHistoryMark | TLCommand - -/** @public */ -export type TLCommandHandler = { - do: (data: Data) => void - undo: (data: Data) => void - redo?: (data: Data) => void - /** - * Allow to combine the next command with the previous one if possible. Useful for, e.g. combining - * a series of shape translation commands into one command in the undo stack - */ - squash?: (prevData: Data, nextData: Data) => Data + history?: 'record' | 'record-preserveRedoStack' | 'ignore' } diff --git a/packages/store/api-report.md b/packages/store/api-report.md index 3d125a866..cd2ba6928 100644 --- a/packages/store/api-report.md +++ b/packages/store/api-report.md @@ -33,6 +33,9 @@ export type ComputedCache = { get(id: IdOf): Data | undefined; }; +// @internal (undocumented) +export function createEmptyRecordsDiff(): RecordsDiff; + // @public export function createMigrationIds>(sequenceId: ID, versions: Versions): { [K in keyof Versions]: `${ID}/${Versions[K]}`; @@ -58,6 +61,9 @@ export function createRecordMigrationSequence(opts: { // @public export function createRecordType(typeName: R['typeName'], config: { + ephemeralKeys?: { + readonly [K in Exclude]: boolean; + }; scope: RecordScope; validator?: StoreValidator; }): RecordType>; @@ -98,6 +104,9 @@ export class IncrementalSetConstructor { remove(item: T): void; } +// @internal +export function isRecordsDiffEmpty(diff: RecordsDiff): boolean; + // @public (undocumented) export type LegacyMigration = { down: (newState: After) => Before; @@ -187,6 +196,9 @@ export class RecordType Exclude, RequiredProperties>; + readonly ephemeralKeys?: { + readonly [K in Exclude]: boolean; + }; readonly scope?: RecordScope; readonly validator?: StoreValidator; }); @@ -197,6 +209,12 @@ export class RecordType Exclude, RequiredProperties>; createId(customUniquePart?: string): IdOf; + // (undocumented) + readonly ephemeralKeys?: { + readonly [K in Exclude]: boolean; + }; + // (undocumented) + readonly ephemeralKeySet: ReadonlySet; isId(id?: string): id is IdOf; isInstance: (record?: UnknownRecord) => record is R; parseId(id: IdOf): string; @@ -244,22 +262,32 @@ export type SerializedStore = Record, R>; // @public export function squashRecordDiffs(diffs: RecordsDiff[]): RecordsDiff; +// @internal +export function squashRecordDiffsMutable(target: RecordsDiff, diffs: RecordsDiff[]): void; + // @public export class Store { constructor(config: { schema: StoreSchema; initialData?: SerializedStore; + id?: string; props: Props; }); + // @internal (undocumented) + addHistoryInterceptor(fn: (entry: HistoryEntry, source: ChangeSource) => void): () => void; allRecords: () => R[]; // (undocumented) - applyDiff(diff: RecordsDiff, runCallbacks?: boolean): void; + applyDiff(diff: RecordsDiff, { runCallbacks, ignoreEphemeralKeys, }?: { + ignoreEphemeralKeys?: boolean; + runCallbacks?: boolean; + }): void; + // @internal (undocumented) + atomic(fn: () => T, runCallbacks?: boolean): T; clear: () => void; createComputedCache: (name: string, derive: (record: V) => T | undefined, isEqual?: ((a: V, b: V) => boolean) | undefined) => ComputedCache; createSelectedComputedCache: (name: string, selector: (record: V) => T | undefined, derive: (input: T) => J | undefined) => ComputedCache; // @internal (undocumented) ensureStoreIsUsable(): void; - // (undocumented) extractingChanges(fn: () => void): RecordsDiff; filterChangesByScope(change: RecordsDiff, scope: RecordScope): { added: { [K in IdOf]: R; }; @@ -269,8 +297,6 @@ export class Store { // (undocumented) _flushHistory(): void; get: >(id: K) => RecFromId | undefined; - // (undocumented) - getRecordType: (record: R) => T; getSnapshot(scope?: 'all' | RecordScope): StoreSnapshot; has: >(id: K) => boolean; readonly history: Atom>; @@ -331,6 +357,8 @@ export class StoreSchema { createIntegrityChecker(store: Store): (() => void) | undefined; // (undocumented) getMigrationsSince(persistedSchema: SerializedSchema): Result; + // @internal (undocumented) + getType(typeName: string): RecordType; // (undocumented) migratePersistedRecord(record: R, persistedSchema: SerializedSchema, direction?: 'down' | 'up'): MigrationResult; // (undocumented) diff --git a/packages/store/src/index.ts b/packages/store/src/index.ts index e773ecd73..2216ec4d7 100644 --- a/packages/store/src/index.ts +++ b/packages/store/src/index.ts @@ -1,12 +1,19 @@ export type { BaseRecord, IdOf, RecordId, UnknownRecord } from './lib/BaseRecord' export { IncrementalSetConstructor } from './lib/IncrementalSetConstructor' export { RecordType, assertIdType, createRecordType } from './lib/RecordType' -export { Store, reverseRecordsDiff, squashRecordDiffs } from './lib/Store' +export { + createEmptyRecordsDiff, + isRecordsDiffEmpty, + reverseRecordsDiff, + squashRecordDiffs, + squashRecordDiffsMutable, + type RecordsDiff, +} from './lib/RecordsDiff' +export { Store } from './lib/Store' export type { CollectionDiff, ComputedCache, HistoryEntry, - RecordsDiff, SerializedStore, StoreError, StoreListener, diff --git a/packages/store/src/lib/RecordType.ts b/packages/store/src/lib/RecordType.ts index 40d568c00..9fd0dea7e 100644 --- a/packages/store/src/lib/RecordType.ts +++ b/packages/store/src/lib/RecordType.ts @@ -1,4 +1,4 @@ -import { structuredClone } from '@tldraw/utils' +import { objectMapEntries, structuredClone } from '@tldraw/utils' import { nanoid } from 'nanoid' import { IdOf, OmitMeta, UnknownRecord } from './BaseRecord' import { StoreValidator } from './Store' @@ -28,7 +28,8 @@ export class RecordType< > { readonly createDefaultProperties: () => Exclude, RequiredProperties> readonly validator: StoreValidator - + readonly ephemeralKeys?: { readonly [K in Exclude]: boolean } + readonly ephemeralKeySet: ReadonlySet readonly scope: RecordScope constructor( @@ -43,11 +44,21 @@ export class RecordType< readonly createDefaultProperties: () => Exclude, RequiredProperties> readonly validator?: StoreValidator readonly scope?: RecordScope + readonly ephemeralKeys?: { readonly [K in Exclude]: boolean } } ) { this.createDefaultProperties = config.createDefaultProperties this.validator = config.validator ?? { validate: (r: unknown) => r as R } this.scope = config.scope ?? 'document' + this.ephemeralKeys = config.ephemeralKeys + + const ephemeralKeySet = new Set() + if (config.ephemeralKeys) { + for (const [key, isEphemeral] of objectMapEntries(config.ephemeralKeys)) { + if (isEphemeral) ephemeralKeySet.add(key) + } + } + this.ephemeralKeySet = ephemeralKeySet } /** @@ -186,6 +197,7 @@ export class RecordType< createDefaultProperties: createDefaultProperties as any, validator: this.validator, scope: this.scope, + ephemeralKeys: this.ephemeralKeys, }) } @@ -218,12 +230,14 @@ export function createRecordType( config: { validator?: StoreValidator scope: RecordScope + ephemeralKeys?: { readonly [K in Exclude]: boolean } } ): RecordType> { return new RecordType>(typeName, { createDefaultProperties: () => ({}) as any, validator: config.validator, scope: config.scope, + ephemeralKeys: config.ephemeralKeys, }) } diff --git a/packages/store/src/lib/RecordsDiff.ts b/packages/store/src/lib/RecordsDiff.ts new file mode 100644 index 000000000..bf4834ae3 --- /dev/null +++ b/packages/store/src/lib/RecordsDiff.ts @@ -0,0 +1,107 @@ +import { objectMapEntries } from '@tldraw/utils' +import { IdOf, UnknownRecord } from './BaseRecord' + +/** + * A diff describing the changes to a record. + * + * @public + */ +export type RecordsDiff = { + added: Record, R> + updated: Record, [from: R, to: R]> + removed: Record, R> +} + +/** @internal */ +export function createEmptyRecordsDiff(): RecordsDiff { + return { added: {}, updated: {}, removed: {} } as RecordsDiff +} + +/** @public */ +export function reverseRecordsDiff(diff: RecordsDiff) { + const result: RecordsDiff = { added: diff.removed, removed: diff.added, updated: {} } + for (const [from, to] of Object.values(diff.updated)) { + result.updated[from.id] = [to, from] + } + return result +} + +/** + * Is a records diff empty? + * @internal + */ +export function isRecordsDiffEmpty(diff: RecordsDiff) { + return ( + Object.keys(diff.added).length === 0 && + Object.keys(diff.updated).length === 0 && + Object.keys(diff.removed).length === 0 + ) +} + +/** + * Squash a collection of diffs into a single diff. + * + * @param diffs - An array of diffs to squash. + * @returns A single diff that represents the squashed diffs. + * @public + */ +export function squashRecordDiffs( + diffs: RecordsDiff[] +): RecordsDiff { + const result = { added: {}, removed: {}, updated: {} } as RecordsDiff + + squashRecordDiffsMutable(result, diffs) + return result +} + +/** + * Apply the array `diffs` to the `target` diff, mutating it in-place. + * @internal + */ +export function squashRecordDiffsMutable( + target: RecordsDiff, + diffs: RecordsDiff[] +): void { + for (const diff of diffs) { + for (const [id, value] of objectMapEntries(diff.added)) { + if (target.removed[id]) { + const original = target.removed[id] + delete target.removed[id] + if (original !== value) { + target.updated[id] = [original, value] + } + } else { + target.added[id] = value + } + } + + for (const [id, [_from, to]] of objectMapEntries(diff.updated)) { + if (target.added[id]) { + target.added[id] = to + delete target.updated[id] + delete target.removed[id] + continue + } + if (target.updated[id]) { + target.updated[id] = [target.updated[id][0], to] + delete target.removed[id] + continue + } + + target.updated[id] = diff.updated[id] + delete target.removed[id] + } + + for (const [id, value] of objectMapEntries(diff.removed)) { + // the same record was added in this diff sequence, just drop it + if (target.added[id]) { + delete target.added[id] + } else if (target.updated[id]) { + target.removed[id] = target.updated[id][0] + delete target.updated[id] + } else { + target.removed[id] = value + } + } + } +} diff --git a/packages/store/src/lib/Store.ts b/packages/store/src/lib/Store.ts index 5ce958f3f..e718ab002 100644 --- a/packages/store/src/lib/Store.ts +++ b/packages/store/src/lib/Store.ts @@ -1,6 +1,8 @@ import { Atom, Computed, Reactor, atom, computed, reactor, transact } from '@tldraw/state' import { + assert, filterEntries, + getOwnProperty, objectMapEntries, objectMapFromEntries, objectMapKeys, @@ -11,23 +13,13 @@ import { nanoid } from 'nanoid' import { IdOf, RecordId, UnknownRecord } from './BaseRecord' import { Cache } from './Cache' import { RecordScope } from './RecordType' +import { RecordsDiff, squashRecordDiffs } from './RecordsDiff' import { StoreQueries } from './StoreQueries' import { SerializedSchema, StoreSchema } from './StoreSchema' import { devFreeze } from './devFreeze' type RecFromId> = K extends RecordId ? R : never -/** - * A diff describing the changes to a record. - * - * @public - */ -export type RecordsDiff = { - added: Record, R> - updated: Record, [from: R, to: R]> - removed: Record, R> -} - /** * A diff describing the changes to a collection. * @@ -113,7 +105,7 @@ export class Store { /** * The random id of the store. */ - public readonly id = nanoid() + public readonly id: string /** * An atom containing the store's atoms. * @@ -169,6 +161,7 @@ export class Store { public readonly scopedTypes: { readonly [K in RecordScope]: ReadonlySet } constructor(config: { + id?: string /** The store's initial data. */ initialData?: SerializedStore /** @@ -178,8 +171,9 @@ export class Store { schema: StoreSchema props: Props }) { - const { initialData, schema } = config + const { initialData, schema, id } = config + this.id = id ?? nanoid() this.schema = schema this.props = config.props @@ -357,7 +351,7 @@ export class Store { * @public */ put = (records: R[], phaseOverride?: 'initialize'): void => { - transact(() => { + this.atomic(() => { const updates: Record, [from: R, to: R]> = {} const additions: Record, R> = {} @@ -402,7 +396,9 @@ export class Store { recordAtom.set(devFreeze(record)) didChange = true - updates[record.id] = [initialValue, recordAtom.__unsafe__getWithoutCapture()] + const updated = recordAtom.__unsafe__getWithoutCapture() + updates[record.id] = [initialValue, updated] + this.addDiffForAfterEvent(initialValue, updated, source) } else { if (beforeCreate) record = beforeCreate(record, source) @@ -420,6 +416,7 @@ export class Store { // Mark the change as a new addition. additions[record.id] = record + this.addDiffForAfterEvent(null, record, source) // Assign the atom to the map under the record's id. if (!map) { @@ -441,24 +438,6 @@ export class Store { updated: updates, removed: {} as Record, R>, }) - - if (this._runCallbacks) { - const { onAfterCreate, onAfterChange } = this - - if (onAfterCreate) { - // Run the onAfterChange callback for addition. - Object.values(additions).forEach((record) => { - onAfterCreate(record, source) - }) - } - - if (onAfterChange) { - // Run the onAfterChange callback for update. - Object.values(updates).forEach(([from, to]) => { - onAfterChange(from, to, source) - }) - } - } }) } @@ -469,7 +448,7 @@ export class Store { * @public */ remove = (ids: IdOf[]): void => { - transact(() => { + this.atomic(() => { const cancelled = [] as IdOf[] const source = this.isMergingRemoteChanges ? 'remote' : 'user' @@ -496,7 +475,9 @@ export class Store { if (!result) result = { ...atoms } if (!removed) removed = {} as Record, R> delete result[id] - removed[id] = atoms[id].get() + const record = atoms[id].get() + removed[id] = record + this.addDiffForAfterEvent(record, null, source) } return result ?? atoms @@ -505,17 +486,6 @@ export class Store { if (!removed) return // Update the history with the removed records. this.updateHistory({ added: {}, updated: {}, removed } as RecordsDiff) - - // If we have an onAfterChange, run it for each removed record. - if (this.onAfterDelete && this._runCallbacks) { - let record: R - for (let i = 0, n = ids.length; i < n; i++) { - record = removed[ids[i]] - if (record) { - this.onAfterDelete(record, source) - } - } - } }) } @@ -620,7 +590,7 @@ export class Store { const prevRunCallbacks = this._runCallbacks try { this._runCallbacks = false - transact(() => { + this.atomic(() => { this.clear() this.put(Object.values(migrationResult.value)) this.ensureStoreIsUsable() @@ -731,9 +701,12 @@ export class Store { } } + /** + * Run `fn` and return a {@link RecordsDiff} of the changes that occurred as a result. + */ extractingChanges(fn: () => void): RecordsDiff { const changes: Array> = [] - const dispose = this.historyAccumulator.intercepting((entry) => changes.push(entry.changes)) + const dispose = this.historyAccumulator.addInterceptor((entry) => changes.push(entry.changes)) try { transact(fn) return squashRecordDiffs(changes) @@ -742,25 +715,47 @@ export class Store { } } - applyDiff(diff: RecordsDiff, runCallbacks = true) { - const prevRunCallbacks = this._runCallbacks - try { - this._runCallbacks = runCallbacks - transact(() => { - const toPut = objectMapValues(diff.added).concat( - objectMapValues(diff.updated).map(([_from, to]) => to) - ) - const toRemove = objectMapKeys(diff.removed) - if (toPut.length) { - this.put(toPut) + applyDiff( + diff: RecordsDiff, + { + runCallbacks = true, + ignoreEphemeralKeys = false, + }: { runCallbacks?: boolean; ignoreEphemeralKeys?: boolean } = {} + ) { + this.atomic(() => { + const toPut = objectMapValues(diff.added) + + for (const [_from, to] of objectMapValues(diff.updated)) { + const type = this.schema.getType(to.typeName) + if (ignoreEphemeralKeys && type.ephemeralKeySet.size) { + const existing = this.get(to.id) + if (!existing) { + toPut.push(to) + continue + } + let changed: R | null = null + for (const [key, value] of Object.entries(to)) { + if (type.ephemeralKeySet.has(key) || Object.is(value, getOwnProperty(existing, key))) { + continue + } + + if (!changed) changed = { ...existing } as R + ;(changed as any)[key] = value + } + if (changed) toPut.push(changed) + } else { + toPut.push(to) } - if (toRemove.length) { - this.remove(toRemove) - } - }) - } finally { - this._runCallbacks = prevRunCallbacks - } + } + + const toRemove = objectMapKeys(diff.removed) + if (toPut.length) { + this.put(toPut) + } + if (toRemove.length) { + this.remove(toRemove) + } + }, runCallbacks) } /** @@ -827,20 +822,14 @@ export class Store { } } - getRecordType = (record: R): T => { - const type = this.schema.types[record.typeName as R['typeName']] - if (!type) { - throw new Error(`Record type ${record.typeName} not found`) - } - return type as unknown as T - } - private _integrityChecker?: () => void | undefined /** @internal */ ensureStoreIsUsable() { - this._integrityChecker ??= this.schema.createIntegrityChecker(this) - this._integrityChecker?.() + this.atomic(() => { + this._integrityChecker ??= this.schema.createIntegrityChecker(this) + this._integrityChecker?.() + }) } private _isPossiblyCorrupted = false @@ -852,64 +841,82 @@ export class Store { isPossiblyCorrupted() { return this._isPossiblyCorrupted } -} -/** - * Squash a collection of diffs into a single diff. - * - * @param diffs - An array of diffs to squash. - * @returns A single diff that represents the squashed diffs. - * @public - */ -export function squashRecordDiffs( - diffs: RecordsDiff[] -): RecordsDiff { - const result = { added: {}, removed: {}, updated: {} } as RecordsDiff + private pendingAfterEvents: Map< + IdOf, + { before: R | null; after: R | null; source: 'remote' | 'user' } + > | null = null + private addDiffForAfterEvent(before: R | null, after: R | null, source: 'remote' | 'user') { + assert(this.pendingAfterEvents, 'must be in event operation') + if (before === after) return + if (before && after) assert(before.id === after.id) + if (!before && !after) return + const id = (before || after)!.id + const existing = this.pendingAfterEvents.get(id) + if (existing) { + assert(existing.source === source, 'source cannot change within a single event operation') + existing.after = after + } else { + this.pendingAfterEvents.set(id, { before, after, source }) + } + } + private flushAtomicCallbacks() { + let updateDepth = 0 + while (this.pendingAfterEvents) { + const events = this.pendingAfterEvents + this.pendingAfterEvents = null - for (const diff of diffs) { - for (const [id, value] of objectMapEntries(diff.added)) { - if (result.removed[id]) { - const original = result.removed[id] - delete result.removed[id] - if (original !== value) { - result.updated[id] = [original, value] + if (!this._runCallbacks) continue + + updateDepth++ + if (updateDepth > 100) { + throw new Error('Maximum store update depth exceeded, bailing out') + } + + for (const { before, after, source } of events.values()) { + if (before && after) { + this.onAfterChange?.(before, after, source) + } else if (before && !after) { + this.onAfterDelete?.(before, source) + } else if (!before && after) { + this.onAfterCreate?.(after, source) } - } else { - result.added[id] = value - } - } - - for (const [id, [_from, to]] of objectMapEntries(diff.updated)) { - if (result.added[id]) { - result.added[id] = to - delete result.updated[id] - delete result.removed[id] - continue - } - if (result.updated[id]) { - result.updated[id] = [result.updated[id][0], to] - delete result.removed[id] - continue - } - - result.updated[id] = diff.updated[id] - delete result.removed[id] - } - - for (const [id, value] of objectMapEntries(diff.removed)) { - // the same record was added in this diff sequence, just drop it - if (result.added[id]) { - delete result.added[id] - } else if (result.updated[id]) { - result.removed[id] = result.updated[id][0] - delete result.updated[id] - } else { - result.removed[id] = value } } } + private _isInAtomicOp = false + /** @internal */ + atomic(fn: () => T, runCallbacks = true): T { + return transact(() => { + if (this._isInAtomicOp) { + if (!this.pendingAfterEvents) this.pendingAfterEvents = new Map() + return fn() + } - return result + this.pendingAfterEvents = new Map() + const prevRunCallbacks = this._runCallbacks + this._runCallbacks = runCallbacks ?? prevRunCallbacks + this._isInAtomicOp = true + try { + const result = fn() + + this.flushAtomicCallbacks() + + return result + } finally { + this.pendingAfterEvents = null + this._runCallbacks = prevRunCallbacks + this._isInAtomicOp = false + } + }) + } + + /** @internal */ + addHistoryInterceptor(fn: (entry: HistoryEntry, source: ChangeSource) => void) { + return this.historyAccumulator.addInterceptor((entry) => + fn(entry, this.isMergingRemoteChanges ? 'remote' : 'user') + ) + } } /** @@ -949,21 +956,12 @@ function squashHistoryEntries( ) } -/** @public */ -export function reverseRecordsDiff(diff: RecordsDiff) { - const result: RecordsDiff = { added: diff.removed, removed: diff.added, updated: {} } - for (const [from, to] of Object.values(diff.updated)) { - result.updated[from.id] = [to, from] - } - return result -} - class HistoryAccumulator { private _history: HistoryEntry[] = [] private _interceptors: Set<(entry: HistoryEntry) => void> = new Set() - intercepting(fn: (entry: HistoryEntry) => void) { + addInterceptor(fn: (entry: HistoryEntry) => void) { this._interceptors.add(fn) return () => { this._interceptors.delete(fn) diff --git a/packages/store/src/lib/StoreQueries.ts b/packages/store/src/lib/StoreQueries.ts index ebfebc218..4a021a752 100644 --- a/packages/store/src/lib/StoreQueries.ts +++ b/packages/store/src/lib/StoreQueries.ts @@ -12,8 +12,9 @@ import isEqual from 'lodash.isequal' import { IdOf, UnknownRecord } from './BaseRecord' import { executeQuery, objectMatchesQuery, QueryExpression } from './executeQuery' import { IncrementalSetConstructor } from './IncrementalSetConstructor' +import { RecordsDiff } from './RecordsDiff' import { diffSets } from './setUtils' -import { CollectionDiff, RecordsDiff } from './Store' +import { CollectionDiff } from './Store' export type RSIndexDiff< R extends UnknownRecord, diff --git a/packages/store/src/lib/StoreSchema.ts b/packages/store/src/lib/StoreSchema.ts index d0cbe70aa..1f6fcdccd 100644 --- a/packages/store/src/lib/StoreSchema.ts +++ b/packages/store/src/lib/StoreSchema.ts @@ -329,4 +329,11 @@ export class StoreSchema { ), } } + + /** @internal */ + getType(typeName: string) { + const type = getOwnProperty(this.types, typeName) + assert(type, 'record type does not exists') + return type + } } diff --git a/packages/store/src/lib/test/recordStore.test.ts b/packages/store/src/lib/test/recordStore.test.ts index aa12b4bcb..6366e840d 100644 --- a/packages/store/src/lib/test/recordStore.test.ts +++ b/packages/store/src/lib/test/recordStore.test.ts @@ -1,8 +1,9 @@ import { Computed, react, RESET_VALUE, transact } from '@tldraw/state' import { BaseRecord, RecordId } from '../BaseRecord' import { createMigrationSequence } from '../migrate' +import { RecordsDiff, reverseRecordsDiff } from '../RecordsDiff' import { createRecordType } from '../RecordType' -import { CollectionDiff, RecordsDiff, Store } from '../Store' +import { CollectionDiff, Store } from '../Store' import { StoreSchema } from '../StoreSchema' interface Book extends BaseRecord<'book', RecordId> { @@ -881,3 +882,270 @@ describe('snapshots', () => { expect(store2.get(Book.createId('lotr'))!.numPages).toBe(42) }) }) + +describe('diffs', () => { + let store: Store + const authorId = Author.createId('tolkein') + const bookId = Book.createId('hobbit') + + beforeEach(() => { + store = new Store({ + props: {}, + schema: StoreSchema.create({ + book: Book, + author: Author, + visit: Visit, + }), + }) + }) + + it('produces diffs from `extractingChanges`', () => { + expect( + store.extractingChanges(() => { + store.put([Author.create({ name: 'J.R.R Tolkein', id: authorId })]) + store.put([ + Book.create({ title: 'The Hobbit', id: bookId, author: authorId, numPages: 300 }), + ]) + }) + ).toMatchInlineSnapshot(` + { + "added": { + "author:tolkein": { + "id": "author:tolkein", + "isPseudonym": false, + "name": "J.R.R Tolkein", + "typeName": "author", + }, + "book:hobbit": { + "author": "author:tolkein", + "id": "book:hobbit", + "numPages": 300, + "title": "The Hobbit", + "typeName": "book", + }, + }, + "removed": {}, + "updated": {}, + } + `) + + expect( + store.extractingChanges(() => { + store.remove([authorId]) + store.update(bookId, (book) => ({ ...book, title: 'The Hobbit: There and Back Again' })) + }) + ).toMatchInlineSnapshot(` + { + "added": {}, + "removed": { + "author:tolkein": { + "id": "author:tolkein", + "isPseudonym": false, + "name": "J.R.R Tolkein", + "typeName": "author", + }, + }, + "updated": { + "book:hobbit": [ + { + "author": "author:tolkein", + "id": "book:hobbit", + "numPages": 300, + "title": "The Hobbit", + "typeName": "book", + }, + { + "author": "author:tolkein", + "id": "book:hobbit", + "numPages": 300, + "title": "The Hobbit: There and Back Again", + "typeName": "book", + }, + ], + }, + } + `) + }) + it('produces diffs from `addHistoryInterceptor`', () => { + const diffs: any[] = [] + const interceptor = jest.fn((diff) => diffs.push(diff)) + store.addHistoryInterceptor(interceptor) + + store.put([ + Author.create({ name: 'J.R.R Tolkein', id: Author.createId('tolkein') }), + Book.create({ title: 'The Hobbit', id: bookId, author: authorId, numPages: 300 }), + ]) + expect(interceptor).toHaveBeenCalledTimes(1) + + store.extractingChanges(() => { + store.remove([authorId]) + + store.update(bookId, (book) => ({ ...book, title: 'The Hobbit: There and Back Again' })) + }) + expect(interceptor).toHaveBeenCalledTimes(3) + + expect(diffs).toMatchInlineSnapshot(` + [ + { + "changes": { + "added": { + "author:tolkein": { + "id": "author:tolkein", + "isPseudonym": false, + "name": "J.R.R Tolkein", + "typeName": "author", + }, + "book:hobbit": { + "author": "author:tolkein", + "id": "book:hobbit", + "numPages": 300, + "title": "The Hobbit", + "typeName": "book", + }, + }, + "removed": {}, + "updated": {}, + }, + "source": "user", + }, + { + "changes": { + "added": {}, + "removed": { + "author:tolkein": { + "id": "author:tolkein", + "isPseudonym": false, + "name": "J.R.R Tolkein", + "typeName": "author", + }, + }, + "updated": {}, + }, + "source": "user", + }, + { + "changes": { + "added": {}, + "removed": {}, + "updated": { + "book:hobbit": [ + { + "author": "author:tolkein", + "id": "book:hobbit", + "numPages": 300, + "title": "The Hobbit", + "typeName": "book", + }, + { + "author": "author:tolkein", + "id": "book:hobbit", + "numPages": 300, + "title": "The Hobbit: There and Back Again", + "typeName": "book", + }, + ], + }, + }, + "source": "user", + }, + ] + `) + }) + + it('can apply and invert diffs', () => { + store.put([ + Author.create({ name: 'J.R.R Tolkein', id: Author.createId('tolkein') }), + Book.create({ title: 'The Hobbit', id: bookId, author: authorId, numPages: 300 }), + ]) + + const checkpoint1 = store.getSnapshot() + + const forwardsDiff = store.extractingChanges(() => { + store.remove([authorId]) + store.update(bookId, (book) => ({ ...book, title: 'The Hobbit: There and Back Again' })) + }) + + const checkpoint2 = store.getSnapshot() + + store.applyDiff(reverseRecordsDiff(forwardsDiff)) + expect(store.getSnapshot()).toEqual(checkpoint1) + + store.applyDiff(forwardsDiff) + expect(store.getSnapshot()).toEqual(checkpoint2) + }) +}) + +describe('after callbacks', () => { + let store: Store + let callbacks: any[] = [] + + const authorId = Author.createId('tolkein') + const bookId = Book.createId('hobbit') + + beforeEach(() => { + store = new Store({ + props: {}, + schema: StoreSchema.create({ + book: Book, + author: Author, + visit: Visit, + }), + }) + + store.onAfterCreate = jest.fn((record) => callbacks.push({ type: 'create', record })) + store.onAfterChange = jest.fn((from, to) => callbacks.push({ type: 'change', from, to })) + store.onAfterDelete = jest.fn((record) => callbacks.push({ type: 'delete', record })) + callbacks = [] + }) + + it('fires callbacks at the end of an `atomic` op', () => { + store.atomic(() => { + expect(callbacks).toHaveLength(0) + + store.put([ + Author.create({ name: 'J.R.R Tolkein', id: authorId }), + Book.create({ title: 'The Hobbit', id: bookId, author: authorId, numPages: 300 }), + ]) + + expect(callbacks).toHaveLength(0) + }) + + expect(callbacks).toMatchObject([ + { type: 'create', record: { id: authorId } }, + { type: 'create', record: { id: bookId } }, + ]) + }) + + it('doesnt fire callback for a record created then deleted', () => { + store.atomic(() => { + store.put([Author.create({ name: 'J.R.R Tolkein', id: authorId })]) + store.remove([authorId]) + }) + expect(callbacks).toHaveLength(0) + }) + + it('bails out if too many callbacks are fired', () => { + let limit = 10 + store.onAfterCreate = (record) => { + if (record.typeName === 'book' && record.numPages < limit) { + store.put([{ ...record, numPages: record.numPages + 1 }]) + } + } + store.onAfterChange = (from, to) => { + if (to.typeName === 'book' && to.numPages < limit) { + store.put([{ ...to, numPages: to.numPages + 1 }]) + } + } + + // this should be fine: + store.put([Book.create({ title: 'The Hobbit', id: bookId, author: authorId, numPages: 0 })]) + expect(store.get(bookId)!.numPages).toBe(limit) + + // if we increase the limit thought, it should crash: + limit = 10000 + store.clear() + expect(() => { + store.put([Book.create({ title: 'The Hobbit', id: bookId, author: authorId, numPages: 0 })]) + }).toThrowErrorMatchingInlineSnapshot(`"Maximum store update depth exceeded, bailing out"`) + }) +}) diff --git a/packages/tldraw/api-report.md b/packages/tldraw/api-report.md index a5a6b46d1..b545a50d5 100644 --- a/packages/tldraw/api-report.md +++ b/packages/tldraw/api-report.md @@ -1814,7 +1814,7 @@ export interface TLUiButtonPickerProps { // (undocumented) items: StyleValuesForUi; // (undocumented) - onValueChange: (style: StyleProp, value: T, squashing: boolean) => void; + onValueChange: (style: StyleProp, value: T) => void; // (undocumented) style: StyleProp; // (undocumented) @@ -2206,6 +2206,8 @@ export interface TLUiInputProps { // (undocumented) onComplete?: (value: string) => void; // (undocumented) + onFocus?: () => void; + // (undocumented) onValueChange?: (value: string) => void; // (undocumented) placeholder?: string; @@ -2332,7 +2334,7 @@ export interface TLUiSliderProps { // (undocumented) label: string; // (undocumented) - onValueChange: (value: number, squashing: boolean) => void; + onValueChange: (value: number) => void; // (undocumented) steps: number; // (undocumented) diff --git a/packages/tldraw/src/lib/shapes/arrow/toolStates/Pointing.ts b/packages/tldraw/src/lib/shapes/arrow/toolStates/Pointing.ts index acd616f76..9e0b9414d 100644 --- a/packages/tldraw/src/lib/shapes/arrow/toolStates/Pointing.ts +++ b/packages/tldraw/src/lib/shapes/arrow/toolStates/Pointing.ts @@ -115,7 +115,7 @@ export class Pointing extends StateNode { if (startTerminal?.type === 'binding') { this.editor.setHintingShapes([startTerminal.boundShapeId]) } - this.editor.updateShapes([change], { squashing: true }) + this.editor.updateShapes([change]) } // Cache the current shape after those changes @@ -152,7 +152,7 @@ export class Pointing extends StateNode { if (endTerminal?.type === 'binding') { this.editor.setHintingShapes([endTerminal.boundShapeId]) } - this.editor.updateShapes([change], { squashing: true }) + this.editor.updateShapes([change]) } } @@ -168,7 +168,7 @@ export class Pointing extends StateNode { }) if (change) { - this.editor.updateShapes([change], { squashing: true }) + this.editor.updateShapes([change]) } } diff --git a/packages/tldraw/src/lib/shapes/draw/toolStates/Drawing.ts b/packages/tldraw/src/lib/shapes/draw/toolStates/Drawing.ts index 8c23577e1..2b049c675 100644 --- a/packages/tldraw/src/lib/shapes/draw/toolStates/Drawing.ts +++ b/packages/tldraw/src/lib/shapes/draw/toolStates/Drawing.ts @@ -370,9 +370,7 @@ export class Drawing extends StateNode { ) } - this.editor.updateShapes([shapePartial], { - squashing: true, - }) + this.editor.updateShapes([shapePartial]) } break } @@ -433,7 +431,7 @@ export class Drawing extends StateNode { ) } - this.editor.updateShapes([shapePartial], { squashing: true }) + this.editor.updateShapes([shapePartial]) } break @@ -574,7 +572,7 @@ export class Drawing extends StateNode { ) } - this.editor.updateShapes([shapePartial], { squashing: true }) + this.editor.updateShapes([shapePartial]) break } @@ -621,7 +619,7 @@ export class Drawing extends StateNode { ) } - this.editor.updateShapes([shapePartial], { squashing: true }) + this.editor.updateShapes([shapePartial]) // Set a maximum length for the lines array; after 200 points, complete the line. if (newPoints.length > 500) { diff --git a/packages/tldraw/src/lib/shapes/frame/components/FrameLabelInput.tsx b/packages/tldraw/src/lib/shapes/frame/components/FrameLabelInput.tsx index 0da28c544..70b5013a6 100644 --- a/packages/tldraw/src/lib/shapes/frame/components/FrameLabelInput.tsx +++ b/packages/tldraw/src/lib/shapes/frame/components/FrameLabelInput.tsx @@ -30,16 +30,13 @@ export const FrameLabelInput = forwardRef< const value = e.currentTarget.value.trim() if (name === value) return - editor.updateShapes( - [ - { - id, - type: 'frame', - props: { name: value }, - }, - ], - { squashing: true } - ) + editor.updateShapes([ + { + id, + type: 'frame', + props: { name: value }, + }, + ]) }, [id, editor] ) @@ -53,16 +50,13 @@ export const FrameLabelInput = forwardRef< const value = e.currentTarget.value if (name === value) return - editor.updateShapes( - [ - { - id, - type: 'frame', - props: { name: value }, - }, - ], - { squashing: true } - ) + editor.updateShapes([ + { + id, + type: 'frame', + props: { name: value }, + }, + ]) }, [id, editor] ) diff --git a/packages/tldraw/src/lib/shapes/note/NoteShapeTool.test.ts b/packages/tldraw/src/lib/shapes/note/NoteShapeTool.test.ts index 03013d2e9..1395e4c99 100644 --- a/packages/tldraw/src/lib/shapes/note/NoteShapeTool.test.ts +++ b/packages/tldraw/src/lib/shapes/note/NoteShapeTool.test.ts @@ -25,7 +25,6 @@ describe(NoteShapeTool, () => { editor.cancel() // leave edit mode - editor.undo() // undoes the selection change editor.undo() expect(editor.getCurrentPageShapes().length).toBe(0) diff --git a/packages/tldraw/src/lib/tools/HandTool/childStates/Pointing.ts b/packages/tldraw/src/lib/tools/HandTool/childStates/Pointing.ts index 0d8390d21..e5746c578 100644 --- a/packages/tldraw/src/lib/tools/HandTool/childStates/Pointing.ts +++ b/packages/tldraw/src/lib/tools/HandTool/childStates/Pointing.ts @@ -5,10 +5,7 @@ export class Pointing extends StateNode { override onEnter = () => { this.editor.stopCameraAnimation() - this.editor.updateInstanceState( - { cursor: { type: 'grabbing', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'grabbing', rotation: 0 }) } override onLongPress: TLEventHandlers['onLongPress'] = () => { diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/Brushing.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/Brushing.ts index 593e3e36c..d44e2186e 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/Brushing.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/Brushing.ts @@ -79,7 +79,7 @@ export class Brushing extends StateNode { } override onCancel?: TLCancelEvent | undefined = (info) => { - this.editor.setSelectedShapes(this.initialSelectedShapeIds, { squashing: true }) + this.editor.setSelectedShapes(this.initialSelectedShapeIds) this.parent.transition('idle', info) } @@ -176,7 +176,7 @@ export class Brushing extends StateNode { const current = editor.getSelectedShapeIds() if (current.length !== results.size || current.some((id) => !results.has(id))) { - editor.setSelectedShapes(Array.from(results), { squashing: true }) + editor.setSelectedShapes(Array.from(results)) } } diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/Crop/children/Idle.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/Crop/children/Idle.ts index 1a3f22fa6..0c1a2493f 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/Crop/children/Idle.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/Crop/children/Idle.ts @@ -6,17 +6,14 @@ export class Idle extends StateNode { static override id = 'idle' override onEnter = () => { - this.editor.updateInstanceState( - { cursor: { type: 'default', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'default', rotation: 0 }) const onlySelectedShape = this.editor.getOnlySelectedShape() // well this fucking sucks. what the fuck. // it's possible for a user to enter cropping, then undo // (which clears the cropping id) but still remain in this state. - this.editor.on('change-history', this.cleanupCroppingState) + this.editor.on('tick', this.cleanupCroppingState) if (onlySelectedShape) { this.editor.mark('crop') @@ -25,12 +22,9 @@ export class Idle extends StateNode { } override onExit: TLExitEventHandler = () => { - this.editor.updateInstanceState( - { cursor: { type: 'default', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'default', rotation: 0 }) - this.editor.off('change-history', this.cleanupCroppingState) + this.editor.off('tick', this.cleanupCroppingState) } override onCancel: TLEventHandlers['onCancel'] = () => { diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.ts index 6d4ad7d85..d51c4a0b7 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.ts @@ -32,10 +32,7 @@ export class TranslatingCrop extends StateNode { } override onExit = () => { - this.editor.updateInstanceState( - { cursor: { type: 'default', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'default', rotation: 0 }) } override onPointerMove = () => { @@ -102,7 +99,7 @@ export class TranslatingCrop extends StateNode { const partial = getTranslateCroppedImageChange(this.editor, shape, delta) if (partial) { - this.editor.updateShapes([partial], { squashing: true }) + this.editor.updateShapes([partial]) } } } diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/Cropping.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/Cropping.ts index a0da7a5ea..c2e327bca 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/Cropping.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/Cropping.ts @@ -65,12 +65,7 @@ export class Cropping extends StateNode { if (!selectedShape) return const cursorType = CursorTypeMap[this.info.handle!] - this.editor.updateInstanceState({ - cursor: { - type: cursorType, - rotation: this.editor.getSelectionRotation(), - }, - }) + this.editor.setCursor({ type: cursorType, rotation: this.editor.getSelectionRotation() }) } private getDefaultCrop = (): TLImageShapeCrop => ({ @@ -201,7 +196,7 @@ export class Cropping extends StateNode { }, } - this.editor.updateShapes([partial], { squashing: true }) + this.editor.updateShapes([partial]) this.updateCursor() } diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx b/packages/tldraw/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx index e6b81d14a..aab15b79d 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx @@ -82,10 +82,7 @@ export class DraggingHandle extends StateNode { this.initialPageRotation = this.initialPageTransform.rotation() this.initialPagePoint = this.editor.inputs.originPagePoint.clone() - this.editor.updateInstanceState( - { cursor: { type: isCreating ? 'cross' : 'grabbing', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: isCreating ? 'cross' : 'grabbing', rotation: 0 }) const handles = this.editor.getShapeHandles(shape)!.sort(sortByIndex) const index = handles.findIndex((h) => h.id === info.handle.id) @@ -196,10 +193,7 @@ export class DraggingHandle extends StateNode { this.editor.setHintingShapes([]) this.editor.snaps.clearIndicators() - this.editor.updateInstanceState( - { cursor: { type: 'default', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'default', rotation: 0 }) } private complete() { @@ -312,7 +306,7 @@ export class DraggingHandle extends StateNode { } if (changes) { - editor.updateShapes([next], { squashing: true }) + editor.updateShapes([next]) } } } diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/Idle.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/Idle.ts index e9d885565..3c9952e03 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/Idle.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/Idle.ts @@ -39,10 +39,7 @@ export class Idle extends StateNode { override onEnter = () => { this.parent.setCurrentToolIdMask(undefined) updateHoveredId(this.editor) - this.editor.updateInstanceState( - { cursor: { type: 'default', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'default', rotation: 0 }) } override onPointerMove: TLEventHandlers['onPointerMove'] = () => { diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingArrowLabel.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingArrowLabel.ts index fd84f09c0..35584682b 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingArrowLabel.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingArrowLabel.ts @@ -62,10 +62,7 @@ export class PointingArrowLabel extends StateNode { override onExit = () => { this.parent.setCurrentToolIdMask(undefined) - this.editor.updateInstanceState( - { cursor: { type: 'default', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'default', rotation: 0 }) } private _labelDragOffset = new Vec(0, 0) @@ -105,10 +102,11 @@ export class PointingArrowLabel extends StateNode { } this.didDrag = true - this.editor.updateShape( - { id: shape.id, type: shape.type, props: { labelPosition: nextLabelPosition } }, - { squashing: true } - ) + this.editor.updateShape({ + id: shape.id, + type: shape.type, + props: { labelPosition: nextLabelPosition }, + }) } override onPointerUp = () => { diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingCropHandle.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingCropHandle.ts index aefbbdc7d..603aaa471 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingCropHandle.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingCropHandle.ts @@ -19,20 +19,12 @@ export class PointingCropHandle extends StateNode { if (!selectedShape) return const cursorType = CursorTypeMap[this.info.handle!] - this.editor.updateInstanceState({ - cursor: { - type: cursorType, - rotation: this.editor.getSelectionRotation(), - }, - }) + this.editor.setCursor({ type: cursorType, rotation: this.editor.getSelectionRotation() }) this.editor.setCroppingShape(selectedShape.id) } override onExit = () => { - this.editor.updateInstanceState( - { cursor: { type: 'default', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'default', rotation: 0 }) this.parent.setCurrentToolIdMask(undefined) } diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingHandle.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingHandle.ts index 239b1a45c..95d5499ee 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingHandle.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingHandle.ts @@ -32,18 +32,12 @@ export class PointingHandle extends StateNode { } } - this.editor.updateInstanceState( - { cursor: { type: 'grabbing', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'grabbing', rotation: 0 }) } override onExit = () => { this.editor.setHintingShapes([]) - this.editor.updateInstanceState( - { cursor: { type: 'default', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'default', rotation: 0 }) } override onPointerUp: TLEventHandlers['onPointerUp'] = () => { diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingResizeHandle.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingResizeHandle.ts index e353d50ea..28e5ee041 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingResizeHandle.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingResizeHandle.ts @@ -34,11 +34,9 @@ export class PointingResizeHandle extends StateNode { private updateCursor() { const selected = this.editor.getSelectedShapes() const cursorType = CursorTypeMap[this.info.handle!] - this.editor.updateInstanceState({ - cursor: { - type: cursorType, - rotation: selected.length === 1 ? this.editor.getSelectionRotation() : 0, - }, + this.editor.setCursor({ + type: cursorType, + rotation: selected.length === 1 ? this.editor.getSelectionRotation() : 0, }) } diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingRotateHandle.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingRotateHandle.ts index 4053a7764..d5d9388c1 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingRotateHandle.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingRotateHandle.ts @@ -11,11 +11,9 @@ export class PointingRotateHandle extends StateNode { private info = {} as PointingRotateHandleInfo private updateCursor() { - this.editor.updateInstanceState({ - cursor: { - type: CursorTypeMap[this.info.handle as RotateCorner], - rotation: this.editor.getSelectionRotation(), - }, + this.editor.setCursor({ + type: CursorTypeMap[this.info.handle as RotateCorner], + rotation: this.editor.getSelectionRotation(), }) } @@ -27,10 +25,7 @@ export class PointingRotateHandle extends StateNode { override onExit = () => { this.parent.setCurrentToolIdMask(undefined) - this.editor.updateInstanceState( - { cursor: { type: 'default', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'default', rotation: 0 }) } override onPointerMove: TLEventHandlers['onPointerMove'] = () => { diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/Resizing.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/Resizing.ts index e07e70741..2c154bb9d 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/Resizing.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/Resizing.ts @@ -61,10 +61,7 @@ export class Resizing extends StateNode { if (isCreating) { this.markId = `creating:${this.editor.getOnlySelectedShape()!.id}` - this.editor.updateInstanceState( - { cursor: { type: 'cross', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'cross', rotation: 0 }) } else { this.markId = 'starting resizing' this.editor.mark(this.markId) @@ -407,10 +404,7 @@ export class Resizing extends StateNode { override onExit = () => { this.parent.setCurrentToolIdMask(undefined) - this.editor.updateInstanceState( - { cursor: { type: 'default', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'default', rotation: 0 }) this.editor.snaps.clearIndicators() } diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/Rotating.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/Rotating.ts index 2c001882a..9a441b850 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/Rotating.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/Rotating.ts @@ -51,11 +51,9 @@ export class Rotating extends StateNode { }) // Update cursor - this.editor.updateInstanceState({ - cursor: { - type: CursorTypeMap[this.info.handle as RotateCorner], - rotation: newSelectionRotation + this.snapshot.initialSelectionRotation, - }, + this.editor.setCursor({ + type: CursorTypeMap[this.info.handle as RotateCorner], + rotation: newSelectionRotation + this.snapshot.initialSelectionRotation, }) } @@ -105,11 +103,9 @@ export class Rotating extends StateNode { }) // Update cursor - this.editor.updateInstanceState({ - cursor: { - type: CursorTypeMap[this.info.handle as RotateCorner], - rotation: newSelectionRotation + this.snapshot.initialSelectionRotation, - }, + this.editor.setCursor({ + type: CursorTypeMap[this.info.handle as RotateCorner], + rotation: newSelectionRotation + this.snapshot.initialSelectionRotation, }) } diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/ScribbleBrushing.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/ScribbleBrushing.ts index 7f9504b42..b55fbb7aa 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/ScribbleBrushing.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/ScribbleBrushing.ts @@ -164,7 +164,7 @@ export class ScribbleBrushing extends StateNode { shiftKey ? [...newlySelectedShapeIds, ...initialSelectedShapeIds] : [...newlySelectedShapeIds] ) if (current.length !== next.size || current.some((id) => !next.has(id))) { - this.editor.setSelectedShapes(Array.from(next), { squashing: true }) + this.editor.setSelectedShapes(Array.from(next)) } } @@ -174,7 +174,7 @@ export class ScribbleBrushing extends StateNode { } private cancel() { - this.editor.setSelectedShapes([...this.initialSelectedShapeIds], { squashing: true }) + this.editor.setSelectedShapes([...this.initialSelectedShapeIds]) this.parent.transition('idle') } } diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/Translating.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/Translating.ts index b6181d55f..04520f284 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/Translating.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/Translating.ts @@ -505,7 +505,6 @@ export function moveShapesToPoint({ y: newLocalPoint.y, } }) - ), - { squashing: true } + ) ) } diff --git a/packages/tldraw/src/lib/tools/ZoomTool/ZoomTool.ts b/packages/tldraw/src/lib/tools/ZoomTool/ZoomTool.ts index 009ff75d8..a9253644f 100644 --- a/packages/tldraw/src/lib/tools/ZoomTool/ZoomTool.ts +++ b/packages/tldraw/src/lib/tools/ZoomTool/ZoomTool.ts @@ -19,10 +19,7 @@ export class ZoomTool extends StateNode { override onExit = () => { this.parent.setCurrentToolIdMask(undefined) - this.editor.updateInstanceState( - { zoomBrush: null, cursor: { type: 'default', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.updateInstanceState({ zoomBrush: null, cursor: { type: 'default', rotation: 0 } }) this.parent.setCurrentToolIdMask(undefined) } @@ -53,15 +50,9 @@ export class ZoomTool extends StateNode { private updateCursor() { if (this.editor.inputs.altKey) { - this.editor.updateInstanceState( - { cursor: { type: 'zoom-out', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'zoom-out', rotation: 0 }) } else { - this.editor.updateInstanceState( - { cursor: { type: 'zoom-in', rotation: 0 } }, - { ephemeral: true } - ) + this.editor.setCursor({ type: 'zoom-in', rotation: 0 }) } } } diff --git a/packages/tldraw/src/lib/ui/components/MobileStylePanel.tsx b/packages/tldraw/src/lib/ui/components/MobileStylePanel.tsx index 30f34cbde..bd53018d9 100644 --- a/packages/tldraw/src/lib/ui/components/MobileStylePanel.tsx +++ b/packages/tldraw/src/lib/ui/components/MobileStylePanel.tsx @@ -37,7 +37,7 @@ export function MobileStylePanel() { const handleStylesOpenChange = useCallback( (isOpen: boolean) => { if (!isOpen) { - editor.updateInstanceState({ isChangingStyle: false }, { ephemeral: true }) + editor.updateInstanceState({ isChangingStyle: false }) } }, [editor] diff --git a/packages/tldraw/src/lib/ui/components/PageMenu/PageItemInput.tsx b/packages/tldraw/src/lib/ui/components/PageMenu/PageItemInput.tsx index 0f7cc48c7..b80aa34e2 100644 --- a/packages/tldraw/src/lib/ui/components/PageMenu/PageItemInput.tsx +++ b/packages/tldraw/src/lib/ui/components/PageMenu/PageItemInput.tsx @@ -15,17 +15,13 @@ export const PageItemInput = function PageItemInput({ const rInput = useRef(null) + const handleFocus = useCallback(() => { + editor.mark('rename page') + }, [editor]) + const handleChange = useCallback( (value: string) => { - editor.renamePage(id, value ? value : 'New Page', { ephemeral: true }) - }, - [editor, id] - ) - - const handleComplete = useCallback( - (value: string) => { - editor.mark('rename page') - editor.renamePage(id, value || 'New Page', { ephemeral: false }) + editor.renamePage(id, value || 'New Page') }, [editor, id] ) @@ -36,8 +32,7 @@ export const PageItemInput = function PageItemInput({ ref={(el) => (rInput.current = el)} defaultValue={name} onValueChange={handleChange} - onComplete={handleComplete} - onCancel={handleComplete} + onFocus={handleFocus} shouldManuallyMaintainScrollPositionWhenFocused autofocus={isCurrentPage} autoselect diff --git a/packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx b/packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx index b6c77140f..10ae96d3b 100644 --- a/packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx +++ b/packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx @@ -21,7 +21,7 @@ export const DefaultStylePanel = memo(function DefaultStylePanel({ const handlePointerOut = useCallback(() => { if (!isMobile) { - editor.updateInstanceState({ isChangingStyle: false }, { ephemeral: true }) + editor.updateInstanceState({ isChangingStyle: false }) } }, [editor, isMobile]) diff --git a/packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx b/packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx index 5d0e4d9ea..ca2d48367 100644 --- a/packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +++ b/packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx @@ -78,13 +78,13 @@ function useStyleChangeCallback() { return React.useMemo( () => - function handleStyleChange(style: StyleProp, value: T, squashing: boolean) { + function handleStyleChange(style: StyleProp, value: T) { editor.batch(() => { if (editor.isIn('select')) { - editor.setStyleForSelectedShapes(style, value, { squashing }) + editor.setStyleForSelectedShapes(style, value) } - editor.setStyleForNextShapes(style, value, { squashing }) - editor.updateInstanceState({ isChangingStyle: true }, { ephemeral: true }) + editor.setStyleForNextShapes(style, value) + editor.updateInstanceState({ isChangingStyle: true }) }) trackEvent('set-style', { source: 'style-panel', id: style.id, value: value as string }) @@ -165,8 +165,8 @@ export function CommonStylePickerSet({ style={DefaultSizeStyle} items={STYLES.size} value={size} - onValueChange={(style, value, squashing) => { - handleValueChange(style, value, squashing) + onValueChange={(style, value) => { + handleValueChange(style, value) const selectedShapeIds = editor.getSelectedShapeIds() if (selectedShapeIds.length > 0) { kickoutOccludedShapes(editor, selectedShapeIds) @@ -333,14 +333,14 @@ export function OpacitySlider() { const msg = useTranslation() const handleOpacityValueChange = React.useCallback( - (value: number, squashing: boolean) => { + (value: number) => { const item = tldrawSupportedOpacities[value] editor.batch(() => { if (editor.isIn('select')) { - editor.setOpacityForSelectedShapes(item, { squashing }) + editor.setOpacityForSelectedShapes(item) } - editor.setOpacityForNextShapes(item, { squashing }) - editor.updateInstanceState({ isChangingStyle: true }, { ephemeral: true }) + editor.setOpacityForNextShapes(item) + editor.updateInstanceState({ isChangingStyle: true }) }) trackEvent('set-style', { source: 'style-panel', id: 'opacity', value }) diff --git a/packages/tldraw/src/lib/ui/components/StylePanel/DoubleDropdownPicker.tsx b/packages/tldraw/src/lib/ui/components/StylePanel/DoubleDropdownPicker.tsx index 18f4a53c2..8a5dff9d6 100644 --- a/packages/tldraw/src/lib/ui/components/StylePanel/DoubleDropdownPicker.tsx +++ b/packages/tldraw/src/lib/ui/components/StylePanel/DoubleDropdownPicker.tsx @@ -24,7 +24,7 @@ interface DoubleDropdownPickerProps { styleB: StyleProp valueA: SharedStyle valueB: SharedStyle - onValueChange: (style: StyleProp, value: T, squashing: boolean) => void + onValueChange: (style: StyleProp, value: T) => void } function _DoubleDropdownPicker({ @@ -88,7 +88,7 @@ function _DoubleDropdownPicker({ onValueChange(styleA, item.value, false)} + onClick={() => onValueChange(styleA, item.value)} title={`${msg(labelA)} — ${msg(`${uiTypeA}-style.${item.value}`)}`} > @@ -124,7 +124,7 @@ function _DoubleDropdownPicker({ type="icon" title={`${msg(labelB)} — ${msg(`${uiTypeB}-style.${item.value}` as TLUiTranslationKey)}`} data-testid={`style.${uiTypeB}.${item.value}`} - onClick={() => onValueChange(styleB, item.value, false)} + onClick={() => onValueChange(styleB, item.value)} > diff --git a/packages/tldraw/src/lib/ui/components/StylePanel/DropdownPicker.tsx b/packages/tldraw/src/lib/ui/components/StylePanel/DropdownPicker.tsx index 675692d55..6f50ab854 100644 --- a/packages/tldraw/src/lib/ui/components/StylePanel/DropdownPicker.tsx +++ b/packages/tldraw/src/lib/ui/components/StylePanel/DropdownPicker.tsx @@ -22,7 +22,7 @@ interface DropdownPickerProps { value: SharedStyle items: StyleValuesForUi type: TLUiButtonProps['type'] - onValueChange: (style: StyleProp, value: T, squashing: boolean) => void + onValueChange: (style: StyleProp, value: T) => void } function _DropdownPicker({ @@ -68,7 +68,7 @@ function _DropdownPicker({ title={msg(`${uiType}-style.${item.value}` as TLUiTranslationKey)} onClick={() => { editor.mark('select style dropdown item') - onValueChange(style, item.value, false) + onValueChange(style, item.value) }} > diff --git a/packages/tldraw/src/lib/ui/components/primitives/TldrawUiButtonPicker.tsx b/packages/tldraw/src/lib/ui/components/primitives/TldrawUiButtonPicker.tsx index bc90bf0b0..a1792463a 100644 --- a/packages/tldraw/src/lib/ui/components/primitives/TldrawUiButtonPicker.tsx +++ b/packages/tldraw/src/lib/ui/components/primitives/TldrawUiButtonPicker.tsx @@ -22,7 +22,7 @@ export interface TLUiButtonPickerProps { value: SharedStyle items: StyleValuesForUi theme: TLDefaultColorTheme - onValueChange: (style: StyleProp, value: T, squashing: boolean) => void + onValueChange: (style: StyleProp, value: T) => void } function _TldrawUiButtonPicker(props: TLUiButtonPickerProps) { @@ -57,14 +57,14 @@ function _TldrawUiButtonPicker(props: TLUiButtonPickerProps if (value.type === 'shared' && value.value === id) return editor.mark('point picker item') - onValueChange(style, id as T, false) + onValueChange(style, id as T) } const handleButtonPointerDown = (e: React.PointerEvent) => { const { id } = e.currentTarget.dataset editor.mark('point picker item') - onValueChange(style, id as T, true) + onValueChange(style, id as T) rPointing.current = true window.addEventListener('pointerup', handlePointerUp) // see TLD-658 @@ -74,14 +74,14 @@ function _TldrawUiButtonPicker(props: TLUiButtonPickerProps if (!rPointing.current) return const { id } = e.currentTarget.dataset - onValueChange(style, id as T, true) + onValueChange(style, id as T) } const handleButtonPointerUp = (e: React.PointerEvent) => { const { id } = e.currentTarget.dataset if (value.type === 'shared' && value.value === id) return - onValueChange(style, id as T, false) + onValueChange(style, id as T) } return { diff --git a/packages/tldraw/src/lib/ui/components/primitives/TldrawUiInput.tsx b/packages/tldraw/src/lib/ui/components/primitives/TldrawUiInput.tsx index 5ba5fe319..20742e06e 100644 --- a/packages/tldraw/src/lib/ui/components/primitives/TldrawUiInput.tsx +++ b/packages/tldraw/src/lib/ui/components/primitives/TldrawUiInput.tsx @@ -21,6 +21,7 @@ export interface TLUiInputProps { onValueChange?: (value: string) => void onCancel?: (value: string) => void onBlur?: (value: string) => void + onFocus?: () => void className?: string /** * Usually on iOS when you focus an input, the browser will adjust the viewport to bring the input @@ -49,6 +50,7 @@ export const TldrawUiInput = React.forwardRef( onComplete, onValueChange, onCancel, + onFocus, onBlur, shouldManuallyMaintainScrollPositionWhenFocused = false, children, @@ -77,8 +79,9 @@ export const TldrawUiInput = React.forwardRef( elm.select() } }) + onFocus?.() }, - [autoselect] + [autoselect, onFocus] ) const handleChange = React.useCallback( diff --git a/packages/tldraw/src/lib/ui/components/primitives/TldrawUiSlider.tsx b/packages/tldraw/src/lib/ui/components/primitives/TldrawUiSlider.tsx index 94b4079db..f9223a2e1 100644 --- a/packages/tldraw/src/lib/ui/components/primitives/TldrawUiSlider.tsx +++ b/packages/tldraw/src/lib/ui/components/primitives/TldrawUiSlider.tsx @@ -10,7 +10,7 @@ export interface TLUiSliderProps { value: number | null label: string title: string - onValueChange: (value: number, squashing: boolean) => void + onValueChange: (value: number) => void 'data-testid'?: string } @@ -22,7 +22,7 @@ export const TldrawUiSlider = memo(function Slider(props: TLUiSliderProps) { const handleValueChange = useCallback( (value: number[]) => { - onValueChange(value[0], true) + onValueChange(value[0]) }, [onValueChange] ) @@ -33,7 +33,7 @@ export const TldrawUiSlider = memo(function Slider(props: TLUiSliderProps) { const handlePointerUp = useCallback(() => { if (!value) return - onValueChange(value, false) + onValueChange(value) }, [value, onValueChange]) return ( diff --git a/packages/tldraw/src/lib/ui/context/actions.tsx b/packages/tldraw/src/lib/ui/context/actions.tsx index 850b44bca..b7dea063a 100644 --- a/packages/tldraw/src/lib/ui/context/actions.tsx +++ b/packages/tldraw/src/lib/ui/context/actions.tsx @@ -1164,12 +1164,9 @@ export function ActionsProvider({ overrides, children }: ActionsProviderProps) { readonlyOk: true, onSelect(source) { trackEvent('toggle-transparent', { source }) - editor.updateInstanceState( - { - exportBackground: !editor.getInstanceState().exportBackground, - }, - { ephemeral: true } - ) + editor.updateInstanceState({ + exportBackground: !editor.getInstanceState().exportBackground, + }) }, checkbox: true, }, @@ -1326,10 +1323,10 @@ export function ActionsProvider({ overrides, children }: ActionsProviderProps) { editor.batch(() => { editor.mark('change-color') if (editor.isIn('select')) { - editor.setStyleForSelectedShapes(style, 'white', { squashing: false }) + editor.setStyleForSelectedShapes(style, 'white') } - editor.setStyleForNextShapes(style, 'white', { squashing: false }) - editor.updateInstanceState({ isChangingStyle: true }, { ephemeral: true }) + editor.setStyleForNextShapes(style, 'white') + editor.updateInstanceState({ isChangingStyle: true }) }) trackEvent('set-style', { source, id: style.id, value: 'white' }) }, diff --git a/packages/tldraw/src/lib/ui/hooks/clipboard/pasteTldrawContent.ts b/packages/tldraw/src/lib/ui/hooks/clipboard/pasteTldrawContent.ts index 80106dd05..c7f6bb238 100644 --- a/packages/tldraw/src/lib/ui/hooks/clipboard/pasteTldrawContent.ts +++ b/packages/tldraw/src/lib/ui/hooks/clipboard/pasteTldrawContent.ts @@ -24,9 +24,9 @@ export function pasteTldrawContent(editor: Editor, clipboard: TLContent, point?: seletionBoundsBefore?.collides(selectedBoundsAfter) ) { // Creates a 'puff' to show a paste has happened. - editor.updateInstanceState({ isChangingStyle: true }, { ephemeral: true }) + editor.updateInstanceState({ isChangingStyle: true }) setTimeout(() => { - editor.updateInstanceState({ isChangingStyle: false }, { ephemeral: true }) + editor.updateInstanceState({ isChangingStyle: false }) }, 150) } } diff --git a/packages/tldraw/src/lib/ui/hooks/usePrint.ts b/packages/tldraw/src/lib/ui/hooks/usePrint.ts index 9728f4e22..a5c8e6cdb 100644 --- a/packages/tldraw/src/lib/ui/hooks/usePrint.ts +++ b/packages/tldraw/src/lib/ui/hooks/usePrint.ts @@ -134,7 +134,7 @@ export function usePrint() { } const afterPrintHandler = () => { - editor.once('change-history', () => { + editor.once('tick', () => { clearElements(el, style) }) } diff --git a/packages/tldraw/src/lib/ui/hooks/useTools.tsx b/packages/tldraw/src/lib/ui/hooks/useTools.tsx index 66fe31b33..fd05a340b 100644 --- a/packages/tldraw/src/lib/ui/hooks/useTools.tsx +++ b/packages/tldraw/src/lib/ui/hooks/useTools.tsx @@ -102,15 +102,7 @@ export function ToolsProvider({ overrides, children }: TLUiToolsProviderProps) { icon: ('geo-' + id) as TLUiIconType, onSelect(source: TLUiEventSource) { editor.batch(() => { - editor.updateInstanceState( - { - stylesForNextShape: { - ...editor.getInstanceState().stylesForNextShape, - [GeoShapeGeoStyle.id]: id, - }, - }, - { ephemeral: true } - ) + editor.setStyleForNextShapes(GeoShapeGeoStyle, id) editor.setCurrentTool('geo') trackEvent('select-tool', { source, id: `geo-${id}` }) }) diff --git a/packages/tldraw/src/test/TldrawEditor.test.tsx b/packages/tldraw/src/test/TldrawEditor.test.tsx index c25ac55e8..1f75a24d8 100644 --- a/packages/tldraw/src/test/TldrawEditor.test.tsx +++ b/packages/tldraw/src/test/TldrawEditor.test.tsx @@ -179,10 +179,7 @@ describe('', () => { expect(editor).toBeTruthy() await act(async () => { - editor.updateInstanceState( - { screenBounds: { x: 0, y: 0, w: 1080, h: 720 } }, - { ephemeral: true, squashing: true } - ) + editor.updateInstanceState({ screenBounds: { x: 0, y: 0, w: 1080, h: 720 } }) }) const id = createShapeId() @@ -299,10 +296,7 @@ describe('Custom shapes', () => { expect(editor).toBeTruthy() await act(async () => { - editor.updateInstanceState( - { screenBounds: { x: 0, y: 0, w: 1080, h: 720 } }, - { ephemeral: true, squashing: true } - ) + editor.updateInstanceState({ screenBounds: { x: 0, y: 0, w: 1080, h: 720 } }) }) expect(editor.shapeUtils.card).toBeTruthy() diff --git a/packages/tldraw/src/test/commands/alignShapes.test.tsx b/packages/tldraw/src/test/commands/alignShapes.test.tsx index 0ec1ec9cd..dbf7a520a 100644 --- a/packages/tldraw/src/test/commands/alignShapes.test.tsx +++ b/packages/tldraw/src/test/commands/alignShapes.test.tsx @@ -23,7 +23,7 @@ describe('when less than two shapes are selected', () => { editor.setSelectedShapes([ids.boxB]) const fn = jest.fn() - editor.on('update', fn) + editor.store.listen(fn) editor.alignShapes(editor.getSelectedShapeIds(), 'top') jest.advanceTimersByTime(1000) expect(fn).not.toHaveBeenCalled() diff --git a/packages/tldraw/src/test/commands/distributeShapes.test.ts b/packages/tldraw/src/test/commands/distributeShapes.test.ts index a6ef19a2f..241678154 100644 --- a/packages/tldraw/src/test/commands/distributeShapes.test.ts +++ b/packages/tldraw/src/test/commands/distributeShapes.test.ts @@ -46,7 +46,7 @@ describe('distributeShapes command', () => { it('does nothing', () => { editor.setSelectedShapes([ids.boxA, ids.boxB]) const fn = jest.fn() - editor.on('change-history', fn) + editor.store.listen(fn) editor.distributeShapes(editor.getSelectedShapeIds(), 'horizontal') jest.advanceTimersByTime(1000) expect(fn).not.toHaveBeenCalled() diff --git a/packages/tldraw/src/test/commands/moveShapesToPage.test.ts b/packages/tldraw/src/test/commands/moveShapesToPage.test.ts index 73d96646d..ed2e4c79e 100644 --- a/packages/tldraw/src/test/commands/moveShapesToPage.test.ts +++ b/packages/tldraw/src/test/commands/moveShapesToPage.test.ts @@ -60,8 +60,9 @@ describe('Editor.moveShapesToPage', () => { it('Adds undo items', () => { editor.history.clear() + expect(editor.history.getNumUndos()).toBe(0) editor.moveShapesToPage([ids.box1], ids.page2) - expect(editor.history.getNumUndos()).toBeGreaterThan(1) + expect(editor.history.getNumUndos()).toBe(1) }) it('Does nothing on an empty ids array', () => { diff --git a/packages/tldraw/src/test/commands/squash.test.ts b/packages/tldraw/src/test/commands/squash.test.ts deleted file mode 100644 index cb4e917de..000000000 --- a/packages/tldraw/src/test/commands/squash.test.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { TestEditor } from '../TestEditor' - -let editor: TestEditor - -beforeEach(() => { - editor = new TestEditor() -}) - -describe('squashing', () => { - editor - - it.todo('squashes') -}) diff --git a/packages/tldraw/src/test/commands/stackShapes.test.ts b/packages/tldraw/src/test/commands/stackShapes.test.ts index 8c2f3e9f6..511258e4e 100644 --- a/packages/tldraw/src/test/commands/stackShapes.test.ts +++ b/packages/tldraw/src/test/commands/stackShapes.test.ts @@ -52,7 +52,7 @@ describe('distributeShapes command', () => { it('does nothing', () => { editor.setSelectedShapes([ids.boxA, ids.boxB]) const fn = jest.fn() - editor.on('change-history', fn) + editor.store.listen(fn) editor.stackShapes(editor.getSelectedShapeIds(), 'horizontal', 0) jest.advanceTimersByTime(1000) expect(fn).not.toHaveBeenCalled() diff --git a/packages/tldraw/src/test/commands/stretch.test.tsx b/packages/tldraw/src/test/commands/stretch.test.tsx index 309dfc174..8397c9a4b 100644 --- a/packages/tldraw/src/test/commands/stretch.test.tsx +++ b/packages/tldraw/src/test/commands/stretch.test.tsx @@ -27,7 +27,7 @@ describe('when less than two shapes are selected', () => { it('does nothing', () => { editor.setSelectedShapes([ids.boxB]) const fn = jest.fn() - editor.on('change-history', fn) + editor.store.listen(fn) editor.stretchShapes(editor.getSelectedShapeIds(), 'horizontal') jest.advanceTimersByTime(1000) diff --git a/packages/tldraw/src/test/testutils/pretty.ts b/packages/tldraw/src/test/testutils/pretty.ts new file mode 100644 index 000000000..f8d9a0cf4 --- /dev/null +++ b/packages/tldraw/src/test/testutils/pretty.ts @@ -0,0 +1,129 @@ +/* eslint-disable no-console */ +import { HistoryManager, RecordsDiff } from '@tldraw/editor' +// eslint-disable-next-line import/no-extraneous-dependencies +import { DiffOptions, diff as jestDiff } from 'jest-diff' +import { inspect } from 'util' + +class Printer { + private _output = '' + private _indent = 0 + + appendLines(str: string) { + const indent = ' '.repeat(this._indent) + this._output += + str + .split('\n') + .map((line) => indent + line) + .join('\n') + '\n' + } + + indent() { + this._indent++ + } + dedent() { + this._indent-- + } + + log(...args: any[]) { + this.appendLines(args.map((arg) => (typeof arg === 'string' ? arg : inspect(arg))).join(' ')) + } + + print() { + console.log(this._output) + } + + get() { + return this._output + } +} + +export function prettyPrintDiff(diff: RecordsDiff, opts?: DiffOptions) { + const before = {} as Record + const after = {} as Record + + for (const added of Object.values(diff.added)) { + after[added.id] = added + } + for (const [from, to] of Object.values(diff.updated)) { + before[from.id] = from + after[to.id] = to + } + for (const removed of Object.values(diff.removed)) { + before[removed.id] = removed + } + + const prettyDiff = jestDiff(after, before, { + aAnnotation: 'After', + bAnnotation: 'Before', + aIndicator: '+', + bIndicator: '-', + ...opts, + }) + + if (prettyDiff?.includes('Compared values have no visual difference.')) { + const p = new Printer() + p.log('Before & after have no visual difference.') + p.log('Diff:') + p.indent() + p.log(diff) + return p.get() + } + + return prettyDiff +} + +export function logHistory(history: HistoryManager) { + const { undos, redos, pendingDiff } = history.debug() + const p = new Printer() + p.log('=== History ===') + p.indent() + + p.log('Pending diff:') + p.indent() + if (pendingDiff.isEmpty) { + p.log('(empty)') + } else { + p.log(prettyPrintDiff(pendingDiff.diff)) + } + p.log('') + p.dedent() + + p.log('Undos:') + p.indent() + if (undos.length === 0) { + p.log('(empty)\n') + } + for (const undo of undos) { + if (!undo) continue + if (undo.type === 'stop') { + p.log('Stop', undo.id) + } else { + p.log('- Diff') + p.indent() + p.log(prettyPrintDiff(undo.diff)) + p.dedent() + } + p.log('') + } + p.dedent() + + p.log('Redos:') + p.indent() + if (redos.length === 0) { + p.log('(empty)\n') + } + for (const redo of redos) { + if (!redo) continue + if (redo.type === 'stop') { + p.log('> Stop', redo.id) + } else { + p.log('- Diff') + p.indent() + p.log(prettyPrintDiff(redo.diff)) + p.dedent() + } + p.log('') + } + + p.print() +} diff --git a/packages/tlschema/src/records/TLInstance.ts b/packages/tlschema/src/records/TLInstance.ts index d01bd16ad..ddf205698 100644 --- a/packages/tlschema/src/records/TLInstance.ts +++ b/packages/tlschema/src/records/TLInstance.ts @@ -27,7 +27,6 @@ export interface TLInstance extends BaseRecord<'instance', TLInstanceId> { currentPageId: TLPageId opacityForNextShape: TLOpacityType stylesForNextShape: Record - // ephemeral followingUserId: string | null highlightedUserIds: string[] brush: BoxModel | null @@ -129,6 +128,38 @@ export function createInstanceRecordType(stylesById: Map('instance', { validator: instanceTypeValidator, scope: 'session', + ephemeralKeys: { + currentPageId: false, + meta: false, + + followingUserId: true, + opacityForNextShape: true, + stylesForNextShape: true, + brush: true, + cursor: true, + scribbles: true, + isFocusMode: true, + isDebugMode: true, + isToolLocked: true, + exportBackground: true, + screenBounds: true, + insets: true, + zoomBrush: true, + isPenMode: true, + isGridMode: true, + chatMessage: true, + isChatting: true, + highlightedUserIds: true, + canMoveCamera: true, + isFocused: true, + devicePixelRatio: true, + isCoarsePointer: true, + isHoveringCanvas: true, + openMenus: true, + isChangingStyle: true, + isReadonly: true, + duplicateProps: true, + }, }).withDefaultProperties( (): Omit => ({ followingUserId: null, diff --git a/packages/tlschema/src/records/TLPageState.ts b/packages/tlschema/src/records/TLPageState.ts index 9599e300f..75e4b204c 100644 --- a/packages/tlschema/src/records/TLPageState.ts +++ b/packages/tlschema/src/records/TLPageState.ts @@ -138,6 +138,18 @@ export const InstancePageStateRecordType = createRecordType { validator: instancePageStateValidator, scope: 'session', + ephemeralKeys: { + pageId: false, + selectedShapeIds: false, + editingShapeId: false, + croppingShapeId: false, + meta: false, + + hintingShapeIds: true, + erasingShapeIds: true, + hoveredShapeId: true, + focusedGroupId: true, + }, } ).withDefaultProperties( (): Omit => ({ diff --git a/packages/tlsync/src/lib/TLSyncClient.ts b/packages/tlsync/src/lib/TLSyncClient.ts index 46b0b99e6..67c4ecde9 100644 --- a/packages/tlsync/src/lib/TLSyncClient.ts +++ b/packages/tlsync/src/lib/TLSyncClient.ts @@ -272,7 +272,9 @@ export class TLSyncClient = Store this.lastServerClock = 0 } // kill all presence state - this.store.remove(Object.keys(this.store.serialize('presence')) as any) + this.store.mergeRemoteChanges(() => { + this.store.remove(Object.keys(this.store.serialize('presence')) as any) + }) this.lastPushedPresenceState = null this.isConnectedToRoom = false this.pendingPushRequests = [] @@ -321,7 +323,7 @@ export class TLSyncClient = Store const wipeAll = event.hydrationType === 'wipe_all' if (!wipeAll) { // if we're only wiping presence data, undo the speculative changes first - this.store.applyDiff(reverseRecordsDiff(stashedChanges), false) + this.store.applyDiff(reverseRecordsDiff(stashedChanges), { runCallbacks: false }) } // now wipe all presence data and, if needed, all document data @@ -336,12 +338,22 @@ export class TLSyncClient = Store // then apply the upstream changes this.applyNetworkDiff({ ...wipeDiff, ...event.diff }, true) + + this.isConnectedToRoom = true + + // now re-apply the speculative changes creating a new push request with the + // appropriate diff + const speculativeChanges = this.store.filterChangesByScope( + this.store.extractingChanges(() => { + this.store.applyDiff(stashedChanges) + }), + 'document' + ) + if (speculativeChanges) this.push(speculativeChanges) }) - // now re-apply the speculative changes as a 'user' to trigger - // creating a new push request with the appropriate diff - this.isConnectedToRoom = true - this.store.applyDiff(stashedChanges) + // this.isConnectedToRoom = true + // this.store.applyDiff(stashedChanges, false) this.store.ensureStoreIsUsable() // TODO: reinstate isNew @@ -525,7 +537,7 @@ export class TLSyncClient = Store } } if (hasChanges) { - this.store.applyDiff(changes, runCallbacks) + this.store.applyDiff(changes, { runCallbacks }) } } @@ -541,7 +553,7 @@ export class TLSyncClient = Store try { this.store.mergeRemoteChanges(() => { // first undo speculative changes - this.store.applyDiff(reverseRecordsDiff(this.speculativeChanges), false) + this.store.applyDiff(reverseRecordsDiff(this.speculativeChanges), { runCallbacks: false }) // then apply network diffs on top of known-to-be-synced data for (const diff of diffs) { diff --git a/packages/tlsync/src/test/syncFuzz.test.ts b/packages/tlsync/src/test/syncFuzz.test.ts index 4974bc558..0a51ffcac 100644 --- a/packages/tlsync/src/test/syncFuzz.test.ts +++ b/packages/tlsync/src/test/syncFuzz.test.ts @@ -1,4 +1,3 @@ -import isEqual from 'lodash.isequal' import { nanoid } from 'nanoid' import { Editor, @@ -8,7 +7,9 @@ import { computed, createPresenceStateDerivation, createTLStore, + isRecordsDiffEmpty, } from 'tldraw' +import { prettyPrintDiff } from '../../../tldraw/src/test/testutils/pretty' import { TLSyncClient } from '../lib/TLSyncClient' import { schema } from '../lib/schema' import { FuzzEditor, Op } from './FuzzEditor' @@ -74,8 +75,8 @@ class FuzzTestInstance extends RandomSource { ) { super(seed) - this.store = createTLStore({ schema }) this.id = nanoid() + this.store = createTLStore({ schema, id: this.id }) this.socketPair = new TestSocketPair(this.id, server) this.client = new TLSyncClient({ store: this.store, @@ -105,6 +106,13 @@ class FuzzTestInstance extends RandomSource { } } +function assertPeerStoreIsUsable(peer: FuzzTestInstance) { + const diffToEnsureUsable = peer.store.extractingChanges(() => peer.store.ensureStoreIsUsable()) + if (!isRecordsDiffEmpty(diffToEnsureUsable)) { + throw new Error(`store of ${peer.id} was not usable\n${prettyPrintDiff(diffToEnsureUsable)}`) + } +} + let totalNumShapes = 0 let totalNumPages = 0 @@ -173,6 +181,7 @@ function runTest(seed: number) { allOk('before applyOp') peer.editor.applyOp(op) + assertPeerStoreIsUsable(peer) allOk('after applyOp') server.flushDebouncingMessages() @@ -210,6 +219,7 @@ function runTest(seed: number) { if (!peer.socketPair.isConnected && peer.randomInt(2) === 0) { peer.socketPair.connect() allOk('final connect') + assertPeerStoreIsUsable(peer) } } } @@ -223,33 +233,29 @@ function runTest(seed: number) { allOk('final flushServer') peer.socketPair.flushClientSentEvents() allOk('final flushClient') + assertPeerStoreIsUsable(peer) } } } - const equalityResults = [] - for (let i = 0; i < peers.length; i++) { - const row = [] - for (let j = 0; j < peers.length; j++) { - row.push( - isEqual( - peers[i].editor?.store.serialize('document'), - peers[j].editor?.store.serialize('document') - ) - ) - } - equalityResults.push(row) + // peers should all be usable without changes: + for (const peer of peers) { + assertPeerStoreIsUsable(peer) } - const [first, ...rest] = peers.map((peer) => peer.editor?.store.serialize('document')) + // all stores should be the same + for (let i = 1; i < peers.length; i++) { + const expected = peers[i - 1] + const actual = peers[i] + try { + expect(actual.store.serialize('document')).toEqual(expected.store.serialize('document')) + } catch (e: any) { + throw new Error(`received = ${actual.id}, expected = ${expected.id}\n${e.message}`) + } + } - // writeFileSync(`./test-results.${seed}.json`, JSON.stringify(ops, null, '\t')) - - expect(first).toEqual(rest[0]) - // all snapshots should be the same - expect(rest.every((other) => isEqual(other, first))).toBe(true) - totalNumPages += Object.values(first!).filter((v) => v.typeName === 'page').length - totalNumShapes += Object.values(first!).filter((v) => v.typeName === 'shape').length + totalNumPages += peers[0].store.query.ids('page').get().size + totalNumShapes += peers[0].store.query.ids('shape').get().size } catch (e) { console.error('seed', seed) console.error( @@ -269,21 +275,25 @@ const NUM_TESTS = 50 const NUM_OPS_PER_TEST = 100 const MAX_PEERS = 4 -// test.only('seed 8343632005032947', () => { -// runTest(8343632005032947) -// }) - -test('fuzzzzz', () => { - for (let i = 0; i < NUM_TESTS; i++) { - const seed = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER) - try { - runTest(seed) - } catch (e) { - console.error('seed', seed) - throw e - } - } +test('seed 8360926944486245 - undo/redo page integrity regression', () => { + runTest(8360926944486245) }) +test('seed 3467175630814895 - undo/redo page integrity regression', () => { + runTest(3467175630814895) +}) +test('seed 6820615056006575 - undo/redo page integrity regression', () => { + runTest(6820615056006575) +}) +test('seed 5279266392988747 - undo/redo page integrity regression', () => { + runTest(5279266392988747) +}) + +for (let i = 0; i < NUM_TESTS; i++) { + const seed = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER) + test(`seed ${seed}`, () => { + runTest(seed) + }) +} test('totalNumPages', () => { expect(totalNumPages).not.toBe(0) From 4c5abe888c1b350b313ae22a3d18a17e856c154c Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 25 Apr 2024 13:45:36 +0100 Subject: [PATCH 05/15] Revert "[signia] Smart dirty checking of active computeds (#3516)" (#3612) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 741ed00bda22f3b445f5996a40ce4bd54a629cc6. This was causing a bug with computed's not getting invalidated correctly. To reproduce: - Draw a rectangle - Hold alt to drag out a duplicate - Delete the duplicate We'd then get errors and sometimes a crash where the indicator continued trying to render a now-deleted shape. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `bugfix` — Bug fix --- packages/state/src/lib/core/Computed.ts | 13 +++---------- packages/state/src/lib/core/transactions.ts | 4 ---- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/packages/state/src/lib/core/Computed.ts b/packages/state/src/lib/core/Computed.ts index 2d82490d6..290f8c97d 100644 --- a/packages/state/src/lib/core/Computed.ts +++ b/packages/state/src/lib/core/Computed.ts @@ -4,7 +4,7 @@ import { HistoryBuffer } from './HistoryBuffer' import { maybeCaptureParent, startCapturingParents, stopCapturingParents } from './capture' import { GLOBAL_START_EPOCH } from './constants' import { EMPTY_ARRAY, equals, haveParentsChanged, singleton } from './helpers' -import { getGlobalEpoch, getIsReacting } from './transactions' +import { getGlobalEpoch } from './transactions' import { Child, ComputeDiff, RESET_VALUE, Signal } from './types' import { logComputedGetterWarning } from './warnings' @@ -189,15 +189,8 @@ class __UNSAFE__Computed implements Computed __unsafe__getWithoutCapture(ignoreErrors?: boolean): Value { const isNew = this.lastChangedEpoch === GLOBAL_START_EPOCH - const globalEpoch = getGlobalEpoch() - - if ( - !isNew && - (this.lastCheckedEpoch === globalEpoch || - (this.isActivelyListening && getIsReacting() && this.lastTraversedEpoch < globalEpoch) || - !haveParentsChanged(this)) - ) { - this.lastCheckedEpoch = globalEpoch + if (!isNew && (this.lastCheckedEpoch === getGlobalEpoch() || !haveParentsChanged(this))) { + this.lastCheckedEpoch = getGlobalEpoch() if (this.error) { if (!ignoreErrors) { throw this.error.thrownValue diff --git a/packages/state/src/lib/core/transactions.ts b/packages/state/src/lib/core/transactions.ts index 0e3672eee..afb92d7d1 100644 --- a/packages/state/src/lib/core/transactions.ts +++ b/packages/state/src/lib/core/transactions.ts @@ -70,10 +70,6 @@ export function getGlobalEpoch() { return inst.globalEpoch } -export function getIsReacting() { - return inst.globalIsReacting -} - /** * Collect all of the reactors that need to run for an atom and run them. * From 15dd56a75ec222165034fc3020015f22838c20ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mitja=20Bezen=C5=A1ek?= Date: Thu, 25 Apr 2024 16:10:40 +0200 Subject: [PATCH 06/15] Readonly / room creation omnibus (#3192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reworks how the readonly urls work. Till now we just used a simple function that would scramble the slugs. Now we use a proper key value mapping between regular and readonly slugs: - We use two KV stores. One is for going from a slug to a readonly slug and the other one for going the other way around. They are populated at the same time. - We separate preview KV stores (dev, preview, staging) from production one. I've already created these on Cloudflare. [My understanding is ](https://developers.cloudflare.com/kv/reference/data-security/#encryption-at-rest)that ids [can be public](https://community.cloudflare.com/t/is-it-safe-to-keep-kv-ids-in-a-public-git-repo/517387/4) since we can only access KV from our worker. Happy to move them to env variables though. - [x] Disable creating new rooms when tldraw is embedded inside iframes on other websites (we check the referrer and if it's not the same as the iframe's origin we don't allow it) - [x] Fork a project when inside an iframe now opens the forked project on tldraw.com and not inside iframe. - [x] We allow embeding of iframes, but we now track the where they are used via the referrer. We send this to Vercel analytics. - [x] Improved UX of the share menu to make it less confusing. Toggle is gone. - [x] `/new` and `/r` routes not redirect to `/`. - [x] This introduces a new `/ro` route for readonly rooms. Legacy rooms still live on `/v`. - [x] Brought back `dotcom-shared` project to share code between BE and FE. Mostly types. - [x] Prevent creating of rooms by entering `/r/non-existing-slug`. - [x] Handle getting a readonly slug for old rooms. Added a comment about it [here](https://github.com/tldraw/tldraw/pull/3192/files#diff-c0954b3dc71bb7097c39656441175f3238ed60cf5cee64077c06e21da82182cbR17-R18). - [x] We no longer expose editor on the window object for readonly rooms. Prevents the users disabling readonly rooms manually. ### Change Type - [ ] `sdk` — Changes the tldraw SDK - [x] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [x] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Make sure old readonly rooms still work. 2. Creating a readonly link from an existing room should still use `/v` path. 3. Newly created rooms should use `/ro` path for readonly rooms. Make sure these work as well. 4. `/r` room was disabled and redirects to `/` 5. `/new` should still work when not inside iframes. - [x] Unit Tests - [ ] End to end tests ### Release Notes 1. This adds new functionality for readonly rooms: - We have a new route `/ro` for newly created readonly rooms. These rooms no longer use the scrambling logic to create readonly slugs. Instead we now use KV storage from cloudflare to track the mapping for slugs -> readonly slug and readonly slug -> slug. - The old route `/v` is preserved, so that the old room still work as they did before. - For old rooms we will keep on generating the old readonly slugs, but for new rooms we'll start using the new logic. 2. We no longer prevent embedding of tldraw inside iframes. 3. We do prevent generating new rooms from inside the iframes though. `/r`, `/new`, `/r/non-existing-id` should not allow creation of new rooms inside iframes. Only `/new` still works when not inside iframes. 4. Forking a project from inside an iframe now opens it on tldraw.com 5. Slight copy change on the sharing menu. We no longer have a toggle between readonly and non-readonly links. 6. `editor` and `app` are no longer exposed on the window object for readonly rooms. Prevents users from using the `updateInstanceState` to escape readonly rooms. --------- Co-authored-by: Mime Čuvalo --- apps/dotcom-worker/package.json | 1 + .../src/lib/TLDrawDurableObject.ts | 34 +- .../src/lib/routes/createRoom.ts | 21 +- .../src/lib/routes/createRoomSnapshot.ts | 9 +- .../src/lib/routes/getReadonlySlug.ts | 30 + .../src/lib/routes/joinExistingRoom.ts | 11 +- apps/dotcom-worker/src/lib/types.ts | 3 + .../src/lib/utils/roomOpenMode.ts | 17 + apps/dotcom-worker/src/lib/worker.ts | 9 +- apps/dotcom-worker/tsconfig.json | 3 + apps/dotcom-worker/wrangler.toml | 33 + apps/dotcom/package.json | 1 + apps/dotcom/scripts/build.ts | 5 +- .../src/__snapshots__/routes.test.tsx.snap | 4 + .../src/components/ErrorPage/ErrorPage.tsx | 7 +- .../dotcom/src/components/IFrameProtector.tsx | 65 +- .../src/components/MultiplayerEditor.tsx | 28 +- apps/dotcom/src/components/ShareMenu.tsx | 146 +- .../src/components/StoreErrorScreen.tsx | 17 +- apps/dotcom/src/hooks/useRemoteSyncClient.ts | 18 +- apps/dotcom/src/pages/history-snapshot.tsx | 5 +- apps/dotcom/src/pages/history.tsx | 5 +- apps/dotcom/src/pages/new.tsx | 40 + apps/dotcom/src/pages/not-found.tsx | 1 - apps/dotcom/src/pages/public-multiplayer.tsx | 7 +- .../src/pages/public-readonly-legacy.tsx | 14 + apps/dotcom/src/pages/public-readonly.tsx | 7 +- apps/dotcom/src/pages/public-snapshot.tsx | 4 +- apps/dotcom/src/pages/root.tsx | 4 +- apps/dotcom/src/routes.tsx | 22 +- apps/dotcom/src/utils/iFrame.ts | 16 + .../ClientWebSocketAdapter.test.ts | 21 +- .../remote-sync/ClientWebSocketAdapter.ts | 20 +- apps/dotcom/src/utils/sharing.ts | 70 +- apps/dotcom/styles/core.css | 1 + apps/dotcom/tsconfig.json | 3 + assets/icons/icon/clipboard-copied.svg | 2 +- assets/translations/main.json | 3 +- packages/dotcom-shared/package.json | 26 + packages/dotcom-shared/src/index.test.ts | 3 + packages/dotcom-shared/src/index.ts | 8 + packages/dotcom-shared/src/routes.ts | 14 + packages/dotcom-shared/src/types.ts | 29 + packages/dotcom-shared/tsconfig.json | 14 + packages/tldraw/api-report.md | 2 +- packages/tldraw/api/api.json | 29539 ++++++++++++++++ .../useTranslation/TLUiTranslationKey.ts | 1 + .../useTranslation/defaultTranslation.ts | 4 +- packages/tlsync/src/index.ts | 8 +- packages/tlsync/src/lib/TLServer.ts | 41 +- packages/tlsync/src/lib/TLSyncClient.ts | 12 + packages/tlsync/src/lib/protocol.ts | 1 + packages/tlsync/src/test/TLServer.test.ts | 41 +- yarn.lock | 13 + 54 files changed, 30236 insertions(+), 227 deletions(-) create mode 100644 apps/dotcom-worker/src/lib/routes/getReadonlySlug.ts create mode 100644 apps/dotcom-worker/src/lib/utils/roomOpenMode.ts create mode 100644 apps/dotcom/src/pages/new.tsx create mode 100644 apps/dotcom/src/pages/public-readonly-legacy.tsx create mode 100644 apps/dotcom/src/utils/iFrame.ts create mode 100644 packages/dotcom-shared/package.json create mode 100644 packages/dotcom-shared/src/index.test.ts create mode 100644 packages/dotcom-shared/src/index.ts create mode 100644 packages/dotcom-shared/src/routes.ts create mode 100644 packages/dotcom-shared/src/types.ts create mode 100644 packages/dotcom-shared/tsconfig.json create mode 100644 packages/tldraw/api/api.json diff --git a/apps/dotcom-worker/package.json b/apps/dotcom-worker/package.json index 9e71e78d4..b137d976f 100644 --- a/apps/dotcom-worker/package.json +++ b/apps/dotcom-worker/package.json @@ -23,6 +23,7 @@ "dependencies": { "@supabase/auth-helpers-remix": "^0.2.2", "@supabase/supabase-js": "^2.33.2", + "@tldraw/dotcom-shared": "workspace:*", "@tldraw/store": "workspace:*", "@tldraw/tlschema": "workspace:*", "@tldraw/tlsync": "workspace:*", diff --git a/apps/dotcom-worker/src/lib/TLDrawDurableObject.ts b/apps/dotcom-worker/src/lib/TLDrawDurableObject.ts index ed6a37d8e..4746320dc 100644 --- a/apps/dotcom-worker/src/lib/TLDrawDurableObject.ts +++ b/apps/dotcom-worker/src/lib/TLDrawDurableObject.ts @@ -2,8 +2,11 @@ /// import { SupabaseClient } from '@supabase/supabase-js' +import { ROOM_OPEN_MODE, type RoomOpenMode } from '@tldraw/dotcom-shared' import { + DBLoadResultType, RoomSnapshot, + TLCloseEventCode, TLServer, TLServerEvent, TLSyncRoom, @@ -19,6 +22,7 @@ import { PERSIST_INTERVAL_MS } from './config' import { getR2KeyForRoom } from './r2' import { Analytics, Environment } from './types' import { createSupabaseClient } from './utils/createSupabaseClient' +import { getSlug } from './utils/roomOpenMode' import { throttle } from './utils/throttle' const MAX_CONNECTIONS = 50 @@ -88,12 +92,22 @@ export class TLDrawDurableObject extends TLServer { readonly router = Router() .get( '/r/:roomId', - (req) => this.extractDocumentInfoFromRequest(req), + (req) => this.extractDocumentInfoFromRequest(req, ROOM_OPEN_MODE.READ_WRITE), + (req) => this.onRequest(req) + ) + .get( + '/v/:roomId', + (req) => this.extractDocumentInfoFromRequest(req, ROOM_OPEN_MODE.READ_ONLY_LEGACY), + (req) => this.onRequest(req) + ) + .get( + '/ro/:roomId', + (req) => this.extractDocumentInfoFromRequest(req, ROOM_OPEN_MODE.READ_ONLY), (req) => this.onRequest(req) ) .post( '/r/:roomId/restore', - (req) => this.extractDocumentInfoFromRequest(req), + (req) => this.extractDocumentInfoFromRequest(req, ROOM_OPEN_MODE.READ_WRITE), (req) => this.onRestore(req) ) .all('*', () => new Response('Not found', { status: 404 })) @@ -113,8 +127,11 @@ export class TLDrawDurableObject extends TLServer { get documentInfo() { return assertExists(this._documentInfo, 'documentInfo must be present') } - extractDocumentInfoFromRequest = async (req: IRequest) => { - const slug = assertExists(req.params.roomId, 'roomId must be present') + extractDocumentInfoFromRequest = async (req: IRequest, roomOpenMode: RoomOpenMode) => { + const slug = assertExists( + await getSlug(this.env, req.params.roomId, roomOpenMode), + 'roomId must be present' + ) if (this._documentInfo) { assert(this._documentInfo.slug === slug, 'slug must match') } else { @@ -226,9 +243,10 @@ export class TLDrawDurableObject extends TLServer { const { 0: clientWebSocket, 1: serverWebSocket } = new WebSocketPair() // Handle the connection (see TLServer) + let connectionResult: DBLoadResultType try { // block concurrency while initializing the room if that needs to happen - await this.controller.blockConcurrencyWhile(() => + connectionResult = await this.controller.blockConcurrencyWhile(() => this.handleConnection({ socket: serverWebSocket as any, persistenceKey: this.documentInfo.slug!, @@ -253,6 +271,12 @@ export class TLDrawDurableObject extends TLServer { this.schedulePersist() }) + if (connectionResult === 'room_not_found') { + // If the room is not found, we need to accept and then immediately close the connection + // with our custom close code. + serverWebSocket.close(TLCloseEventCode.NOT_FOUND, 'Room not found') + } + return new Response(null, { status: 101, webSocket: clientWebSocket }) } diff --git a/apps/dotcom-worker/src/lib/routes/createRoom.ts b/apps/dotcom-worker/src/lib/routes/createRoom.ts index c6a450ce4..43899c56e 100644 --- a/apps/dotcom-worker/src/lib/routes/createRoom.ts +++ b/apps/dotcom-worker/src/lib/routes/createRoom.ts @@ -1,24 +1,22 @@ -import { SerializedSchema, SerializedStore } from '@tldraw/store' -import { TLRecord } from '@tldraw/tlschema' +import { CreateRoomRequestBody } from '@tldraw/dotcom-shared' import { RoomSnapshot, schema } from '@tldraw/tlsync' import { IRequest } from 'itty-router' import { nanoid } from 'nanoid' import { getR2KeyForRoom } from '../r2' import { Environment } from '../types' import { validateSnapshot } from '../utils/validateSnapshot' - -type SnapshotRequestBody = { - schema: SerializedSchema - snapshot: SerializedStore -} +import { isAllowedOrigin } from '../worker' // Sets up a new room based on a provided snapshot, e.g. when a user clicks the "Share" buttons or the "Fork project" buttons. export async function createRoom(request: IRequest, env: Environment): Promise { // The data sent from the client will include the data for the new room - const data = (await request.json()) as SnapshotRequestBody + const data = (await request.json()) as CreateRoomRequestBody + if (!isAllowedOrigin(data.origin)) { + return Response.json({ error: true, message: 'Not allowed' }, { status: 406 }) + } // There's a chance the data will be invalid, so we check it first - const snapshotResult = validateSnapshot(data) + const snapshotResult = validateSnapshot(data.snapshot) if (!snapshotResult.ok) { return Response.json({ error: true, message: snapshotResult.error }, { status: 400 }) } @@ -40,6 +38,11 @@ export async function createRoom(request: IRequest, env: Environment): Promise - parent_slug?: string | string[] | undefined -} - export async function createRoomSnapshot(request: IRequest, env: Environment): Promise { const data = (await request.json()) as CreateSnapshotRequestBody diff --git a/apps/dotcom-worker/src/lib/routes/getReadonlySlug.ts b/apps/dotcom-worker/src/lib/routes/getReadonlySlug.ts new file mode 100644 index 000000000..e1eb4f5c5 --- /dev/null +++ b/apps/dotcom-worker/src/lib/routes/getReadonlySlug.ts @@ -0,0 +1,30 @@ +import { GetReadonlySlugResponseBody } from '@tldraw/dotcom-shared' +import { lns } from '@tldraw/utils' +import { IRequest } from 'itty-router' +import { Environment } from '../types' + +// Return a URL to a readonly version of the room +export async function getReadonlySlug(request: IRequest, env: Environment): Promise { + const roomId = request.params.roomId + if (!roomId) { + return new Response('Bad request', { + status: 400, + }) + } + + let slug = await env.SLUG_TO_READONLY_SLUG.get(roomId) + let isLegacy = false + + if (!slug) { + // For all newly created rooms we add the readonly slug to the KV store. + // If it does not exist there it means we are trying to get a slug for an old room. + slug = lns(roomId) + isLegacy = true + } + return new Response( + JSON.stringify({ + slug, + isLegacy, + } satisfies GetReadonlySlugResponseBody) + ) +} diff --git a/apps/dotcom-worker/src/lib/routes/joinExistingRoom.ts b/apps/dotcom-worker/src/lib/routes/joinExistingRoom.ts index 99569fe99..b90b87113 100644 --- a/apps/dotcom-worker/src/lib/routes/joinExistingRoom.ts +++ b/apps/dotcom-worker/src/lib/routes/joinExistingRoom.ts @@ -1,11 +1,16 @@ +import { RoomOpenMode } from '@tldraw/dotcom-shared' import { IRequest } from 'itty-router' import { Environment } from '../types' import { fourOhFour } from '../utils/fourOhFour' import { isRoomIdTooLong, roomIdIsTooLong } from '../utils/roomIdIsTooLong' +import { getSlug } from '../utils/roomOpenMode' -// This is the entry point for joining an existing room -export async function joinExistingRoom(request: IRequest, env: Environment): Promise { - const roomId = request.params.roomId +export async function joinExistingRoom( + request: IRequest, + env: Environment, + roomOpenMode: RoomOpenMode +): Promise { + const roomId = await getSlug(env, request.params.roomId, roomOpenMode) if (!roomId) return fourOhFour() if (isRoomIdTooLong(roomId)) return roomIdIsTooLong() diff --git a/apps/dotcom-worker/src/lib/types.ts b/apps/dotcom-worker/src/lib/types.ts index 3505ad5c6..9fdbd8ef0 100644 --- a/apps/dotcom-worker/src/lib/types.ts +++ b/apps/dotcom-worker/src/lib/types.ts @@ -17,6 +17,9 @@ export interface Environment { ROOMS: R2Bucket ROOMS_HISTORY_EPHEMERAL: R2Bucket + SLUG_TO_READONLY_SLUG: KVNamespace + READONLY_SLUG_TO_SLUG: KVNamespace + // env vars SUPABASE_URL: string | undefined SUPABASE_KEY: string | undefined diff --git a/apps/dotcom-worker/src/lib/utils/roomOpenMode.ts b/apps/dotcom-worker/src/lib/utils/roomOpenMode.ts new file mode 100644 index 000000000..2e1626605 --- /dev/null +++ b/apps/dotcom-worker/src/lib/utils/roomOpenMode.ts @@ -0,0 +1,17 @@ +import { ROOM_OPEN_MODE, RoomOpenMode } from '@tldraw/dotcom-shared' +import { exhaustiveSwitchError, lns } from '@tldraw/utils' +import { Environment } from '../types' + +export async function getSlug(env: Environment, slug: string | null, roomOpenMode: RoomOpenMode) { + if (!slug) return null + switch (roomOpenMode) { + case ROOM_OPEN_MODE.READ_WRITE: + return slug + case ROOM_OPEN_MODE.READ_ONLY: + return await env.READONLY_SLUG_TO_SLUG.get(slug) + case ROOM_OPEN_MODE.READ_ONLY_LEGACY: + return lns(slug) + default: + exhaustiveSwitchError(roomOpenMode) + } +} diff --git a/apps/dotcom-worker/src/lib/worker.ts b/apps/dotcom-worker/src/lib/worker.ts index 9c415186c..d2100e10a 100644 --- a/apps/dotcom-worker/src/lib/worker.ts +++ b/apps/dotcom-worker/src/lib/worker.ts @@ -1,11 +1,13 @@ /// /// +import { ROOM_OPEN_MODE } from '@tldraw/dotcom-shared' import { Router, createCors } from 'itty-router' import { env } from 'process' import Toucan from 'toucan-js' import { createRoom } from './routes/createRoom' import { createRoomSnapshot } from './routes/createRoomSnapshot' import { forwardRoomRequest } from './routes/forwardRoomRequest' +import { getReadonlySlug } from './routes/getReadonlySlug' import { getRoomHistory } from './routes/getRoomHistory' import { getRoomHistorySnapshot } from './routes/getRoomHistorySnapshot' import { getRoomSnapshot } from './routes/getRoomSnapshot' @@ -24,9 +26,12 @@ const router = Router() .post('/new-room', createRoom) .post('/snapshots', createRoomSnapshot) .get('/snapshot/:roomId', getRoomSnapshot) - .get('/r/:roomId', joinExistingRoom) + .get('/r/:roomId', (req, env) => joinExistingRoom(req, env, ROOM_OPEN_MODE.READ_WRITE)) + .get('/v/:roomId', (req, env) => joinExistingRoom(req, env, ROOM_OPEN_MODE.READ_ONLY_LEGACY)) + .get('/ro/:roomId', (req, env) => joinExistingRoom(req, env, ROOM_OPEN_MODE.READ_ONLY)) .get('/r/:roomId/history', getRoomHistory) .get('/r/:roomId/history/:timestamp', getRoomHistorySnapshot) + .get('/readonly-slug/:roomId', getReadonlySlug) .post('/r/:roomId/restore', forwardRoomRequest) .all('*', fourOhFour) @@ -70,7 +75,7 @@ const Worker = { }, } -function isAllowedOrigin(origin: string) { +export function isAllowedOrigin(origin: string) { if (origin === 'http://localhost:3000') return true if (origin === 'http://localhost:5420') return true if (origin.endsWith('.tldraw.com')) return true diff --git a/apps/dotcom-worker/tsconfig.json b/apps/dotcom-worker/tsconfig.json index b4d7ff869..e7a2d4918 100644 --- a/apps/dotcom-worker/tsconfig.json +++ b/apps/dotcom-worker/tsconfig.json @@ -7,6 +7,9 @@ "emitDeclarationOnly": false }, "references": [ + { + "path": "../../packages/dotcom-shared" + }, { "path": "../../packages/store" }, diff --git a/apps/dotcom-worker/wrangler.toml b/apps/dotcom-worker/wrangler.toml index 98368c816..6d6163a63 100644 --- a/apps/dotcom-worker/wrangler.toml +++ b/apps/dotcom-worker/wrangler.toml @@ -114,3 +114,36 @@ bucket_name = "rooms-history-ephemeral-preview" [[env.production.r2_buckets]] binding = "ROOMS_HISTORY_EPHEMERAL" bucket_name = "rooms-history-ephemeral" + +#################### Key value storage #################### +[[env.dev.kv_namespaces]] +binding = "SLUG_TO_READONLY_SLUG" +id = "847a6bded62045c6808dda6a275ef96c" + +[[env.dev.kv_namespaces]] +binding = "READONLY_SLUG_TO_SLUG" +id = "0a83acab40374ccd918cc9d755741714" + +[[env.preview.kv_namespaces]] +binding = "SLUG_TO_READONLY_SLUG" +id = "847a6bded62045c6808dda6a275ef96c" + +[[env.preview.kv_namespaces]] +binding = "READONLY_SLUG_TO_SLUG" +id = "0a83acab40374ccd918cc9d755741714" + +[[env.staging.kv_namespaces]] +binding = "SLUG_TO_READONLY_SLUG" +id = "847a6bded62045c6808dda6a275ef96c" + +[[env.staging.kv_namespaces]] +binding = "READONLY_SLUG_TO_SLUG" +id = "0a83acab40374ccd918cc9d755741714" + +[[env.production.kv_namespaces]] +binding = "SLUG_TO_READONLY_SLUG" +id = "2fb5fc7f7ca54a5a9dfae1b07a30a778" + +[[env.production.kv_namespaces]] +binding = "READONLY_SLUG_TO_SLUG" +id = "96be6637b281412ab35b2544539d78e8" diff --git a/apps/dotcom/package.json b/apps/dotcom/package.json index bf5700284..c2cd34985 100644 --- a/apps/dotcom/package.json +++ b/apps/dotcom/package.json @@ -23,6 +23,7 @@ "@sentry/integrations": "^7.34.0", "@sentry/react": "^7.77.0", "@tldraw/assets": "workspace:*", + "@tldraw/dotcom-shared": "workspace:*", "@tldraw/tlsync": "workspace:*", "@tldraw/utils": "workspace:*", "@vercel/analytics": "^1.1.1", diff --git a/apps/dotcom/scripts/build.ts b/apps/dotcom/scripts/build.ts index e9e734921..69373d5f8 100644 --- a/apps/dotcom/scripts/build.ts +++ b/apps/dotcom/scripts/build.ts @@ -8,6 +8,7 @@ import json5 from 'json5' import { nicelog } from '../../../scripts/lib/nicelog' import { T } from '@tldraw/validate' +import { getMultiplayerServerURL } from '../vite.config' // We load the list of routes that should be forwarded to our SPA's index.html here. // It uses a jest snapshot file because deriving the set of routes from our @@ -56,9 +57,7 @@ async function build() { // rewrite api calls to the multiplayer server { src: '^/api(/(.*))?$', - dest: `${ - process.env.MULTIPLAYER_SERVER?.replace(/^ws/, 'http') ?? 'http://127.0.0.1:8787' - }$1`, + dest: `${getMultiplayerServerURL()}$1`, check: true, }, // cache static assets immutably diff --git a/apps/dotcom/src/__snapshots__/routes.test.tsx.snap b/apps/dotcom/src/__snapshots__/routes.test.tsx.snap index db16700e1..4d6d55f9b 100644 --- a/apps/dotcom/src/__snapshots__/routes.test.tsx.snap +++ b/apps/dotcom/src/__snapshots__/routes.test.tsx.snap @@ -26,6 +26,10 @@ exports[`the_routes 1`] = ` "reactRouterPattern": "/r/:roomId", "vercelRouterPattern": "^/r/[^/]*/?$", }, + { + "reactRouterPattern": "/ro/:roomId", + "vercelRouterPattern": "^/ro/[^/]*/?$", + }, { "reactRouterPattern": "/s/:roomId", "vercelRouterPattern": "^/s/[^/]*/?$", diff --git a/apps/dotcom/src/components/ErrorPage/ErrorPage.tsx b/apps/dotcom/src/components/ErrorPage/ErrorPage.tsx index 9a275d8dd..ba5aebb13 100644 --- a/apps/dotcom/src/components/ErrorPage/ErrorPage.tsx +++ b/apps/dotcom/src/components/ErrorPage/ErrorPage.tsx @@ -1,4 +1,5 @@ import { Link } from 'react-router-dom' +import { isInIframe } from '../../utils/iFrame' export function ErrorPage({ icon, @@ -6,8 +7,8 @@ export function ErrorPage({ }: { icon?: boolean messages: { header: string; para1: string; para2?: string } - redirectTo?: string }) { + const inIframe = isInIframe() return (
@@ -19,8 +20,8 @@ export function ErrorPage({

{messages.para1}

{messages.para2 &&

{messages.para2}

}
- - Take me home. + + {inIframe ? 'Open tldraw.' : 'Back to tldraw.'}
diff --git a/apps/dotcom/src/components/IFrameProtector.tsx b/apps/dotcom/src/components/IFrameProtector.tsx index b4fd9f06d..95309432f 100644 --- a/apps/dotcom/src/components/IFrameProtector.tsx +++ b/apps/dotcom/src/components/IFrameProtector.tsx @@ -2,12 +2,13 @@ import { ReactNode, useEffect, useState } from 'react' import { LoadingScreen } from 'tldraw' import { version } from '../../version' import { useUrl } from '../hooks/useUrl' +import { getParentOrigin, isInIframe } from '../utils/iFrame' import { trackAnalyticsEvent } from '../utils/trackAnalyticsEvent' /* If we're in an iframe, we need to figure out whether we're on a whitelisted host (e.g. tldraw itself) or a not-allowed host (e.g. someone else's website). Some websites embed tldraw in iframes and this is kinda -risky for us and for them, too—and hey, if we decide to offer a hosted thing, then that's another stor +risky for us and for them, too—and hey, if we decide to offer a hosted thing, then that's another story. Figuring this out is a little tricky because the same code here is going to run on: - the website as a top window (tldraw-top) @@ -26,33 +27,45 @@ and we should show an annoying messsage. If we're not in an iframe, we don't need to do anything. */ +export const ROOM_CONTEXT = { + PUBLIC_MULTIPLAYER: 'public-multiplayer', + PUBLIC_READONLY: 'public-readonly', + PUBLIC_SNAPSHOT: 'public-snapshot', + HISTORY_SNAPSHOT: 'history-snapshot', + HISTORY: 'history', + LOCAL: 'local', +} as const +type $ROOM_CONTEXT = (typeof ROOM_CONTEXT)[keyof typeof ROOM_CONTEXT] + +const EMBEDDED_STATE = { + IFRAME_UNKNOWN: 'iframe-unknown', + IFRAME_NOT_ALLOWED: 'iframe-not-allowed', + NOT_IFRAME: 'not-iframe', + IFRAME_OK: 'iframe-ok', +} as const +type $EMBEDDED_STATE = (typeof EMBEDDED_STATE)[keyof typeof EMBEDDED_STATE] + // Which routes do we allow to be embedded in tldraw.com itself? -const WHITELIST_CONTEXT = ['public-multiplayer', 'public-readonly', 'public-snapshot'] +const WHITELIST_CONTEXT: $ROOM_CONTEXT[] = [ + ROOM_CONTEXT.PUBLIC_MULTIPLAYER, + ROOM_CONTEXT.PUBLIC_READONLY, + ROOM_CONTEXT.PUBLIC_SNAPSHOT, +] const EXPECTED_QUESTION = 'are we cool?' const EXPECTED_RESPONSE = 'yes' + version -const isInIframe = () => { - return typeof window !== 'undefined' && (window !== window.top || window.self !== window.parent) -} - export function IFrameProtector({ slug, context, children, }: { slug: string - context: - | 'public-multiplayer' - | 'public-readonly' - | 'public-snapshot' - | 'history-snapshot' - | 'history' - | 'local' + context: $ROOM_CONTEXT children: ReactNode }) { - const [embeddedState, setEmbeddedState] = useState< - 'iframe-unknown' | 'iframe-not-allowed' | 'not-iframe' | 'iframe-ok' - >(isInIframe() ? 'iframe-unknown' : 'not-iframe') + const [embeddedState, setEmbeddedState] = useState<$EMBEDDED_STATE>( + isInIframe() ? EMBEDDED_STATE.IFRAME_UNKNOWN : EMBEDDED_STATE.NOT_IFRAME + ) const url = useUrl() @@ -76,24 +89,28 @@ export function IFrameProtector({ if (event.data === EXPECTED_RESPONSE) { // todo: check the origin? - setEmbeddedState('iframe-ok') + setEmbeddedState(EMBEDDED_STATE.IFRAME_OK) clearTimeout(timeout) } } window.addEventListener('message', handleMessageEvent, false) - if (embeddedState === 'iframe-unknown') { + if (embeddedState === EMBEDDED_STATE.IFRAME_UNKNOWN) { // We iframe embeddings on multiplayer or readonly if (WHITELIST_CONTEXT.includes(context)) { window.parent.postMessage(EXPECTED_QUESTION, '*') // todo: send to a specific origin? timeout = setTimeout(() => { - setEmbeddedState('iframe-not-allowed') - trackAnalyticsEvent('connect_to_room_in_iframe', { slug, context }) + setEmbeddedState(EMBEDDED_STATE.IFRAME_NOT_ALLOWED) + trackAnalyticsEvent('connect_to_room_in_iframe', { + slug, + context, + origin: getParentOrigin(), + }) }, 1000) } else { // We don't allow iframe embeddings on other routes - setEmbeddedState('iframe-not-allowed') + setEmbeddedState(EMBEDDED_STATE.IFRAME_NOT_ALLOWED) } } @@ -103,12 +120,12 @@ export function IFrameProtector({ } }, [embeddedState, slug, context]) - if (embeddedState === 'iframe-unknown') { + if (embeddedState === EMBEDDED_STATE.IFRAME_UNKNOWN) { // We're in an iframe, but we don't know if it's a tldraw iframe - return Loading in an iframe... + return Loading in an iframe… } - if (embeddedState === 'iframe-not-allowed') { + if (embeddedState === EMBEDDED_STATE.IFRAME_NOT_ALLOWED) { // We're in an iframe and its not one of ours return (
diff --git a/apps/dotcom/src/components/MultiplayerEditor.tsx b/apps/dotcom/src/components/MultiplayerEditor.tsx index a5f575b53..10f53df4e 100644 --- a/apps/dotcom/src/components/MultiplayerEditor.tsx +++ b/apps/dotcom/src/components/MultiplayerEditor.tsx @@ -1,3 +1,4 @@ +import { ROOM_OPEN_MODE, RoomOpenModeToPath, type RoomOpenMode } from '@tldraw/dotcom-shared' import { useCallback, useEffect } from 'react' import { DefaultContextMenu, @@ -18,7 +19,6 @@ import { TldrawUiMenuItem, ViewSubmenu, atom, - lns, useActions, useValue, } from 'tldraw' @@ -104,19 +104,17 @@ const components: TLComponents = { } export function MultiplayerEditor({ - isReadOnly, + roomOpenMode, roomSlug, }: { - isReadOnly: boolean + roomOpenMode: RoomOpenMode roomSlug: string }) { const handleUiEvent = useHandleUiEvents() - const roomId = isReadOnly ? lns(roomSlug) : roomSlug - const storeWithStatus = useRemoteSyncClient({ - uri: `${MULTIPLAYER_SERVER}/r/${roomId}`, - roomId, + uri: `${MULTIPLAYER_SERVER}/${RoomOpenModeToPath[roomOpenMode]}/${roomSlug}`, + roomId: roomSlug, }) const isOffline = @@ -128,16 +126,22 @@ export function MultiplayerEditor({ const sharingUiOverrides = useSharing() const fileSystemUiOverrides = useFileSystem({ isMultiplayer: true }) const cursorChatOverrides = useCursorChat() + const isReadonly = + roomOpenMode === ROOM_OPEN_MODE.READ_ONLY || roomOpenMode === ROOM_OPEN_MODE.READ_ONLY_LEGACY const handleMount = useCallback( (editor: Editor) => { - ;(window as any).app = editor - ;(window as any).editor = editor - editor.updateInstanceState({ isReadonly: isReadOnly }) + if (!isReadonly) { + ;(window as any).app = editor + ;(window as any).editor = editor + } + editor.updateInstanceState({ + isReadonly, + }) editor.registerExternalAssetHandler('file', createAssetFromFile) editor.registerExternalAssetHandler('url', createAssetFromUrl) }, - [isReadOnly] + [isReadonly] ) if (storeWithStatus.error) { @@ -151,7 +155,7 @@ export function MultiplayerEditor({ assetUrls={assetUrls} onMount={handleMount} overrides={[sharingUiOverrides, fileSystemUiOverrides, cursorChatOverrides]} - initialState={isReadOnly ? 'hand' : 'select'} + initialState={isReadonly ? 'hand' : 'select'} onUiEvent={handleUiEvent} components={components} autoFocus diff --git a/apps/dotcom/src/components/ShareMenu.tsx b/apps/dotcom/src/components/ShareMenu.tsx index 1ea4810ac..0e44a8a98 100644 --- a/apps/dotcom/src/components/ShareMenu.tsx +++ b/apps/dotcom/src/components/ShareMenu.tsx @@ -1,4 +1,9 @@ import * as Popover from '@radix-ui/react-popover' +import { + GetReadonlySlugResponseBody, + ROOM_OPEN_MODE, + RoomOpenModeToPath, +} from '@tldraw/dotcom-shared' import React, { useEffect, useState } from 'react' import { TldrawUiMenuContextProvider, @@ -15,29 +20,71 @@ import { createQRCodeImageDataString } from '../utils/qrcode' import { SHARE_PROJECT_ACTION, SHARE_SNAPSHOT_ACTION } from '../utils/sharing' import { ShareButton } from './ShareButton' +const SHARE_CURRENT_STATE = { + OFFLINE: 'offline', + SHARED_READ_WRITE: 'shared-read-write', + SHARED_READ_ONLY: 'shared-read-only', +} as const +type ShareCurrentState = (typeof SHARE_CURRENT_STATE)[keyof typeof SHARE_CURRENT_STATE] + type ShareState = { - state: 'offline' | 'shared' | 'readonly' + state: ShareCurrentState qrCodeDataUrl: string url: string - readonlyUrl: string + readonlyUrl: string | null readonlyQrCodeDataUrl: string } +function isSharedReadonlyUrl(pathname: string) { + return ( + pathname.startsWith(`/${RoomOpenModeToPath[ROOM_OPEN_MODE.READ_ONLY]}/`) || + pathname.startsWith(`/${RoomOpenModeToPath[ROOM_OPEN_MODE.READ_ONLY_LEGACY]}/`) + ) +} + +function isSharedReadWriteUrl(pathname: string) { + return pathname.startsWith('/r/') +} + function getFreshShareState(): ShareState { - const isShared = window.location.href.includes('/r/') - const isReadOnly = window.location.href.includes('/v/') + const isSharedReadWrite = isSharedReadWriteUrl(window.location.pathname) + const isSharedReadOnly = isSharedReadonlyUrl(window.location.pathname) return { - state: isShared ? 'shared' : isReadOnly ? 'readonly' : 'offline', + state: isSharedReadWrite + ? SHARE_CURRENT_STATE.SHARED_READ_WRITE + : isSharedReadOnly + ? SHARE_CURRENT_STATE.SHARED_READ_ONLY + : SHARE_CURRENT_STATE.OFFLINE, url: window.location.href, - readonlyUrl: window.location.href.includes('/r/') - ? getShareUrl(window.location.href, true) - : window.location.href, + readonlyUrl: isSharedReadOnly ? window.location.href : null, qrCodeDataUrl: '', readonlyQrCodeDataUrl: '', } } +async function getReadonlyUrl() { + const pathname = window.location.pathname + const isReadOnly = isSharedReadonlyUrl(pathname) + if (isReadOnly) return window.location.href + + const segments = pathname.split('/') + + const roomId = segments[2] + const result = await fetch(`/api/readonly-slug/${roomId}`) + if (!result.ok) return + + const data = (await result.json()) as GetReadonlySlugResponseBody + if (!data.slug) return + + segments[1] = + RoomOpenModeToPath[data.isLegacy ? ROOM_OPEN_MODE.READ_ONLY_LEGACY : ROOM_OPEN_MODE.READ_ONLY] + segments[2] = data.slug + const newPathname = segments.join('/') + + return `${window.location.origin}${newPathname}${window.location.search}` +} + /** @public */ export const ShareMenu = React.memo(function ShareMenu() { const msg = useTranslation() @@ -50,25 +97,24 @@ export const ShareMenu = React.memo(function ShareMenu() { const [isUploading, setIsUploading] = useState(false) const [isUploadingSnapshot, setIsUploadingSnapshot] = useState(false) - const [isReadOnlyLink, setIsReadOnlyLink] = useState(shareState.state === 'readonly') + const isReadOnlyLink = shareState.state === SHARE_CURRENT_STATE.SHARED_READ_ONLY const currentShareLinkUrl = isReadOnlyLink ? shareState.readonlyUrl : shareState.url const currentQrCodeUrl = isReadOnlyLink ? shareState.readonlyQrCodeDataUrl : shareState.qrCodeDataUrl const [didCopy, setDidCopy] = useState(false) + const [didCopyReadonlyLink, setDidCopyReadonlyLink] = useState(false) const [didCopySnapshotLink, setDidCopySnapshotLink] = useState(false) useEffect(() => { - if (shareState.state === 'offline') { + if (shareState.state === SHARE_CURRENT_STATE.OFFLINE) { return } let cancelled = false const shareUrl = getShareUrl(window.location.href, false) - const readonlyShareUrl = getShareUrl(window.location.href, true) - - if (!shareState.qrCodeDataUrl && shareState.state === 'shared') { + if (!shareState.qrCodeDataUrl && shareState.state === SHARE_CURRENT_STATE.SHARED_READ_WRITE) { // Fetch the QR code data URL createQRCodeImageDataString(shareUrl).then((dataUrl) => { if (!cancelled) { @@ -77,14 +123,16 @@ export const ShareMenu = React.memo(function ShareMenu() { }) } - if (!shareState.readonlyQrCodeDataUrl) { - // fetch the readonly QR code data URL - createQRCodeImageDataString(readonlyShareUrl).then((dataUrl) => { - if (!cancelled) { - setShareState((s) => ({ ...s, readonlyShareUrl, readonlyQrCodeDataUrl: dataUrl })) - } - }) - } + getReadonlyUrl().then((readonlyUrl) => { + if (readonlyUrl && !shareState.readonlyQrCodeDataUrl) { + // fetch the readonly QR code data URL + createQRCodeImageDataString(readonlyUrl).then((dataUrl) => { + if (!cancelled) { + setShareState((s) => ({ ...s, readonlyUrl, readonlyQrCodeDataUrl: dataUrl })) + } + }) + } + }) const interval = setInterval(() => { const url = window.location.href @@ -115,7 +163,8 @@ export const ShareMenu = React.memo(function ShareMenu() { alignOffset={4} > - {shareState.state === 'shared' || shareState.state === 'readonly' ? ( + {shareState.state === SHARE_CURRENT_STATE.SHARED_READ_WRITE || + shareState.state === SHARE_CURRENT_STATE.SHARED_READ_ONLY ? ( <>
+
    {categories.map((currentCategory) => (
  • @@ -76,7 +86,10 @@ export function ExamplePage({
      {examples .find((category) => category.id === currentCategory) - ?.value.map((sidebarExample) => ( + ?.value.filter((example) => + example.title.toLowerCase().includes(filterValue.toLowerCase()) + ) + .map((sidebarExample) => ( ul > li) { + display: block; +} + ul.example__sidebar__category__items { list-style: none; padding: 0px 0px 0px 4px; From 7442456d85bbe816ee01cc4cfccf32b765165e6c Mon Sep 17 00:00:00 2001 From: Taha <98838967+Taha-Hassan-Git@users.noreply.github.com> Date: Sat, 27 Apr 2024 12:14:23 +0100 Subject: [PATCH 15/15] Make coarse pointer check dynamic (#3572) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a device has both a touch screen and a mouse, pointer: coarse evaluates to false and then doesn't change even if the user begins to use the touch screen. In this PR pointer: coarse is replaced with any-pointer: coarse, which checks if a touchscreen input is available. Event listeners for touchstart and mousemove update isCoursePointer dynamically. So if the user begins to move the mouse it changes to pointer: fine, if they then touch the screen the pointer is returned to coarse. https://github.com/tldraw/tldraw/assets/98838967/fb86bb44-ec11-4161-bb2f-0e8c3ee83eb6 ### Change Type - [ ] `sdk` — Changes the tldraw SDK - [x] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [x] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Load tldraw on a device with both coarse and fine pointer inputs avaiable (e.g. an ipad with a keyboard and trackpad) 2. Switch between using the mouse and touch screen. 3. Handles on shapes should update dynamically. ### Release Notes - Add a brief release note for your PR here. --------- Co-authored-by: Mime Čuvalo Co-authored-by: Steve Ruiz --- .../editor/src/lib/hooks/useCoarsePointer.ts | 71 +++++++++++++++---- 1 file changed, 56 insertions(+), 15 deletions(-) diff --git a/packages/editor/src/lib/hooks/useCoarsePointer.ts b/packages/editor/src/lib/hooks/useCoarsePointer.ts index f51c8cf94..a0c279d98 100644 --- a/packages/editor/src/lib/hooks/useCoarsePointer.ts +++ b/packages/editor/src/lib/hooks/useCoarsePointer.ts @@ -4,27 +4,68 @@ import { useEditor } from './useEditor' /** @internal */ export function useCoarsePointer() { const editor = useEditor() + useEffect(() => { + // We'll track our own state for the pointer type + let isCoarse = editor.getInstanceState().isCoarsePointer + + // 1. + // We'll use touch events / mouse events to detect coarse pointer. + + // When the user touches the screen, we assume they have a coarse pointer + const handleTouchStart = () => { + if (isCoarse) return + isCoarse = true + editor.updateInstanceState({ isCoarsePointer: true }) + } + + // When the user moves the mouse, we assume they have a fine pointer + const handleMouseMove = () => { + if (!isCoarse) return + isCoarse = false + editor.updateInstanceState({ isCoarsePointer: false }) + } + + // Set up the listeners for touch and mouse events + window.addEventListener('touchstart', handleTouchStart) + window.addEventListener('mousemove', handleMouseMove) + + // 2. + // We can also use the media query to detect / set the initial pointer type + // and update the state if the pointer type changes. + + // We want the touch / mouse events to run even if the browser does not + // support matchMedia. We'll have to handle the media query changes + // conditionally in the code below. + const mql = window.matchMedia && window.matchMedia('(any-pointer: coarse)') + // This is a workaround for a Firefox bug where we don't correctly // detect coarse VS fine pointer. For now, let's assume that you have a fine // pointer if you're on Firefox on desktop. - if ( - editor.environment.isFirefox && - !editor.environment.isAndroid && - !editor.environment.isIos - ) { - editor.updateInstanceState({ isCoarsePointer: false }) - return + const isForcedFinePointer = + editor.environment.isFirefox && !editor.environment.isAndroid && !editor.environment.isIos + + const handleMediaQueryChange = () => { + const next = isForcedFinePointer ? false : mql.matches // get the value from the media query + if (isCoarse !== next) return // bail if the value hasn't changed + isCoarse = next // update the local value + editor.updateInstanceState({ isCoarsePointer: next }) // update the value in state } - if (window.matchMedia) { - const mql = window.matchMedia('(pointer: coarse)') - const handler = () => { - editor.updateInstanceState({ isCoarsePointer: !!mql.matches }) - } - handler() + + if (mql) { + // set up the listener + mql.addEventListener('change', handleMediaQueryChange) + + // and run the handler once to set the initial value + handleMediaQueryChange() + } + + return () => { + window.removeEventListener('touchstart', handleTouchStart) + window.removeEventListener('mousemove', handleMouseMove) + if (mql) { - mql.addEventListener('change', handler) - return () => mql.removeEventListener('change', handler) + mql.removeEventListener('change', handleMediaQueryChange) } } }, [editor])