Skip to main content
FlowDrop uses Svelte 5 rune-based stores for state management. There are no module-level store functions — every store lives on the per-mount FlowDropInstance.
Reaching a storeResolve the owning instance with getInstance() inside a FlowDrop component (it resolves the page-default instance for single-editor embeds), or hold the mount handle’s .instance outside the component tree. Exports from @flowdrop/flowdrop/editor: createFlowDropInstance, getInstance, provideInstance, the FlowDropInstance type, and the store classes WorkflowStore, HistoryStore, HistoryService, PortCoordinateStore (PlaygroundStore and InterruptStore export from @flowdrop/flowdrop/playground). See the multiple instances guide.

fd.workflow (WorkflowStore)

The primary store for workflow state, dirty tracking, and node/edge mutations.

Reactive getters

Non-reactive utilities

Workflow actions

Change callbacks


fd.historyBindings (HistoryStore)

Manages undo/redo with snapshot-based history — the reactive rune wrapper around fd.history (the underlying HistoryService).

Reactive getters

History actions


settingsStore

Manages editor settings with localStorage persistence and optional API sync. Settings are page-global by design — not instance-scoped, so they remain module-level functions.

Reactive getters

Settings updates

Theme functions

Change listener


fd.playground (PlaygroundStore)

Manages playground sessions, messages, and execution state.

Reactive getters

Playground actions


fd.interrupts (InterruptStore)

Manages human-in-the-loop interrupts with a state machine for each interrupt’s lifecycle.

Query methods

Interrupt actions

State machine

Each interrupt transitions through these states:

fd.categories (CategoriesStore)

Manages node category definitions.

Next steps