LuxelEspañol

Luxel v0.2 · Reference · part 3 of 14

API reference (3)

@luxel-framework/compiler/config

luxel.config.ts and server/contract.ts.

ExportKindDescription
allowconstAn event the session's roles must allow. */
collectionconstA keyed list. collection({ key, fields, page: false, maxItems: 12 }) declares a short, fixed list that policies.pageSize does not apply to (Sprint 12.3, C14): maxItems bounds it, here and at run time, and policies.maxCollectionItems still applies. The two go together: luxel build refuses one without the other (LUXEL-E029). /
CollectionSpectypeWhat collection() takes: the key and the fields, and for a list exempt from the page size, its bound. */
CollectionStateinterface—
CompositePageConfiginterfaceA page that mounts several views side by side, each in its own context. */
dateconstA date, ISO 8601 (yyyy-mm-dd); luxel-host formats it. */
DateStateinterfaceA date (ISO 8601 yyyy-mm-dd); luxel-host formats it with the page's language (Sprint 7). */
defineConfigfunction—
defineContractfunction—
EventPolicyinterfaceThe authorization policy of one event (Sprint 7, mandatory: an event without one does not compile, and the gateway denies it). Deny by default: roles the session must hold one of them (a public event takes public: true instead); effect "write" (default: idempotent, one transaction, version check) or "read" (a query: a search, a page, a recalculation; nothing is stored); refs object authorization: for each id the event carries (its param, a select input, a column of a rows input), the kind of resource it names. The app's scope function for that kind re-checks every id against the session before the handler runs. local marks an id that names no resource (e.g. a row key of a form being filled). /
GatewayJwtIdentityConfiginterfaceSprint 13.5: identity in luxel.config. The same shape as GatewayJwtIdentityConfig of @luxel-framework/gateway (identity.ts), which validates it when luxel-host starts; repeated here because this module has no dependencies (it runs at build time). /
ItemFieldStatetypeA field of a collection item. */
LoadPolicyinterfaceSprint 12 (SEC-S12): who may load a view (run its defineLoad), like an event's policy: the session's roles (allow([...])) or anyone (publicLoad(), only for a view whose route is public). No default. /
LOCALconstThe refs kind of an id that names no resource (e.g. the key of a row of a form). */
LuxelConfiginterface—
moneyconstAn amount in integer cents; luxel-host formats it. */
MoneyStateinterfaceAn amount in integer cents; luxel-host formats it with the app's locale and currency. */
numberconstA raw number for a number slot (finite, within [min, max]). */
numbersconstA list of exactly length raw numbers for a number-list slot. */
NumbersStateinterfaceA list of raw finite numbers, exactly length of them (a number-list slot, Sprint 7). */
NumberStateinterfaceA raw finite number for number slots (a bar, a viewBox), bounded at build time (Sprint 7). */
optionsconstThe options of a select, at most max. */
OptionsStateinterfaceThe options of a select (key + label), at most max (Sprint 7). */
publicEventconstAn event any session may send (e.g. login). */
publicLoadconstSprint 12: a view anyone may load (a public route: a login, a public page). */
quantityconstA number shown as text; luxel-host formats it. */
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.