Skip to content

overview

Everything you import from @statorjs/stator comes through an explicit subpath — there is no root export.

SubpathWhat it isStability
/serverApp assembly, routing, dispatch, storesStable + Toolchain
/machineThe isomorphic state-machine engine (browser-safe)Stable
/templatehtml, read, control flow, directivesStable + Toolchain
/clientIsland authoring: StatorElement, use, machine, dispatchStable
/devThe dev serverStable
/buildProduction build + type syncStable
/componentsBuilt-in server components (JsonLd)Stable
/compilerThe .stator compilerInternal

There are three tiers:

  • Stable — the documented authoring surface: every symbol with its own section on a reference page. Semver-stable; these break only in a major.
  • Toolchain — the symbols listed under a reference page’s “Lower-level exports” heading on /server and /template. They’re public for one structural reason: compiled .stator output imports a few of them — always against the same package version that compiled it — and the framework’s own tooling (the dev server, the build) shares the rest. These may change in a minor. Don’t build application code on them; if one turns out to be genuinely useful, tell us and we’ll promote it.
  • Internalcompiler, plus the bundler glue the framework’s own tooling imports. They exist as subpaths only for that tooling; their shapes may change in a minor. Don’t build on them. In particular there is no bundler plugin surface: Stator never reads a vite.config.* and accepts no plugins — see Styling and assets for what to do instead.

The lower-level lists on /machine and /client are Stable — they’re type-level surface your app legitimately types against (InstanceOf, EventOf, DispatchResult, …), not runtime plumbing.

The package ships its src/ TypeScript directly — no dist/, no bundles. The dev server’s loader, the island bundler, and the production server all consume TS natively, so a build step would only add a layer where sourcemaps and stack traces can lie. Your app’s toolchain must be able to load TS, which every supported entry point already is.