@columenlabs/lumen-ui-types 0.1.24 → 0.1.26
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.
- package/NOTICE +1 -1
- package/README.md +54 -2
- package/package.json +5 -5
package/NOTICE
CHANGED
|
@@ -8,5 +8,5 @@ chart's own logo, so per that library's NOTICE, an app that shows these charts
|
|
|
8
8
|
should link to https://www.tradingview.com/ somewhere a user can find it (an
|
|
9
9
|
About page or footer is enough).
|
|
10
10
|
|
|
11
|
-
The components under packages/
|
|
11
|
+
The components under packages/ui/src/ui are based on shadcn/ui
|
|
12
12
|
(https://ui.shadcn.com), MIT License, Copyright (c) 2023 shadcn.
|
package/README.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# @columenlabs/lumen-ui-types
|
|
2
2
|
|
|
3
|
-
Lumen's view model:
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "0.1.26",
|
|
4
4
|
"description": "Lumen's view model: views, formulas, domains and joins, frames.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
"sideEffects": [
|
|
61
61
|
"**/*.css"
|
|
62
62
|
],
|
|
63
|
-
"homepage": "https://github.com/columenlabs/lumen
|
|
63
|
+
"homepage": "https://github.com/columenlabs/lumen",
|
|
64
64
|
"repository": {
|
|
65
65
|
"type": "git",
|
|
66
|
-
"url": "git+https://github.com/columenlabs/lumen
|
|
67
|
-
"directory": "packages/
|
|
66
|
+
"url": "git+https://github.com/columenlabs/lumen.git",
|
|
67
|
+
"directory": "packages/ui-types"
|
|
68
68
|
},
|
|
69
|
-
"bugs": "https://github.com/columenlabs/lumen
|
|
69
|
+
"bugs": "https://github.com/columenlabs/lumen/issues",
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public",
|
|
72
72
|
"registry": "https://registry.npmjs.org/"
|