mirror of
https://github.com/basketikun/infinite-canvas.git
synced 2026-07-29 03:34:28 +08:00
9 lines
779 B
TypeScript
9 lines
779 B
TypeScript
export type Position = { x: number; y: number };
|
|
export type Viewport = { x: number; y: number; k: number };
|
|
export type CanvasNodeType = "image" | "text" | "config" | "video" | "audio";
|
|
export type CanvasNode = { id: string; type: CanvasNodeType; title?: string; position: Position; width: number; height: number; metadata?: Record<string, unknown> };
|
|
export type CanvasConnection = { id: string; fromNodeId: string; toNodeId: string };
|
|
export type CanvasSnapshot = { projectId?: string; title?: string; nodes?: CanvasNode[]; connections?: CanvasConnection[]; selectedNodeIds?: string[]; viewport?: Viewport; clientId?: string };
|
|
export type AgentEmit = (type: string, payload: unknown) => void;
|
|
export type AgentAttachment = { name?: string; type?: string; dataUrl?: string };
|