@opentui/keymap/extras/graph

Every export of @opentui/keymap/extras/graph in the 0.6.0 release, from its type declarations. A version names the release that added an export after the module's first release.

Functions#

function createGraphExtra<TTarget extends object, TEvent extends KeymapEvent>(keymap: KeymapExtensionProvider<TTarget, TEvent>): KeymapGraphExtra<TTarget, TEvent>
Core engine
function getGraphSnapshot<TTarget extends object, TEvent extends KeymapEvent>(keymap: KeymapExtensionProvider<TTarget, TEvent>, options?: GraphSnapshotOptions<TTarget>): GraphSnapshot<TTarget, TEvent>
Core engine

Interfaces#

interface GraphBinding<TTarget extends object = object, TEvent extends KeymapEvent = KeymapEvent>
Core engine
  • property GraphBinding.active: boolean
  • property GraphBinding.attrs?: Readonly<Attributes>
  • property GraphBinding.bindingIndex: number
  • property GraphBinding.command?: BindingCommand<TTarget, TEvent>
  • property GraphBinding.commandAttrs?: Readonly<Attributes>
  • property GraphBinding.commandIds: readonly string[]
  • property GraphBinding.commandResolved: boolean
  • property GraphBinding.enabled: boolean
  • property GraphBinding.event: BindingEvent
  • property GraphBinding.fallthrough: boolean
  • property GraphBinding.id: string
  • property GraphBinding.inactiveReasons: readonly GraphInactiveReason[]
  • property GraphBinding.layerId: string
  • property GraphBinding.nodeId?: string
  • property GraphBinding.preventDefault: boolean
  • property GraphBinding.reachable: boolean
  • property GraphBinding.sequence: readonly KeySequencePart[]
  • property GraphBinding.shadowed: boolean
  • property GraphBinding.sourceLayerOrder: number
interface GraphCommand<TTarget extends object = object, TEvent extends KeymapEvent = KeymapEvent>
Core engine
  • property GraphCommand.active: boolean
  • property GraphCommand.attrs?: Readonly<Attributes>
  • property GraphCommand.command: Command<TTarget, TEvent>
  • property GraphCommand.enabled: boolean
  • property GraphCommand.fields: Readonly<Record<string, unknown>>
  • property GraphCommand.id: string
  • property GraphCommand.inactiveReasons: readonly GraphInactiveReason[]
  • property GraphCommand.layerId: string
  • property GraphCommand.name: string
  • property GraphCommand.reachable: boolean
  • property GraphCommand.target?: TTarget
interface GraphLayer<TTarget extends object = object>
Core engine
  • property GraphLayer.active: boolean
  • property GraphLayer.attrs?: Readonly<Attributes>
  • property GraphLayer.bindingIds: readonly string[]
  • property GraphLayer.commandIds: readonly string[]
  • property GraphLayer.enabled: boolean
  • property GraphLayer.fields: Readonly<Record<string, unknown>>
  • property GraphLayer.focusActive: boolean
  • property GraphLayer.id: string
  • property GraphLayer.inactiveReasons: readonly GraphInactiveReason[]
  • property GraphLayer.order: number
  • property GraphLayer.priority: number
  • property GraphLayer.rootNodeId: string
  • property GraphLayer.target?: TTarget
  • property GraphLayer.targetMode?: TargetMode
interface GraphSequenceNode
Core engine
  • property GraphSequenceNode.active: boolean
  • property GraphSequenceNode.bindingIds: readonly string[]
  • property GraphSequenceNode.childIds: readonly string[]
  • property GraphSequenceNode.depth: number
  • property GraphSequenceNode.display: string
  • property GraphSequenceNode.id: string
  • property GraphSequenceNode.layerId: string
  • property GraphSequenceNode.match: KeyMatch | null
  • property GraphSequenceNode.parentId: string | null
  • property GraphSequenceNode.pending: boolean
  • property GraphSequenceNode.pendingPath: boolean
  • property GraphSequenceNode.reachable: boolean
  • property GraphSequenceNode.reachableBindingIds: readonly string[]
  • property GraphSequenceNode.sequence: readonly KeySequencePart[]
  • property GraphSequenceNode.stroke: NormalizedKeyStroke | null
  • property GraphSequenceNode.tokenName?: string
interface GraphSnapshot<TTarget extends object = object, TEvent extends KeymapEvent = KeymapEvent>
Core engine
  • property GraphSnapshot.activeKeys: readonly ActiveKey<TTarget, TEvent>[]
  • property GraphSnapshot.bindings: readonly GraphBinding<TTarget, TEvent>[]
  • property GraphSnapshot.commands: readonly GraphCommand<TTarget, TEvent>[]
  • property GraphSnapshot.focused?: TTarget | null
  • property GraphSnapshot.layers: readonly GraphLayer<TTarget>[]
  • property GraphSnapshot.pendingSequence: readonly KeySequencePart[]
  • property GraphSnapshot.sequenceNodes: readonly GraphSequenceNode[]
interface GraphSnapshotOptions<TTarget extends object = object>
Core engine
  • property GraphSnapshotOptions.focused?: TTarget | null
  • property GraphSnapshotOptions.includeTargets?: boolean
interface KeymapGraphExtra<TTarget extends object, TEvent extends KeymapEvent>
Core engine
  • method KeymapGraphExtra.getGraphSnapshot(options?: GraphSnapshotOptions<TTarget>): GraphSnapshot<TTarget, TEvent>

Types#

type GraphInactiveReason = "focus" | "target-destroyed" | "layer-disabled" | "binding-disabled" | "command-disabled" | "command-inactive" | "command-unresolved" | "shadowed"
Core engine