Files
EditorTemplate/types/node.ts
2026-09-11 13:22:24 -07:00

36 lines
633 B
TypeScript

export enum NodeType {
Episode = "Episode",
Image = "Image",
SoundEffect = "SoundEffect",
Song = "Song",
Action = "Action",
Scene = "Scene",
InventoryItem = "InventoryItem",
Character = "Character",
Dialogue = "Dialogue",
Actions = "Actions",
}
export interface NodeAction {
name: string
imageUrl: string
description: string
onClick: () => void
}
export interface NodeProperty {
id: string
label: string
type: string
value: any
readOnly?: boolean
}
export interface Node {
id: string
type: NodeType
actions: NodeAction[]
children?: Node[]
properties: Record<string, NodeProperty>
}