@kainest/lexium-runtime
v18.0.9
Published
Runtime components and hooks for applications generated by Lexium App Generator.
Readme
@kainest/lexium-runtime
The components and hooks that applications generated by Lexium App Generator run on.
A generated app installs this package and imports its pages' building blocks from it. You normally do not add it to a project by hand: the generator writes the dependency, at an exact version, into the app's package.json.
Versions
| Part | Meaning |
|---|---|
| Major (18.x.y) | The generator core the runtime belongs to. 18 serves React 18 and React 19. It is not the React version. |
| Minor | A change to what the runtime exports or to how generated code must call it. |
| Patch | A fix behind an unchanged surface. |
Pin the exact version. Generated code and the runtime are written together, so a newer runtime can need different generated code, even across a minor. Do not widen the version to a range. To move to a newer runtime, regenerate the app.
What the app provides
The runtime is the same for every app. Everything specific to one project is generated into the app and handed over once, before the first render:
// src/lexium.config.ts — generated; imported first by src/main.tsx
import { configureLexium } from "@kainest/lexium-runtime/lexConfig";
configureLexium({
dataSources, endpoints, routes, auth, rules, /* … */
env: import.meta.env,
});Reading project data before configureLexium has run throws an error that names the missing key.
Styles
The package ships no stylesheets. The generator writes them into each app under styles/, because a project can edit the shipped rules. A component from this package renders unstyled without them.
Entry points
| Import | Contents | Needs |
|---|---|---|
| @kainest/lexium-runtime/<Module> | One module (/Button, /useDataSource). This is what generated code imports. | — |
| @kainest/lexium-runtime | Everything that needs no optional package. | — |
| @kainest/lexium-runtime/charts | Chart components. | recharts, react-is |
| @kainest/lexium-runtime/rich-text | The rich text editor. | lexical, @lexical/* |
react, react-dom (18 or 19) and react-router-dom (6) are always required.
Licence
KAI Nest Runtime License 1.0. In short: free to use, including commercially, as part of applications created with Lexium App Generator (and later versions of them, however modified); not for use in other applications, for redistribution on its own, or in a competing product. The full terms are in LICENSE. Third-party notices are in NOTICE.
