@columenlabs/lumen-ui-types 0.1.25 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +54 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,5 +1,57 @@
1
1
  # @columenlabs/lumen-ui-types
2
2
 
3
- Lumen's view model: view config, formulas (Jexl), domains and joins, the data catalog, frames, chart formulas and market shapes. It has no React and can be used on a server.
3
+ Lumen's view model: the schemas and registries that [`@columenlabs/lumen-ui`](https://www.npmjs.com/package/@columenlabs/lumen-ui) reads, and that your server can check against. No React, so it runs in a browser, a Worker or Node alike.
4
4
 
5
- See the [Lumen README](https://github.com/columenlabs/lumen#readme). MIT.
5
+ - Docs: https://lumen.columenlabs.com/docs/
6
+ - For agents: https://lumen.columenlabs.com/llms.txt
7
+ - Source: https://github.com/columenlabs/lumen (`packages/ui-types`). MIT.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ bun add @columenlabs/lumen-ui-types
13
+ ```
14
+
15
+ Pin it to the same exact version as `@columenlabs/lumen-ui`.
16
+
17
+ ## The model in one paragraph
18
+
19
+ A **domain** is a set of rows with their own fields and the **keys** its rows carry (a symbol, an account). A **join** is a set of fields that attaches to any row with that key (a symbol's price, an account's cash). A **view** is one config over one domain: its columns, filters, grouping, formulas and widgets. The **catalog** lists every domain your pages show and the function that reads it. The kit ships the shapes and the machinery with every list empty; your app fills them once at start with `registerDomains`.
20
+
21
+ ## Modules
22
+
23
+ Import each by its path, for example `@columenlabs/lumen-ui-types/views`.
24
+
25
+ | Path | What it holds |
26
+ |---|---|
27
+ | `/registry` | `registerDomains`: what your app tells the kit about its data, once at start, on the server and in the browser alike |
28
+ | `/views` | The view config schema (columns, filters, group, pivot, sort, formats, totals, widgets and their styles) and `upgradeViewConfig` |
29
+ | `/view-formula` | Formula columns in Jexl (an interpreter, no `eval`): `group_sum`, `total_sum`, names by where a field comes from, and the checker |
30
+ | `/domains` | Keys, joins and `joinFields`: which fields attach to a row by its key |
31
+ | `/catalog` | The data catalog: each domain's app, tables, fields and reader, and lookups such as `readableDomain` |
32
+ | `/frames` | Frames: named rows plus the one script that made them, linked to a card by key or a snapshot of their own |
33
+ | `/workspaces` | Workspaces: a page of tabs, each tab one view config over a frame or a domain |
34
+ | `/chart-formula` | Chart indicators as specs: a built-in with any window (`ema_13`) or a formula over open, high, low and close |
35
+ | `/market` | The market widget's symbols and the shapes of bars and quotes |
36
+ | `/tasks` | Background tasks: the shape every app reports and the header's Tasks list reads |
37
+ | `.` | What belongs to no module, such as the Refresh request header |
38
+
39
+ ## Register your data
40
+
41
+ ```ts
42
+ // src/registry.ts: the module every entry imports first
43
+ import { registerDomains } from '@columenlabs/lumen-ui-types/registry';
44
+
45
+ registerDomains({
46
+ joins: { /* key → the fields that attach to a row with that key */ },
47
+ joinSources: { /* where each join's fields come from */ },
48
+ domainKeys: { /* domain → the keys its rows carry */ },
49
+ catalog: { /* domain → its app, tables, fields and reader */ },
50
+ });
51
+ ```
52
+
53
+ Call it before anything renders or answers, in both your server and your browser entries, so both read the same lists.
54
+
55
+ ## Versions
56
+
57
+ 0.x: any minor may break things until 1.0. Every merge to Lumen's `main` publishes the next patch of every Lumen package; see the [releases](https://github.com/columenlabs/lumen/releases).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@columenlabs/lumen-ui-types",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "description": "Lumen's view model: views, formulas, domains and joins, frames.",
5
5
  "license": "MIT",
6
6
  "type": "module",