@qijenchen/design-system 0.1.0-beta.33 → 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
|
-
|
|
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
|
|
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
|
|
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"
|
|
@@ -198,7 +198,7 @@ User 2026-05-15 verbatim 抓「DS 深度稽核漏 storybook content quality」+
|
|
|
198
198
|
| 80 | **Addon subdir ship completeness**(2026-05-28 codify per beta.27 7th iteration anchor)| `check_addon_subdir_ship.sh` P0 BLOCKER:addon 主檔(`.storybook/addons/*/` + `packages/storybook-config/addons/*/`)import `./utils/*` 等 relative subdir 但對應 dir 沒一起 ship → Rollup `Could not resolve` → CSF parse error cascade → build 死。修方向:(1) Copy 缺漏 dir(2) 跑 local build verify(3) commit。Escape `// @addon-subdir-skip:`。Anchor:beta.27 ds-devmode 搬 npm 包漏帶 utils/ 6 files |
|
|
199
199
|
| 81 | **Storybook addon preset 必 `.cjs` extension**(2026-05-28 codify per beta.27-.31 5 連敗 anchor)| `check_storybook_addon_preset_cjs.sh` P0 BLOCKER:`addons/*/preset.ts` 在 `"type":"module"` package 內含 `createRequire` / `require.resolve` / `fileURLToPath(import.meta.url)` → Node ESM scope vs esbuild-register CJS-transpile 衝突 → `require not defined` runtime fail。改 hand-written `preset.cjs`(`.cjs` override package type → 強制 CJS) + `path.join(__dirname, ...)` 返 absolute fs path。SSOT: `memory/feedback_storybook_addon_preset_must_be_cjs.md`。Escape `// @preset-cjs-skip:`。Anchor:2026-05-28 beta.27/.28/.29/.30/.31 5 連敗,beta.32 用 .cjs 才修 |
|
|
200
200
|
| 82 | **Consumer app story title `Apps/<app-name>/...` namespace**(2026-05-28 codify per template create-app duplicate-id anchor)| `check_consumer_app_story_title.sh` P0 BLOCKER:consumer apps `apps/<name>/**/*.stories.{tsx,ts,mdx}` 的 `title:` field 必開頭 `Apps/<app-kebab-name>/...`(per `.claude/rules/story-rules.md` 「Title 命名 2-namespace canonical」)。錯 prefix → Storybook glob 撈到 2 個同 id story → build duplicate warning + 只顯第一個 → 新 app 在 sidebar 不可見。Hook 從 file path 自動推 expected prefix。DS-internal stories(`packages/design-system/**`)走 `Design System/...` 另條 canonical,out of scope。Escape `// @app-story-title-skip:`。Anchor:2026-05-28 npm run create-app verify-flow-test e2e 抓 4 collisions,`scripts/create-app.mjs:patchStoryTitles()` 修生成 + hook 防手動 edit |
|
|
201
|
-
| 83 | **Fork-context runtime + naming SSOT**(2026-05-29 codify per user「fork 後 fork user 在自己獨立環境下仍能如預期運行」;net-new vs dim 62/63/64)| Net-new aspects 不在 dim 62/63/64:**(a)** Hook fire integrity in fork cwd — verify `check_fork_user_plugin_install.sh`(SessionStart)+ `inject_deploy_url_after_push.sh`(PostToolUse Bash)+ approval-preflight scope `apps/**/*.tsx` 在 fork cwd 正確 fire,plugin install 後 `${CLAUDE_PLUGIN_ROOT}` 變數正確 resolve;**(b)** CLAUDE.md cross-load chain — fork `CLAUDE.md` Step 0 指向 `node_modules/@qijenchen/design-system/CLAUDE.md` + `ds-canonical/rules/meta-patterns.md` 真可讀(npm package `files` allowlist 含 ds-canonical);**(c)** Naming SSOT 3 層 — DS-internal source dir(`template/ds-product-template/`)≠ published GitHub Template Repository(`ajenchen/ds-product-template`)≠ fork user new repo 名(self-chosen)清楚 documented in `template/README.md`「命名 SSOT
|
|
201
|
+
| 83 | **Fork-context runtime + naming SSOT**(2026-05-29 codify per user「fork 後 fork user 在自己獨立環境下仍能如預期運行」;net-new vs dim 62/63/64)| Net-new aspects 不在 dim 62/63/64:**(a)** Hook fire integrity in fork cwd — verify `check_fork_user_plugin_install.sh`(SessionStart)+ `inject_deploy_url_after_push.sh`(PostToolUse Bash)+ approval-preflight scope `apps/**/*.tsx` 在 fork cwd 正確 fire,plugin install 後 `${CLAUDE_PLUGIN_ROOT}` 變數正確 resolve;**(b)** CLAUDE.md cross-load chain — fork `CLAUDE.md` Step 0 指向 `node_modules/@qijenchen/design-system/CLAUDE.md` + `ds-canonical/rules/meta-patterns.md` 真可讀(npm package `files` allowlist 含 ds-canonical);**(c)** Naming SSOT 3 層 — DS-internal source dir(`template/ds-product-template/`)≠ published GitHub Template Repository(`ajenchen/ds-product-template`)≠ fork user new repo 名(self-chosen)清楚 documented in `template/README.md`「命名 SSOT」段;**(d)** **跨 repo 交付 canary(2026-05-29 加,補 source→live 盲點)** — `node scripts/verify-published-deploy.mjs`:L1 mirror workflow 最近 run 必 success(否則 published scaffold stale)+ L2 published `.storybook/main.ts` === 本地 template(mirror 真送達)+ L3 `--live`(給 `NETLIFY_PREVIEW_PASSWORD`)playwright 帶密碼 render 部署故事斷言非空白。**Why net-new**:dim 66 只驗 local fixture build,dim 83(a)-(c)只驗 source — 都沒驗「mirror 有沒有真把 source 送達 live netlify 部署」。Anchor:2026-05-29 mirror 從 5/26 默默失敗(PAT 無 workflow scope)→ published stale → netlify 空白,稽核數週沒抓到因無此 canary。Skill chain:`/deep-audit-cross-codex` Phase 0 cwd detection 切 ds-repo / fork-user-repo 2-mode 跑此 dim(2026-05-29 簡化 from 3-mode per 「避免原則無限膨脹」)。Anchor:2026-05-29 dir name vs published repo name SSOT confusion + ds-canonical mirror drift + mirror-deliver-to-live gap |
|
|
202
202
|
|
|
203
203
|
**Heavy dim(`--deep` mode 各必獨立 sub-agent 跑,不可 batch)**:12 / 24 / 25 / 40 / 41 / 42 / 43 / 45 / 49 / 50 / 51 / 52 / 53。Sub-agent prompt 嚴禁含「SKIP」keyword(per Phase 1 NO-SKIP invariant)。
|
|
204
204
|
|
package/ds-story-manifest.json
CHANGED
|
@@ -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-
|
|
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.
|
|
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
|
+
}
|
package/src/styles/tokens.css
CHANGED
|
@@ -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';
|