@staticflux/core
coreStaticFlux core: tokens, units, injector, scopes, Result, async primitives, telemetry, state machines, reactivity port.
tokenRegistryunitDepHandleFunctionalDepScopeLevelInitTimingcreateInjectorbind
Reference
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.
The static core: tokens, units, injector, scopes, Result, Tasks, machines, telemetry, reactivity. Depends on nothing internal.
StaticFlux core: tokens, units, injector, scopes, Result, async primitives, telemetry, state machines, reactivity port.
tokenRegistryunitDepHandleFunctionalDepScopeLevelInitTimingcreateInjectorbind
The app supervisor, app and feature lifecycles, resource manager and frame scheduler.
App supervisor, app & feature lifecycles, resource manager, frame scheduler, memory budgets.
appMachinesubsystemMachinefeatureMachineALLOWED_COMMANDSAppStateAppCommandSubsystemRestartPolicydefineSubsystem
One async key-value interface over any backend (memory, web storage, cookies, IndexedDB, OPFS, remote) with composable middleware.
AsyncStoreStoreCapabilitiesSeekOptionsStoreCursorBatchOpStoreChangetoStoreErrorisQuotaErrorstoreFromDriver
Independent building blocks — each depends only on core (and occasionally another vertical) and plugs in through ports.
Focus management, live-region announcer, shortcut registry, preference facts.
A11yEnvironmentbrowserA11yEnvironmentdefaultTimerscreateFocusManagertabbablesOfKEEP_INTERACTIVE_ATTRFocusTrapMachinerememberFocusReturnFOCUS_FALLBACK_SELECTOR
Decision points and pluggable advisors (heuristic, statistical, model, remote).
defineDecisionPointnormalizeargmaxclampheuristicDistributionstableKeyAdvisoradvisorForTIER_RANK
Model provider port over browser built-in AI, on-device, decision and remote models.
ModelProviderAI_TASKSclassifyavailabilityMachinecreateAiFactsStoreAiMetricscreateBrowserAiProviderdetectBuiltInAicreateDecisionModelProvider
Identity providers, session lifecycle, multi-tab sync, single-flight refresh, token broker.
IdentityProviderCredentialsProviderGrantSessionSnapshotSessionChangeSessionListenersessionMachinecreateSessionStoreAuthMetrics
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
Capability registry: typed, schema-described actions callable by UI, command palette, agents and WebMCP.
InfervalidatetoJsonSchemadefineCapabilitydescribeCapabilityimplementCapabilityRunContextCapabilityDecidePortCapabilityConfirmPort
Typed config & feature flags, layered resolution, OpenFeature-compatible provider port.
FlagRegistrydefineFlagflagTypeFlagValuesflagValueVariantKeyEvaluationContextEvaluationContextSourcestaticContext
Transports, resources, caching/SWR, batching, schema-first stores with patches, user-data slices.
TransportdefineEndpointdefineStreamEndpointtransportSlotDefaultTransportbuildRequestcreateDataClientPauseControleffectivePausePolicy
ECS document model (v1 on Yjs); DocumentCRDT v2 port, DocumentRepo and versioned components with a Loro engine; binary render projection and spatial index.
defineComponentdefineTextComponentcreateWorldStructStoredefineSystemcreateIdGeneratorDocumentCRDTDocumentOpcreateLwwMap
Facts, declarative policies compiled to decision tables, explainable decisions, meters.
defineFactFactSourceFactSinkGateFactsflagFactcreateManualFactSourcePolicyIRConditiondefinePolicy
Boundary-surviving state with lifetimes; shared snapshot format.
SnapshotEnvelopecreateEnvelopeisEnvelopeparseEnvelopevalidateWithHandoffSchemadefineHandofflifetimeKindeffectiveTtl
Hydration: islands over prerendered HTML (visible/idle/interaction) and store-snapshot rehydration for instant boot.
ISLAND_MARKER_FORMATHYDRATE_STRATEGIESscanIslandsislandElementsreadIslandMarkerparseIslandPropsserializeIslandPropsrenderIslandMarkerescapeHtmlAttribute
Typed message catalogs, ICU-style formatting, lazy locales, RTL.
defineMessagesMessageRefParamsOfcatalogOfCATALOGdefineTranslationsparseMessageformatNodescollectArgs
Logical chunk ids, manifest runtime, warmup tiers, speculation, boot plans.
chunkChunkIdWARMUP_TIERSDEFAULT_CHUNK_BUDGETS_KBbudgetKbOfSfManifestparseManifestgetChunkchunkClosure
Journey tracing, feature marks, long-task/layout detectors, runtime budgets.
createJourneyTrackerJourneySummarycriticalPathdefaultPhaseRulejourneyMachineJOURNEY_PHASEScreateFeatureMarksnormalizeFeatureMarkcreateLongFrameDetector
Capability-based platform facts, host modes, form factors, app profile.
PlatformEnvbrowserEnvmediaMatchesreadGlobalisEmbeddedFormFactorRegistrydefineFormFactorcomputeFormFactorHostModeRegistry
PWA: service-worker runtime (precache from the loader manifest), update flow, web app manifest, link capture, share targets, optional COOP/COEP service worker.
SwEnvSwGlobalLikeCacheStorageLikeCacheLikeRequestLikeResponseLikecacheNamesinstallPrecachecleanupCaches
Async navigation pipeline with named stages, typed routes, sub-route view state.
STAGESPIPELINE_STAGESPipelineKinddefineStageStagePluginstagePlugindefineRoutebindCapabilityguard
Isolated hosting of untrusted plugins (iframe/worker) that can only call declared capabilities.
isAllowedEntryUrlPluginLimitsDEFAULT_PLUGIN_LIMITSeffectiveLimitsdefinePluginEventSandboxChannelsConnectMessagePLUGIN_ALLOWEDestimateBytes
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
URL-state kinds (view/intent/sticky/dialog), declared bindings, URL ⇄ store sync.
defineUrlBindingdefineIntentreserveParamscheckUrlDeclarationscreateUrlDeclarationRegistrycodeccodecEqualscreateUrlSyncboxAdapter
Wasm modules as worker-scoped units and chunks; feature facts; memory views.
WASM_FEATURESWASM_FEATURE_PROBESdetectWasmFeaturesWasmFeatureFactswasmFeatureUsableusableFeaturesdescribeWasmModuleWasmExportsOfWasmEngine
Publishes capabilities as WebMCP tools through gating and confirmation.
detectModelContextadapterForWebMcpToolDescriptorWebMcpToolResultWebMcpClientLikecreateWebMcpPublisherdefaultToolNametoToolResultpublisherMachine
Typed envelopes, supervised workers, store replication, core-context sync; editor/render pipeline with sequenced deltas, input ring and brokered peer channels.
EnvelopecreateEnvelopeisEnvelopevalidateEnvelopeChannelsreplicaChanneldefineProtocolrequestevent
Lit integration, the surface manager and rich surfaces.
UI kit: themed Lit components (controls, overlays, shell parts, command palette) on @staticflux/ui, wired to messaging and capabilities.
Surface manager: dialogs, sheets, popovers, tooltips, toasts, banners, coach marks.
surfaceMachineSURFACE_KINDSPRIORITIESDismissReasonUSER_REASONSownerOfrenderContextSurfacePolicydefaultSurfacePolicy
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
Lit integration: components with declared deps, MobX controller, scope elements, typed theme contract.
componentComponentSpecComponentDepsComponentHooksDepKeyDepValueSTATE_ATTRdefineComponentdefineUiElements
The app frame — slots, themes, workspaces, command palette — and the devtools built on the telemetry fabric.
Devtools on the telemetry fabric: boot waterfall, journeys, DI graph, lifecycle states, decision traces, store inspector, violations, verbosity controls.
createDevtoolsCollectorDEFAULT_CAPACITYparseLifecycleEventparseInvalidEventinstanceOfsplitDecisionKeybuildBootWaterfallbuildJourneysFromTrackerbuildJourneysFromSpans
Layout slots, theming tokens, workspaces, command palette, error boundaries; declarative layout specs with validated, gated, animated diffs.
BUILT_IN_SLOTSSlotIdSlotContributionSlotContributionsTokenslotContributiondefineWorkspacedefaultWorkspacearrangeSlotscreateWorkspaceManager
Build-time and test-time only: the sf CLI, bundler plugins, the testkit. Never shipped to browsers.
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
Minimal real-browser test harness: serves package sources through Vite and runs .browser.ts suites and .scenario.ts scripts in Chromium via Playwright.
Rspack plugin: logical chunk naming, sf-manifest emission, per-profile preloads, SW precache list, Module Federation 2.0 remote mapping, budget report.
staticfluxRspackStaticfluxRspackOptionschunkNameForvalidateOptionstoBuildErrorgzipKbCompilerLikeCompilationLikeChunkGroupLike
StaticFlux CLI: dependency-graph checks, budget reports, error catalog and manifest generation.
runCliparseArgsHELPreadGraphExportsloadGraphModulecheckGraphformatGraphTextformatGraphJsonformatGraphDot
Vite plugin: logical chunk naming, sf-manifest emission, per-profile preloads, SW precache list, dev isolation headers, budget report.
staticfluxStaticfluxViteOptionsvalidateOptionsbuildDeclarationsgzipKbsha384computeArtifactsbuildReportJsonhtmlPreloadsFor