@seanyeh77/tokens 0.41.0 → 0.43.0

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/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # @seanyeh77/tokens
2
+
3
+ SeanYeh 設計系統的設計 token:淺色、深色和 `teaching` 預設的 CSS 變數(`tokens.css`)、Tailwind v4 主題(`tailwind.css`)、有型別的 token 名稱(`cssVar()`)和自架字體。
4
+
5
+ ## 安裝
6
+
7
+ ```bash
8
+ npm i @seanyeh77/tokens
9
+ ```
10
+
11
+ 用 `@seanyeh77/ui` 時不必另外裝:它已經帶 `tokens.css` 和字體。只有要用 `cssVar()` 或 Tailwind 主題時才需要這個套件。
12
+
13
+ ```ts
14
+ import { cssVar } from '@seanyeh77/tokens';
15
+
16
+ const style = { color: cssVar('ink-muted') }; // 只有存在的 token 名稱能編譯
17
+ ```
18
+
19
+ ```css
20
+ @layer theme, base, ui, components, utilities;
21
+ @import 'tailwindcss';
22
+ @import '@seanyeh77/tokens/tailwind.css';
23
+ ```
24
+
25
+ ## 文件
26
+
27
+ - 文件網站:<https://seanyeh77.github.io/ui-design-system/>(全部 token 見 `theme.md`)
28
+ - 給 AI agent 的使用說明:[AGENTS.md](https://github.com/seanyeh77/ui-design-system/blob/main/AGENTS.md)
package/dist/tailwind.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /* Generated from tokens.json by scripts/build.ts. Do not edit by hand. */
2
- /* Use after @import "tailwindcss". Also load tokens.css, unlayered: the color, spacing and shadow utilities read its variables. */
2
+ /* Use after @import "tailwindcss". Also load tokens.css: the color, spacing and shadow utilities read its variables. Put @layer theme, base, ui, components, utilities; first, so utilities override the components. */
3
3
  @theme inline {
4
4
  --color-bg: var(--bg);
5
5
  --color-surface: var(--surface);
package/dist/tokens.css CHANGED
@@ -1,4 +1,7 @@
1
1
  /* Generated from tokens.json by scripts/build.ts. Do not edit by hand. */
2
+ @layer theme, base, ui, components, utilities;
3
+ @layer ui.tokens, ui.components;
4
+ @layer ui.tokens {
2
5
  :root {
3
6
  --bg: #fcfbfb;
4
7
  --surface: #ffffff;
@@ -228,3 +231,4 @@
228
231
  --shadow-card: none;
229
232
  --shadow-card-hover: none;
230
233
  }
234
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seanyeh77/tokens",
3
- "version": "0.41.0",
3
+ "version": "0.43.0",
4
4
  "description": "Design tokens of SeanYeh's design system: CSS variables for light, dark and the teaching preset, a Tailwind v4 theme, typed token names and self-hosted fonts.",
5
5
  "license": "MIT",
6
6
  "author": "Hsiu-An Yeh",