@finstack-com-public/design

中文文档
0.10.1发布于 2026/11/12MITTypeScriptES Module零依赖近 30 天下载 2131

Design kit: tokens, icons, components and a chart theme, shared by Grizzbi, BI App and the calculation engine.

原始使用文档
文档目录4 节
  1. Install
  2. Use
  3. Develop
  4. Licence

FinStack design kit

@finstack-com-public/design gives FinStack's products one look: design tokens, the Lucide icon set, a component library and a chart theme. It is used by Grizzbi, BI App and the calculation engine.

It is framework-neutral:

  • The look is CSS custom properties plus class-based CSS.
  • Behaviour comes from small plain-DOM functions.
  • Thin React wrappers render the same markup and call the same functions.

There are no runtime dependencies (React is an optional peer), and every file loads as it is, with no build step.

Install

The kit is published, public, on npmjs.com. It needs no token and no .npmrc entry:

npm install @finstack-com-public/design

Use

import '@finstack-com-public/design/kit.css'; // layers, tokens, every block and the utilities
import '@finstack-com-public/design/fonts.css'; // Inter and Plus Jakarta Sans, self-hosted

A page printed to PDF loads fonts-print.css instead of fonts.css: static Inter and Plus Jakarta Sans, which Chromium embeds as TrueType. The print recipe, page footer included, is css/print.md.

<body class="fs-theme fs-light fs-compact">
  <button class="fs-button fs-button--primary">Apply</button>
</body>
  • Schemes: .fs-light, .fs-dark or .fs-auto. Densities: .fs-dense, .fs-compact or .fs-comfortable. Each goes on the root or on any .fs-theme island.
  • Per-block CSS: import css/layers.css first, then css/tokens.css and the blocks you use (css/button.css, …).
  • Behaviour: @finstack-com-public/design/dom (createMenu, createTabs, createDialog, …).
  • React: @finstack-com-public/design/react.
  • Icons: @finstack-com-public/design/icons.
  • Chart theme: @finstack-com-public/design/charts (with toEChartsTheme).
  • Tokens as data: @finstack-com-public/design/tokens, tokens.json and grid.json.

Each block's markup, variants and states are in its usage note beside the CSS (dist/css/<block>.md). The full contract is the design spec:

Versioning: token names, class names, file paths and exports are the public API. While the kit is 0.x, a minor version may break them, and CHANGELOG.md says so.

Develop

Prerequisites, commands and the gallery (every block in every state, light and dark, three densities) are in docs/dev-environment-setup.md. Agents start from AGENTS.md.

Licence

MIT, see LICENSE. The licence doesn't cover product names, logos or mascots: see TRADEMARKS.md. Inter and the Lucide icon data keep their own licences: see THIRD_PARTY_NOTICES.md.

版本与发布记录

@finstack-com-public/design 共发布 12 个版本,首次发布于 2026/11/02;过去 12 个月发布了 12 个版本。

版本发布日期距今
0.10.1latest2026/11/122 天前
0.10.02026/11/122 天前
0.9.12026/11/104 天前
0.9.02026/11/105 天前
0.8.02026/11/095 天前
0.7.12026/11/095 天前

关于 @finstack-com-public/design 的常见问题

@finstack-com-public/design 是什么?

Design kit: tokens, icons, components and a chart theme, shared by Grizzbi, BI App and the calculation engine.

如何安装 @finstack-com-public/design?

在项目目录运行 npm install @finstack-com-public/design,或使用 pnpm add / yarn add / bun add。

@finstack-com-public/design 支持 TypeScript 吗?

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

@finstack-com-public/design 支持 ESM 还是 CommonJS?

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

@finstack-com-public/design 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@finstack-com-public/design 可以商用吗?

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

@finstack-com-public/design 的下载量有多少?

根据 npm 官方下载统计,@finstack-com-public/design 在 2026/10/15 – 2026/11/13 这 30 天内被下载 2,131 次,日均约 71 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@finstack-com-public/design 还在维护吗?

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