@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>function getGraphSnapshot<TTarget extends object, TEvent extends KeymapEvent>(keymap: KeymapExtensionProvider<TTarget, TEvent>, options?: GraphSnapshotOptions<TTarget>): GraphSnapshot<TTarget, TEvent>
Interfaces#
interface GraphBinding<TTarget extends object = object, TEvent extends KeymapEvent = KeymapEvent>property GraphBinding.active: booleanproperty GraphBinding.attrs?: Readonly<Attributes>property GraphBinding.bindingIndex: numberproperty GraphBinding.command?: BindingCommand<TTarget, TEvent>property GraphBinding.commandAttrs?: Readonly<Attributes>property GraphBinding.commandIds: readonly string[]property GraphBinding.commandResolved: booleanproperty GraphBinding.enabled: booleanproperty GraphBinding.event: BindingEventproperty GraphBinding.fallthrough: booleanproperty GraphBinding.id: stringproperty GraphBinding.inactiveReasons: readonly GraphInactiveReason[]property GraphBinding.layerId: stringproperty GraphBinding.nodeId?: stringproperty GraphBinding.preventDefault: booleanproperty GraphBinding.reachable: booleanproperty GraphBinding.sequence: readonly KeySequencePart[]property GraphBinding.shadowed: booleanproperty GraphBinding.sourceLayerOrder: number
interface GraphCommand<TTarget extends object = object, TEvent extends KeymapEvent = KeymapEvent>property GraphCommand.active: booleanproperty GraphCommand.attrs?: Readonly<Attributes>property GraphCommand.command: Command<TTarget, TEvent>property GraphCommand.enabled: booleanproperty GraphCommand.fields: Readonly<Record<string, unknown>>property GraphCommand.id: stringproperty GraphCommand.inactiveReasons: readonly GraphInactiveReason[]property GraphCommand.layerId: stringproperty GraphCommand.name: stringproperty GraphCommand.reachable: booleanproperty GraphCommand.target?: TTarget
interface GraphLayer<TTarget extends object = object>property GraphLayer.active: booleanproperty GraphLayer.attrs?: Readonly<Attributes>property GraphLayer.bindingIds: readonly string[]property GraphLayer.commandIds: readonly string[]property GraphLayer.enabled: booleanproperty GraphLayer.fields: Readonly<Record<string, unknown>>property GraphLayer.focusActive: booleanproperty GraphLayer.id: stringproperty GraphLayer.inactiveReasons: readonly GraphInactiveReason[]property GraphLayer.order: numberproperty GraphLayer.priority: numberproperty GraphLayer.rootNodeId: stringproperty GraphLayer.target?: TTargetproperty GraphLayer.targetMode?: TargetMode
interface GraphSequenceNodeproperty GraphSequenceNode.active: booleanproperty GraphSequenceNode.bindingIds: readonly string[]property GraphSequenceNode.childIds: readonly string[]property GraphSequenceNode.depth: numberproperty GraphSequenceNode.display: stringproperty GraphSequenceNode.id: stringproperty GraphSequenceNode.layerId: stringproperty GraphSequenceNode.match: KeyMatch | nullproperty GraphSequenceNode.parentId: string | nullproperty GraphSequenceNode.pending: booleanproperty GraphSequenceNode.pendingPath: booleanproperty GraphSequenceNode.reachable: booleanproperty GraphSequenceNode.reachableBindingIds: readonly string[]property GraphSequenceNode.sequence: readonly KeySequencePart[]property GraphSequenceNode.stroke: NormalizedKeyStroke | nullproperty GraphSequenceNode.tokenName?: string
interface GraphSnapshot<TTarget extends object = object, TEvent extends KeymapEvent = KeymapEvent>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 | nullproperty GraphSnapshot.layers: readonly GraphLayer<TTarget>[]property GraphSnapshot.pendingSequence: readonly KeySequencePart[]property GraphSnapshot.sequenceNodes: readonly GraphSequenceNode[]
interface GraphSnapshotOptions<TTarget extends object = object>property GraphSnapshotOptions.focused?: TTarget | nullproperty GraphSnapshotOptions.includeTargets?: boolean
interface KeymapGraphExtra<TTarget extends object, TEvent extends KeymapEvent>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"