Some checks failed
Deploy analytics worker / Deploy analytics worker to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
i18n upload strings / Upload latest strings (push) Failing after 1s
Deploy bemo / Deploy bemo to ${{ (github.ref == 'refs/heads/bemo-production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
Deploy grafana resources / ${{ github.event_name == 'push' && 'Deploy grafana resources' || 'Validate grafana resources (dry run)' }} (push) Failing after 0s
End to end tests (dotcom) / Check for relevant changes (push) Failing after 0s
End to end tests (examples) / Check for relevant changes (push) Failing after 0s
End to end tests (mermaid readability) / Check for relevant changes (push) Failing after 1s
End to end tests (perf) / Check for relevant changes (push) Failing after 0s
Publish editor extensions / Publish editor extensions (push) Failing after 1s
Publish SDK packages / Remove the publish-packages label (push) Has been skipped
Checks / Tests & checks (push) Has been cancelled
Checks / Build all projects (push) Has been cancelled
Deploy templates / Deploy templates (push) Has been cancelled
End to end tests (dotcom) / End to end tests (dotcom) (push) Has been cancelled
End to end tests (mermaid readability) / End to end tests (mermaid readability) (push) Has been cancelled
End to end tests (perf) / End to end tests (perf) (push) Has been cancelled
Deploy .com / Deploy dotcom to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Has been cancelled
End to end tests (examples) / End to end tests (examples) (push) Has been cancelled
Publish SDK packages / Publish SDK packages (push) Has been cancelled
Publish SDK packages / Tell user released version (push) Has been cancelled
Publish SDK packages / Publishes code templates to separate repositories (push) Has been cancelled
Publish SDK packages / Deploys the template demos with the new SDK version (push) Has been cancelled
2042 lines
53 KiB
Markdown
2042 lines
53 KiB
Markdown
## API Report File for "@tldraw/tlschema"
|
|
|
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
|
|
```ts
|
|
|
|
import { BaseRecord } from '@tldraw/store';
|
|
import { Expand } from '@tldraw/utils';
|
|
import { IndexKey } from '@tldraw/utils';
|
|
import { JsonObject } from '@tldraw/utils';
|
|
import { LegacyMigrations } from '@tldraw/store';
|
|
import { MakeUndefinedOptional } from '@tldraw/utils';
|
|
import { MigrationId } from '@tldraw/store';
|
|
import { MigrationSequence } from '@tldraw/store';
|
|
import { RecordId } from '@tldraw/store';
|
|
import { RecordScope } from '@tldraw/store';
|
|
import { RecordType } from '@tldraw/store';
|
|
import { SerializedStore } from '@tldraw/store';
|
|
import { Signal } from '@tldraw/state';
|
|
import { StandaloneDependsOn } from '@tldraw/store';
|
|
import { Store } from '@tldraw/store';
|
|
import { StoreSchema } from '@tldraw/store';
|
|
import { StoreSnapshot } from '@tldraw/store';
|
|
import { StoreValidator } from '@tldraw/store';
|
|
import { T } from '@tldraw/validate';
|
|
import { UnknownRecord } from '@tldraw/store';
|
|
|
|
// @public
|
|
export const arrowBindingMigrations: TLPropsMigrations;
|
|
|
|
// @public
|
|
export const arrowBindingProps: RecordProps<TLArrowBinding>;
|
|
|
|
// @public
|
|
export const arrowBindingVersions: {
|
|
AddSnap: `com.tldraw.binding.arrow/${number}`;
|
|
};
|
|
|
|
// @public
|
|
export const ArrowShapeArrowheadEndStyle: EnumStyleProp<"arrow" | "bar" | "diamond" | "dot" | "inverted" | "none" | "pipe" | "square" | "triangle">;
|
|
|
|
// @public
|
|
export const ArrowShapeArrowheadStartStyle: EnumStyleProp<"arrow" | "bar" | "diamond" | "dot" | "inverted" | "none" | "pipe" | "square" | "triangle">;
|
|
|
|
// @public
|
|
export const ArrowShapeKindStyle: EnumStyleProp<"arc" | "elbow">;
|
|
|
|
// @public
|
|
export const arrowShapeMigrations: MigrationSequence;
|
|
|
|
// @public
|
|
export const arrowShapeProps: RecordProps<TLArrowShape>;
|
|
|
|
// @public
|
|
export const arrowShapeVersions: {
|
|
readonly AddElbow: "com.tldraw.shape.arrow/6";
|
|
readonly AddIsPrecise: "com.tldraw.shape.arrow/2";
|
|
readonly AddLabelColor: "com.tldraw.shape.arrow/1";
|
|
readonly AddLabelPosition: "com.tldraw.shape.arrow/3";
|
|
readonly AddRichText: "com.tldraw.shape.arrow/7";
|
|
readonly AddRichTextAttrs: "com.tldraw.shape.arrow/8";
|
|
readonly AddScale: "com.tldraw.shape.arrow/5";
|
|
readonly ExtractBindings: "com.tldraw.shape.arrow/4";
|
|
};
|
|
|
|
// @public
|
|
export const assetIdValidator: T.Validator<TLAssetId>;
|
|
|
|
// @public
|
|
export const assetMigrations: MigrationSequence;
|
|
|
|
// @public
|
|
export const AssetRecordType: RecordType<TLAsset<"bookmark" | "image" | "video">, "props" | "type">;
|
|
|
|
// @public
|
|
export class b64Vecs {
|
|
static decodeFirstPoint(b64Points: string, dim?: 2 | 3): null | VecModel;
|
|
static decodeFirstPoint2D(b64Points: string): null | VecModel;
|
|
static decodeLastPoint(b64Points: string, dim?: 2 | 3): null | VecModel;
|
|
static decodeLastPoint2D(b64Points: string): null | VecModel;
|
|
static decodePoints(base64: string, dim?: 2 | 3): VecModel[];
|
|
static decodePoints2D(base64: string): VecModel[];
|
|
static encodePoints(points: VecModel[], dim?: 2 | 3): string;
|
|
static encodePoints2D(points: VecModel[]): string;
|
|
static isSinglePoint(b64Points: string, dim?: 2 | 3): boolean;
|
|
// @internal
|
|
static _legacyDecodePoints(base64: string): VecModel[];
|
|
// @internal
|
|
static _legacyEncodePoint(x: number, y: number, z: number): string;
|
|
// @internal
|
|
static _legacyEncodePoints(points: VecModel[]): string;
|
|
}
|
|
|
|
// @public
|
|
export const bindingIdValidator: T.Validator<TLBindingId>;
|
|
|
|
// @public
|
|
export const bookmarkAssetMigrations: MigrationSequence;
|
|
|
|
// @public (undocumented)
|
|
export const bookmarkAssetProps: {
|
|
description: T.Validator<string>;
|
|
favicon: T.Validator<string>;
|
|
image: T.Validator<string>;
|
|
src: T.Validator<null | string>;
|
|
title: T.Validator<string>;
|
|
};
|
|
|
|
// @public
|
|
export const bookmarkShapeMigrations: TLPropsMigrations;
|
|
|
|
// @public
|
|
export const bookmarkShapeProps: RecordProps<TLBookmarkShape>;
|
|
|
|
// @public
|
|
export interface BoxModel {
|
|
// (undocumented)
|
|
h: number;
|
|
// (undocumented)
|
|
w: number;
|
|
// (undocumented)
|
|
x: number;
|
|
// (undocumented)
|
|
y: number;
|
|
}
|
|
|
|
// @public
|
|
export const boxModelValidator: T.ObjectValidator<BoxModel>;
|
|
|
|
// @public
|
|
export const CameraRecordType: RecordType<TLCamera, never>;
|
|
|
|
// @public
|
|
export const canvasUiColorTypeValidator: T.Validator<"accent" | "black" | "laser" | "muted-1" | "selection-fill" | "selection-stroke" | "white">;
|
|
|
|
// @public
|
|
export const commentReactionRecordConfig: CustomRecordInfo;
|
|
|
|
// @public
|
|
export const commentRecordConfig: CustomRecordInfo;
|
|
|
|
// @public
|
|
export const commentSchemaRecords: {
|
|
'comment-reaction': CustomRecordInfo;
|
|
'comment-thread': CustomRecordInfo;
|
|
comment: CustomRecordInfo;
|
|
};
|
|
|
|
// @public
|
|
export const commentThreadRecordConfig: CustomRecordInfo;
|
|
|
|
// @public
|
|
export function compressLegacySegments(segments: {
|
|
points: VecModel[];
|
|
type: 'free' | 'straight';
|
|
}[]): TLDrawShapeSegment[];
|
|
|
|
// @public
|
|
export function createAssetPropsMigrationIds<S extends string, T extends Record<string, number>>(assetType: S, ids: T): {
|
|
[k in keyof T]: `com.tldraw.asset.${S}/${T[k]}`;
|
|
};
|
|
|
|
// @public
|
|
export function createAssetPropsMigrationSequence(migrations: TLPropsMigrations): TLPropsMigrations;
|
|
|
|
// @internal
|
|
export function createAssetRecordType(assets: Record<string, SchemaPropsInfo>): RecordType< {
|
|
id: TLAssetId;
|
|
meta: JsonObject;
|
|
props: {
|
|
[x: string]: /*elided*/ any;
|
|
};
|
|
type: string;
|
|
typeName: "asset";
|
|
}, "props" | "type">;
|
|
|
|
// @public
|
|
export function createAssetValidator<Type extends string, Props extends JsonObject, Meta extends JsonObject = JsonObject>(type: Type, props?: {
|
|
[K in keyof Props]: T.Validatable<Props[K]>;
|
|
} | T.Validator<Props>, meta?: {
|
|
[K in keyof Meta]: T.Validatable<Meta[K]>;
|
|
}): T.ObjectValidator<Expand< { [P in "id" | "meta" | "typeName" | (undefined extends Props ? never : "props") | (undefined extends Type ? never : "type")]: TLBaseAsset<Type, Props>[P]; } & { [P in (undefined extends Props ? "props" : never) | (undefined extends Type ? "type" : never)]?: TLBaseAsset<Type, Props>[P] | undefined; }>>;
|
|
|
|
// @public
|
|
export function createBindingId(id?: string): TLBindingId;
|
|
|
|
// @public
|
|
export function createBindingPropsMigrationIds<S extends string, T extends Record<string, number>>(bindingType: S, ids: T): {
|
|
[k in keyof T]: `com.tldraw.binding.${S}/${T[k]}`;
|
|
};
|
|
|
|
// @public
|
|
export function createBindingPropsMigrationSequence(migrations: TLPropsMigrations): TLPropsMigrations;
|
|
|
|
// @public
|
|
export function createBindingValidator<Type extends string, Props extends JsonObject, Meta extends JsonObject>(type: Type, props?: {
|
|
[K in keyof Props]: T.Validatable<Props[K]>;
|
|
}, meta?: {
|
|
[K in keyof Meta]: T.Validatable<Meta[K]>;
|
|
}): T.ObjectValidator<Expand< { [P in "fromId" | "id" | "meta" | "toId" | "typeName" | (undefined extends Props ? never : "props") | (undefined extends Type ? never : "type")]: TLBaseBinding<Type, Props>[P]; } & { [P in (undefined extends Props ? "props" : never) | (undefined extends Type ? "type" : never)]?: TLBaseBinding<Type, Props>[P] | undefined; }>>;
|
|
|
|
// @public
|
|
export function createCachedUserResolve(resolveFn: (userId: string) => null | TLUser): (userId: string) => Signal<null | TLUser>;
|
|
|
|
// @public
|
|
export function createComment(props: {
|
|
authorId: string;
|
|
body: TLRichText;
|
|
meta?: JsonObject;
|
|
now?: number;
|
|
pageId: TLPageId;
|
|
threadId: TLCommentThreadId;
|
|
}): TLComment;
|
|
|
|
// @public (undocumented)
|
|
export function createCommentId(id?: string): TLCommentId;
|
|
|
|
// @public
|
|
export function createCommentReaction(props: {
|
|
commentId: TLCommentId;
|
|
emoji: string;
|
|
meta?: JsonObject;
|
|
now?: number;
|
|
pageId: TLPageId;
|
|
threadId: TLCommentThreadId;
|
|
userId: string;
|
|
}): TLCommentReaction;
|
|
|
|
// @public
|
|
export function createCommentReactionId(commentId: TLCommentId, userId: string, emoji: string): TLCommentReactionId;
|
|
|
|
// @public
|
|
export function createCommentThread(props: {
|
|
anchor: TLCommentAnchor;
|
|
createdBy: string;
|
|
meta?: JsonObject;
|
|
now?: number;
|
|
pageId: TLPageId;
|
|
}): TLCommentThread;
|
|
|
|
// @public (undocumented)
|
|
export function createCommentThreadId(id?: string): TLCommentThreadId;
|
|
|
|
// @public
|
|
export function createCustomRecordId<T extends string>(typeName: T, id?: string): RecordId<UnknownRecord> & `${T}:${string}`;
|
|
|
|
// @public
|
|
export function createCustomRecordMigrationIds<const S extends string, const T extends Record<string, number>>(recordType: S, ids: T): {
|
|
[k in keyof T]: `com.tldraw.${S}/${T[k]}`;
|
|
};
|
|
|
|
// @public
|
|
export function createCustomRecordMigrationSequence(migrations: TLPropsMigrations): TLPropsMigrations;
|
|
|
|
// @public
|
|
export function createPresenceStateDerivation($user: Signal<null | TLUser>, opts?: CreatePresenceStateDerivationOpts): (store: TLStore) => Signal<null | TLInstancePresence>;
|
|
|
|
// @public (undocumented)
|
|
export interface CreatePresenceStateDerivationOpts {
|
|
getUserPresence?(store: TLStore, user: TLUser): null | TLPresenceStateInfo;
|
|
instanceId?: TLInstancePresence['id'];
|
|
}
|
|
|
|
// @public
|
|
export function createShapeId(id?: string): TLShapeId;
|
|
|
|
// @public
|
|
export function createShapePropsMigrationIds<const S extends string, const T extends Record<string, number>>(shapeType: S, ids: T): {
|
|
[k in keyof T]: `com.tldraw.shape.${S}/${T[k]}`;
|
|
};
|
|
|
|
// @public
|
|
export function createShapePropsMigrationSequence(migrations: TLPropsMigrations): TLPropsMigrations;
|
|
|
|
// @public
|
|
export function createShapeValidator<Type extends string, Props extends JsonObject, Meta extends JsonObject>(type: Type, props?: {
|
|
[K in keyof Props]: T.Validatable<Props[K]>;
|
|
}, meta?: {
|
|
[K in keyof Meta]: T.Validatable<Meta[K]>;
|
|
}): T.ObjectValidator<Expand< { [P in "id" | "index" | "isLocked" | "meta" | "opacity" | "parentId" | "rotation" | "typeName" | "x" | "y" | (undefined extends Props ? never : "props") | (undefined extends Type ? never : "type")]: TLBaseShape<Type, Props>[P]; } & { [P in (undefined extends Props ? "props" : never) | (undefined extends Type ? "type" : never)]?: TLBaseShape<Type, Props>[P] | undefined; }>>;
|
|
|
|
// @public
|
|
export function createTLSchema({ shapes, bindings, assets, user, records, migrations, }?: {
|
|
assets?: Record<string, SchemaPropsInfo>;
|
|
bindings?: Record<string, SchemaPropsInfo>;
|
|
migrations?: readonly MigrationSequence[];
|
|
records?: Record<string, CustomRecordInfo>;
|
|
shapes?: Record<string, SchemaPropsInfo>;
|
|
user?: UserSchemaInfo;
|
|
}): TLSchema;
|
|
|
|
// @public (undocumented)
|
|
export function createUserId(id: string): TLUserId;
|
|
|
|
// @public
|
|
export function createUserRecordType(config?: {
|
|
meta?: Record<string, T.Validatable<any>>;
|
|
}): RecordType<TLUser, never>;
|
|
|
|
// @public
|
|
export interface CustomRecordInfo {
|
|
createDefaultProperties?: () => Record<string, unknown>;
|
|
migrations?: MigrationSequence | TLPropsMigrations;
|
|
scope: RecordScope;
|
|
validator: T.Validatable<any>;
|
|
}
|
|
|
|
// @public
|
|
export const defaultAssetSchemas: {
|
|
bookmark: {
|
|
migrations: MigrationSequence;
|
|
props: {
|
|
description: T.Validator<string>;
|
|
favicon: T.Validator<string>;
|
|
image: T.Validator<string>;
|
|
src: T.Validator<null | string>;
|
|
title: T.Validator<string>;
|
|
};
|
|
};
|
|
image: {
|
|
migrations: MigrationSequence;
|
|
props: {
|
|
fileSize: T.Validator<number | undefined>;
|
|
h: T.Validator<number>;
|
|
isAnimated: T.Validator<boolean>;
|
|
mimeType: T.Validator<null | string>;
|
|
name: T.Validator<string>;
|
|
pixelRatio: T.Validator<number | undefined>;
|
|
src: T.Validator<null | string>;
|
|
w: T.Validator<number>;
|
|
};
|
|
};
|
|
video: {
|
|
migrations: MigrationSequence;
|
|
props: {
|
|
fileSize: T.Validator<number | undefined>;
|
|
h: T.Validator<number>;
|
|
isAnimated: T.Validator<boolean>;
|
|
mimeType: T.Validator<null | string>;
|
|
name: T.Validator<string>;
|
|
src: T.Validator<null | string>;
|
|
w: T.Validator<number>;
|
|
};
|
|
};
|
|
};
|
|
|
|
// @public
|
|
export const defaultBindingSchemas: {
|
|
arrow: {
|
|
migrations: TLPropsMigrations;
|
|
props: RecordProps<TLArrowBinding>;
|
|
};
|
|
};
|
|
|
|
// @public (undocumented)
|
|
export const DefaultColorStyle: EnumStyleProp<TLDefaultColorStyle>;
|
|
|
|
// @public
|
|
export const DefaultDashStyle: EnumStyleProp<"dashed" | "dotted" | "draw" | "none" | "solid">;
|
|
|
|
// @public
|
|
export const DefaultFillStyle: EnumStyleProp<"fill" | "lined-fill" | "none" | "pattern" | "semi" | "solid">;
|
|
|
|
// @public
|
|
export const DefaultFontFamilies: {
|
|
draw: string;
|
|
mono: string;
|
|
sans: string;
|
|
serif: string;
|
|
};
|
|
|
|
// @public
|
|
export const DefaultFontStyle: EnumStyleProp<"draw" | "mono" | "sans" | "serif">;
|
|
|
|
// @public
|
|
export const DefaultHorizontalAlignStyle: EnumStyleProp<"end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start">;
|
|
|
|
// @public
|
|
export const defaultShapeSchemas: {
|
|
arrow: {
|
|
migrations: MigrationSequence;
|
|
props: RecordProps<TLArrowShape>;
|
|
};
|
|
bookmark: {
|
|
migrations: TLPropsMigrations;
|
|
props: RecordProps<TLBookmarkShape>;
|
|
};
|
|
draw: {
|
|
migrations: TLPropsMigrations;
|
|
props: RecordProps<TLDrawShape>;
|
|
};
|
|
embed: {
|
|
migrations: TLPropsMigrations;
|
|
props: RecordProps<TLEmbedShape>;
|
|
};
|
|
frame: {
|
|
migrations: TLPropsMigrations;
|
|
props: RecordProps<TLFrameShape>;
|
|
};
|
|
geo: {
|
|
migrations: TLPropsMigrations;
|
|
props: RecordProps<TLGeoShape>;
|
|
};
|
|
group: {
|
|
migrations: TLPropsMigrations;
|
|
props: RecordProps<TLGroupShape>;
|
|
};
|
|
highlight: {
|
|
migrations: TLPropsMigrations;
|
|
props: RecordProps<TLHighlightShape>;
|
|
};
|
|
image: {
|
|
migrations: TLPropsMigrations;
|
|
props: RecordProps<TLImageShape>;
|
|
};
|
|
line: {
|
|
migrations: TLPropsMigrations;
|
|
props: RecordProps<TLLineShape>;
|
|
};
|
|
note: {
|
|
migrations: TLPropsMigrations;
|
|
props: RecordProps<TLNoteShape>;
|
|
};
|
|
text: {
|
|
migrations: TLPropsMigrations;
|
|
props: RecordProps<TLTextShape>;
|
|
};
|
|
video: {
|
|
migrations: TLPropsMigrations;
|
|
props: RecordProps<TLVideoShape>;
|
|
};
|
|
};
|
|
|
|
// @public
|
|
export const DefaultSizeStyle: EnumStyleProp<"l" | "m" | "s" | "xl">;
|
|
|
|
// @public
|
|
export const DefaultTextAlignStyle: EnumStyleProp<"end" | "middle" | "start">;
|
|
|
|
// @public
|
|
export const DefaultVerticalAlignStyle: EnumStyleProp<"end" | "middle" | "start">;
|
|
|
|
// @public
|
|
export const DIM_2D = 2;
|
|
|
|
// @public
|
|
export const DIM_3D = 3;
|
|
|
|
// @public
|
|
export const DocumentRecordType: RecordType<TLDocument, never>;
|
|
|
|
// @public
|
|
export const drawShapeMigrations: TLPropsMigrations;
|
|
|
|
// @public (undocumented)
|
|
export const drawShapeProps: RecordProps<TLDrawShape>;
|
|
|
|
// @public
|
|
export const ElbowArrowSnap: T.Validator<"center" | "edge-point" | "edge" | "none">;
|
|
|
|
// @public
|
|
export type ElbowArrowSnap = T.TypeOf<typeof ElbowArrowSnap>;
|
|
|
|
// @public
|
|
export const embedShapeMigrations: TLPropsMigrations;
|
|
|
|
// @public
|
|
export const embedShapeProps: RecordProps<TLEmbedShape>;
|
|
|
|
// @public
|
|
export class EnumStyleProp<T> extends StyleProp<T> {
|
|
// @internal
|
|
constructor(id: string, defaultValue: T, values: readonly T[]);
|
|
addValues(...newValues: T[]): void;
|
|
removeValues(...valuesToRemove: T[]): void;
|
|
// (undocumented)
|
|
readonly values: T[];
|
|
}
|
|
|
|
// @public
|
|
export type ExtractShapeByProps<P> = Extract<TLShape, {
|
|
props: P;
|
|
}>;
|
|
|
|
// @public
|
|
export const frameShapeMigrations: TLPropsMigrations;
|
|
|
|
// @public
|
|
export const frameShapeProps: RecordProps<TLFrameShape>;
|
|
|
|
// @public
|
|
export const GeoShapeGeoStyle: EnumStyleProp<"arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "heart" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box">;
|
|
|
|
// @public
|
|
export const geoShapeMigrations: TLPropsMigrations;
|
|
|
|
// @public
|
|
export const geoShapeProps: RecordProps<TLGeoShape>;
|
|
|
|
// @public
|
|
export function getDefaultTranslationLocale(): TLLanguage['locale'];
|
|
|
|
// @public
|
|
export function getDefaultUserPresence(store: TLStore, user: TLUser): {
|
|
brush: BoxModel | null;
|
|
camera: {
|
|
x: number;
|
|
y: number;
|
|
z: number;
|
|
};
|
|
chatMessage: string;
|
|
color: string;
|
|
currentPageId: TLPageId;
|
|
cursor: {
|
|
rotation: number;
|
|
type: string;
|
|
x: number;
|
|
y: number;
|
|
};
|
|
followingUserId: TLUserId | null;
|
|
lastActivityTimestamp: number;
|
|
meta: {};
|
|
screenBounds: BoxModel;
|
|
scribbles: TLScribble[];
|
|
selectedShapeIds: TLShapeId[];
|
|
userId: TLUserId;
|
|
userName: string;
|
|
} | null;
|
|
|
|
// @internal
|
|
export function getShapePropKeysByStyle(props: Record<string, T.Validatable<any>>): Map<StyleProp<unknown>, string>;
|
|
|
|
// @public
|
|
export const groupShapeMigrations: TLPropsMigrations;
|
|
|
|
// @public
|
|
export const groupShapeProps: RecordProps<TLGroupShape>;
|
|
|
|
// @public
|
|
export const highlightShapeMigrations: TLPropsMigrations;
|
|
|
|
// @public (undocumented)
|
|
export const highlightShapeProps: RecordProps<TLHighlightShape>;
|
|
|
|
// @public
|
|
export function idValidator<Id extends RecordId<UnknownRecord>>(prefix: Id['__type__']['typeName']): T.Validator<Id>;
|
|
|
|
// @public
|
|
export const imageAssetMigrations: MigrationSequence;
|
|
|
|
// @public (undocumented)
|
|
export const imageAssetProps: {
|
|
fileSize: T.Validator<number | undefined>;
|
|
h: T.Validator<number>;
|
|
isAnimated: T.Validator<boolean>;
|
|
mimeType: T.Validator<null | string>;
|
|
name: T.Validator<string>;
|
|
pixelRatio: T.Validator<number | undefined>;
|
|
src: T.Validator<null | string>;
|
|
w: T.Validator<number>;
|
|
};
|
|
|
|
// @public
|
|
export const ImageShapeCrop: T.ObjectValidator<TLShapeCrop>;
|
|
|
|
// @public
|
|
export const imageShapeMigrations: TLPropsMigrations;
|
|
|
|
// @public
|
|
export const imageShapeProps: RecordProps<TLImageShape>;
|
|
|
|
// @public
|
|
export const InstancePageStateRecordType: RecordType<TLInstancePageState, "pageId">;
|
|
|
|
// @public
|
|
export const InstancePresenceRecordType: RecordType<TLInstancePresence, "currentPageId" | "userId" | "userName">;
|
|
|
|
// @public
|
|
export function isBinding(record?: UnknownRecord): record is TLBinding;
|
|
|
|
// @public
|
|
export function isBindingId(id?: string): id is TLBindingId;
|
|
|
|
// @public
|
|
export function isCommentId(id: string): id is TLCommentId;
|
|
|
|
// @public
|
|
export function isCommentReactionId(id: string): id is TLCommentReactionId;
|
|
|
|
// @public
|
|
export function isCommentThreadId(id: string): id is TLCommentThreadId;
|
|
|
|
// @public
|
|
export function isCustomRecord(typeName: string, record?: UnknownRecord): boolean;
|
|
|
|
// @public
|
|
export function isCustomRecordId(typeName: string, id?: string): boolean;
|
|
|
|
// @public
|
|
export function isDocument(record?: UnknownRecord): record is TLDocument;
|
|
|
|
// @internal (undocumented)
|
|
export function isFontEntry(value: unknown): value is TLThemeFont;
|
|
|
|
// @public
|
|
export function isPage(record?: UnknownRecord): record is TLPage;
|
|
|
|
// @public
|
|
export function isPageId(id: string): id is TLPageId;
|
|
|
|
// @public
|
|
export function isShape(record?: UnknownRecord): record is TLShape;
|
|
|
|
// @public
|
|
export function isShapeId(id?: string): id is TLShapeId;
|
|
|
|
// @public (undocumented)
|
|
export function isUserId(id: string): id is TLUserId;
|
|
|
|
// @public (undocumented)
|
|
export const LANGUAGES: readonly [{
|
|
readonly label: 'Bahasa Indonesia';
|
|
readonly locale: 'id';
|
|
}, {
|
|
readonly label: 'Bahasa Melayu';
|
|
readonly locale: 'ms';
|
|
}, {
|
|
readonly label: 'Català';
|
|
readonly locale: 'ca';
|
|
}, {
|
|
readonly label: 'Čeština';
|
|
readonly locale: 'cs';
|
|
}, {
|
|
readonly label: 'Danish';
|
|
readonly locale: 'da';
|
|
}, {
|
|
readonly label: 'Deutsch';
|
|
readonly locale: 'de';
|
|
}, {
|
|
readonly label: 'English';
|
|
readonly locale: 'en';
|
|
}, {
|
|
readonly label: 'Español';
|
|
readonly locale: 'es';
|
|
}, {
|
|
readonly label: 'Filipino';
|
|
readonly locale: 'tl';
|
|
}, {
|
|
readonly label: 'Français';
|
|
readonly locale: 'fr';
|
|
}, {
|
|
readonly label: 'Galego';
|
|
readonly locale: 'gl';
|
|
}, {
|
|
readonly label: 'Hrvatski';
|
|
readonly locale: 'hr';
|
|
}, {
|
|
readonly label: 'Italiano';
|
|
readonly locale: 'it';
|
|
}, {
|
|
readonly label: 'Magyar';
|
|
readonly locale: 'hu';
|
|
}, {
|
|
readonly label: 'Nederlands';
|
|
readonly locale: 'nl';
|
|
}, {
|
|
readonly label: 'Norwegian';
|
|
readonly locale: 'no';
|
|
}, {
|
|
readonly label: 'Polski';
|
|
readonly locale: 'pl';
|
|
}, {
|
|
readonly label: 'Português - Brasil';
|
|
readonly locale: 'pt-br';
|
|
}, {
|
|
readonly label: 'Português - Europeu';
|
|
readonly locale: 'pt-pt';
|
|
}, {
|
|
readonly label: 'Română';
|
|
readonly locale: 'ro';
|
|
}, {
|
|
readonly label: 'Slovenščina';
|
|
readonly locale: 'sl';
|
|
}, {
|
|
readonly label: 'Somali';
|
|
readonly locale: 'so';
|
|
}, {
|
|
readonly label: 'Suomi';
|
|
readonly locale: 'fi';
|
|
}, {
|
|
readonly label: 'Svenska';
|
|
readonly locale: 'sv';
|
|
}, {
|
|
readonly label: 'Tiếng Việt';
|
|
readonly locale: 'vi';
|
|
}, {
|
|
readonly label: 'Türkçe';
|
|
readonly locale: 'tr';
|
|
}, {
|
|
readonly label: 'Ελληνικά';
|
|
readonly locale: 'el';
|
|
}, {
|
|
readonly label: 'Русский';
|
|
readonly locale: 'ru';
|
|
}, {
|
|
readonly label: 'Українська';
|
|
readonly locale: 'uk';
|
|
}, {
|
|
readonly label: 'עברית';
|
|
readonly locale: 'he';
|
|
}, {
|
|
readonly label: 'اردو';
|
|
readonly locale: 'ur';
|
|
}, {
|
|
readonly label: 'عربي';
|
|
readonly locale: 'ar';
|
|
}, {
|
|
readonly label: 'فارسی';
|
|
readonly locale: 'fa';
|
|
}, {
|
|
readonly label: 'नेपाली';
|
|
readonly locale: 'ne';
|
|
}, {
|
|
readonly label: 'मराठी';
|
|
readonly locale: 'mr';
|
|
}, {
|
|
readonly label: 'हिन्दी';
|
|
readonly locale: 'hi-in';
|
|
}, {
|
|
readonly label: 'বাংলা';
|
|
readonly locale: 'bn';
|
|
}, {
|
|
readonly label: 'ਪੰਜਾਬੀ';
|
|
readonly locale: 'pa';
|
|
}, {
|
|
readonly label: 'ગુજરાતી';
|
|
readonly locale: 'gu-in';
|
|
}, {
|
|
readonly label: 'தமிழ்';
|
|
readonly locale: 'ta';
|
|
}, {
|
|
readonly label: 'తెలుగు';
|
|
readonly locale: 'te';
|
|
}, {
|
|
readonly label: 'ಕನ್ನಡ';
|
|
readonly locale: 'kn';
|
|
}, {
|
|
readonly label: 'മലയാളം';
|
|
readonly locale: 'ml';
|
|
}, {
|
|
readonly label: 'ภาษาไทย';
|
|
readonly locale: 'th';
|
|
}, {
|
|
readonly label: 'ភាសាខ្មែរ';
|
|
readonly locale: 'km-kh';
|
|
}, {
|
|
readonly label: '한국어';
|
|
readonly locale: 'ko-kr';
|
|
}, {
|
|
readonly label: '日本語';
|
|
readonly locale: 'ja';
|
|
}, {
|
|
readonly label: '简体中文';
|
|
readonly locale: 'zh-cn';
|
|
}, {
|
|
readonly label: '繁體中文 (台灣)';
|
|
readonly locale: 'zh-tw';
|
|
}];
|
|
|
|
// @public
|
|
export const lineShapeMigrations: TLPropsMigrations;
|
|
|
|
// @public
|
|
export const lineShapeProps: RecordProps<TLLineShape>;
|
|
|
|
// @public
|
|
export const LineShapeSplineStyle: EnumStyleProp<"cubic" | "line">;
|
|
|
|
// @public
|
|
export const noteShapeMigrations: TLPropsMigrations;
|
|
|
|
// @public
|
|
export const noteShapeProps: RecordProps<TLNoteShape>;
|
|
|
|
// @public
|
|
export const opacityValidator: T.Validator<number>;
|
|
|
|
// @public
|
|
export const pageIdValidator: T.Validator<TLPageId>;
|
|
|
|
// @public
|
|
export const PageRecordType: RecordType<TLPage, "index" | "name">;
|
|
|
|
// @public
|
|
export const parentIdValidator: T.Validator<TLParentId>;
|
|
|
|
// @internal
|
|
export function pluckPreservingValues(val?: null | TLInstance): null | Partial<TLInstance>;
|
|
|
|
// @public
|
|
export const PointerRecordType: RecordType<TLPointer, never>;
|
|
|
|
// @public
|
|
export type RecordProps<R extends UnknownRecord & {
|
|
props: object;
|
|
}> = {
|
|
[K in keyof R['props']]: T.Validatable<R['props'][K]>;
|
|
};
|
|
|
|
// @public
|
|
export type RecordPropsType<Config extends Record<string, T.Validatable<any>>> = MakeUndefinedOptional<{
|
|
[K in keyof Config]: T.TypeOf<Config[K]>;
|
|
}>;
|
|
|
|
// @public
|
|
export function registerColorsFromThemes(definitions: TLThemes): void;
|
|
|
|
// @public
|
|
export function registerFontsFromThemes(definitions: TLThemes): void;
|
|
|
|
// @public
|
|
export const richTextValidator: T.ObjectValidator<{
|
|
attrs?: any;
|
|
content: unknown[];
|
|
type: string;
|
|
}>;
|
|
|
|
// @public
|
|
export const rootBindingMigrations: MigrationSequence;
|
|
|
|
// @public
|
|
export const rootShapeMigrations: MigrationSequence;
|
|
|
|
// @public
|
|
export interface SchemaPropsInfo {
|
|
meta?: Record<string, StoreValidator<any>>;
|
|
migrations?: LegacyMigrations | MigrationSequence | TLPropsMigrations;
|
|
props?: Record<string, StoreValidator<any>>;
|
|
}
|
|
|
|
// @public
|
|
export const scribbleValidator: T.ObjectValidator<TLScribble>;
|
|
|
|
// @public
|
|
export type SetValue<T extends Set<any>> = T extends Set<infer U> ? U : never;
|
|
|
|
// @public
|
|
export const shapeIdValidator: T.Validator<TLShapeId>;
|
|
|
|
// @public
|
|
export type ShapeWithCrop = ExtractShapeByProps<{
|
|
crop: null | TLShapeCrop;
|
|
h: number;
|
|
w: number;
|
|
}>;
|
|
|
|
// @public
|
|
export class StyleProp<Type> implements T.Validatable<Type> {
|
|
// @internal
|
|
protected constructor(id: string, defaultValue: Type, type: T.Validatable<Type>);
|
|
// (undocumented)
|
|
defaultValue: Type;
|
|
static define<Type>(uniqueId: string, options: {
|
|
defaultValue: Type;
|
|
type?: T.Validatable<Type>;
|
|
}): StyleProp<Type>;
|
|
static defineEnum<const Values extends readonly unknown[]>(uniqueId: string, options: {
|
|
defaultValue: Values[number];
|
|
values: Values;
|
|
}): EnumStyleProp<Values[number]>;
|
|
// (undocumented)
|
|
readonly id: string;
|
|
// (undocumented)
|
|
setDefaultValue(value: Type): void;
|
|
// (undocumented)
|
|
readonly type: T.Validatable<Type>;
|
|
// (undocumented)
|
|
validate(value: unknown): Type;
|
|
// (undocumented)
|
|
validateUsingKnownGoodVersion(prevValue: Type, newValue: unknown): Type;
|
|
}
|
|
|
|
// @public (undocumented)
|
|
export type StylePropValue<T extends StyleProp<any>> = T extends StyleProp<infer U> ? U : never;
|
|
|
|
// @public
|
|
export const textShapeMigrations: TLPropsMigrations;
|
|
|
|
// @public
|
|
export const textShapeProps: RecordProps<TLTextShape>;
|
|
|
|
// @public
|
|
export const TL_CANVAS_UI_COLOR_TYPES: Set<"accent" | "black" | "laser" | "muted-1" | "selection-fill" | "selection-stroke" | "white">;
|
|
|
|
// @public
|
|
export const TL_CURSOR_TYPES: Set<string>;
|
|
|
|
// @public
|
|
export const TL_HANDLE_TYPES: Set<"clone" | "create" | "vertex" | "virtual">;
|
|
|
|
// @public
|
|
export const TL_SCRIBBLE_STATES: Set<"active" | "complete" | "paused" | "starting" | "stopping">;
|
|
|
|
// @public
|
|
export type TLArrowBinding = TLBaseBinding<'arrow', TLArrowBindingProps>;
|
|
|
|
// @public
|
|
export interface TLArrowBindingProps {
|
|
isExact: boolean;
|
|
isPrecise: boolean;
|
|
normalizedAnchor: VecModel;
|
|
snap: ElbowArrowSnap;
|
|
terminal: 'end' | 'start';
|
|
}
|
|
|
|
// @public
|
|
export type TLArrowShape = TLBaseShape<'arrow', TLArrowShapeProps>;
|
|
|
|
// @public
|
|
export type TLArrowShapeArrowheadStyle = T.TypeOf<typeof ArrowShapeArrowheadStartStyle>;
|
|
|
|
// @public
|
|
export type TLArrowShapeKind = T.TypeOf<typeof ArrowShapeKindStyle>;
|
|
|
|
// @public
|
|
export interface TLArrowShapeProps {
|
|
// (undocumented)
|
|
arrowheadEnd: TLArrowShapeArrowheadStyle;
|
|
// (undocumented)
|
|
arrowheadStart: TLArrowShapeArrowheadStyle;
|
|
// (undocumented)
|
|
bend: number;
|
|
// (undocumented)
|
|
color: TLDefaultColorStyle;
|
|
// (undocumented)
|
|
dash: TLDefaultDashStyle;
|
|
// (undocumented)
|
|
elbowMidPoint: number;
|
|
// (undocumented)
|
|
end: VecModel;
|
|
// (undocumented)
|
|
fill: TLDefaultFillStyle;
|
|
// (undocumented)
|
|
font: TLDefaultFontStyle;
|
|
// (undocumented)
|
|
kind: TLArrowShapeKind;
|
|
// (undocumented)
|
|
labelColor: TLDefaultColorStyle;
|
|
// (undocumented)
|
|
labelPosition: number;
|
|
// (undocumented)
|
|
richText: TLRichText;
|
|
// (undocumented)
|
|
scale: number;
|
|
// (undocumented)
|
|
size: TLDefaultSizeStyle;
|
|
// (undocumented)
|
|
start: VecModel;
|
|
}
|
|
|
|
// @public
|
|
export type TLAsset<K extends keyof TLIndexedAssets = keyof TLIndexedAssets> = TLIndexedAssets[K];
|
|
|
|
// @public
|
|
export interface TLAssetContext {
|
|
dpr: number;
|
|
networkEffectiveType: null | string;
|
|
screenScale: number;
|
|
shouldResolveToOriginal: boolean;
|
|
steppedScreenScale: number;
|
|
}
|
|
|
|
// @public
|
|
export type TLAssetId = RecordId<TLBaseAsset<any, any>>;
|
|
|
|
// @public
|
|
export type TLAssetPartial<T extends TLAsset = TLAsset> = T extends T ? {
|
|
id: TLAssetId;
|
|
meta?: Partial<T['meta']>;
|
|
props?: Partial<T['props']>;
|
|
type: T['type'];
|
|
} & Partial<Omit<T, 'id' | 'meta' | 'props' | 'type'>> : never;
|
|
|
|
// @public
|
|
export type TLAssetShape = ExtractShapeByProps<{
|
|
assetId: TLAssetId;
|
|
}>;
|
|
|
|
// @public
|
|
export interface TLAssetStore {
|
|
remove?(assetIds: TLAssetId[]): Promise<void>;
|
|
resolve?(asset: TLAsset, ctx: TLAssetContext): null | Promise<null | string> | string;
|
|
upload(asset: TLAsset, file: File, abortSignal?: AbortSignal): Promise<{
|
|
meta?: JsonObject;
|
|
src: string;
|
|
}>;
|
|
}
|
|
|
|
// @public
|
|
export interface TLBaseAsset<Type extends string, Props> extends BaseRecord<'asset', TLAssetId> {
|
|
meta: JsonObject;
|
|
props: Props;
|
|
type: Type;
|
|
}
|
|
|
|
// @public
|
|
export interface TLBaseBinding<Type extends string, Props extends object> {
|
|
fromId: TLShapeId;
|
|
// (undocumented)
|
|
readonly id: TLBindingId;
|
|
meta: JsonObject;
|
|
props: Props;
|
|
toId: TLShapeId;
|
|
type: Type;
|
|
// (undocumented)
|
|
readonly typeName: 'binding';
|
|
}
|
|
|
|
// @public
|
|
export interface TLBaseShape<Type extends string, Props extends object> {
|
|
// (undocumented)
|
|
readonly id: TLShapeId;
|
|
// (undocumented)
|
|
index: IndexKey;
|
|
// (undocumented)
|
|
isLocked: boolean;
|
|
// (undocumented)
|
|
meta: JsonObject;
|
|
// (undocumented)
|
|
opacity: TLOpacityType;
|
|
// (undocumented)
|
|
parentId: TLParentId;
|
|
// (undocumented)
|
|
props: Props;
|
|
// (undocumented)
|
|
rotation: number;
|
|
// (undocumented)
|
|
type: Type;
|
|
// (undocumented)
|
|
readonly typeName: 'shape';
|
|
// (undocumented)
|
|
x: number;
|
|
// (undocumented)
|
|
y: number;
|
|
}
|
|
|
|
// @public
|
|
export type TLBinding<K extends keyof TLIndexedBindings = keyof TLIndexedBindings> = TLIndexedBindings[K];
|
|
|
|
// @public
|
|
export type TLBindingCreate<T extends TLBinding = TLBinding> = T extends T ? {
|
|
fromId: T['fromId'];
|
|
id?: TLBindingId;
|
|
meta?: Partial<T['meta']>;
|
|
props?: Partial<T['props']>;
|
|
toId: T['toId'];
|
|
type: T['type'];
|
|
typeName?: T['typeName'];
|
|
} : never;
|
|
|
|
// @public
|
|
export type TLBindingId = RecordId<TLBinding>;
|
|
|
|
// @public
|
|
export type TLBindingUpdate<T extends TLBinding = TLBinding> = T extends T ? {
|
|
fromId?: T['fromId'];
|
|
id: TLBindingId;
|
|
meta?: Partial<T['meta']>;
|
|
props?: Partial<T['props']>;
|
|
toId?: T['toId'];
|
|
type: T['type'];
|
|
typeName?: T['typeName'];
|
|
} : never;
|
|
|
|
// @public
|
|
export type TLBookmarkAsset = TLBaseAsset<'bookmark', {
|
|
description: string;
|
|
favicon: string;
|
|
image: string;
|
|
src: null | string;
|
|
title: string;
|
|
}>;
|
|
|
|
// @public
|
|
export type TLBookmarkShape = TLBaseShape<'bookmark', TLBookmarkShapeProps>;
|
|
|
|
// @public
|
|
export interface TLBookmarkShapeProps {
|
|
assetId: null | TLAssetId;
|
|
h: number;
|
|
url: string;
|
|
w: number;
|
|
}
|
|
|
|
// @public
|
|
export interface TLCamera extends BaseRecord<'camera', TLCameraId> {
|
|
meta: JsonObject;
|
|
x: number;
|
|
y: number;
|
|
z: number;
|
|
}
|
|
|
|
// @public
|
|
export type TLCameraId = RecordId<TLCamera>;
|
|
|
|
// @public
|
|
export type TLCanvasUiColor = SetValue<typeof TL_CANVAS_UI_COLOR_TYPES>;
|
|
|
|
// @public
|
|
export interface TLComment extends BaseRecord<'comment', TLCommentId> {
|
|
authorId: string;
|
|
body: TLRichText;
|
|
// (undocumented)
|
|
createdAt: number;
|
|
editedAt: null | number;
|
|
isDeleted: boolean;
|
|
// (undocumented)
|
|
meta: JsonObject;
|
|
pageId: TLPageId;
|
|
threadId: TLCommentThreadId;
|
|
}
|
|
|
|
// @public
|
|
export type TLCommentAnchor = {
|
|
pinX?: number;
|
|
h: number;
|
|
pinY?: number;
|
|
type: 'region';
|
|
w: number;
|
|
x: number;
|
|
y: number;
|
|
} | {
|
|
isPrecise: boolean;
|
|
shapeId: TLShapeId;
|
|
type: 'shape';
|
|
x: number;
|
|
y: number;
|
|
} | {
|
|
type: 'page';
|
|
} | {
|
|
type: 'point';
|
|
x: number;
|
|
y: number;
|
|
};
|
|
|
|
// @public (undocumented)
|
|
export type TLCommentId = RecordId<TLComment>;
|
|
|
|
// @public
|
|
export interface TLCommentReaction extends BaseRecord<'comment-reaction', TLCommentReactionId> {
|
|
commentId: TLCommentId;
|
|
// (undocumented)
|
|
createdAt: number;
|
|
emoji: string;
|
|
// (undocumented)
|
|
meta: JsonObject;
|
|
pageId: TLPageId;
|
|
threadId: TLCommentThreadId;
|
|
userId: string;
|
|
}
|
|
|
|
// @public (undocumented)
|
|
export type TLCommentReactionId = RecordId<TLCommentReaction>;
|
|
|
|
// @public
|
|
export interface TLCommentThread extends BaseRecord<'comment-thread', TLCommentThreadId> {
|
|
anchor: TLCommentAnchor;
|
|
// (undocumented)
|
|
createdAt: number;
|
|
createdBy: string;
|
|
isDeleted: boolean;
|
|
// (undocumented)
|
|
meta: JsonObject;
|
|
pageId: TLPageId;
|
|
resolved: {
|
|
at: number;
|
|
by: string;
|
|
} | null;
|
|
}
|
|
|
|
// @public (undocumented)
|
|
export type TLCommentThreadId = RecordId<TLCommentThread>;
|
|
|
|
// @public
|
|
export type TLCreateShapePartial<T extends TLShape = TLShape> = T extends T ? {
|
|
meta?: Partial<T['meta']>;
|
|
props?: Partial<T['props']>;
|
|
type: T['type'];
|
|
} & Partial<Omit<T, 'meta' | 'props' | 'type'>> : never;
|
|
|
|
// @public
|
|
export interface TLCursor {
|
|
rotation: number;
|
|
type: TLCursorType;
|
|
}
|
|
|
|
// @public
|
|
export type TLCursorType = SetValue<typeof TL_CURSOR_TYPES>;
|
|
|
|
// @public
|
|
export type TLCustomRecord = TLIndexedRecords[keyof TLIndexedRecords];
|
|
|
|
// @public
|
|
export type TLDefaultAsset = TLBookmarkAsset | TLImageAsset | TLVideoAsset;
|
|
|
|
// @public
|
|
export type TLDefaultBinding = TLArrowBinding;
|
|
|
|
// @public
|
|
export interface TLDefaultColor {
|
|
// (undocumented)
|
|
fill: string;
|
|
// (undocumented)
|
|
frameFill: string;
|
|
// (undocumented)
|
|
frameHeadingFill: string;
|
|
// (undocumented)
|
|
frameHeadingStroke: string;
|
|
// (undocumented)
|
|
frameStroke: string;
|
|
// (undocumented)
|
|
frameText: string;
|
|
// (undocumented)
|
|
highlightP3: string;
|
|
// (undocumented)
|
|
highlightSrgb: string;
|
|
// (undocumented)
|
|
linedFill: string;
|
|
// (undocumented)
|
|
noteFill: string;
|
|
// (undocumented)
|
|
noteText: string;
|
|
// (undocumented)
|
|
pattern: string;
|
|
// (undocumented)
|
|
semi: string;
|
|
// (undocumented)
|
|
solid: string;
|
|
}
|
|
|
|
// @public
|
|
export type TLDefaultColorStyle = {
|
|
[K in keyof TLThemeDefaultColors]: TLThemeDefaultColors[K] extends TLDefaultColor ? K : never;
|
|
}[keyof TLThemeDefaultColors] & string;
|
|
|
|
// @public
|
|
export type TLDefaultDashStyle = T.TypeOf<typeof DefaultDashStyle>;
|
|
|
|
// @public
|
|
export type TLDefaultFillStyle = T.TypeOf<typeof DefaultFillStyle>;
|
|
|
|
// @public
|
|
export type TLDefaultFontStyle = keyof TLThemeFonts & string;
|
|
|
|
// @public
|
|
export type TLDefaultHorizontalAlignStyle = T.TypeOf<typeof DefaultHorizontalAlignStyle>;
|
|
|
|
// @public
|
|
export type TLDefaultRecord = TLAsset | TLBinding | TLCamera | TLDocument | TLInstance | TLInstancePageState | TLInstancePresence | TLPage | TLPointer | TLShape | TLUser;
|
|
|
|
// @public
|
|
export type TLDefaultShape = TLArrowShape | TLBookmarkShape | TLDrawShape | TLEmbedShape | TLFrameShape | TLGeoShape | TLGroupShape | TLHighlightShape | TLImageShape | TLLineShape | TLNoteShape | TLTextShape | TLVideoShape;
|
|
|
|
// @public
|
|
export type TLDefaultSizeStyle = T.TypeOf<typeof DefaultSizeStyle>;
|
|
|
|
// @public
|
|
export type TLDefaultTextAlignStyle = T.TypeOf<typeof DefaultTextAlignStyle>;
|
|
|
|
// @public
|
|
export type TLDefaultVerticalAlignStyle = T.TypeOf<typeof DefaultVerticalAlignStyle>;
|
|
|
|
// @public
|
|
export interface TLDocument extends BaseRecord<'document', RecordId<TLDocument>> {
|
|
gridSize: number;
|
|
meta: JsonObject;
|
|
name: string;
|
|
}
|
|
|
|
// @public
|
|
export const TLDOCUMENT_ID: RecordId<TLDocument>;
|
|
|
|
// @public
|
|
export type TLDrawShape = TLBaseShape<'draw', TLDrawShapeProps>;
|
|
|
|
// @public
|
|
export interface TLDrawShapeProps {
|
|
color: TLDefaultColorStyle;
|
|
dash: TLDefaultDashStyle;
|
|
fill: TLDefaultFillStyle;
|
|
isClosed: boolean;
|
|
isComplete: boolean;
|
|
isPen: boolean;
|
|
scale: number;
|
|
scaleX: number;
|
|
scaleY: number;
|
|
segments: TLDrawShapeSegment[];
|
|
size: TLDefaultSizeStyle;
|
|
}
|
|
|
|
// @public
|
|
export interface TLDrawShapeSegment {
|
|
dim?: 2 | 3;
|
|
path: string;
|
|
type: 'free' | 'straight';
|
|
}
|
|
|
|
// @public
|
|
export type TLEmbedShape = TLBaseShape<'embed', TLEmbedShapeProps>;
|
|
|
|
// @public
|
|
export interface TLEmbedShapeProps {
|
|
h: number;
|
|
url: string;
|
|
w: number;
|
|
}
|
|
|
|
// @public
|
|
export interface TLFontFace {
|
|
readonly ascentOverride?: string;
|
|
readonly descentOverride?: string;
|
|
readonly family: string;
|
|
readonly featureSettings?: string;
|
|
readonly lineGapOverride?: string;
|
|
readonly src: TLFontFaceSource;
|
|
readonly stretch?: string;
|
|
readonly style?: string;
|
|
readonly unicodeRange?: string;
|
|
readonly weight?: string;
|
|
}
|
|
|
|
// @public
|
|
export interface TLFontFaceSource {
|
|
// (undocumented)
|
|
format?: string;
|
|
// (undocumented)
|
|
tech?: string;
|
|
url: string;
|
|
}
|
|
|
|
// @public
|
|
export type TLFrameShape = TLBaseShape<'frame', TLFrameShapeProps>;
|
|
|
|
// @public
|
|
export interface TLFrameShapeProps {
|
|
color: TLDefaultColorStyle;
|
|
h: number;
|
|
name: string;
|
|
w: number;
|
|
}
|
|
|
|
// @public
|
|
export type TLGeoShape = TLBaseShape<'geo', TLGeoShapeProps>;
|
|
|
|
// @public
|
|
export type TLGeoShapeGeoStyle = T.TypeOf<typeof GeoShapeGeoStyle>;
|
|
|
|
// @public
|
|
export interface TLGeoShapeProps {
|
|
align: TLDefaultHorizontalAlignStyle;
|
|
color: TLDefaultColorStyle;
|
|
dash: TLDefaultDashStyle;
|
|
fill: TLDefaultFillStyle;
|
|
flipX: boolean;
|
|
flipY: boolean;
|
|
font: TLDefaultFontStyle;
|
|
geo: TLGeoShapeGeoStyle;
|
|
growY: number;
|
|
h: number;
|
|
labelColor: TLDefaultColorStyle;
|
|
richText: TLRichText;
|
|
scale: number;
|
|
size: TLDefaultSizeStyle;
|
|
url: string;
|
|
verticalAlign: TLDefaultVerticalAlignStyle;
|
|
w: number;
|
|
}
|
|
|
|
// @public (undocumented)
|
|
export interface TLGlobalAssetPropsMap {
|
|
}
|
|
|
|
// @public (undocumented)
|
|
export interface TLGlobalBindingPropsMap {
|
|
}
|
|
|
|
// @public
|
|
export interface TLGlobalRecordPropsMap {
|
|
}
|
|
|
|
// @public (undocumented)
|
|
export interface TLGlobalShapePropsMap {
|
|
}
|
|
|
|
// @public
|
|
export type TLGroupShape = TLBaseShape<'group', TLGroupShapeProps>;
|
|
|
|
// @public
|
|
export interface TLGroupShapeProps {
|
|
}
|
|
|
|
// @public
|
|
export interface TLHandle {
|
|
// @deprecated (undocumented)
|
|
canSnap?: boolean;
|
|
id: string;
|
|
index: IndexKey;
|
|
label?: string;
|
|
snapReferenceHandleId?: string;
|
|
snapType?: 'align' | 'point';
|
|
type: TLHandleType;
|
|
x: number;
|
|
y: number;
|
|
}
|
|
|
|
// @public
|
|
export type TLHandleType = SetValue<typeof TL_HANDLE_TYPES>;
|
|
|
|
// @public
|
|
export type TLHighlightShape = TLBaseShape<'highlight', TLHighlightShapeProps>;
|
|
|
|
// @public
|
|
export interface TLHighlightShapeProps {
|
|
color: TLDefaultColorStyle;
|
|
isComplete: boolean;
|
|
isPen: boolean;
|
|
scale: number;
|
|
scaleX: number;
|
|
scaleY: number;
|
|
segments: TLDrawShapeSegment[];
|
|
size: TLDefaultSizeStyle;
|
|
}
|
|
|
|
// @public
|
|
export type TLImageAsset = TLBaseAsset<'image', {
|
|
fileSize?: number;
|
|
h: number;
|
|
isAnimated: boolean;
|
|
mimeType: null | string;
|
|
name: string;
|
|
pixelRatio?: number;
|
|
src: null | string;
|
|
w: number;
|
|
}>;
|
|
|
|
// @public
|
|
export type TLImageShape = TLBaseShape<'image', TLImageShapeProps>;
|
|
|
|
// @public
|
|
export interface TLImageShapeProps {
|
|
altText: string;
|
|
assetId: null | TLAssetId;
|
|
crop: null | TLShapeCrop;
|
|
flipX: boolean;
|
|
flipY: boolean;
|
|
h: number;
|
|
playing: boolean;
|
|
url: string;
|
|
w: number;
|
|
}
|
|
|
|
// @public (undocumented)
|
|
export type TLIndexedAssets = {
|
|
[K in keyof TLGlobalAssetPropsMap | TLDefaultAsset['type'] as K extends TLDefaultAsset['type'] ? K extends keyof TLGlobalAssetPropsMap ? TLGlobalAssetPropsMap[K] extends null | undefined ? never : K : K : K]: K extends TLDefaultAsset['type'] ? K extends keyof TLGlobalAssetPropsMap ? TLBaseAsset<K, TLGlobalAssetPropsMap[K]> : Extract<TLDefaultAsset, {
|
|
type: K;
|
|
}> : TLBaseAsset<K, TLGlobalAssetPropsMap[K & keyof TLGlobalAssetPropsMap]>;
|
|
};
|
|
|
|
// @public (undocumented)
|
|
export type TLIndexedBindings = {
|
|
[K in keyof TLGlobalBindingPropsMap | TLDefaultBinding['type'] as K extends TLDefaultBinding['type'] ? K extends keyof TLGlobalBindingPropsMap ? TLGlobalBindingPropsMap[K] extends null | undefined ? never : K : K : K]: K extends TLDefaultBinding['type'] ? K extends keyof TLGlobalBindingPropsMap ? TLBaseBinding<K, TLGlobalBindingPropsMap[K]> : Extract<TLDefaultBinding, {
|
|
type: K;
|
|
}> : TLBaseBinding<K, TLGlobalBindingPropsMap[K & keyof TLGlobalBindingPropsMap]>;
|
|
};
|
|
|
|
// @public
|
|
export type TLIndexedRecords = {
|
|
[K in keyof TLGlobalRecordPropsMap as TLGlobalRecordPropsMap[K] extends null | undefined ? never : K]: TLGlobalRecordPropsMap[K];
|
|
};
|
|
|
|
// @public (undocumented)
|
|
export type TLIndexedShapes = {
|
|
[K in keyof TLGlobalShapePropsMap | TLDefaultShape['type'] as K extends TLDefaultShape['type'] ? K extends 'group' ? K : K extends keyof TLGlobalShapePropsMap ? TLGlobalShapePropsMap[K] extends null | undefined ? never : K : K : K]: K extends 'group' ? Extract<TLDefaultShape, {
|
|
type: K;
|
|
}> : K extends TLDefaultShape['type'] ? K extends keyof TLGlobalShapePropsMap ? TLBaseShape<K, TLGlobalShapePropsMap[K]> : Extract<TLDefaultShape, {
|
|
type: K;
|
|
}> : TLBaseShape<K, TLGlobalShapePropsMap[K & keyof TLGlobalShapePropsMap]>;
|
|
};
|
|
|
|
// @public
|
|
export interface TLInstance extends BaseRecord<'instance', TLInstanceId> {
|
|
// (undocumented)
|
|
brush: BoxModel | null;
|
|
cameraState: 'idle' | 'moving';
|
|
// (undocumented)
|
|
chatMessage: string;
|
|
// (undocumented)
|
|
currentPageId: TLPageId;
|
|
// (undocumented)
|
|
cursor: TLCursor;
|
|
// (undocumented)
|
|
devicePixelRatio: number;
|
|
// (undocumented)
|
|
duplicateProps: {
|
|
offset: {
|
|
x: number;
|
|
y: number;
|
|
};
|
|
shapeIds: TLShapeId[];
|
|
} | null;
|
|
// (undocumented)
|
|
exportBackground: boolean;
|
|
// (undocumented)
|
|
followingUserId: null | TLUserId;
|
|
// (undocumented)
|
|
highlightedUserIds: TLUserId[];
|
|
// (undocumented)
|
|
insets: boolean[];
|
|
// (undocumented)
|
|
isChangingStyle: boolean;
|
|
// (undocumented)
|
|
isChatting: boolean;
|
|
isCoarsePointer: boolean;
|
|
// (undocumented)
|
|
isDebugMode: boolean;
|
|
// (undocumented)
|
|
isFocused: boolean;
|
|
// (undocumented)
|
|
isFocusMode: boolean;
|
|
// (undocumented)
|
|
isGridMode: boolean;
|
|
isHoveringCanvas: boolean | null;
|
|
// (undocumented)
|
|
isPenMode: boolean;
|
|
// (undocumented)
|
|
isReadonly: boolean;
|
|
// (undocumented)
|
|
isToolLocked: boolean;
|
|
// (undocumented)
|
|
meta: JsonObject;
|
|
// (undocumented)
|
|
opacityForNextShape: TLOpacityType;
|
|
// (undocumented)
|
|
openMenus: string[];
|
|
// (undocumented)
|
|
screenBounds: BoxModel;
|
|
// (undocumented)
|
|
scribbles: TLScribble[];
|
|
// (undocumented)
|
|
stylesForNextShape: Record<string, unknown>;
|
|
// (undocumented)
|
|
zoomBrush: BoxModel | null;
|
|
}
|
|
|
|
// @public
|
|
export const TLINSTANCE_ID: TLInstanceId;
|
|
|
|
// @public
|
|
export type TLInstanceId = RecordId<TLInstance>;
|
|
|
|
// @public
|
|
export interface TLInstancePageState extends BaseRecord<'instance_page_state', TLInstancePageStateId> {
|
|
// (undocumented)
|
|
croppingShapeId: null | TLShapeId;
|
|
// (undocumented)
|
|
editingShapeId: null | TLShapeId;
|
|
// (undocumented)
|
|
erasingShapeIds: TLShapeId[];
|
|
// (undocumented)
|
|
focusedGroupId: null | TLShapeId;
|
|
// (undocumented)
|
|
hintingShapeIds: TLShapeId[];
|
|
// (undocumented)
|
|
hoveredShapeId: null | TLShapeId;
|
|
// (undocumented)
|
|
meta: JsonObject;
|
|
// (undocumented)
|
|
pageId: RecordId<TLPage>;
|
|
// (undocumented)
|
|
selectedShapeIds: TLShapeId[];
|
|
}
|
|
|
|
// @public
|
|
export type TLInstancePageStateId = RecordId<TLInstancePageState>;
|
|
|
|
// @public
|
|
export interface TLInstancePresence extends BaseRecord<'instance_presence', TLInstancePresenceID> {
|
|
// (undocumented)
|
|
brush: BoxModel | null;
|
|
// (undocumented)
|
|
camera: {
|
|
x: number;
|
|
y: number;
|
|
z: number;
|
|
} | null;
|
|
// (undocumented)
|
|
chatMessage: string;
|
|
// (undocumented)
|
|
color: string;
|
|
// (undocumented)
|
|
currentPageId: TLPageId;
|
|
// (undocumented)
|
|
cursor: {
|
|
rotation: number;
|
|
type: TLCursor['type'];
|
|
x: number;
|
|
y: number;
|
|
} | null;
|
|
// (undocumented)
|
|
followingUserId: null | TLUserId;
|
|
// (undocumented)
|
|
lastActivityTimestamp: null | number;
|
|
// (undocumented)
|
|
meta: JsonObject;
|
|
// (undocumented)
|
|
screenBounds: BoxModel | null;
|
|
// (undocumented)
|
|
scribbles: TLScribble[];
|
|
// (undocumented)
|
|
selectedShapeIds: TLShapeId[];
|
|
// (undocumented)
|
|
userId: TLUserId;
|
|
// (undocumented)
|
|
userName: string;
|
|
}
|
|
|
|
// @public
|
|
export type TLInstancePresenceID = RecordId<TLInstancePresence>;
|
|
|
|
// @public
|
|
export type TLLanguage = (typeof LANGUAGES)[number];
|
|
|
|
// @public
|
|
export type TLLineShape = TLBaseShape<'line', TLLineShapeProps>;
|
|
|
|
// @public
|
|
export interface TLLineShapePoint {
|
|
id: string;
|
|
index: IndexKey;
|
|
x: number;
|
|
y: number;
|
|
}
|
|
|
|
// @public
|
|
export interface TLLineShapeProps {
|
|
color: TLDefaultColorStyle;
|
|
dash: TLDefaultDashStyle;
|
|
points: Record<string, TLLineShapePoint>;
|
|
scale: number;
|
|
size: TLDefaultSizeStyle;
|
|
spline: TLLineShapeSplineStyle;
|
|
}
|
|
|
|
// @public
|
|
export type TLLineShapeSplineStyle = T.TypeOf<typeof LineShapeSplineStyle>;
|
|
|
|
// @public
|
|
export type TLNoteShape = TLBaseShape<'note', TLNoteShapeProps>;
|
|
|
|
// @public
|
|
export interface TLNoteShapeProps {
|
|
align: TLDefaultHorizontalAlignStyle;
|
|
color: TLDefaultColorStyle;
|
|
font: TLDefaultFontStyle;
|
|
fontSizeAdjustment: null | number;
|
|
growY: number;
|
|
labelColor: TLDefaultColorStyle;
|
|
richText: TLRichText;
|
|
scale: number;
|
|
size: TLDefaultSizeStyle;
|
|
textLastEditedBy: null | string;
|
|
url: string;
|
|
verticalAlign: TLDefaultVerticalAlignStyle;
|
|
}
|
|
|
|
// @public
|
|
export type TLOpacityType = number;
|
|
|
|
// @public
|
|
export interface TLPage extends BaseRecord<'page', TLPageId> {
|
|
// (undocumented)
|
|
index: IndexKey;
|
|
// (undocumented)
|
|
meta: JsonObject;
|
|
// (undocumented)
|
|
name: string;
|
|
}
|
|
|
|
// @public
|
|
export type TLPageId = RecordId<TLPage>;
|
|
|
|
// @public
|
|
export type TLParentId = TLPageId | TLShapeId;
|
|
|
|
// @public
|
|
export interface TLPointer extends BaseRecord<'pointer', TLPointerId> {
|
|
// (undocumented)
|
|
lastActivityTimestamp: number;
|
|
// (undocumented)
|
|
meta: JsonObject;
|
|
// (undocumented)
|
|
x: number;
|
|
// (undocumented)
|
|
y: number;
|
|
}
|
|
|
|
// @public
|
|
export const TLPOINTER_ID: TLPointerId;
|
|
|
|
// @public
|
|
export type TLPointerId = RecordId<TLPointer>;
|
|
|
|
// @public
|
|
export type TLPresenceStateInfo = Parameters<(typeof InstancePresenceRecordType)['create']>[0];
|
|
|
|
// @public
|
|
export interface TLPropsMigration {
|
|
// (undocumented)
|
|
readonly dependsOn?: MigrationId[];
|
|
readonly down?: 'none' | 'retired' | ((props: any) => any);
|
|
// (undocumented)
|
|
readonly id: MigrationId;
|
|
// (undocumented)
|
|
readonly up: (props: any) => any;
|
|
}
|
|
|
|
// @public
|
|
export interface TLPropsMigrations {
|
|
// (undocumented)
|
|
readonly sequence: Array<StandaloneDependsOn | TLPropsMigration>;
|
|
}
|
|
|
|
// @public
|
|
export type TLRecord = TLCustomRecord | TLDefaultRecord;
|
|
|
|
// @public
|
|
export interface TLRemovedDefaultThemeColors {
|
|
}
|
|
|
|
// @public
|
|
export type TLRichText = T.TypeOf<typeof richTextValidator>;
|
|
|
|
// @public
|
|
export type TLSchema = StoreSchema<TLRecord, TLStoreProps>;
|
|
|
|
// @public
|
|
export interface TLScribble {
|
|
color: TLCanvasUiColor;
|
|
delay: number;
|
|
id: string;
|
|
opacity: number;
|
|
points: VecModel[];
|
|
shrink: number;
|
|
size: number;
|
|
state: SetValue<typeof TL_SCRIBBLE_STATES>;
|
|
taper: boolean;
|
|
}
|
|
|
|
// @public
|
|
export type TLSerializedStore = SerializedStore<TLRecord>;
|
|
|
|
// @public
|
|
export type TLShape<K extends keyof TLIndexedShapes = keyof TLIndexedShapes> = TLIndexedShapes[K];
|
|
|
|
// @public
|
|
export interface TLShapeCrop {
|
|
// (undocumented)
|
|
bottomRight: VecModel;
|
|
// (undocumented)
|
|
isCircle?: boolean;
|
|
// (undocumented)
|
|
topLeft: VecModel;
|
|
}
|
|
|
|
// @public
|
|
export type TLShapeId = RecordId<TLShape>;
|
|
|
|
// @public
|
|
export type TLShapePartial<T extends TLShape = TLShape> = T extends T ? {
|
|
id: TLShapeId;
|
|
meta?: Partial<T['meta']>;
|
|
props?: Partial<T['props']>;
|
|
type: T['type'];
|
|
} & Partial<Omit<T, 'id' | 'meta' | 'props' | 'type'>> : never;
|
|
|
|
// @public
|
|
export type TLStore = Store<TLRecord, TLStoreProps>;
|
|
|
|
// @public
|
|
export interface TLStoreProps {
|
|
assets: Required<TLAssetStore>;
|
|
collaboration?: {
|
|
mode?: null | Signal<'readonly' | 'readwrite'>;
|
|
status: null | Signal<'offline' | 'online'>;
|
|
};
|
|
defaultName: string;
|
|
onMount(editor: unknown): (() => void) | void;
|
|
users: Required<TLUserStore>;
|
|
}
|
|
|
|
// @public
|
|
export type TLStoreSchema = StoreSchema<TLRecord, TLStoreProps>;
|
|
|
|
// @public
|
|
export type TLStoreSnapshot = StoreSnapshot<TLRecord>;
|
|
|
|
// @public
|
|
export type TLTextShape = TLBaseShape<'text', TLTextShapeProps>;
|
|
|
|
// @public
|
|
export interface TLTextShapeProps {
|
|
// (undocumented)
|
|
autoSize: boolean;
|
|
// (undocumented)
|
|
color: TLDefaultColorStyle;
|
|
// (undocumented)
|
|
font: TLDefaultFontStyle;
|
|
// (undocumented)
|
|
richText: TLRichText;
|
|
// (undocumented)
|
|
scale: number;
|
|
// (undocumented)
|
|
size: TLDefaultSizeStyle;
|
|
// (undocumented)
|
|
textAlign: TLDefaultTextAlignStyle;
|
|
// (undocumented)
|
|
w: number;
|
|
}
|
|
|
|
// @public
|
|
export interface TLTheme {
|
|
// (undocumented)
|
|
colors: {
|
|
dark: TLThemeColors;
|
|
light: TLThemeColors;
|
|
};
|
|
fonts: TLThemeFonts;
|
|
fontSize: number;
|
|
id: TLThemeId;
|
|
lineHeight: number;
|
|
strokeWidth: number;
|
|
}
|
|
|
|
// @public
|
|
export type TLThemeColors = Pick<TLThemeDefaultColors, TLThemeUiColorKeys> & Omit<TLThemeDefaultColors, keyof TLRemovedDefaultThemeColors | TLThemeUiColorKeys>;
|
|
|
|
// @public
|
|
export interface TLThemeDefaultColors {
|
|
// (undocumented)
|
|
'light-blue': TLDefaultColor;
|
|
// (undocumented)
|
|
'light-green': TLDefaultColor;
|
|
// (undocumented)
|
|
'light-red': TLDefaultColor;
|
|
// (undocumented)
|
|
'light-violet': TLDefaultColor;
|
|
// (undocumented)
|
|
background: string;
|
|
// (undocumented)
|
|
black: TLDefaultColor;
|
|
// (undocumented)
|
|
blue: TLDefaultColor;
|
|
brushFill: string;
|
|
brushStroke: string;
|
|
// (undocumented)
|
|
cursor: string;
|
|
// (undocumented)
|
|
green: TLDefaultColor;
|
|
// (undocumented)
|
|
grey: TLDefaultColor;
|
|
laser: string;
|
|
// (undocumented)
|
|
negativeSpace: string;
|
|
// (undocumented)
|
|
noteBorder: string;
|
|
// (undocumented)
|
|
orange: TLDefaultColor;
|
|
// (undocumented)
|
|
red: TLDefaultColor;
|
|
selectedContrast: string;
|
|
selectionFill: string;
|
|
selectionStroke: string;
|
|
snap: string;
|
|
// (undocumented)
|
|
solid: string;
|
|
// (undocumented)
|
|
text: string;
|
|
// (undocumented)
|
|
violet: TLDefaultColor;
|
|
// (undocumented)
|
|
white: TLDefaultColor;
|
|
// (undocumented)
|
|
yellow: TLDefaultColor;
|
|
}
|
|
|
|
// @public
|
|
export interface TLThemeFont {
|
|
faces?: TLFontFace[];
|
|
fontFamily: string;
|
|
icon?: unknown;
|
|
}
|
|
|
|
// @public
|
|
export interface TLThemeFonts {
|
|
// (undocumented)
|
|
draw: TLThemeFont;
|
|
// (undocumented)
|
|
mono: TLThemeFont;
|
|
// (undocumented)
|
|
sans: TLThemeFont;
|
|
// (undocumented)
|
|
serif: TLThemeFont;
|
|
}
|
|
|
|
// @public (undocumented)
|
|
export type TLThemeId = keyof TLThemes & string;
|
|
|
|
// @public
|
|
export interface TLThemes {
|
|
// (undocumented)
|
|
default: TLTheme;
|
|
}
|
|
|
|
// @public
|
|
export type TLThemeUiColorKeys = 'background' | 'brushFill' | 'brushStroke' | 'cursor' | 'laser' | 'negativeSpace' | 'noteBorder' | 'selectedContrast' | 'selectionFill' | 'selectionStroke' | 'snap' | 'solid' | 'text';
|
|
|
|
// @public
|
|
export type TLUnknownAsset = TLBaseAsset<string, object>;
|
|
|
|
// @public
|
|
export type TLUnknownBinding = TLBaseBinding<string, object>;
|
|
|
|
// @public
|
|
export type TLUnknownShape = TLBaseShape<string, object>;
|
|
|
|
// @public
|
|
export interface TLUser extends BaseRecord<'user', TLUserId> {
|
|
// (undocumented)
|
|
color: string;
|
|
// (undocumented)
|
|
imageUrl: string;
|
|
// (undocumented)
|
|
meta: JsonObject;
|
|
// (undocumented)
|
|
name: string;
|
|
}
|
|
|
|
// @public (undocumented)
|
|
export type TLUserId = RecordId<TLUser>;
|
|
|
|
// @public
|
|
export interface TLUserStore {
|
|
currentUser: Signal<null | TLUser>;
|
|
resolve?(userId: string): Signal<null | TLUser>;
|
|
}
|
|
|
|
// @public
|
|
export type TLVideoAsset = TLBaseAsset<'video', {
|
|
fileSize?: number;
|
|
h: number;
|
|
mimeType: null | string;
|
|
name: string;
|
|
src: null | string;
|
|
w: number;
|
|
isAnimated: boolean;
|
|
}>;
|
|
|
|
// @public
|
|
export type TLVideoShape = TLBaseShape<'video', TLVideoShapeProps>;
|
|
|
|
// @public
|
|
export interface TLVideoShapeProps {
|
|
// (undocumented)
|
|
altText: string;
|
|
// (undocumented)
|
|
assetId: null | TLAssetId;
|
|
// (undocumented)
|
|
autoplay: boolean;
|
|
// (undocumented)
|
|
h: number;
|
|
// (undocumented)
|
|
playing: boolean;
|
|
// (undocumented)
|
|
time: number;
|
|
// (undocumented)
|
|
url: string;
|
|
// (undocumented)
|
|
w: number;
|
|
}
|
|
|
|
// @public
|
|
export function toRichText(text: string): TLRichText;
|
|
|
|
// @public (undocumented)
|
|
export const userIdValidator: T.Validator<TLUserId>;
|
|
|
|
// @public (undocumented)
|
|
export const UserRecordType: RecordType<TLUser, never>;
|
|
|
|
// @public
|
|
export interface UserSchemaInfo {
|
|
meta?: Record<string, T.Validatable<any>>;
|
|
migrations?: readonly MigrationSequence[];
|
|
}
|
|
|
|
// @public
|
|
export interface VecModel {
|
|
// (undocumented)
|
|
x: number;
|
|
// (undocumented)
|
|
y: number;
|
|
// (undocumented)
|
|
z?: number;
|
|
}
|
|
|
|
// @public
|
|
export const vecModelValidator: T.ObjectValidator<VecModel>;
|
|
|
|
// @public
|
|
export const videoAssetMigrations: MigrationSequence;
|
|
|
|
// @public (undocumented)
|
|
export const videoAssetProps: {
|
|
fileSize: T.Validator<number | undefined>;
|
|
h: T.Validator<number>;
|
|
isAnimated: T.Validator<boolean>;
|
|
mimeType: T.Validator<null | string>;
|
|
name: T.Validator<string>;
|
|
src: T.Validator<null | string>;
|
|
w: T.Validator<number>;
|
|
};
|
|
|
|
// @public
|
|
export const videoShapeMigrations: TLPropsMigrations;
|
|
|
|
// @public
|
|
export const videoShapeProps: RecordProps<TLVideoShape>;
|
|
|
|
// (No @packageDocumentation comment for this package)
|
|
|
|
```
|