Optional ReadonlycontributionsDestinations this entry injects itself into, keyed by destination panel key - each value a Placement describing where in that panel this entry lands. Woven into the destination by ICommandButtonRegistry.resolveMembers.
Optional ReadonlydefaultA split button's quick action - the command key its primary ("quick") half runs, next to the
members dropdown. A command-registry key (distinct from this entry's own key); omit for a
plain popup (head just opens the list).
Optional ReadonlygetDescription (usually the tooltip).
Optional ReadonlygetIcon. A string resolves via DynamicIcon. Return null to render no icon (a deliberate
blank); return undefined - or omit the getter - to let the resolved command supply its own.
Optional ReadonlygetLabel (usually the button / menu text). groupKey = the panel it renders in (rarely needed).
Optional ReadonlykeyThe one reference. On a registered entry it is its id (how it is referenced / injected /
replaced; ICommandButtonRegistry.register requires it). On a member it is what to
resolve, registry-first (a registered entry, else a plain command) - so a bare-string member is
shorthand for { key }.
Optional ReadonlymembersThe ordered list members - each a key (string, resolved registry-first), a divider
('-' / null), or an inline entry. Its presence makes this entry a panel (group).
Optional ReadonlyrenderOptional custom renderer - the escape hatch. Omit for the default control (a button, a
split button, or a popup, per the facets above). Provide to fully render it yourself - e.g. a
host renders the same command its own way (the studio opens the Monaco pane, a VSCode host a native
control), or a toggle group whose head reflects the active member. A panel entry's render
receives the entry's own key as groupKey (so it can resolve its members); a leaf entry's
render receives the resolved leaf button props. May render null internally to self-hide.
Optional ReadonlyshowRender the entry's label as visible content on a toolbar button (in addition to any icon /
split-toggle checkmark), not just as its tooltip. Toolbar buttons are icon-only by default; set
this for the deliberate text buttons (e.g. Gridlines, Workbook View) and the icon+text ones
(e.g. Text to Columns). No effect on menu items, which always show their label.
Optional ReadonlystateOptional state passed to the resolved command on execute (parameterizes a reused command).
The one thing the command-button registry deals in - a button or a panel (group). One shape, whether it becomes a plain button, a split button, a popup, or a fully custom control.
There is one reference concept:
key. A registered entry has akey(its id); a member is akey- a bare string, resolved registry-first against that same registry (a registered entry if one exists, otherwise a plain command). The same shape also appears keyless and inline as a member ({ key, state, render, … }= a reference + overrides, or a keyless nested panel). Keys are a single namespace: an entry key must not shadow a command key, so a reference always means exactly one thing. What an entry becomes:members- a list; its presence makes the entry a panel (group) (isCommandGroup).defaultKey- a split button's quick action (the command its primary half runs).render- a fully custom control (the escape hatch); omit for the default button / split / popup.