Home / Docs / Packages / @bpmnkit/plugins

@bpmnkit/plugins

Thirty-four composable plugins for the BPMN canvas and editor — minimap, linting, simulation, AI bridge, storage and more.

Overview

@bpmnkit/plugins is the capability layer above @bpmnkit/canvas and @bpmnkit/editor. The canvas draws a diagram and exposes a CanvasApi; a plugin is anything that takes that API and adds something — an overlay, a panel, a keyboard mode, a side effect on save.

Every plugin ships behind its own entry point, so a viewer that wants a minimap and nothing else pays for a minimap and nothing else:

import { createMinimapPlugin } from "@bpmnkit/plugins/minimap";

There is deliberately no root export. import … from "@bpmnkit/plugins" does not resolve, because a barrel would pull all thirty-four into every bundle that wanted one.

Installation

npm install @bpmnkit/plugins @bpmnkit/canvas

Using a plugin

Most plugins are a factory you call and hand to the canvas:

import { BpmnCanvas } from "@bpmnkit/canvas";
import { createMinimapPlugin } from "@bpmnkit/plugins/minimap";
import { createZoomControlsPlugin } from "@bpmnkit/plugins/zoom-controls";

const canvas = new BpmnCanvas({
  container: document.getElementById("app")!,
  xml,
  plugins: [createMinimapPlugin(), createZoomControlsPlugin()],
});

Plugins compose: they are independent, order-insensitive unless they say otherwise, and each one cleans up after itself when the canvas is destroyed.

What is available

Navigation and view

Entry pointExportWhat it adds
minimapcreateMinimapPluginOverview panel; click to pan
zoom-controlscreateZoomControlsPluginZoom in/out/fit buttons
flow-navigationcreateFlowNavigationPluginKeyboard cursor that walks the sequence flows
model-navigationcreateModelNavigationPluginDrill into sub-processes and call activities
presentationcreatePresentationPluginStep through a process as slides
story-viewcreateStoryViewPluginThe process as readable prose cards
ascii-viewcreateAsciiViewPluginThe diagram as text, via @bpmnkit/ascii
watermarkcreateWatermarkPluginA mark over the canvas

Editing

Entry pointExportWhat it adds
config-panelcreateConfigPanelPluginProperty panel shell
config-panel-bpmncreateConfigPanelBpmnPluginThe BPMN property editors themselves
command-palettecreateCommandPalettePlugin⌘K palette for a viewer
command-palette-editorcreateCommandPaletteEditorPluginThe editor’s own commands
main-menucreateMainMenuPluginMenu bar
tabscreateTabsPlugin, InMemoryFileResolverMulti-file tabs
historysaveCheckpoint, listCheckpoints, createHistoryPanelNamed checkpoints
storagecreateStoragePluginPersistence, with a host-supplied backend
storage-tabs-bridgecreateStorageTabsBridgeWires those two together
element-docscreateElementDocsPluginInline BPMN reference for the selected element

Correctness

Entry pointExportWhat it adds
lintcreateLintPluginFindings on the canvas
optimizecreateOptimizePluginThe @bpmnkit/core optimizer, on the diagram
pattern-advisorcreatePatternAdvisorPluginFifteen pattern rules, with fixes
variable-flowcreateVariableFlowPluginProducers and consumers per variable
diffcreateBpmnDiffVisual diff of two models

Execution

Entry pointExportWhat it adds
process-runnercreateProcessRunnerPluginSimulate, step, chaos mode, scenario tests
token-highlightcreateTokenHighlightPluginToken positions on the canvas
live-modecreateLiveModePluginAuto-deploy and live instance overlay
deploycreateDeployPluginDeploy to a cluster, guarded by the optimizer

DMN, forms and FEEL

Entry pointExportWhat it adds
dmn-viewerDmnViewer, injectDmnViewerStylesRender a decision table
dmn-editorDmnEditorEdit one
form-viewerFormViewer, injectFormViewerStylesRender a Camunda Form
form-editorFormEditorEdit one
feel-playgroundcreateFeelPlaygroundPlugin, buildFeelPlaygroundPanelEvaluate FEEL against live variables

Integration

Entry pointExportWhat it adds
ai-bridgecreateAiBridgePluginNatural-language edits over the compact model
connector-catalogcreateConnectorCatalogPluginBrowse and apply @bpmnkit/connectors

Styles

Plugins that render their own UI export their CSS as a string and an injector — for example FORM_VIEWER_CSS and injectFormViewerStyles from form-viewer. The injectors are id-guarded, so calling one twice is free, and a host that would rather ship the CSS itself can take the string instead.

Brand colours come from @bpmnkit/ui tokens with hex fallbacks, so a plugin looks right standalone and themes correctly inside an app that sets them.

Stability

@bpmnkit/plugins carries the 1.0 stability promise: the entry points listed above, and the exports and option types they name, will not change shape without a major version.

Two clarifications, because a plugin package is where the edges are:

  • Adding a plugin is a minor. A new entry point breaks nobody.
  • Rendered DOM and class names are not API. How a panel is laid out, which elements it builds, and the class names inside it are presentation. Style through the documented CSS custom properties rather than by reaching into the markup.