Skip to content

Vizel API / core/src / buildVizelBubbleMenuSpec

Function: buildVizelBubbleMenuSpec()

ts
function buildVizelBubbleMenuSpec(commands, options): readonly VizelCommandSpec[];

Defined in: packages/core/src/builders/bubble-menu.ts:25

Build the bubble-menu spec from a VizelCommand array.

Filters by surfaces.bubbleMenu, applies each command's optional showWhen predicate against the editor, sorts by priority ascending, and projects each command into a VizelCommandSpec.

Parameters

ParameterType
commandsreadonly VizelCommand[]
optionsVizelBubbleMenuSpecOptions

Returns

readonly VizelCommandSpec[]

Released under the MIT License.