Vizel API / core/src / buildVizelBlockMenuSpec
Function: buildVizelBlockMenuSpec()
ts
function buildVizelBlockMenuSpec(
actions,
turnIntoOptions,
showTurnInto,
locale): VizelBlockMenuSpec;Defined in: packages/core/src/builders/block-menu.ts:86
Build a VizelBlockMenuSpec for the block context menu.
The skeleton owns: container ARIA, grouping of actions into sections, is-destructive flag derivation, submenu trigger ARIA wiring (aria-haspopup + aria-expanded), and submenu list shape.
The framework component owns: positioning, focus management, event binding, and computing per-action disabled state (which requires the runtime editor + node, not available here).
Parameters
| Parameter | Type | Description |
|---|---|---|
actions | readonly VizelBlockMenuAction[] | Resolved block-menu actions (already locale-applied). |
turnIntoOptions | readonly VizelNodeTypeOption[] | Filtered list of available "Turn into" targets. |
showTurnInto | boolean | Whether the submenu is currently open. |
locale | VizelLocale | undefined | Optional locale for translated labels. |