/** A node of the compact tree the AI reads and writes. */ export type CompactNode = { id?: string; type: string; props?: Record; text?: string; children?: CompactNode[]; label?: string; }; /** Input of `fromSnapshot`; CraftJS `SerializedNodes` (and `query.getNodes()` output reshaped) satisfy it. */ export type SnapshotNode = { type: string | { resolvedName: string; }; props?: Record; nodes?: string[]; custom?: { displayName?: string; deletable?: boolean; }; parent?: string | null; }; export type Snapshot = Record; /** Structural twin of CraftJS 0.2.12 `SerializedNode`, kept local so `.d.ts` has no craft dependency. */ export type SerializedNode = { type: string | { resolvedName: string; }; isCanvas: boolean; props: Record; displayName: string; custom?: any; parent: string | null; hidden: boolean; nodes: string[]; linkedNodes: Record; _childCanvas?: Record; }; export type SerializedNodes = Record;