@miniapp-studio/core
@miniapp-studio/core
The document contract. Zod schemas, validation, and the registries every other package reads — with no React and no Craft, so a build tool, a server, or a test can validate a document without a renderer.
Core owns the persisted vocabulary: the StudioDocument envelope, the flat
NodeTree, component/data-source/event-handler definitions, theme tokens, and
binding expressions. Everything below is a persisted identity, so read
Document migrations and versioning before
renaming or retyping any of it.
Graph reference checks and traversal are internal helpers behind
validateGraph. Data-source execution, request coordination, expression
parsing, and registry-aware data validation are separate modules, as are the
envelope, theme rules, token references, handler definitions, handler
execution, and event validation.
Contract map
- Canonical document — the envelope and legacy bare-tree compatibility.
- Theme tokens — token definitions, references, validation, and resolution.
- Event handlers — handler definitions, registries, runtime props, and validation.
- Components — schema-first definitions, registries, palettes, and public composition.
- Data sources — source definitions, bindings, loading, and host responsibilities.
- Dynamic data contract — detailed data grammar, scope, request, and error semantics.
- Document migrations — versioning and compatibility responsibilities.