Canvas SDK API.
Every public export from @editful/canvas-sdk.
Functions
definePlugin
Identity helper preserving the definition's precise inferred type.
Parameters
| Name | Type | Status | Description |
|---|---|---|---|
plugin | Definition | Required | No description. |
Show raw definition+
/** Identity helper preserving the definition's precise inferred type. */
export declare function definePlugin<const Definition extends PluginDefinition>(plugin: Definition): Definition;hexColor
Converts `#rgb`, `#rrggbb`, or `#rrggbbaa` to an Editful packed color.
Parameters
| Name | Type | Status | Description |
|---|---|---|---|
hex | string | Required | No description. |
Show raw definition+
/** Converts `#rgb`, `#rrggbb`, or `#rrggbbaa` to an Editful packed color. */
export declare function hexColor(hex: string): number;validatePluginActionSchema
Validates the complete JSON-Schema subset supported by plugin actions. Registration, desktop execution, and the MCP catalog all use this contract.
Parameters
| Name | Type | Status | Description |
|---|---|---|---|
schema | Readonly<Record<string, PluginJson>> | Required | No description. |
path | string | Optional | No description. |
depth | number | Optional | No description. |
Show raw definition+
/**
* Validates the complete JSON-Schema subset supported by plugin actions.
* Registration, desktop execution, and the MCP catalog all use this contract.
*/
export declare function validatePluginActionSchema(schema: Readonly<Record<string, PluginJson>>, path?: string, depth?: number): void;Classes
PluginActionCancelledError
Show raw definition+
export declare class PluginActionCancelledError extends Error {
constructor(message?: string);
}PluginActionConflictError
Show raw definition+
export declare class PluginActionConflictError extends Error {
constructor(message?: string);
}PluginConfigurationError
Show raw definition+
export declare class PluginConfigurationError extends Error {
constructor(message: string);
}PluginHostFeatureError
Show raw definition+
export declare class PluginHostFeatureError extends Error {
constructor(message: string);
}PluginNetworkError
Show raw definition+
export declare class PluginNetworkError extends Error {
constructor(message: string);
}Types
CreateContribution
Properties
| Name | Type | Status | Description |
|---|---|---|---|
label | string | Required · readonly | No description. |
icon | string | Optional · readonly | No description. |
shortcut | string | Required · readonly | No description. |
cursor | "crosshair" | "text" | Required · readonly | No description. |
gesture | "drag" | "place" | Required · readonly | No description. |
order | number | Required · readonly | No description. |
defaultSize | { readonly width: number; readonly height: number; } | Required · readonly | No description. |
defaultSize.width | number | Required · readonly | No description. |
defaultSize.height | number | Required · readonly | No description. |
styleSlot | "text" | "shape" | "palette" | Required · readonly | No description. |
opensTextEditor | boolean | Optional · readonly | No description. |
Show raw definition+
export interface CreateContribution {
readonly label: string;
readonly icon?: string;
readonly shortcut: string;
readonly cursor: 'crosshair' | 'text';
readonly gesture: 'drag' | 'place';
readonly order: number;
readonly defaultSize: {
readonly width: number;
readonly height: number;
};
readonly styleSlot: 'shape' | 'palette' | 'text';
readonly opensTextEditor?: boolean;
}FieldHandle
Show raw definition+
export interface FieldHandle<Value, Kind = unknown> {
readonly [FIELD_VALUE]: (value: Value) => Value;
readonly [FIELD_KIND]: (kind: Kind) => Kind;
}FieldOptions
Properties
| Name | Type | Status | Description |
|---|---|---|---|
default | Value | Optional · readonly | No description. |
Show raw definition+
export interface FieldOptions<Value> {
readonly default?: Value;
}KindBuilder
Properties
| Name | Type | Status | Description |
|---|---|---|---|
field | KindFieldBuilder<Kind> | Required · readonly | No description. |
ui | ViewBuilder<Kind> | Required · readonly | No description. |
create | (contribution: CreateContribution) => void | Required | No description. |
hit | (shape: "rect" | "ellipse") => void | Required | No description. |
text | (contribution: TextContribution<Kind>) => void | Required | No description. |
view | (contribution: ViewContribution<Kind>) => void | Required | No description. |
defaults | (contribution: StyleDefaults) => void | Required | No description. |
agent | (contribution: { readonly name: string; readonly description?: string; }) => void | Required | No description. |
interaction | (contribution: PluginInteractionContribution) => void | Required | No description. |
asset | () => void | Required | No description. |
pack | (fn: PackFunction<Kind>) => void | Required | No description. |
Show raw definition+
export interface KindBuilder<Kind = unknown> {
readonly field: KindFieldBuilder<Kind>;
readonly ui: ViewBuilder<Kind>;
create(contribution: CreateContribution): void;
hit(shape: 'rect' | 'ellipse'): void;
text(contribution: TextContribution<Kind>): void;
view(contribution: ViewContribution<Kind>): void;
defaults(contribution: StyleDefaults): void;
agent(contribution: {
readonly name: string;
readonly description?: string;
}): void;
interaction(contribution: PluginInteractionContribution): void;
asset(): void;
pack(fn: PackFunction<Kind>): void;
}KindFieldBuilder
Properties
| Name | Type | Status | Description |
|---|---|---|---|
f64 | (name: string, options?: FieldOptions<number>) => FieldHandle<number, Kind> | Required | No description. |
i32 | (name: string, options?: FieldOptions<number>) => FieldHandle<number, Kind> | Required | No description. |
bool | (name: string, options?: FieldOptions<boolean>) => FieldHandle<boolean, Kind> | Required | No description. |
string | (name: string, options?: FieldOptions<string>) => FieldHandle<string, Kind> | Required | No description. |
text | (name: string) => FieldHandle<string, Kind> | Required | No description. |
Show raw definition+
export interface KindFieldBuilder<Kind = unknown> {
f64(name: string, options?: FieldOptions<number>): FieldHandle<number, Kind>;
i32(name: string, options?: FieldOptions<number>): FieldHandle<number, Kind>;
bool(name: string, options?: FieldOptions<boolean>): FieldHandle<boolean, Kind>;
string(name: string, options?: FieldOptions<string>): FieldHandle<string, Kind>;
text(name: string): FieldHandle<string, Kind>;
}PackedNode
Read-only node view valid only for the duration of one pack call.
Properties
| Name | Type | Status | Description |
|---|---|---|---|
x | number | Required · readonly | No description. |
y | number | Required · readonly | No description. |
halfW | number | Required · readonly | No description. |
halfH | number | Required · readonly | No description. |
rotation | number | Required · readonly | No description. |
cornerRadius | number | Required · readonly | No description. |
strokeWidth | number | Required · readonly | No description. |
fill | number | Required · readonly | No description. |
stroke | number | Required · readonly | No description. |
assetId | string | Required · readonly | No description. |
fontFamily | number | Required · readonly | No description. |
fontSize | number | Required · readonly | No description. |
fontWeight | number | Required · readonly | No description. |
fontItalic | boolean | Required · readonly | No description. |
textAlign | number | Required · readonly | No description. |
textColor | number | Required · readonly | No description. |
lineHeight | number | Required · readonly | No description. |
letterSpacing | number | Required · readonly | No description. |
textPadding | number | Required · readonly | No description. |
textVerticalAlign | number | Required · readonly | No description. |
textSizing | number | Required · readonly | No description. |
get | <Value>(field: FieldHandle<Value, Kind>) => Value | Required | No description. |
Show raw definition+
/** Read-only node view valid only for the duration of one pack call. */
export interface PackedNode<Kind = unknown> {
readonly x: number;
readonly y: number;
readonly halfW: number;
readonly halfH: number;
readonly rotation: number;
readonly cornerRadius: number;
readonly strokeWidth: number;
readonly fill: number;
readonly stroke: number;
readonly assetId: string;
readonly fontFamily: number;
readonly fontSize: number;
readonly fontWeight: number;
readonly fontItalic: boolean;
readonly textAlign: number;
readonly textColor: number;
readonly lineHeight: number;
readonly letterSpacing: number;
readonly textPadding: number;
readonly textVerticalAlign: number;
readonly textSizing: number;
get<Value>(field: FieldHandle<Value, Kind>): Value;
}PackFunction
Show raw definition+
export type PackFunction<Kind = unknown> = (node: PackedNode<Kind>, services: PackServices, out: PrimitiveWriter) => void;PackServices
Properties
| Name | Type | Status | Description |
|---|---|---|---|
text | { readonly sharedTextStyle: TextStyle; familyOf(font: number): TextStyle["family"]; } | Required · readonly | No description. |
text.sharedTextStyle | TextStyle | Required · readonly | No description. |
text.familyOf | (font: number) => TextStyle["family"] | Required | No description. |
Show raw definition+
export interface PackServices {
readonly text: {
readonly sharedTextStyle: TextStyle;
familyOf(font: number): TextStyle['family'];
};
}PluginActionContext
Properties
| Name | Type | Status | Description |
|---|---|---|---|
signal | AbortSignal | Required · readonly | No description. |
boardId | string | Optional · readonly | Stable board id for constructing declared board-scoped service requests. |
document | PluginDocument | Required · readonly | No description. |
selection | PluginSelection | Required · readonly | No description. |
settings | PluginSettings | Required · readonly | No description. |
secrets | PluginSecrets | Required · readonly | No description. |
network | PluginNetwork | Required · readonly | No description. |
remoteMedia | PluginRemoteMedia | Required · readonly | No description. |
ui | PluginActionUi | Required · readonly | No description. |
editors | PluginEditors | Required · readonly | No description. |
openExternal | (url: string) => Promise<void> | Required | No description. |
Show raw definition+
export interface PluginActionContext {
readonly signal: AbortSignal;
/** Stable board id for constructing declared board-scoped service requests. */
readonly boardId?: string;
readonly document: PluginDocument;
readonly selection: PluginSelection;
readonly settings: PluginSettings;
readonly secrets: PluginSecrets;
readonly network: PluginNetwork;
readonly remoteMedia: PluginRemoteMedia;
readonly ui: PluginActionUi;
readonly editors: PluginEditors;
openExternal(url: string): Promise<void>;
}PluginActionUi
Properties
| Name | Type | Status | Description |
|---|---|---|---|
prompt | (options: { readonly label: string; readonly description?: string; readonly initial?: string | number; }) => Promise<string | number | null> | Required | No description. |
confirm | (options: { readonly label: string; readonly description?: string; }) => Promise<boolean> | Required | No description. |
pick | <Value extends PluginJson>(options: { readonly label: string; readonly description?: string; readonly items: readonly PluginPickerItem<Value>[]; }) => Promise<Value | null> | Required | No description. |
notify | (notification: PluginNotification) => void | Required | Publishes a bounded notice into the host notification tray. Plugins cannot choose its position, duration, markup, or actions. |
progress | (message: string) => void | Required | No description. |
error | (message: string) => void | Required | No description. |
Show raw definition+
export interface PluginActionUi {
prompt(options: {
readonly label: string;
readonly description?: string;
readonly initial?: string | number;
}): Promise<string | number | null>;
confirm(options: {
readonly label: string;
readonly description?: string;
}): Promise<boolean>;
pick<Value extends PluginJson>(options: {
readonly label: string;
readonly description?: string;
readonly items: readonly PluginPickerItem<Value>[];
}): Promise<Value | null>;
/**
* Publishes a bounded notice into the host notification tray. Plugins cannot
* choose its position, duration, markup, or actions.
*/
notify(notification: PluginNotification): void;
progress(message: string): void;
error(message: string): void;
}PluginAgentActionContribution
Properties
| Name | Type | Status | Description |
|---|---|---|---|
id | string | Required · readonly | No description. |
name | string | Required · readonly | No description. |
description | string | Required · readonly | No description. |
inputSchema | Readonly<Record<string, PluginJson>> | Required · readonly | No description. |
outputSchema | Readonly<Record<string, PluginJson>> | Required · readonly | No description. |
requiresConfirmation | boolean | Required · readonly | No description. |
run | (input: Input, context: PluginActionContext) => Promise<Output> | Required | No description. |
Show raw definition+
export interface PluginAgentActionContribution<Input extends PluginJson = PluginJson, Output extends PluginJson = PluginJson> {
readonly id: string;
readonly name: string;
readonly description: string;
readonly inputSchema: Readonly<Record<string, PluginJson>>;
readonly outputSchema: Readonly<Record<string, PluginJson>>;
readonly requiresConfirmation: boolean;
run(input: Input, context: PluginActionContext): Promise<Output>;
}PluginCommandContribution
Properties
| Name | Type | Status | Description |
|---|---|---|---|
id | string | Required · readonly | No description. |
label | string | Required · readonly | No description. |
description | string | Optional · readonly | No description. |
shortcut | string | Optional · readonly | No description. |
toolbar | { readonly label?: string; readonly icon?: string; readonly order: number; readonly activeEditor?: string; } | Optional · readonly | Exposes this command as a toolbar button in addition to the command palette. |
toolbar.label | string | Optional · readonly | Optional toolbar-only label; the command palette keeps the command label. |
toolbar.icon | string | Optional · readonly | Built-in glyph key or explicit `./path.svg` bundled in the plugin artifact. |
toolbar.order | number | Required · readonly | No description. |
toolbar.activeEditor | string | Optional · readonly | Manual editor whose open state makes this button behave as an active canvas tool. The host dismisses that editor after choosing empty canvas or a different object, while clicks on the current selection keep it open. |
selection | { readonly minimum?: number; readonly maximum?: number; readonly kinds?: readonly string[]; } | Optional · readonly | No description. |
selection.minimum | number | Optional · readonly | No description. |
selection.maximum | number | Optional · readonly | No description. |
selection.kinds | readonly string[] | Optional · readonly | No description. |
run | (context: PluginActionContext) => Promise<void> | Required | No description. |
Show raw definition+
export interface PluginCommandContribution {
readonly id: string;
readonly label: string;
readonly description?: string;
readonly shortcut?: string;
/** Exposes this command as a toolbar button in addition to the command palette. */
readonly toolbar?: {
/** Optional toolbar-only label; the command palette keeps the command label. */
readonly label?: string;
/** Built-in glyph key or explicit `./path.svg` bundled in the plugin artifact. */
readonly icon?: string;
readonly order: number;
/**
* Manual editor whose open state makes this button behave as an active
* canvas tool. The host dismisses that editor after choosing empty canvas
* or a different object, while clicks on the current selection keep it open.
*/
readonly activeEditor?: string;
};
readonly selection?: {
readonly minimum?: number;
readonly maximum?: number;
readonly kinds?: readonly string[];
};
run(context: PluginActionContext): Promise<void>;
}PluginContext
Properties
| Name | Type | Status | Description |
|---|---|---|---|
pluginId | string | Required · readonly | No description. |
kind | <const Id extends string>(id: Id) => KindBuilder<Id> | Required | No description. |
command | (contribution: PluginCommandContribution) => void | Required | No description. |
editor | (contribution: PluginEditorContribution) => void | Required | No description. |
importer | (contribution: PluginImporterContribution) => void | Required | No description. |
action | (contribution: PluginAgentActionContribution) => void | Required | No description. |
Show raw definition+
export interface PluginContext {
readonly pluginId: string;
kind<const Id extends string>(id: Id): KindBuilder<Id>;
command(contribution: PluginCommandContribution): void;
editor(contribution: PluginEditorContribution): void;
importer(contribution: PluginImporterContribution): void;
action(contribution: PluginAgentActionContribution): void;
}PluginDefinition
Properties
| Name | Type | Status | Description |
|---|---|---|---|
register | (context: PluginContext) => void | Required | No description. |
Show raw definition+
export interface PluginDefinition {
register(context: PluginContext): void;
}PluginDocument
Properties
| Name | Type | Status | Description |
|---|---|---|---|
revision | number | Required · readonly | No description. |
inspect | (nodeIds: readonly string[]) => readonly PluginNodeSnapshot[] | Required | No description. |
transaction | (label: string) => PluginDocumentTransaction | Required | No description. |
Show raw definition+
export interface PluginDocument {
readonly revision: number;
inspect(nodeIds: readonly string[]): readonly PluginNodeSnapshot[];
transaction(label: string): PluginDocumentTransaction;
}PluginDocumentTransaction
Properties
| Name | Type | Status | Description |
|---|---|---|---|
create | (node: PluginNodeCreate) => void | Required | No description. |
update | (node: PluginNodeUpdate) => void | Required | No description. |
delete | (nodeId: string) => void | Required | No description. |
commit | () => void | Required | No description. |
Show raw definition+
export interface PluginDocumentTransaction {
create(node: PluginNodeCreate): void;
update(node: PluginNodeUpdate): void;
delete(nodeId: string): void;
commit(): void;
}PluginEditorContribution
Properties
| Name | Type | Status | Description |
|---|---|---|---|
id | string | Required · readonly | No description. |
label | string | Required · readonly | No description. |
surface | PluginEditorSurface | Required · readonly | No description. |
order | number | Optional · readonly | No description. |
activation | "automatic" | "manual" | Optional · readonly | Automatic editors follow their selection requirement. Manual editors are hidden until this plugin opens them through `context.editors`. |
selection | { readonly minimum?: number; readonly maximum?: number; readonly kinds?: readonly string[]; } | Optional · readonly | Omit to allow any selection. When present, every selected node must match the declared kinds. This applies after the activation requirement. |
selection.minimum | number | Optional · readonly | No description. |
selection.maximum | number | Optional · readonly | No description. |
selection.kinds | readonly string[] | Optional · readonly | No description. |
mount | (container: HTMLElement, context: PluginActionContext) => void | (() => void) | PluginEditorInstance | Required | Mounts trusted plugin UI directly into Editful's renderer. Plugins may use plain DOM or mount a bundled React root and must release owned resources. |
Show raw definition+
export interface PluginEditorContribution {
readonly id: string;
readonly label: string;
readonly surface: PluginEditorSurface;
readonly order?: number;
/**
* Automatic editors follow their selection requirement. Manual editors are
* hidden until this plugin opens them through `context.editors`.
*/
readonly activation?: 'automatic' | 'manual';
/**
* Omit to allow any selection. When present, every selected node must match
* the declared kinds. This applies after the activation requirement.
*/
readonly selection?: {
readonly minimum?: number;
readonly maximum?: number;
readonly kinds?: readonly string[];
};
/**
* Mounts trusted plugin UI directly into Editful's renderer. Plugins may use
* plain DOM or mount a bundled React root and must release owned resources.
*/
mount(container: HTMLElement, context: PluginActionContext): void | (() => void) | PluginEditorInstance;
}PluginEditorInstance
Properties
| Name | Type | Status | Description |
|---|---|---|---|
update | (context: PluginActionContext) => void | Optional | No description. |
dispose | () => void | Required | No description. |
Show raw definition+
export interface PluginEditorInstance {
update?(context: PluginActionContext): void;
dispose(): void;
}PluginEditors
Controls trusted plugin editor surfaces owned by the current plugin. Manual editor state is transient host UI state: it is bounded JSON, is not written to the canvas document, and disappears with the current runtime.
Properties
| Name | Type | Status | Description |
|---|---|---|---|
open | (editorId: string, state?: PluginJson) => void | Required | No description. |
close | (editorId: string) => void | Required | No description. |
state | (editorId: string) => PluginJson | undefined | Required | No description. |
Show raw definition+
/**
* Controls trusted plugin editor surfaces owned by the current plugin.
*
* Manual editor state is transient host UI state: it is bounded JSON, is not
* written to the canvas document, and disappears with the current runtime.
*/
export interface PluginEditors {
open(editorId: string, state?: PluginJson): void;
close(editorId: string): void;
state(editorId: string): PluginJson | undefined;
}PluginEditorSurface
Show raw definition+
export type PluginEditorSurface = 'toolbar' | 'left-sidebar' | 'right-sidebar';PluginImporterContribution
Properties
| Name | Type | Status | Description |
|---|---|---|---|
id | string | Required · readonly | No description. |
label | string | Required · readonly | No description. |
priority | number | Optional · readonly | No description. |
match | { readonly mediaTypes?: readonly string[]; readonly extensions?: readonly string[]; readonly urlSchemes?: readonly string[]; readonly urlHosts?: readonly string[]; } | Required · readonly | No description. |
match.mediaTypes | readonly string[] | Optional · readonly | No description. |
match.extensions | readonly string[] | Optional · readonly | No description. |
match.urlSchemes | readonly string[] | Optional · readonly | No description. |
match.urlHosts | readonly string[] | Optional · readonly | No description. |
import | (input: PluginImporterInput, context: PluginActionContext) => Promise<"handled" | "rejected"> | Required | No description. |
Show raw definition+
export interface PluginImporterContribution {
readonly id: string;
readonly label: string;
readonly priority?: number;
readonly match: {
readonly mediaTypes?: readonly string[];
readonly extensions?: readonly string[];
readonly urlSchemes?: readonly string[];
readonly urlHosts?: readonly string[];
};
import(input: PluginImporterInput, context: PluginActionContext): Promise<'handled' | 'rejected'>;
}PluginImporterInput
Properties
| Name | Type | Status | Description |
|---|---|---|---|
operation | "paste" | "drop" | Required · readonly | No description. |
text | string | Optional · readonly | No description. |
uriList | readonly string[] | Optional · readonly | No description. |
files | readonly { readonly name: string; readonly mediaType: string; readonly byteLength: number; readBytes(): Promise<Uint8Array>; }[] | Required · readonly | No description. |
point | { readonly x: number; readonly y: number; } | Required · readonly | No description. |
point.x | number | Required · readonly | No description. |
point.y | number | Required · readonly | No description. |
Show raw definition+
export interface PluginImporterInput {
readonly operation: 'paste' | 'drop';
readonly text?: string;
readonly uriList?: readonly string[];
readonly files: readonly {
readonly name: string;
readonly mediaType: string;
readonly byteLength: number;
readBytes(): Promise<Uint8Array>;
}[];
readonly point: {
readonly x: number;
readonly y: number;
};
}PluginInteractionContribution
Properties
| Name | Type | Status | Description |
|---|---|---|---|
id | string | Required · readonly | No description. |
label | string | Required · readonly | No description. |
cursor | "pointer" | "default" | Required · readonly | No description. |
activate | (node: PluginNodeSnapshot, context: PluginActionContext) => Promise<void> | Required | No description. |
Show raw definition+
export interface PluginInteractionContribution {
readonly id: string;
readonly label: string;
readonly cursor: 'pointer' | 'default';
activate(node: PluginNodeSnapshot, context: PluginActionContext): Promise<void>;
}PluginJson
Show raw definition+
export type PluginJson = null | PluginScalar | readonly PluginJson[] | {
readonly [key: string]: PluginJson;
};PluginNetwork
Properties
| Name | Type | Status | Description |
|---|---|---|---|
request | (request: PluginNetworkRequest) => Promise<PluginNetworkResponse> | Required | No description. |
Show raw definition+
export interface PluginNetwork {
request(request: PluginNetworkRequest): Promise<PluginNetworkResponse>;
}PluginNetworkRequest
Properties
| Name | Type | Status | Description |
|---|---|---|---|
url | string | Required · readonly | No description. |
method | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | Optional · readonly | No description. |
headers | Readonly<Record<string, string>> | Optional · readonly | No description. |
body | string | Uint8Array<ArrayBufferLike> | Optional · readonly | No description. |
response | "text" | "json" | "bytes" | Optional · readonly | No description. |
timeoutMs | number | Optional · readonly | No description. |
auth | "board" | Optional · readonly | Host-injected board credential, available only for the first-party service. |
Show raw definition+
export interface PluginNetworkRequest {
readonly url: string;
readonly method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
readonly headers?: Readonly<Record<string, string>>;
readonly body?: string | Uint8Array;
readonly response?: 'json' | 'text' | 'bytes';
readonly timeoutMs?: number;
/** Host-injected board credential, available only for the first-party service. */
readonly auth?: 'board';
}PluginNetworkResponse
Properties
| Name | Type | Status | Description |
|---|---|---|---|
status | number | Required · readonly | No description. |
headers | Readonly<Record<string, string>> | Required · readonly | No description. |
body | PluginJson | Uint8Array<ArrayBufferLike> | Required · readonly | No description. |
Show raw definition+
export interface PluginNetworkResponse {
readonly status: number;
readonly headers: Readonly<Record<string, string>>;
readonly body: PluginJson | string | Uint8Array;
}PluginNodeCreate
Properties
| Name | Type | Status | Description |
|---|---|---|---|
kind | string | Required · readonly | No description. |
x | number | Required · readonly | No description. |
y | number | Required · readonly | No description. |
width | number | Required · readonly | No description. |
height | number | Required · readonly | No description. |
rotation | number | Optional · readonly | No description. |
fill | number | Optional · readonly | No description. |
stroke | number | Optional · readonly | No description. |
strokeWidth | number | Optional · readonly | No description. |
fontFamily | number | Optional · readonly | No description. |
fontSize | number | Optional · readonly | No description. |
fontWeight | number | Optional · readonly | No description. |
fontItalic | boolean | Optional · readonly | No description. |
textAlign | TextAlign | Optional · readonly | No description. |
textColor | number | Optional · readonly | No description. |
lineHeight | number | Optional · readonly | No description. |
letterSpacing | number | Optional · readonly | No description. |
textPadding | number | Optional · readonly | No description. |
textVerticalAlign | TextVerticalAlign | Optional · readonly | No description. |
fields | Readonly<Record<string, PluginScalar>> | Optional · readonly | No description. |
Show raw definition+
export interface PluginNodeCreate {
readonly kind: string;
readonly x: number;
readonly y: number;
readonly width: number;
readonly height: number;
readonly rotation?: number;
readonly fill?: number;
readonly stroke?: number;
readonly strokeWidth?: number;
readonly fontFamily?: TextFont;
readonly fontSize?: number;
readonly fontWeight?: number;
readonly fontItalic?: boolean;
readonly textAlign?: TextAlign;
readonly textColor?: number;
readonly lineHeight?: number;
readonly letterSpacing?: number;
readonly textPadding?: number;
readonly textVerticalAlign?: TextVerticalAlign;
readonly fields?: Readonly<Record<string, PluginScalar>>;
}PluginNodeSnapshot
Properties
| Name | Type | Status | Description |
|---|---|---|---|
id | string | Required · readonly | No description. |
kind | string | Required · readonly | No description. |
x | number | Required · readonly | No description. |
y | number | Required · readonly | No description. |
width | number | Required · readonly | No description. |
height | number | Required · readonly | No description. |
rotation | number | Required · readonly | No description. |
fill | number | Required · readonly | No description. |
stroke | number | Required · readonly | No description. |
strokeWidth | number | Required · readonly | No description. |
fontFamily | number | Required · readonly | No description. |
fontSize | number | Required · readonly | No description. |
fontWeight | number | Required · readonly | No description. |
fontItalic | boolean | Required · readonly | No description. |
textAlign | TextAlign | Required · readonly | No description. |
textColor | number | Required · readonly | No description. |
lineHeight | number | Required · readonly | No description. |
letterSpacing | number | Required · readonly | No description. |
textPadding | number | Required · readonly | No description. |
textVerticalAlign | TextVerticalAlign | Required · readonly | No description. |
field | <Value extends PluginScalar>(name: string) => Value | undefined | Required | No description. |
Show raw definition+
export interface PluginNodeSnapshot {
readonly id: string;
readonly kind: string;
readonly x: number;
readonly y: number;
readonly width: number;
readonly height: number;
readonly rotation: number;
readonly fill: number;
readonly stroke: number;
readonly strokeWidth: number;
readonly fontFamily: TextFont;
readonly fontSize: number;
readonly fontWeight: number;
readonly fontItalic: boolean;
readonly textAlign: TextAlign;
readonly textColor: number;
readonly lineHeight: number;
readonly letterSpacing: number;
readonly textPadding: number;
readonly textVerticalAlign: TextVerticalAlign;
field<Value extends PluginScalar>(name: string): Value | undefined;
}PluginNodeUpdate
Properties
| Name | Type | Status | Description |
|---|---|---|---|
id | string | Required · readonly | No description. |
x | number | Optional · readonly | No description. |
y | number | Optional · readonly | No description. |
width | number | Optional · readonly | No description. |
height | number | Optional · readonly | No description. |
rotation | number | Optional · readonly | No description. |
fill | number | Optional · readonly | No description. |
stroke | number | Optional · readonly | No description. |
strokeWidth | number | Optional · readonly | No description. |
fontFamily | number | Optional · readonly | No description. |
fontSize | number | Optional · readonly | No description. |
fontWeight | number | Optional · readonly | No description. |
fontItalic | boolean | Optional · readonly | No description. |
textAlign | TextAlign | Optional · readonly | No description. |
textColor | number | Optional · readonly | No description. |
lineHeight | number | Optional · readonly | No description. |
letterSpacing | number | Optional · readonly | No description. |
textPadding | number | Optional · readonly | No description. |
textVerticalAlign | TextVerticalAlign | Optional · readonly | No description. |
fields | Readonly<Record<string, PluginScalar>> | Optional · readonly | No description. |
Show raw definition+
export interface PluginNodeUpdate {
readonly id: string;
readonly x?: number;
readonly y?: number;
readonly width?: number;
readonly height?: number;
readonly rotation?: number;
readonly fill?: number;
readonly stroke?: number;
readonly strokeWidth?: number;
readonly fontFamily?: TextFont;
readonly fontSize?: number;
readonly fontWeight?: number;
readonly fontItalic?: boolean;
readonly textAlign?: TextAlign;
readonly textColor?: number;
readonly lineHeight?: number;
readonly letterSpacing?: number;
readonly textPadding?: number;
readonly textVerticalAlign?: TextVerticalAlign;
readonly fields?: Readonly<Record<string, PluginScalar>>;
}PluginNotification
Properties
| Name | Type | Status | Description |
|---|---|---|---|
title | string | Required · readonly | Short notification heading rendered as text by the host. |
message | string | Optional · readonly | Optional supporting copy rendered as text by the host. |
tone | PluginNotificationTone | Optional · readonly | The host owns placement and lifetime. Info, success, and warning notices leave automatically; errors remain until resolved or dismissed. |
Show raw definition+
export interface PluginNotification {
/** Short notification heading rendered as text by the host. */
readonly title: string;
/** Optional supporting copy rendered as text by the host. */
readonly message?: string;
/**
* The host owns placement and lifetime. Info, success, and warning notices
* leave automatically; errors remain until resolved or dismissed.
*/
readonly tone?: PluginNotificationTone;
}PluginNotificationTone
Show raw definition+
export type PluginNotificationTone = 'info' | 'success' | 'warning' | 'error';PluginPickerItem
Properties
| Name | Type | Status | Description |
|---|---|---|---|
value | Value | Required · readonly | No description. |
label | string | Required · readonly | No description. |
description | string | Optional · readonly | No description. |
imageUrl | string | Optional · readonly | No description. |
links | readonly PluginPickerLink[] | Optional · readonly | No description. |
Show raw definition+
export interface PluginPickerItem<Value extends PluginJson = PluginJson> {
readonly value: Value;
readonly label: string;
readonly description?: string;
readonly imageUrl?: string;
readonly links?: readonly PluginPickerLink[];
}PluginPickerLink
Properties
| Name | Type | Status | Description |
|---|---|---|---|
label | string | Required · readonly | No description. |
href | string | Required · readonly | No description. |
Show raw definition+
export interface PluginPickerLink {
readonly label: string;
readonly href: string;
}PluginRemoteImageDimensions
Properties
| Name | Type | Status | Description |
|---|---|---|---|
width | number | Required · readonly | No description. |
height | number | Required · readonly | No description. |
Show raw definition+
export interface PluginRemoteImageDimensions {
readonly width: number;
readonly height: number;
}PluginRemoteMedia
Properties
| Name | Type | Status | Description |
|---|---|---|---|
probe | (url: string) => Promise<PluginRemoteImageDimensions> | Required | Decodes an exact URL under this plugin's declared remote-media policy and leaves the result warm in the host image cache. |
Show raw definition+
export interface PluginRemoteMedia {
/**
* Decodes an exact URL under this plugin's declared remote-media policy and
* leaves the result warm in the host image cache.
*/
probe(url: string): Promise<PluginRemoteImageDimensions>;
}PluginScalar
Show raw definition+
export type PluginScalar = string | number | boolean;PluginSecrets
Properties
| Name | Type | Status | Description |
|---|---|---|---|
get | (name: string) => Promise<string | undefined> | Required | No description. |
Show raw definition+
export interface PluginSecrets {
get(name: string): Promise<string | undefined>;
}PluginSelection
Properties
| Name | Type | Status | Description |
|---|---|---|---|
snapshot | () => PluginSelectionSummary | Required | No description. |
nodeIds | () => readonly string[] | Required | No description. |
Show raw definition+
export interface PluginSelection {
snapshot(): PluginSelectionSummary;
nodeIds(): readonly string[];
}PluginSelectionSummary
Properties
| Name | Type | Status | Description |
|---|---|---|---|
count | number | Required · readonly | No description. |
kindIds | readonly string[] | Required · readonly | No description. |
Show raw definition+
export interface PluginSelectionSummary {
readonly count: number;
readonly kindIds: readonly string[];
}PluginSettings
Properties
| Name | Type | Status | Description |
|---|---|---|---|
get | (key: string) => PluginScalar | undefined | Required | No description. |
Show raw definition+
export interface PluginSettings {
get(key: string): PluginScalar | undefined;
}PrimitiveWriter
Properties
| Name | Type | Status | Description |
|---|---|---|---|
quad | (x: number, y: number, halfW: number, halfH: number, rotation: number, cornerRadius: number, strokeWidth: number, primitive: Primitive, fill: number, stroke: number) => void | Required | No description. |
textBlock | (block: { x: number; y: number; halfW: number; halfH: number; text: string; style: TextStyle; font: number; wrapWidth: number; padding: number; verticalPadding?: number; verticalAlign: number; readonly background?: { readonly fill: number; readonly stroke?: number; readonly strokeWidth?: number; readonly cornerRadius: number; }; }) => void | Required | No description. |
imageQuad | { (assetId: string, x: number, y: number, halfW: number, halfH: number, rotation: number): void; (source: { readonly url: string; }, x: number, y: number, halfW: number, halfH: number, rotation: number): void; } | Required | No description. |
interactionRegion | (interactionId: string, x: number, y: number, width: number, height: number, semantics: { readonly role: "button" | "link"; readonly label: string; }) => void | Required | No description. |
Show raw definition+
export interface PrimitiveWriter {
quad(x: number, y: number, halfW: number, halfH: number, rotation: number, cornerRadius: number, strokeWidth: number, primitive: Primitive, fill: number, stroke: number): void;
textBlock(block: {
x: number;
y: number;
halfW: number;
halfH: number;
text: string;
style: TextStyle;
font: number;
wrapWidth: number;
padding: number;
/** Overrides vertical inset while preserving `padding` horizontally. */
verticalPadding?: number;
verticalAlign: number;
readonly background?: {
readonly fill: number;
readonly stroke?: number;
readonly strokeWidth?: number;
readonly cornerRadius: number;
};
}): void;
imageQuad(assetId: string, x: number, y: number, halfW: number, halfH: number, rotation: number): void;
imageQuad(source: {
readonly url: string;
}, x: number, y: number, halfW: number, halfH: number, rotation: number): void;
interactionRegion(interactionId: string, x: number, y: number, width: number, height: number, semantics: {
readonly role: 'button' | 'link';
readonly label: string;
}): void;
}StyleDefaults
Properties
| Name | Type | Status | Description |
|---|---|---|---|
fill | number | Optional · readonly | No description. |
stroke | number | Optional · readonly | No description. |
strokeWidth | number | Optional · readonly | No description. |
cornerRadius | number | Optional · readonly | No description. |
fontSize | number | Optional · readonly | No description. |
textColor | number | Optional · readonly | No description. |
lineHeight | number | Optional · readonly | No description. |
textSizing | number | Optional · readonly | No description. |
Show raw definition+
export interface StyleDefaults {
readonly fill?: number;
readonly stroke?: number;
readonly strokeWidth?: number;
readonly cornerRadius?: number;
readonly fontSize?: number;
readonly textColor?: number;
readonly lineHeight?: number;
readonly textSizing?: number;
}TextContribution
Properties
| Name | Type | Status | Description |
|---|---|---|---|
field | FieldHandle<string, Kind> | Required · readonly | No description. |
padding | number | "node" | Required · readonly | No description. |
verticalAlign | "center" | "node" | "top" | Required · readonly | No description. |
font | "node" | "shared" | Required · readonly | No description. |
width | "user" | "auto" | "derived" | Required · readonly | No description. |
height | "user" | "auto" | "derived" | Required · readonly | No description. |
minWidth | number | Optional · readonly | No description. |
minHeight | number | Optional · readonly | No description. |
Show raw definition+
export interface TextContribution<Kind = unknown> {
readonly field: FieldHandle<string, Kind>;
readonly padding: number | 'node';
readonly verticalAlign: 'top' | 'center' | 'node';
readonly font: 'shared' | 'node';
readonly width: 'user' | 'auto' | 'derived';
readonly height: 'user' | 'auto' | 'derived';
readonly minWidth?: number;
readonly minHeight?: number;
}TextStyle
Properties
| Name | Type | Status | Description |
|---|---|---|---|
family | "sans" | "serif" | "mono" | Required · readonly | No description. |
weight | number | Required · readonly | No description. |
italic | boolean | Required · readonly | No description. |
size | number | Required · readonly | No description. |
lineHeight | number | Required · readonly | No description. |
letterSpacing | number | Required · readonly | No description. |
align | "left" | "center" | "right" | Required · readonly | No description. |
color | number | Required · readonly | No description. |
Show raw definition+
export interface TextStyle {
readonly family: 'sans' | 'serif' | 'mono';
readonly weight: number;
readonly italic: boolean;
readonly size: number;
readonly lineHeight: number;
readonly letterSpacing: number;
readonly align: 'left' | 'center' | 'right';
readonly color: number;
}ViewBoxOptions
Paint, padding, and optional child content for a container.
Properties
| Name | Type | Status | Description |
|---|---|---|---|
child | ViewNode<Kind> | Optional · readonly | The single child inside the box. |
padding | number | ViewInsets | Optional · readonly | Defaults to zero. Physical sides override their logical axis. |
fill | "node" | ViewValue<number, Kind> | Optional · readonly | Packed fill, field-bound fill, or the node's fill. |
stroke | "node" | ViewValue<number, Kind> | Optional · readonly | Packed stroke, field-bound stroke, or the node's stroke. |
strokeWidth | number | "node" | Optional · readonly | Stroke width in canvas units, or the node's stroke width. |
cornerRadius | number | "node" | "full" | Optional · readonly | Corner radius, the node's radius, or a full pill radius. |
Show raw definition+
/** Paint, padding, and optional child content for a container. */
export interface ViewBoxOptions<Kind = unknown> {
/** The single child inside the box. */
readonly child?: ViewNode<Kind>;
/** Defaults to zero. Physical sides override their logical axis. */
readonly padding?: number | ViewInsets;
/** Packed fill, field-bound fill, or the node's fill. */
readonly fill?: ViewValue<number, Kind> | 'node';
/** Packed stroke, field-bound stroke, or the node's stroke. */
readonly stroke?: ViewValue<number, Kind> | 'node';
/** Stroke width in canvas units, or the node's stroke width. */
readonly strokeWidth?: number | 'node';
/** Corner radius, the node's radius, or a full pill radius. */
readonly cornerRadius?: number | 'node' | 'full';
}ViewBuilder
Kind-scoped factory for declarative view primitives.
Properties
| Name | Type | Status | Description |
|---|---|---|---|
text | (value: ViewValue<string, Kind>, options: ViewTextOptions<Kind>) => ViewNode<Kind> | Required | Creates measured display text from a literal or field value. |
image | (source: ViewImageSource<Kind>, options: ViewImageOptions) => ViewNode<Kind> | Required | Creates a fixed-height remote or document-backed image. |
box | (options: ViewBoxOptions<Kind>) => ViewNode<Kind> | Required | Creates a painted container with zero or one child. |
stack | (options: ViewStackOptions<Kind>) => ViewNode<Kind> | Required | Creates an inline or block layout container. |
spacer | () => ViewNode<Kind> | Required | Creates flexible space within an inline stack. |
Show raw definition+
/** Kind-scoped factory for declarative view primitives. */
export interface ViewBuilder<Kind = unknown> {
/** Creates measured display text from a literal or field value. */
text(value: ViewValue<string, Kind>, options: ViewTextOptions<Kind>): ViewNode<Kind>;
/** Creates a fixed-height remote or document-backed image. */
image(source: ViewImageSource<Kind>, options: ViewImageOptions): ViewNode<Kind>;
/** Creates a painted container with zero or one child. */
box(options: ViewBoxOptions<Kind>): ViewNode<Kind>;
/** Creates an inline or block layout container. */
stack(options: ViewStackOptions<Kind>): ViewNode<Kind>;
/** Creates flexible space within an inline stack. */
spacer(): ViewNode<Kind>;
}ViewContribution
Root view and host-owned sizing policy registered with a node kind.
Properties
| Name | Type | Status | Description |
|---|---|---|---|
root | ViewNode<Kind> | Required · readonly | Root of the declarative view tree. |
width | { readonly mode: "user"; readonly min?: number; } | Required · readonly | User-resizable width and optional minimum width. |
width.mode | "user" | Required · readonly | No description. |
width.min | number | Optional · readonly | No description. |
height | { readonly mode: "fit-content"; } | Required · readonly | Height derived from the measured root content. |
height.mode | "fit-content" | Required · readonly | No description. |
Show raw definition+
/** Root view and host-owned sizing policy registered with a node kind. */
export interface ViewContribution<Kind = unknown> {
/** Root of the declarative view tree. */
readonly root: ViewNode<Kind>;
/** User-resizable width and optional minimum width. */
readonly width: {
readonly mode: 'user';
readonly min?: number;
};
/** Height derived from the measured root content. */
readonly height: {
readonly mode: 'fit-content';
};
}ViewImageOptions
Fixed image dimensions within a declarative view.
Properties
| Name | Type | Status | Description |
|---|---|---|---|
width | number | "fill" | Required · readonly | Fixed width, or all available block width. |
height | number | Required · readonly | Fixed height in canvas units. |
Show raw definition+
/** Fixed image dimensions within a declarative view. */
export interface ViewImageOptions {
/** Fixed width, or all available block width. */
readonly width: number | 'fill';
/** Fixed height in canvas units. */
readonly height: number;
}ViewImageSource
Remote or document-backed source for an image primitive.
Properties
| Name | Type | Status | Description |
|---|---|---|---|
url | ViewValue<string, Kind> | Optional · readonly | No description. |
asset | ViewValue<string, Kind> | Optional · readonly | No description. |
Show raw definition+
/** Remote or document-backed source for an image primitive. */
export type ViewImageSource<Kind = unknown> = {
readonly url: ViewValue<string, Kind>;
} | {
readonly asset: ViewValue<string, Kind>;
};ViewInsets
Logical and physical insets for a view box. Physical sides take precedence.
Properties
| Name | Type | Status | Description |
|---|---|---|---|
inline | number | Optional · readonly | Left and right inset. |
block | number | Optional · readonly | Top and bottom inset. |
top | number | Optional · readonly | Top inset. |
right | number | Optional · readonly | Right inset. |
bottom | number | Optional · readonly | Bottom inset. |
left | number | Optional · readonly | Left inset. |
Show raw definition+
/** Logical and physical insets for a view box. Physical sides take precedence. */
export interface ViewInsets {
/** Left and right inset. */
readonly inline?: number;
/** Top and bottom inset. */
readonly block?: number;
/** Top inset. */
readonly top?: number;
/** Right inset. */
readonly right?: number;
/** Bottom inset. */
readonly bottom?: number;
/** Left inset. */
readonly left?: number;
}ViewNode
Opaque declarative view node created by a kind's {@link ViewBuilder}.
Show raw definition+
/** Opaque declarative view node created by a kind's {@link ViewBuilder}. */
export interface ViewNode<Kind = unknown> {
readonly [VIEW_NODE_KIND]: (kind: Kind) => Kind;
}ViewStackOptions
Ordered children on the inline or block axis.
Properties
| Name | Type | Status | Description |
|---|---|---|---|
axis | "inline" | "block" | Required · readonly | Inline lays out left to right. Block lays out top to bottom. |
children | readonly ViewNode<Kind>[] | Required · readonly | Ordered view nodes owned by the same kind. |
gap | number | Optional · readonly | Defaults to zero. |
align | "center" | "start" | "end" | Optional · readonly | Inline cross-axis alignment. Defaults to center. |
Show raw definition+
/** Ordered children on the inline or block axis. */
export interface ViewStackOptions<Kind = unknown> {
/** Inline lays out left to right. Block lays out top to bottom. */
readonly axis: 'inline' | 'block';
/** Ordered view nodes owned by the same kind. */
readonly children: readonly ViewNode<Kind>[];
/** Defaults to zero. */
readonly gap?: number;
/** Inline cross-axis alignment. Defaults to center. */
readonly align?: 'start' | 'center' | 'end';
}ViewTextFont
Font metrics used by both text measurement and paint.
Properties
| Name | Type | Status | Description |
|---|---|---|---|
family | number | Required · readonly | Bundled font family. |
size | number | "node" | Required · readonly | Font size in canvas units, or the node's font size. |
weight | number | "node" | Required · readonly | Numeric font weight, or the node's font weight. |
italic | boolean | "node" | Optional · readonly | Italic state, or the node's italic state. |
lineHeight | number | "node" | Required · readonly | Unitless line height, or the node's line height. |
letterSpacing | number | "node" | Optional · readonly | Letter spacing in canvas units, or the node's letter spacing. |
align | "left" | "center" | "right" | Optional · readonly | Horizontal text alignment. |
Show raw definition+
/** Font metrics used by both text measurement and paint. */
export interface ViewTextFont {
/** Bundled font family. */
readonly family: TextFont;
/** Font size in canvas units, or the node's font size. */
readonly size: number | 'node';
/** Numeric font weight, or the node's font weight. */
readonly weight: number | 'node';
/** Italic state, or the node's italic state. */
readonly italic?: boolean | 'node';
/** Unitless line height, or the node's line height. */
readonly lineHeight: number | 'node';
/** Letter spacing in canvas units, or the node's letter spacing. */
readonly letterSpacing?: number | 'node';
/** Horizontal text alignment. */
readonly align?: 'left' | 'center' | 'right';
}ViewTextOptions
Options for a display-only text primitive.
Properties
| Name | Type | Status | Description |
|---|---|---|---|
font | ViewTextFont | Required · readonly | Font metrics shared by measurement and paint. |
color | "node" | ViewValue<number, Kind> | Required · readonly | Packed color, field-bound color, or the node's text color. |
wrap | boolean | Optional · readonly | Defaults to true. False measures the text at its intrinsic width. |
interaction | { readonly id: string; readonly role: "button" | "link"; readonly label: string; } | Optional · readonly | Optional pointer semantics for the text bounds. |
interaction.id | string | Required · readonly | Identifier reported to the plugin interaction handler. |
interaction.role | "button" | "link" | Required · readonly | Accessible interaction role. |
interaction.label | string | Required · readonly | Accessible label for the interaction region. |
Show raw definition+
/** Options for a display-only text primitive. */
export interface ViewTextOptions<Kind = unknown> {
/** Font metrics shared by measurement and paint. */
readonly font: ViewTextFont;
/** Packed color, field-bound color, or the node's text color. */
readonly color: ViewValue<number, Kind> | 'node';
/** Defaults to true. False measures the text at its intrinsic width. */
readonly wrap?: boolean;
/** Optional pointer semantics for the text bounds. */
readonly interaction?: {
/** Identifier reported to the plugin interaction handler. */
readonly id: string;
/** Accessible interaction role. */
readonly role: 'button' | 'link';
/** Accessible label for the interaction region. */
readonly label: string;
};
}ViewValue
A fixed value or a field handle resolved from the rendered canvas node.
Show raw definition+
/** A fixed value or a field handle resolved from the rendered canvas node. */
export type ViewValue<Value, Kind = unknown> = Value | FieldHandle<Value, Kind>;Constants
EDITFUL_PLUGIN_API_VERSION
Runtime plugin contract implemented by compatible Editful 0.9.x releases.
Show raw definition+
/** Runtime plugin contract implemented by compatible Editful 0.9.x releases. */
export declare const EDITFUL_PLUGIN_API_VERSION: "0.9.0";Primitive
Properties
| Name | Type | Status | Description |
|---|---|---|---|
RoundRect | 0 | Required · readonly | No description. |
Ellipse | 1 | Required · readonly | No description. |
None | 2 | Required · readonly | No description. |
TextBlock | 100 | Required · readonly | No description. |
ImageQuad | 101 | Required · readonly | No description. |
Show raw definition+
export declare const Primitive: {
readonly RoundRect: 0;
readonly Ellipse: 1;
readonly None: 2;
readonly TextBlock: 100;
readonly ImageQuad: 101;
};
export type Primitive = (typeof Primitive)[keyof typeof Primitive];TextAlign
Properties
| Name | Type | Status | Description |
|---|---|---|---|
Left | 0 | Required · readonly | No description. |
Center | 1 | Required · readonly | No description. |
Right | 2 | Required · readonly | No description. |
Show raw definition+
export declare const TextAlign: {
readonly Left: 0;
readonly Center: 1;
readonly Right: 2;
};
export type TextAlign = (typeof TextAlign)[keyof typeof TextAlign];TextFont
Properties
| Name | Type | Status | Description |
|---|---|---|---|
Sans | 0 | Required · readonly | No description. |
Serif | 1 | Required · readonly | No description. |
Mono | 2 | Required · readonly | No description. |
Show raw definition+
export declare const TextFont: {
readonly Sans: 0;
readonly Serif: 1;
readonly Mono: 2;
};
export type TextFont = number;TextSizing
Properties
| Name | Type | Status | Description |
|---|---|---|---|
Fixed | 0 | Required · readonly | No description. |
AutoWidth | 1 | Required · readonly | No description. |
AutoHeight | 2 | Required · readonly | No description. |
Auto | 3 | Required · readonly | No description. |
Show raw definition+
export declare const TextSizing: {
readonly Fixed: 0;
readonly AutoWidth: 1;
readonly AutoHeight: 2;
readonly Auto: 3;
};TextVerticalAlign
Properties
| Name | Type | Status | Description |
|---|---|---|---|
Top | 0 | Required · readonly | No description. |
Middle | 1 | Required · readonly | No description. |
Bottom | 2 | Required · readonly | No description. |
Show raw definition+
export declare const TextVerticalAlign: {
readonly Top: 0;
readonly Middle: 1;
readonly Bottom: 2;
};
export type TextVerticalAlign = (typeof TextVerticalAlign)[keyof typeof TextVerticalAlign];UNBOUNDED_WRAP
Sentinel used by text layout when wrapping is disabled.
Show raw definition+
/** Sentinel used by text layout when wrapping is disabled. */
export declare const UNBOUNDED_WRAP: number;