LuxelEspañol

Luxel v0.2 · Reference · part 4 of 14

API reference (4)

ExportKindDescription
QuantityStateinterfaceA number shown as text; luxel-host formats it with the page's language (Sprint 7). */
ServerContracttype—
StateLeaftype—
StateTreeinterface—
statusconstOne of a closed list of states (shown as an enumerated attribute). */
StatusStateinterfaceOne of a closed list of states, shown as an enumerated attribute (e.g. a class; Sprint 7). */
SurfaceConfiginterfaceA 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). /
textconstText the server formats (a summary, a name…). */
TextStateinterface—
valueconstThe value of an input inside a row. */
ValueStateinterfaceThe value of an input inside a row (what the server proposes; the person may change it; Sprint 7). */
VariantConfiginterfaceOne renderer variant. A view with no path is served under /‹variant>/‹view id> in each of its variants. */
ViewContractinterface—
ViewRouteConfiginterfaceHow 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.

ExportKindDescription
AdapterOptionsinterface—
answerMatchesStatefunctionSettles 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). /
BoundSteptypeOne step of an answer, as far as a collection's size goes. */
ChangetypeWhat a handler returns, recorded by path (serializable: stored for replays). */
Changesinterface—
CollectionAnswerErrorclassSprint 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. /
CollectionBoundErrorclassSprint 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. /
CollectionLeafinterface—
countsInsertsItselfconstWhether adapter was built by createAdapterFactory (and so counts inserts inside its transaction). */
createAdapterFactoryfunctionThe 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). /
createMemoryEventStorefunctionAn in-memory EventStore with the same contract, for unit tests only (decision 12). */
createViewAdaptersfunction—
Edit this page on GitHub

This page: 7.9 KB of JavaScript (Luxel's shared runtime), 0 KB from your app.

Measured when the site is built: the runtime files this page loads, compressed as they are sent.

Made by IntiOps. The Luxel 0.1.0 betas are on npm (0.1.0-beta.1, 0.1.0-beta.2), with an alpha of 0.2 (0.2.0-alpha.1): no external security review yet.