Public API reference
This is the catalogue of the public package exports, starting with src/lib/index.ts, the package root, and the inspector subpaths.
Use this page to decide which reference page answers your question fastest. If you want the "when should I use this?" version, pair it with the guide.
Start here
- Core runtime
- Covers
defineStore, managers, store helpers, and Svelte interop - Best for understanding the store lifecycle and core APIs
- Covers
- Plugins and orchestration
- Covers persistence, history, sync, and async plugins
- Best for understanding how advanced features fit together
- Finite state machines
- Covers
createFsmPlugin(),fsmdefinitions, and$fsm - Best for modeling explicit workflow state
- Covers
- Validation
- Covers
createValidationPlugin(), validate hooks, and rollback behavior - Best for rejecting invalid state changes safely
- Covers
- Inspector
- Covers the dev-only inspector runtime helpers and Vite integration
- Best for wiring the drawer and Vite plugin
- Persistence helpers
- Covers storage adapters, compression, and persistence types
- Best for customizing durable store state
- Public types
- Covers store, manager, history, sync, and async contracts
- Best for keeping strong TypeScript inference end to end
What this reference includes
The pages linked above cover the package-root exports plus the inspector subpath exports, including:
- store definition and manager helpers
- plugin factories
- FSM and validation APIs
- storage adapters and compression helpers
- public store, sync, history, async, and persistence types
Read alongside the guide
The reference tells you exactly what each API does. For step-by-step usage, pair it with the guide and examples and recipes.