import type { ActiveKey, Attributes, BindingCommand, BindingEvent, Command, KeymapEvent, KeyMatch, KeySequencePart, NormalizedKeyStroke, TargetMode } from "../../types.js"; export interface GraphSnapshotOptions { focused?: TTarget | null; includeTargets?: boolean; } export type GraphInactiveReason = "focus" | "target-destroyed" | "layer-disabled" | "binding-disabled" | "command-disabled" | "command-inactive" | "command-unresolved" | "shadowed"; export interface GraphLayer { id: string; order: number; priority: number; target?: TTarget; targetMode?: TargetMode; fields: Readonly>; attrs?: Readonly; active: boolean; focusActive: boolean; enabled: boolean; inactiveReasons: readonly GraphInactiveReason[]; rootNodeId: string; bindingIds: readonly string[]; commandIds: readonly string[]; } export interface GraphCommand { id: string; layerId: string; name: string; command: Command; fields: Readonly>; attrs?: Readonly; target?: TTarget; active: boolean; reachable: boolean; enabled: boolean; inactiveReasons: readonly GraphInactiveReason[]; } export interface GraphBinding { id: string; layerId: string; sourceLayerOrder: number; bindingIndex: number; nodeId?: string; commandIds: readonly string[]; sequence: readonly KeySequencePart[]; command?: BindingCommand; commandAttrs?: Readonly; attrs?: Readonly; event: BindingEvent; preventDefault: boolean; fallthrough: boolean; active: boolean; reachable: boolean; enabled: boolean; commandResolved: boolean; shadowed: boolean; inactiveReasons: readonly GraphInactiveReason[]; } export interface GraphSequenceNode { id: string; layerId: string; parentId: string | null; childIds: readonly string[]; bindingIds: readonly string[]; reachableBindingIds: readonly string[]; depth: number; sequence: readonly KeySequencePart[]; stroke: NormalizedKeyStroke | null; match: KeyMatch | null; display: string; tokenName?: string; active: boolean; reachable: boolean; pending: boolean; pendingPath: boolean; } export interface GraphSnapshot { focused?: TTarget | null; pendingSequence: readonly KeySequencePart[]; activeKeys: readonly ActiveKey[]; layers: readonly GraphLayer[]; commands: readonly GraphCommand[]; bindings: readonly GraphBinding[]; sequenceNodes: readonly GraphSequenceNode[]; }