English
UI components
@altasystem/ui is the set of pieces the game uses to show a step that does something on a machine: the plan card ("here is what will be installed"), the owner's yes, the run going, the proof, a sign-in, a secret typed safely, and the panel that holds a whole quest. Any page served by the owner's own server can use them: a dashboard, a store page of a chart, an admin panel.
Two packages:
| Package | What it holds |
|---|---|
@altasystem/ui-core | The flows without any DOM (plan → agree → run → prove, sign-ins, choices, values), the client of the owner's server (createAltaClient), the words in English and French, and a fake client for tests (@altasystem/ui-core/testing). |
@altasystem/ui | The elements: Custom Elements in the light DOM, styled through tokens, with two themes (galaxy, the game's, and alta, light and dark) and a Tailwind preset. |
Both are private for now: they live in the repository under packages/ui-core and packages/ui.
Three ways to use them
- As they are. Import the elements and a theme, put
<alta-plan-card quest="…" step="…">in the page. The card plans, the agreement asks, the run shows its progress, the proof says if it worked. Quickstart. - In your own look. Change the tokens, style the parts and states with CSS or Tailwind, give classes per part. Theming.
- Around your own markup. Use the flows of
@altasystem/ui-corealone and draw them yourself: the rules (nothing runs before a yes, a secret goes only to the owner's server) stay those of the flows.
What never changes
- Nothing runs on the machine before the owner agrees to a plan card.
- A secret is typed in
<alta-secret-field>, which the page cannot read; it goes once, in the body of one request, to the owner's server, and is cleared. Secrets. - A step is green only when its proof passes (or, when it has no proof, on the owner's word, said as such).
Where to go next
- Quickstart: a plan card on a page in five minutes.
- Theming: tokens, parts and states, classes, Tailwind.
- Secrets: the guarantees of the secret field, and their limits.
- The quest panel:
<alta-quest-rail>, as the game uses it. - Every component and every token.