Contributions
Contributions are declarative UI: tabs, toolbar buttons, HTML blocks, and icons. They are registered with contributionRegistry.registerContribution(target, contribution).
Targets
Contribution targets define where UI appears:
| Constant | Role |
|---|---|
SIDEBAR_MAIN | Main sidebar (e.g. file tree). |
SIDEBAR_MAIN_BOTTOM | Bottom of main sidebar. |
SIDEBAR_AUXILIARY | Secondary sidebar. |
EDITOR_AREA_MAIN | Editor area. |
PANEL_BOTTOM | Bottom panel. |
TOOLBAR_MAIN | Main toolbar. |
TOOLBAR_MAIN_RIGHT, TOOLBAR_MAIN_CENTER | Main toolbar slots. |
TOOLBAR_BOTTOM, TOOLBAR_BOTTOM_END, TOOLBAR_BOTTOM_CENTER | Bottom toolbar. |
SYSTEM_LANGUAGE_BUNDLES | i18n language bundles (extensions). |
Import these from @kispace-io/core.
Contribution types
- CommandContribution —
command,label,icon, optionalparams,showLabel,disabled. Used for toolbar buttons and menu items. - TabContribution —
name, optionaleditorId,closable,noOverflow,component(function returning a Lit template). Used for sidebar and editor area tabs. - PaneContribution —
name,component, optionalsize,minSize,maxSize,order. Used for resizable panes. - HTMLContribution —
html(string or function returning a LitTemplateResult). Raw HTML or template in a slot. - IconContribution —
mappings(map of icon keys to identifiers), optionalpriority.
All contributions can include target, label, icon, slot from the base Contribution interface where applicable.