@aeon-ui/primitives
v0.1.0
Published
XState machines for Aeon UI primitives
Maintainers
Readme
@aeon-ui/primitives
XState v5 machines — behavior only, no DOM.
Agents: docs/MACHINES.md lists every machine and events.
Install
pnpm add @aeon-ui/primitivesPair with @aeon-ui/react (useAeonMachine) or your own XState bindings.
Exported machines
| Export | File | Use |
|--------|------|-----|
| toggleMachine | machines/toggle.ts | Switch, Checkbox |
| dialogMachine | machines/dialog.ts | Dialog |
| tabsMachine | machines/tabs.ts | Tabs |
| accordionMachine | machines/accordion.ts | Accordion |
| createAsyncMachine | machines/async.ts | Async regions |
| asyncMachine | default instance | |
| buttonLifecycleMachine | machines/button.ts | App/demo — not wired inside headless Button |
| fieldMachine | machines/field.ts | Field (parallel) |
| popoverMachine | machines/popover.ts | Menu, Popover, Select |
| toastMachine | machines/toast.ts | Toast item |
Helpers
import { ASYNC_LIFECYCLE_STATES, isEmptyAsyncData, createAsyncMachine } from '@aeon-ui/primitives'Async example
const machine = createAsyncMachine<User[]>()
// send: FETCH | RESOLVE | REJECT | RESET | STALE | REFRESHExtend
- Add
src/machines/<name>.ts - Export from
src/index.ts - Wire in
@aeon-ui/react - Update
apps/demo/src/aeonDiagrams.ts - docs/COMPONENT_CHECKLIST.md
