FlowDropInstance container holding its stores. While most developers won’t need to interact with stores directly, they’re essential for advanced integrations.
Reaching a store
There are no module-level store functions — instances are the API. Reach a store one of two ways:getInstance()inside a FlowDrop component returns the owningFlowDropInstance. For single-editor embeds it resolves the page-default instance automatically.- The mount handle’s
.instance(const fd = (await mountFlowDropApp(...)).instance) lets you reach a specific editor’s stores from vanilla JS or another framework. You can also construct one withcreateFlowDropInstance({ id })from@flowdrop/flowdrop/editorand pass it as theinstanceprop.
| Member | Holds |
|---|---|
fd.workflow | Workflow state, nodes, edges, dirty tracking |
fd.history / fd.historyBindings | Undo/redo (service and reactive wrapper) |
fd.playground | Playground sessions and messages |
fd.interrupts | Human-in-the-loop interrupt state |
fd.categories | Node category definitions |
fd.portCoordinates | Port handle positions |
fd.pipelinePanel | Pipeline execution view state |
fd.api | API client |
fd.nodes / fd.fields | Node and form-field registries |
fd.formats / fd.portCompatibility | Workflow formats and port rules |
Workflow store (fd.workflow)
The central store holding the current workflow state.
Reading state
Modifying state
Dirty state
History store (fd.historyBindings)
Manages undo/redo with snapshot-based history. fd.historyBindings is the reactive rune wrapper around fd.history (the underlying HistoryService).
Settings store
User preferences for theme, editor behavior, and UI. Settings are page-global by design — they are not instance-scoped, so these remain module-level functions.Theme control
Theme is also page-global:Playground store (fd.playground)
Manages interactive testing sessions and messages.
Interrupt store (fd.interrupts)
Manages human-in-the-loop interrupt state.
Using stores in Svelte components
Since stores use Svelte 5 runes, read their getters inside$derived:
Using stores outside Svelte
For vanilla JS or other frameworks, hold the mount handle’s.instance and read its getters at call time: