@columenlabs/lumen-ui-types

中文文档
0.1.219发布于 2026/11/09MITTypeScriptES Module近 30 天下载 5.8万

Lumen's view model: views, formulas, domains and joins, frames.

原始使用文档
文档目录5 节
  1. Install
  2. The model in one paragraph
  3. Modules
  4. Register your data
  5. Versions

@columenlabs/lumen-ui-types

Lumen's view model: the schemas and registries that @columenlabs/lumen-ui reads, and that your server can check against. No React, so it runs in a browser, a Worker or Node alike.

Install

bun add @columenlabs/lumen-ui-types

Pin it to the same exact version as @columenlabs/lumen-ui.

The model in one paragraph

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.

Modules

Import each by its path, for example @columenlabs/lumen-ui-types/views.

PathWhat it holds
/registryregisterDomains: what your app tells the kit about its data, once at start, on the server and in the browser alike
/viewsThe view config schema (columns, filters, group, pivot, sort, formats, totals, widgets and their styles) and upgradeViewConfig
/view-formulaFormula columns in Jexl (an interpreter, no eval): group_sum, total_sum, names by where a field comes from, and the checker
/domainsKeys, joins and joinFields: which fields attach to a row by its key
/catalogThe data catalog: each domain's app, tables, fields and reader, and lookups such as readableDomain
/framesFrames: named rows plus the one script that made them, linked to a card by key or a snapshot of their own
/workspacesWorkspaces: a page of tabs, each tab one view config over a frame or a domain
/chart-formulaChart indicators as specs: a built-in with any window (ema_13) or a formula over open, high, low and close
/marketThe market widget's symbols and the shapes of bars and quotes
/tasksBackground tasks: the shape every app reports and the header's Tasks list reads
.What belongs to no module, such as the Refresh request header

Register your data

// src/registry.ts: the module every entry imports first
import { registerDomains } from '@columenlabs/lumen-ui-types/registry';

registerDomains({
  joins: { /* key → the fields that attach to a row with that key */ },
  joinSources: { /* where each join's fields come from */ },
  domainKeys: { /* domain → the keys its rows carry */ },
  catalog: { /* domain → its app, tables, fields and reader */ },
});

Call it before anything renders or answers, in both your server and your browser entries, so both read the same lists.

Versions

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.

版本与发布记录

@columenlabs/lumen-ui-types 共发布 232 个版本,首次发布于 2026/10/23;过去 12 个月发布了 232 个版本。

版本发布日期距今
0.1.219latest2026/11/091 天前
0.1.2182026/11/091 天前
0.1.2172026/11/091 天前
0.1.2162026/11/091 天前
0.1.2152026/11/091 天前
0.1.2142026/11/091 天前

其他发布通道:legacy → 0.1.12。

关于 @columenlabs/lumen-ui-types 的常见问题

@columenlabs/lumen-ui-types 是什么?

Lumen's view model: views, formulas, domains and joins, frames.

如何安装 @columenlabs/lumen-ui-types?

在项目目录运行 npm install @columenlabs/lumen-ui-types,或使用 pnpm add / yarn add / bun add。

@columenlabs/lumen-ui-types 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@columenlabs/lumen-ui-types 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@columenlabs/lumen-ui-types 可以商用吗?

@columenlabs/lumen-ui-types 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@columenlabs/lumen-ui-types 的下载量有多少?

根据 npm 官方下载统计,@columenlabs/lumen-ui-types 在 2026/10/11 – 2026/11/09 这 30 天内被下载 57,955 次,日均约 1,932 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@columenlabs/lumen-ui-types 还在维护吗?

最新版本 0.1.219 发布于 2026/11/09(1 天前);至今共发布 232 个版本,其中过去 12 个月发布了 232 个;首次发布于 2026/10/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。