@boxxy/model
v0.2.4
Published
The types that boxxy's packages share
Readme
The types that boxxy's packages share, with the fact catalog and its schemas.
Every boxxy package that reads or writes a store row, a fact or a port imports its types from here. The package does no I/O: it takes the time as an argument, and it holds only types, zod schemas and pure functions.
Install
Install the package from npm with Bun:
bun add @boxxy/modelThe package runs on Bun 1.3 or newer.
Features
- The branded ids and names, with a zod schema for each in
brandSchemas. - The store rows, the port interfaces, the plug-in interfaces and the loaded rules.
- The fact catalog
WorkFacts, with a zod schema for each fact type's payload inworkFactSchemas(v1 facts). - The four close-outs of the v1 phases, each with its schema, and
closeOutSchemafor any of them. - The output schemas of the two pepys reports,
costToLandSchemaandstageTimeSchema. definePhase, which registers a phase kind with its close-out type hidden.buildItemViews, which derives each item's position and state from its rows and the rules, withfindPositionandderiveItemState.pickSeatTakeandcollectSeatSync, which give a store's seat take and seat sync.liveLevers, which drops the levers a later undo lever cancels and those past their expiry.signalKey, which builds a signal's key from its name and the content hash of its parameters.defineSignal,defineGateanddefineAdmission, which register a plug-in with its parameter type hidden.
Documentation
The boxxy design docs describe each type, and the interface sketches give its shape.
