@qijenchen/design-system 0.1.0-beta.34 → 0.1.0-beta.35

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.
@@ -123,14 +123,18 @@ fi
123
123
  teardown_proj
124
124
 
125
125
  # Test 7: Hook count > hard cap → BLOCKER
126
- echo "Test 7: hook count 46 hard BLOCKER (cap raised to 45 2026-05-26 per infra backfill)"
126
+ # Cap SSOT(session_start_governance_check.sh `HOOK_COUNT" -gt N`)動態讀,避免 cap 升級後測試 re-drift。
127
+ # Anchor:2026-05-29 cap 已升 45→60 但本測試寫死 46/「hard 45」→ CI hook-test 失敗 → 連帶 storybook
128
+ # build + GitHub Pages deploy 全卡(deploy-storybook job gated 在 Verify pass)。改動態讀後永不 drift。
129
+ HARD_CAP=$(grep -oE 'HOOK_COUNT" -gt [0-9]+' "$HOOK" | grep -oE '[0-9]+' | head -1)
130
+ echo "Test 7: hook count > hard cap ${HARD_CAP} → BLOCKER (cap 從 SSOT 讀)"
127
131
  setup_proj
128
- for i in $(seq 1 46); do
132
+ for i in $(seq 1 $((HARD_CAP + 5))); do
129
133
  : > "$TMP_PROJ/.claude/hooks/check_fake_${i}.sh"
130
134
  done
131
135
  run_hook
132
- if [ "$EXIT" = "0" ] && echo "$STDOUT_TEXT" | grep -q "BLOCKER" && echo "$STDOUT_TEXT" | grep -qE "hard (30|35|40|45)"; then
133
- echo " PASS Test 7 hook count hard BLOCKER"; PASS=$((PASS+1))
136
+ if [ "$EXIT" = "0" ] && echo "$STDOUT_TEXT" | grep -q "BLOCKER" && echo "$STDOUT_TEXT" | grep -qE "hard ${HARD_CAP}"; then
137
+ echo " PASS Test 7 hook count hard BLOCKER (cap ${HARD_CAP})"; PASS=$((PASS+1))
134
138
  else
135
139
  echo " FAIL Test 7 (output: ${STDOUT_TEXT:0:200})"
136
140
  FAIL=$((FAIL+1)); FAILED="${FAILED}\n - Test 7"
@@ -7,7 +7,7 @@
7
7
  "scripts/composition-fidelity-visual-diff.mjs",
8
8
  "product-workspace apps/template/src/AllDsComponents.stories.tsx (DsCanonicalPortal)"
9
9
  ],
10
- "generatedAt": "2026-05-29T07:08:15.252Z"
10
+ "generatedAt": "2026-05-29T08:01:40.949Z"
11
11
  },
12
12
  "components": {
13
13
  "accordion": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qijenchen/design-system",
3
- "version": "0.1.0-beta.34",
3
+ "version": "0.1.0-beta.35",
4
4
  "private": false,
5
5
  "description": "World-class design system — components, patterns, tokens, hooks (single source of truth for team distribution).",
6
6
  "type": "module",
@@ -41,7 +41,8 @@
41
41
  "./styles/tokens.css": "./src/styles/tokens.css",
42
42
  "./styles/tokens": "./src/styles/tokens.css",
43
43
  "./package.json": "./package.json",
44
- "./ds-story-manifest.json": "./ds-story-manifest.json"
44
+ "./ds-story-manifest.json": "./ds-story-manifest.json",
45
+ "./styles/base": "./src/styles/base.css"
45
46
  },
46
47
  "bin": {
47
48
  "qijenchen-ds-init": "./cli-init.mjs"
@@ -0,0 +1,48 @@
1
+ /* @qijenchen/design-system/styles/base — consumer base layer SSOT
2
+ *
3
+ * Why(2026-05-29 fix:ds-product-template storybook 字體 drift,user「請你追根究底去解決」授權):
4
+ * `styles/tokens` 只 ship token 變數(`--font-sans` / `--canvas` / `--foreground` 等),
5
+ * 不含「把變數套到 body」的 base 層。DS repo `src/globals.css` 自帶此 base 層,但 consumer
6
+ * (apps/template globals + storybook.css)只 import tokens → body 字體/底色/前景退回瀏覽器預設
7
+ * → consumer storybook 跟 DS storybook 字體不同。
8
+ *
9
+ * 本檔抽出 base 層為單一 SSOT:DS `src/globals.css` + consumer 都 import,字體/reset 永不 drift。
10
+ * codex 2026-05-29 dual-track 共識 option (a)。
11
+ *
12
+ * 用法(consumer,放在 tokens import 之後):
13
+ * @import '@qijenchen/design-system/styles/tokens';
14
+ * @import '@qijenchen/design-system/styles/base';
15
+ */
16
+
17
+ /* lucide 全域 stroke width */
18
+ .lucide {
19
+ stroke-width: 1.75;
20
+ }
21
+
22
+ @layer base {
23
+ *,
24
+ ::before,
25
+ ::after {
26
+ box-sizing: border-box;
27
+ border-color: var(--color-neutral-5);
28
+ }
29
+
30
+ body {
31
+ background-color: var(--canvas);
32
+ color: var(--foreground);
33
+ font-family: var(--font-sans);
34
+ -webkit-font-smoothing: antialiased;
35
+ -moz-osx-font-smoothing: grayscale;
36
+ }
37
+
38
+ :focus-visible {
39
+ outline: 2px solid var(--ring);
40
+ outline-offset: 2px;
41
+ }
42
+
43
+ /* Button pointer cursor(Tailwind v4 移除 v3 的 button cursor,補回符合 UX 直覺) */
44
+ button:not(:disabled),
45
+ [role="button"]:not(:disabled) {
46
+ cursor: pointer;
47
+ }
48
+ }
@@ -40,3 +40,7 @@
40
40
  tokens.css aggregator 必須也包含, 不然 consumer 拿不到 → 跑版。 */
41
41
  @import './../components/DataTable/data-table.css';
42
42
  @import './../patterns/header-canonical/header-canonical.css';
43
+
44
+ /* Base layer — body typography(font-family var(--font-sans))+ reset + focus + button cursor。
45
+ 必在 token 之後(依賴 token vars)。Consumer `@import tokens` 一次拿到。SSOT: styles/base.css。 */
46
+ @import './base.css';