Reference

Every building block.

34 packages and 4 tools, grouped by layer. Filter by layer or search by name, purpose or export.

Generated at build time from the repository: names, descriptions and layers from each package.json, public API from each AGENTS.md, budgets from .size-limit.json. Every name links to the package’s AGENTS.md on GitHub.

A package may import only lower layers (core < runtime < vertical < ui < shell < feature < app), checked through each package’s declared dependencies and pnpm lint:boundaries (no cycles, no deep imports); same-layer packages talk through ports the app wires together.

38 packages

Core

The static core: tokens, units, injector, scopes, Result, Tasks, machines, telemetry, reactivity. Depends on nothing internal.

  • @staticflux/core

    core

    StaticFlux core: tokens, units, injector, scopes, Result, async primitives, telemetry, state machines, reactivity port.

    tokenRegistryunitDepHandleFunctionalDepScopeLevelInitTimingcreateInjectorbind

    Budget
    9.5 KB (full runtime surface) · 7.5 KB (typical boot: injector + units + telemetry)

Runtime

The app supervisor, app and feature lifecycles, resource manager and frame scheduler.

  • @staticflux/runtime

    runtime

    App supervisor, app & feature lifecycles, resource manager, frame scheduler, memory budgets.

    appMachinesubsystemMachinefeatureMachineALLOWED_COMMANDSAppStateAppCommandSubsystemRestartPolicydefineSubsystem

    Budget
    8.5 KB (boot: bootApp + supervisor + scheduler) · 14.5 KB (full) · 3.5 KB /worker (worker scheduler + long-task detector) · 2 KB /memory (cache memory ledger)
    Depends on
    core, storage
  • @staticflux/storage

    runtime

    One async key-value interface over any backend (memory, web storage, cookies, IndexedDB, OPFS, remote) with composable middleware.

    AsyncStoreStoreCapabilitiesSeekOptionsStoreCursorBatchOpStoreChangetoStoreErrorisQuotaErrorstoreFromDriver

    Budget
    6 KB (boot: createStore + IndexedDB + memory)
    Depends on
    core

Verticals

