diff --git a/apps/tutorial/e2e/pages.spec.ts b/apps/tutorial/e2e/pages.spec.ts index 6f2c622..dbf3d6a 100644 --- a/apps/tutorial/e2e/pages.spec.ts +++ b/apps/tutorial/e2e/pages.spec.ts @@ -271,11 +271,14 @@ test.describe('价值区荧光标记契约', () => { }) test.describe('票券规格契约', () => { - test.beforeEach(async ({ page }) => await page.goto('/design-symbols.html')) + test.beforeEach(async ({ page }) => await page.goto('/design-components.html')) test.use({ reducedMotion: 'no-preference' }) + const chapterTickets = (page: Page) => + page.locator('[data-comp="ticket"]').filter({ has: page.locator('.ticket-stub') }) + test('裁切式:overflow hidden + 单一 2px 描边 + 头部色块无独立边框', async ({ page }) => { - const done = page.locator('.ticket-pk').first() + const done = chapterTickets(page).first().locator('.ticket-face') await expect(done).toBeVisible() const s = await done.evaluate((el) => { const cs = getComputedStyle(el) @@ -295,7 +298,7 @@ test.describe('票券规格契约', () => { }) test('票面 mask 打孔,内层包裹 drop-shadow 跟随轮廓,孔缘对齐撕线', async ({ page }) => { - const done = page.locator('.ticket-pk').first() + const done = chapterTickets(page).first().locator('.ticket-face') const mask = await done.evaluate((el) => { const cs = getComputedStyle(el) return cs.maskImage || cs.webkitMaskImage || 'none' @@ -318,9 +321,8 @@ test.describe('票券规格契约', () => { expect(f.pseudoContent).toBe('none') expect(f.innerShadow).toBe('none') - const arcs = await page.evaluate(() => { - const done = document.querySelector('.ticket-pk') as HTMLElement - const shell = done.closest('.ticket-shell') as HTMLElement + const arcs = await done.evaluate((el) => { + const shell = el.closest('.ticket-shell') as HTMLElement const stub = shell.querySelector('.ticket-stub') as HTMLElement const tearX = stub.getBoundingClientRect().x + parseFloat(getComputedStyle(stub).borderLeftWidth) / 2 diff --git a/apps/tutorial/e2e/visual.spec.ts-snapshots/design-components-chromium-linux.png b/apps/tutorial/e2e/visual.spec.ts-snapshots/design-components-chromium-linux.png index e6c9f0a..faa8e6f 100644 Binary files a/apps/tutorial/e2e/visual.spec.ts-snapshots/design-components-chromium-linux.png and b/apps/tutorial/e2e/visual.spec.ts-snapshots/design-components-chromium-linux.png differ diff --git a/apps/tutorial/e2e/visual.spec.ts-snapshots/design-symbols-chromium-linux.png b/apps/tutorial/e2e/visual.spec.ts-snapshots/design-symbols-chromium-linux.png index 8a93508..4e8a574 100644 Binary files a/apps/tutorial/e2e/visual.spec.ts-snapshots/design-symbols-chromium-linux.png and b/apps/tutorial/e2e/visual.spec.ts-snapshots/design-symbols-chromium-linux.png differ diff --git a/apps/tutorial/src/pages/design-components/App.tsx b/apps/tutorial/src/pages/design-components/App.tsx index 67f85fe..01b6c7c 100644 --- a/apps/tutorial/src/pages/design-components/App.tsx +++ b/apps/tutorial/src/pages/design-components/App.tsx @@ -210,7 +210,10 @@ export function App() { -
+
diff --git a/apps/tutorial/src/pages/design-symbols/App.tsx b/apps/tutorial/src/pages/design-symbols/App.tsx index afa05b0..4632e68 100644 --- a/apps/tutorial/src/pages/design-symbols/App.tsx +++ b/apps/tutorial/src/pages/design-symbols/App.tsx @@ -1,10 +1,14 @@ import type { ReactNode } from 'react' -import { BrickDot, ChapterTicket, Mark, Ring, Tri, Wave } from '../../design-system' -import { CHAPTERS } from '../../lib/chapters' +import { BrickDot, Mark, Ring, Tri, Wave } from '../../design-system' import { Page, Section } from '../../lib/ui' const SHAPES = [ - { el: , n: '▲ 靶子', m: '目标,卡头打头', s: '靶子先行' }, + { + el: , + n: '▲ 靶子', + d: '唯一实心有指向——说「做什么」,不核对、不计数', + s: '靶子先行 · 章卡与步骤卡头', + }, { el: ( @@ -13,12 +17,27 @@ const SHAPES = [ ), n: '● 积木', - m: '清单点列,实=已学', - s: '积木清单', + d: '唯一成列可数——实心=已学,管进度不管方向', + s: '积木清单 · 零件点列与卡头进度点', + }, + { + el: , + n: '○ 预期', + d: '唯一空心——中间留空待核对,说「做成什么样」', + s: '预期结果 · 对照 agent 输出的尺子', + }, + { + el: , + n: '~ 代理区', + d: '唯一不闭合——是边界不是物件,圈出交给 agent 的范围', + s: '每步先分类 · 无学习价值就交接', + }, + { + el: 过程, + n: '荧光标记 价值区', + d: '唯一划在文字上——不散落空白,标记有学习价值的词', + s: '每步先分类 · 价值区就地写清', }, - { el: , n: '○ 预期', m: '可核对的结果', s: '预期结果' }, - { el: , n: '~ 代理区', m: '交给 agent', s: '每步先分类' }, - { el: 过程, n: '荧光标记 价值区', m: '划在文字上,不是散落图形', s: '每步先分类' }, ] const VOCAB: { p: string; rows: [ReactNode, string][] }[] = [ @@ -45,21 +64,21 @@ export function App() {
-
+
{SHAPES.map((s) => (
{s.el}
{s.n}
-
{s.m}
-
{s.s}
+
{s.d}
+
场景 · {s.s}
))}
@@ -93,17 +112,6 @@ export function App() {
-
-
- - -

- 完成=沿撕线打双孔 - (半圆缺口);未开始撕线为实线、无孔。头部色块无独立描边,由票体 overflow-hidden - 裁出单一描边圆角。票号=章程序号。 -

-
-
) } diff --git a/docs/assets/design-symbols-shape-grid/pr-shot-components-after.png b/docs/assets/design-symbols-shape-grid/pr-shot-components-after.png new file mode 100644 index 0000000..faa8e6f Binary files /dev/null and b/docs/assets/design-symbols-shape-grid/pr-shot-components-after.png differ diff --git a/docs/assets/design-symbols-shape-grid/pr-shot-symbols-after.png b/docs/assets/design-symbols-shape-grid/pr-shot-symbols-after.png new file mode 100644 index 0000000..4e8a574 Binary files /dev/null and b/docs/assets/design-symbols-shape-grid/pr-shot-symbols-after.png differ diff --git a/docs/assets/design-symbols-shape-grid/pr-shot-symbols-before.png b/docs/assets/design-symbols-shape-grid/pr-shot-symbols-before.png new file mode 100644 index 0000000..8a93508 Binary files /dev/null and b/docs/assets/design-symbols-shape-grid/pr-shot-symbols-before.png differ