Vizel API / core/src / VizelCommandSpec
Interface: VizelCommandSpec
Defined in: packages/core/src/builders/types.ts:198
Actionable item shared across command surfaces.
The same logical command appears in multiple surfaces (slash menu, toolbar, bubble menu, block menu, keyboard shortcut). The spec carries the view-only fields a renderer needs: identity, localized label, optional description / icon / shortcut, classification group, fuzzy-match keywords, and the runtime-evaluated enable / active flags.
VizelCommand carries the runtime-bearing form (canRun, isActive, run); builders derive a VizelCommandSpec from a VizelCommand for a specific editor instance, stripping the runtime fields so renderers receive view-only data.
Properties
description?
readonly optional description?: string;Defined in: packages/core/src/builders/types.ts:204
Optional secondary line (slash menu description, tooltip hint).
group?
readonly optional group?: string;Defined in: packages/core/src/builders/types.ts:210
Group key for slash menu sections, toolbar grouping, etc.
icon?
readonly optional icon?: string;Defined in: packages/core/src/builders/types.ts:206
Optional icon identifier resolved by the icon catalog.
id
readonly id: string;Defined in: packages/core/src/builders/types.ts:200
Stable identifier shared across surfaces (e.g. "format/bold").
isActive
readonly isActive: boolean;Defined in: packages/core/src/builders/types.ts:216
Whether the command's mark / node is currently active at the selection.
isEnabled
readonly isEnabled: boolean;Defined in: packages/core/src/builders/types.ts:214
Whether the command can currently run against the editor.
keywords?
readonly optional keywords?: readonly string[];Defined in: packages/core/src/builders/types.ts:212
Fuzzy-match keywords used by slash menu filtering.
label
readonly label: string;Defined in: packages/core/src/builders/types.ts:202
Localized display label.
shortcut?
readonly optional shortcut?: VizelShortcutSpec;Defined in: packages/core/src/builders/types.ts:208
Optional keyboard shortcut hint.