Independent building blocks — each depends only on core (and occasionally another vertical) and plugs in through ports.

  • @staticflux/a11y

    vertical

    Focus management, live-region announcer, shortcut registry, preference facts.

    A11yEnvironmentbrowserA11yEnvironmentdefaultTimerscreateFocusManagertabbablesOfKEEP_INTERACTIVE_ATTRFocusTrapMachinerememberFocusReturnFOCUS_FALLBACK_SELECTOR

    Budget
    6.9 KB (full; B11c 6.7 → 6.9 KB: Alt + punctuation shortcuts matched by physical key (R15.7))
    Depends on
    core
  • @staticflux/advisors

    vertical

    Decision points and pluggable advisors (heuristic, statistical, model, remote).

    defineDecisionPointnormalizeargmaxclampheuristicDistributionstableKeyAdvisoradvisorForTIER_RANK

    Budget
    6.5 KB (full)
    Depends on
    core
  • @staticflux/ai

    vertical

    Model provider port over browser built-in AI, on-device, decision and remote models.

    ModelProviderAI_TASKSclassifyavailabilityMachinecreateAiFactsStoreAiMetricscreateBrowserAiProviderdetectBuiltInAicreateDecisionModelProvider

    Budget
    6.5 KB (full)
    Depends on
    core
  • @staticflux/auth

    vertical

    Identity providers, session lifecycle, multi-tab sync, single-flight refresh, token broker.

    IdentityProviderCredentialsProviderGrantSessionSnapshotSessionChangeSessionListenersessionMachinecreateSessionStoreAuthMetrics

    Budget
    11 KB (full)
    Depends on
    core
  • @staticflux/blob

    vertical

    Content-addressed blob store: chunked hashing, OPFS backend with atomic heads, journal and leader tab, folder mirror, zip bundles, catalog-driven GC and quota helpers.

    DigestBlobRefChunkManifestBlobRangeBlobStoreObjectStorecreateBlobStoreparseChunkManifestencodeChunkManifest

    Budget
    12 KB (store worker: workspace store + Latest + leader) · 6.5 KB (folder mirror) · 5 KB (zip bundle) · 21 KB (full)
    Depends on
    core, storage
  • @staticflux/capabilities

    vertical

    Capability registry: typed, schema-described actions callable by UI, command palette, agents and WebMCP.

    InfervalidatetoJsonSchemadefineCapabilitydescribeCapabilityimplementCapabilityRunContextCapabilityDecidePortCapabilityConfirmPort

    Budget
    6.5 KB (full)
    Depends on
    core
  • @staticflux/config

    vertical

    Typed config & feature flags, layered resolution, OpenFeature-compatible provider port.

    FlagRegistrydefineFlagflagTypeFlagValuesflagValueVariantKeyEvaluationContextEvaluationContextSourcestaticContext

    Budget
    counts toward the framework boot runtime (R12.7, ≤ 45 KB together with core/runtime/DI/router/auth/gate/data);
    Depends on
    core
  • @staticflux/data

    vertical

    Transports, resources, caching/SWR, batching, schema-first stores with patches, user-data slices.

    TransportdefineEndpointdefineStreamEndpointtransportSlotDefaultTransportbuildRequestcreateDataClientPauseControleffectivePausePolicy

    Budget
    9.5 KB (boot: client + transport + resources)
    Depends on
    core, storage
  • @staticflux/document

    vertical

    ECS document model (v1 on Yjs); DocumentCRDT v2 port, DocumentRepo and versioned components with a Loro engine; binary render projection and spatial index.

    defineComponentdefineTextComponentcreateWorldStructStoredefineSystemcreateIdGeneratorDocumentCRDTDocumentOpcreateLwwMap

    Budget
    13.5 KB (excl. yjs) · 12 KB /v2 (DocumentRepo, components, canonical parts; no engine) · 9 KB /loro-crdt (adapter glue, excl. loro-crdt) · 1.21 MB loro-crdt Wasm [wasm budget category; worker only, IF-15.1 ≤ 1.25 MB gzip] · 4.25 KB /render-projection (binary render projection, SF-Δ25) · 2.9 KB /spatial-index (spatial index system incl. rbush, SF-Δ25)
    Depends on
    core, worker
  • @staticflux/gate

    vertical

    Facts, declarative policies compiled to decision tables, explainable decisions, meters.

    defineFactFactSourceFactSinkGateFactsflagFactcreateManualFactSourcePolicyIRConditiondefinePolicy

    Budget
    9 KB (full)
    Depends on
    core
  • @staticflux/handoff

    vertical

    Boundary-surviving state with lifetimes; shared snapshot format.

    SnapshotEnvelopecreateEnvelopeisEnvelopeparseEnvelopevalidateWithHandoffSchemadefineHandofflifetimeKindeffectiveTtl

    Budget
    6 KB (full)
    Depends on
    core, storage
  • @staticflux/hydrate

    vertical

    Hydration: islands over prerendered HTML (visible/idle/interaction) and store-snapshot rehydration for instant boot.

    ISLAND_MARKER_FORMATHYDRATE_STRATEGIESscanIslandsislandElementsreadIslandMarkerparseIslandPropsserializeIslandPropsrenderIslandMarkerescapeHtmlAttribute

    Budget
    7 KB (islands)
    Depends on
    core, loader, data, storage
  • @staticflux/i18n

    vertical

    Typed message catalogs, ICU-style formatting, lazy locales, RTL.

    defineMessagesMessageRefParamsOfcatalogOfCATALOGdefineTranslationsparseMessageformatNodescollectArgs

    Budget
    7.5 KB (full)
    Depends on
    core
  • @staticflux/loader

    vertical

    Logical chunk ids, manifest runtime, warmup tiers, speculation, boot plans.

    chunkChunkIdWARMUP_TIERSDEFAULT_CHUNK_BUDGETS_KBbudgetKbOfSfManifestparseManifestgetChunkchunkClosure

    Budget
    4.5 KB (boot: chunk loader + boot plan)
    Depends on
    core
  • @staticflux/perf

    vertical

    Journey tracing, feature marks, long-task/layout detectors, runtime budgets.

    createJourneyTrackerJourneySummarycriticalPathdefaultPhaseRulejourneyMachineJOURNEY_PHASEScreateFeatureMarksnormalizeFeatureMarkcreateLongFrameDetector

    Budget
    9.5 KB (full; not on boot path)
    Depends on
    core
  • @staticflux/platform

    vertical

    Capability-based platform facts, host modes, form factors, app profile.

    PlatformEnvbrowserEnvmediaMatchesreadGlobalisEmbeddedFormFactorRegistrydefineFormFactorcomputeFormFactorHostModeRegistry

    Budget
    1.1 KB detect-mode (inline boot detector) · 15 KB (full) · 1.3 KB baseline (inline pre-boot check: web API facts + verdict) · 750 B unsupported screen (the unsupported boot plan's only chunk) · 3.75 KB async fact lane + built-in probes
    Depends on
    core
  • @staticflux/pwa

    vertical

    PWA: service-worker runtime (precache from the loader manifest), update flow, web app manifest, link capture, share targets, optional COOP/COEP service worker.

    SwEnvSwGlobalLikeCacheStorageLikeCacheLikeRequestLikeResponseLikecacheNamesinstallPrecachecleanupCaches

    Budget
    6 KB (page: updater + warm bridge) · 8.5 KB /sw (service worker runtime)
    Depends on
    core, loader, storage
  • @staticflux/router

    vertical

    Async navigation pipeline with named stages, typed routes, sub-route view state.

    STAGESPIPELINE_STAGESPipelineKinddefineStageStagePluginstagePlugindefineRoutebindCapabilityguard

    Budget
    13.5 KB (full)
    Depends on
    core, runtime
  • @staticflux/sandbox

    vertical

    Isolated hosting of untrusted plugins (iframe/worker) that can only call declared capabilities.

    isAllowedEntryUrlPluginLimitsDEFAULT_PLUGIN_LIMITSeffectiveLimitsdefinePluginEventSandboxChannelsConnectMessagePLUGIN_ALLOWEDestimateBytes

    Budget
    8 KB (host)
    Depends on
    core, capabilities, worker
  • @staticflux/stage

    vertical

    Composed stage over document parts (session and local layers, reference/inherit/variant arcs, provenance, locks), actor attribution and the per-actor undo service.

    ActorActorKindACTOR_KINDSViaVIASisActorAttributionPortRunSourcecreateAttributionPort

    Budget
    9.5 KB (stage, attribution, undo service; excl. framework)
    Depends on
    core, document
  • @staticflux/urlstate

    vertical

    URL-state kinds (view/intent/sticky/dialog), declared bindings, URL ⇄ store sync.

    defineUrlBindingdefineIntentreserveParamscheckUrlDeclarationscreateUrlDeclarationRegistrycodeccodecEqualscreateUrlSyncboxAdapter

    Budget
    8 KB (full)
    Depends on
    core
  • @staticflux/wasm

    vertical

    Wasm modules as worker-scoped units and chunks; feature facts; memory views.

    WASM_FEATURESWASM_FEATURE_PROBESdetectWasmFeaturesWasmFeatureFactswasmFeatureUsableusableFeaturesdescribeWasmModuleWasmExportsOfWasmEngine

    Budget
    5.5 KB (full)
    Depends on
    core, worker
  • @staticflux/webmcp

    vertical

    Publishes capabilities as WebMCP tools through gating and confirmation.

    detectModelContextadapterForWebMcpToolDescriptorWebMcpToolResultWebMcpClientLikecreateWebMcpPublisherdefaultToolNametoToolResultpublisherMachine

    Budget
    2.5 KB (full)
    Depends on
    core, capabilities
  • @staticflux/worker

    vertical

    Typed envelopes, supervised workers, store replication, core-context sync; editor/render pipeline with sequenced deltas, input ring and brokered peer channels.

    EnvelopecreateEnvelopeisEnvelopevalidateEnvelopeChannelsreplicaChanneldefineProtocolrequestevent

    Budget
    14 KB (full) · 9.5 KB /channels · 14 KB /coordinator · 23 KB /pipeline
    Depends on
    core

UI

Lit integration, the surface manager and rich surfaces.

  • @staticflux/kit

    ui

    UI kit: themed Lit components (controls, overlays, shell parts, command palette) on @staticflux/ui, wired to messaging and capabilities.

    Budget
    1.75 KB /button · 4.95 KB /icon-button (raised 4.5 → 4.95 KB by B11a2: tooltip warm period, long-press, disabled reason, second line) · 2.75 KB /segmented · 2 KB /text-field · 1.95 KB /slider · 2.25 KB /color-field · 9.8 KB /menu (raised 5.5 → 9.8 KB by B11a2: icons and checkmarks, groups, one submenu level, filter field, context menu at a point, bottom sheet, consumed light dismiss, nesting rules, focus return) · 5.35 KB /popover (raised 3.5 → 5.35 KB by B11a2: consumed / pass-through dismiss, one at a time, nesting rules, focus return when the trigger is gone) · 4.25 KB /tooltip (raised 3.6 → 4.25 KB by B11a2: warm period, long-press, disabled reason, second line) · 3 KB /tabs · 12.4 KB /surfaces (raised 8.25 → 12.4 KB by B11a2: dialog sizes, wizard step frame, discard row, takeover frame, toast count and hold, layer order, focus fallback) · 1.1 KB /surface-defs (raised 0.5 → 1.1 KB by B11a2: confirm / destructive, blocking error and hint surfaces) · 2.5 KB /toolbar · 8.2 KB /dock (raised 7 → 7.6 KB by B11a: chevrons are <sf-icon> + Lucide modules, no text glyphs; 8.2 KB by B11a2: icon buttons carry the warm-period tooltip) · 2.65 KB /inspector (raised 1.85 → 2.65 KB by B11a: the group chevron is <sf-icon>) · 5.75 KB /tree (raised 4.4 → 5.1 KB by B11a: the twisty is <sf-icon>; B11b raised 5.1 → 5.75 KB: inline rename rows, trailing row content, muted and highlighted rows for Layers) · 2.5 KB /shortcut-sheet (<sf-shortcut-sheet>: the keyboard cheat sheet over a registry snapshot; B11b) · 12.5 KB /size-field (<sf-size-field>: the size field pair of New design; with the number field, segmented, icon button; B11b; B11c measured 9 KB → 12.5 KB: it carries the number field (5 KB), the segmented switch, the icon button with the tooltip core and the lock icons) · 3.6 KB /command-palette · 1.25 KB /roving · 1.7 KB /position (raised 1.5 → 1.7 KB by B11a2: shrink step and the context-menu corner rule) · 45.75 KB (full, excl. lit + framework; raised 22.5 → 22.6 KB by C0: the new card component; 22.6 → 27.5 KB by B11a: icon element, number field, inline edit, swatch; 42.5 KB by B11a2: overlays, feedback, hints and the shared colour, font and alignment popovers; 43.25 KB by B11b: the tree’s inline rename and decorated rows; 43.75 KB by B11b slice 4: the keyboard cheat sheet <sf-shortcut-sheet>; B11c 43.75 KB → 45.5 KB: <sf-size-field> (R13.48), card action and selection slots (R13.49), icon fill; B11c 45.5 → 45.75 KB: the colour popover Image tab) · 1.1 KB /tag · 1.1 KB /status · 1.4 KB /card (B11c 1.1 KB → 1.4 KB: action and leading slots outside the link, selected / drop-target / dragging states (R13.49)) · 1.7 KB /icon (<sf-icon> + icon data helpers; B11a; B11c 1.65 KB → 1.7 KB: --sf-icon-fill (the favourite star fills)) · 5.5 KB /icons (the whole kit icon set: 89 Lucide + 15 custom; well under STUDIO-UX-SPEC §10.2's 20 KB cap for Studio's set; B11a; B11b raised 5 → 5.5 KB: 12 more Lucide icons for the inspector — strikethrough, sub/superscript, justify, case, remove formatting, vertical text alignment, orientation, reverse) · 0.3 KB /icons/trash-2 (one icon module ≈ 0.2 KB, STUDIO-UX-SPEC §10.2; B11a) · 5 KB /number-field (<sf-number-field>: expressions, units, scrub, mixed; B11a; 5 KB by B11a2: its icon buttons carry the warm-period tooltip) · 3 KB /inline-edit (<sf-inline-edit>; B11a; 3 KB by B11a2: the shared tooltip core grew) · 1.3 KB /swatch (<sf-swatch>; B11a) · 1.05 KB /overlay (the overlay model as data: six layers, nesting table, gaps, flat-tree parent lookup; B11a2) · 2.3 KB /confirm-row (<sf-confirm-row>: the inline confirm row; B11a2) · 8.15 KB /feedback (<sf-banner>, <sf-blocking-error>, <sf-progress-row> + the SfError mapping; B11a2) · 4.65 KB /copy-field (<sf-copy-field>; B11a2) · 2.5 KB /hint (<sf-hint>: the first-use hint card; B11a2) · 2.8 KB /disclosure (<sf-disclosure>: section, More row, pinned; B11a2, DENSITY-DISCLOSURE §2) · 10.5 KB /color-popover (<sf-color-popover>: hex, opacity, eyedropper, four swatch grids, inline custom picker; B11a2; B11c 10 → 10.5 KB: the Image tab (assets, upload, fit, crop)) · 4.3 KB /font-picker (<sf-font-picker>: virtualised in-face list with search; B11a2) · 8.65 KB /align-popover (<sf-align-popover>; B11a2)
    Depends on
    core, ui, messaging, a11y, i18n, capabilities
  • @staticflux/messaging

    ui

    Surface manager: dialogs, sheets, popovers, tooltips, toasts, banners, coach marks.

    surfaceMachineSURFACE_KINDSPRIORITIESDismissReasonUSER_REASONSownerOfrenderContextSurfacePolicydefaultSurfacePolicy

    Budget
    9.2 KB (full, excl. lit; raised 9 → 9.2 KB by B11a2: strict overlay policy, toast hold and repeat count, dismiss guards)
    Depends on
    core, ui
  • @staticflux/surface

    ui

    Render surfaces (Canvas2D/WebGL/WebGPU/HTML-in-Canvas), frame loop, OffscreenCanvas transfer, input forwarding; GPU raster backend port, text input (EditContext / hidden textarea), image scaling and PNG.

    SurfaceSurfaceLifecyclecreateSurfaceShellcreateCanvasSurfacecreateDomSurfacesizeCanvascreateWorkerSurfacehostRenderSurfacescreateRenderSurface

    Budget
    10.5 KB (full) · 1.75 KB /input-ring · 9.5 KB /raster (render and export workers: tiled renderer, GPU device lifecycle, headless) · 1.6 KB /image (area scaling + deterministic PNG encoder; renditions and export workers) · 3.75 KB /text-input (TextInput port: EditContext + hidden textarea, variant binding; main thread, with text editing)
    Depends on
    core, platform, runtime, worker
  • @staticflux/ui

    ui

    Lit integration: components with declared deps, MobX controller, scope elements, typed theme contract.

    componentComponentSpecComponentDepsComponentHooksDepKeyDepValueSTATE_ATTRdefineComponentdefineUiElements

    Budget
    9 KB (full, excl. lit) · 6 KB /theme (contract, appearance, units) · 2.52 KB /default-theme (B9: +8 B for the worker-safe @lit/reactive-element/css-tag.js import path)
    Depends on
    core, runtime

Shell

The app frame — slots, themes, workspaces, command palette — and the devtools built on the telemetry fabric.

  • @staticflux/devtools

    shell

    Devtools on the telemetry fabric: boot waterfall, journeys, DI graph, lifecycle states, decision traces, store inspector, violations, verbosity controls.

    createDevtoolsCollectorDEFAULT_CAPACITYparseLifecycleEventparseInvalidEventinstanceOfsplitDecisionKeybuildBootWaterfallbuildJourneysFromTrackerbuildJourneysFromSpans

    Budget
    17.5 KB (collector; dev only)
    Depends on
    core, ui, perf, gate, runtime
  • @staticflux/shell

    shell

    Layout slots, theming tokens, workspaces, command palette, error boundaries; declarative layout specs with validated, gated, animated diffs.

    BUILT_IN_SLOTSSlotIdSlotContributionSlotContributionsTokenslotContributiondefineWorkspacedefaultWorkspacearrangeSlotscreateWorkspaceManager

    Budget
    9.5 KB (full, excl. lit) · 6 KB /spec (spec runtime, diff, layout port; excl. framework)
    Depends on
    core, ui, messaging, a11y

Tooling

Build-time and test-time only: the sf CLI, bundler plugins, the testkit. Never shipped to browsers.

  • @staticflux/testkit

    tooling

    Testing toolkit: test injector, deterministic clocks/schedulers, fake session, re-exported package fakes, shared contract suites, GPU and media fakes, SSIM image comparison, golden render snapshots and a real-GPU (Chromium) runner.

    createTestInjectorasOverridesprovideValueOVERRIDE_SOURCEcreateTestTelemetryRecordQuerycreateSeededRandomVIOLATION_EVENTcreateFakeClock

    Budget
    none (not shipped to browsers).
    Depends on
    core, runtime, auth, data, platform, storage, worker, router, urlstate, document, blob, ui, stage, surface, shell
  • @staticflux/browser-test

    tooling

    Minimal real-browser test harness: serves package sources through Vite and runs .browser.ts suites and .scenario.ts scripts in Chromium via Playwright.

    Budget
    No size budget (not shipped to browsers).
  • @staticflux/rspack-plugin

    tooling

    Rspack plugin: logical chunk naming, sf-manifest emission, per-profile preloads, SW precache list, Module Federation 2.0 remote mapping, budget report.

    staticfluxRspackStaticfluxRspackOptionschunkNameForvalidateOptionstoBuildErrorgzipKbCompilerLikeCompilationLikeChunkGroupLike

    Budget
    none (not shipped to browsers).
    Depends on
    core, loader
  • @staticflux/sf

    tooling

    StaticFlux CLI: dependency-graph checks, budget reports, error catalog and manifest generation.

    runCliparseArgsHELPreadGraphExportsloadGraphModulecheckGraphformatGraphTextformatGraphJsonformatGraphDot

    Budget
    none (not shipped to browsers).
    Depends on
    core
  • @staticflux/vite-plugin

    tooling

    Vite plugin: logical chunk naming, sf-manifest emission, per-profile preloads, SW precache list, dev isolation headers, budget report.

    staticfluxStaticfluxViteOptionsvalidateOptionsbuildDeclarationsgzipKbsha384computeArtifactsbuildReportJsonhtmlPreloadsFor

    Budget
    none (not shipped to browsers).
    Depends on
    core, loader