Luxel v0.1 · Reference · part 4 of 12
API reference (4)
| Export | Kind | Description |
|---|
| ServerContract | type | — |
| StateLeaf | type | — |
| StateTree | interface | — |
| status | const | One of a closed list of states (shown as an enumerated attribute). */ |
| StatusState | interface | One of a closed list of states, shown as an enumerated attribute (e.g. a class; Sprint 7). */ |
| SurfaceConfig | interface | A dynamic surface (ADR-017): a UI generated at run time (e.g. by an agent) for a view of the server contract. The host asks the bindings for it per request, refuses it with luxel check unless it passes the policies, and projects it (dynamic projection, path addressing). / |
| text | const | Text the server formats (a summary, a name…). */ |
| TextState | interface | — |
| value | const | The value of an input inside a row. */ |
| ValueState | interface | The value of an input inside a row (what the server proposes; the person may change it; Sprint 7). */ |
| VariantConfig | interface | One renderer variant. A view with no path is served under /‹variant>/‹view id> in each of its variants. */ |
| ViewContract | interface | — |
| ViewRouteConfig | interface | How the host serves one view (routing and access; the view itself lives in its .view.tsx). */ |
@luxel-framework/server
defineLoad, defineEvent and the handler context.
| Export | Kind | Description |
|---|
| AdapterOptions | interface | — |
| answerMatchesState | function | Settles what stepsWithinBounds left pending against the state the view's load gives AFTER the event: every key the answer inserts is in the list, every key it removes is not (otherwise the answer is not the state's: refused), and the list is within its bound. What the browser holds after applying the answer is then the list the server just counted, as far as the browser's list was the server's before the event (see ADR-061 section 8 for what state-version control guarantees of that). / |
| BoundStep | type | One step of an answer, as far as a collection's size goes. */ |
| Change | type | What a handler returns, recorded by path (serializable: stored for replays). */ |
| Changes | interface | — |
| CollectionAnswerError | class | Sprint 12.3 (C14): an answer whose item operations disagree with the view's state after the event. The message names the collection and how many keys disagree, never a key or its data. / |
| CollectionBoundError | class | Sprint 12.3 (C14): a collection with more items than its zone declares (the manifest's maxItems). The request is refused whole (a server error, never a shortened list: which rows to drop is a decision about data); luxel-host logs the message, which names the collection, the count, the bound and the fix. path is the state path, where the adapter knows it. / |
| CollectionLeaf | interface | — |
| countsInsertsItself | const | Whether adapter was built by createAdapterFactory (and so counts inserts inside its transaction). */ |
| createAdapterFactory | function | The adapters of the defined views, and surface(): the adapter of a dynamic surface (ADR-017) bound to a contract view. A surface runs that view's handlers and store scope with its own zone bindings and manifest, so the framework's guarantees are the same for a compiled view and for a UI an agent generated. Sprint 7: alias(): a compiled view bound to another contract view (the same view in another language). / |
| createMemoryEventStore | function | An in-memory EventStore with the same contract, for unit tests only (decision 12). */ |
| createViewAdapters | function | — |
| DateLeaf | interface | Sprint 7: an ISO 8601 date (yyyy-mm-dd), formatted by the host. */ |
Edit this page on GitHub