@filipgutica/design-system

中文文档
1.0.15发布于 2026/11/14MITTypeScriptES Module零依赖构建来源已验证近 30 天下载 4450

Filip's design language, tokens, and component catalogue for any framework

原始使用文档
文档目录6 节
  1. Contents
  2. Install
  3. Develop
  4. Release
  5. History
  6. License

Design system

Filip's design language for any framework: the spec, the tokens, the component catalogue, and the editor themes. It ships as the npm package @filipgutica/design-system.

  • Agents get language/ at ~/design-system through filip-stack host config, or by copying it from the package; the site's Agents section has both.
  • Vue apps can use @filipgutica/ui, a Vue component library built on this design system.
  • Site: https://filipgutica.github.io/design-system/ has the Overview, Foundations, and Components pages, with index.json and llms.txt for agents.

Contents

PathWhat it holds
language/The payload: DESIGN.md, components.md, decisions.md, visualizations.md, tokens.css, the catalogue (components.html), example pages, visualization helpers, and the Graphite Indigo editor theme
tokens/core.json, tokens/themes/*.jsonThe token values, the only place a value lives, and each token's role. Core holds every token; each theme file holds only its name, a note, its hue pair, and optional fonts
scripts/build-tokens.mjsThe token generator: writes language/tokens.css and dist/
scripts/build-site.mjsThe site build: writes site/ for GitHub Pages from components.html, the tokens, and package.json
dist/Generated theme files, JSON, and JavaScript
fonts/IBM Plex latin woff2 files, fonts.css, and their OFL licences
tests/Guard tests for the payload, the tokens, and the site build, the React smoke test, and behaviour tests for the catalogue and the built site

To change a value, edit the JSON and run pnpm tokens:build. pnpm tokens:check fails when a generated file is stale or a token has no role.

pnpm site:build writes the site to site/. It reads the version from the latest ds-v* tag, so it needs the tags in the checkout.

Install

npm install @filipgutica/design-system
ImportWhat it is
@filipgutica/design-system/tokens.cssThe tokens. Dark mode follows prefers-color-scheme; set data-theme="light" or "dark" on <html> to override it.
@filipgutica/design-system/themes/*.cssA theme's identity inputs (hue pair and fonts): graphite-indigo (the default, already in tokens.css), mauve, or pine. Load one after tokens.css, on :root.
@filipgutica/design-system/fonts.cssIBM Plex Sans and Mono.
@filipgutica/design-systemtokens (resolved values per theme and mode) and cssVar(name), with types.
@filipgutica/design-system/tokens.jsonThe resolved values as JSON.
@filipgutica/design-system/language/*The spec, catalogue, and example pages.

In a React app, import tokens.css and fonts.css once in the entry and write var(--color-text) in styles, or cssVar('color-text') in TypeScript. tests/react-smoke/ is a working example.

Develop

corepack enable
pnpm install --frozen-lockfile
pnpm verify

pnpm verify checks the generated files, runs the tests, the React smoke test, and the catalogue tests (Find, shortcuts, location, drawer, overflow, and axe), then pnpm pack --dry-run and publint. The browser tests need Chromium: pnpm exec playwright install chromium.

Release

semantic-release publishes from main with npm provenance. Releases stay 1.0.x while the design system has no outside users (decisions.md, Versioning):

  • Any commit that releases, such as fix, feat, or a breaking change, releases a patch.
  • The release notes name a breaking change only when its commit message has ! after the type or a BREAKING CHANGE: or BREAKING-CHANGE: footer. Put it there; a marker only in the PR body releases a patch but does not reach the notes.
  • build, chore, docs, test, and similar types release nothing, unless the commit or its PR marks a breaking change.
  • Release tags are ds-v*. The v1.0.0–v2.4.0 tags and npm versions are the earlier series.

Commits follow Conventional Commits, and CI checks them with commitlint. Do not edit the version by hand.

History

language/ came from host-config/design-language/ in filip-stack, with its history. The token JSON, generator, and fonts came from ui.

License

MIT. The IBM Plex fonts in fonts/ are under the SIL Open Font License; see the OFL-*.txt files beside them. The editor theme in language/editor-themes/graphite-indigo/ derives from Visual Studio Code's default themes; see its LICENSE and THIRD_PARTY_NOTICES.md.

版本与发布记录

@filipgutica/design-system 共发布 23 个版本,首次发布于 2026/11/10;过去 12 个月发布了 23 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.0.15latest2026/11/141 天前
1.0.142026/11/131 天前
1.0.132026/11/131 天前
1.0.122026/11/131 天前
1.0.112026/11/131 天前
1.0.102026/11/131 天前

关于 @filipgutica/design-system 的常见问题

@filipgutica/design-system 是什么?

Filip's design language, tokens, and component catalogue for any framework

如何安装 @filipgutica/design-system?

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

@filipgutica/design-system 支持 TypeScript 吗?

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

@filipgutica/design-system 支持 ESM 还是 CommonJS?

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

@filipgutica/design-system 需要什么版本的 Node.js?

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

@filipgutica/design-system 可以商用吗?

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

@filipgutica/design-system 的下载量有多少?

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

@filipgutica/design-system 还在维护吗?

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