diff --git a/apps/design-lab/e2e/pages.spec.ts b/apps/design-lab/e2e/pages.spec.ts index 041c8a4..552f74b 100644 --- a/apps/design-lab/e2e/pages.spec.ts +++ b/apps/design-lab/e2e/pages.spec.ts @@ -184,6 +184,25 @@ test.describe('散落形状摆放契约', () => { }) }) +test.describe('价值区荧光标记契约', () => { + test.beforeEach(async ({ page }) => await page.goto('/symbols.html')) + + test('荧光笔标记文字:mustard 底、无描边、微斜——是标记不是形状', async ({ page }) => { + const s = await page.evaluate(() => { + const m = document.querySelector('mark') + if (!m) return null + const cs = getComputedStyle(m) + const r = m.getBoundingClientRect() + return { bg: cs.backgroundColor, bw: cs.borderTopWidth, rot: cs.rotate, h: r.height } + }) + expect(s).not.toBeNull() + expect(s!.bg).toBe('rgb(255, 217, 61)') // clash2a mustard——荧光笔 + expect(s!.bw).toBe('0px') // 标记无描边:2px ink 是形状的规则,标记划在文字上 + expect(s!.rot).toContain('deg') // 微斜(rotate 属性生效,手划手感) + expect(s!.h).toBeGreaterThan(14) // 骑在文字上,有字高 + }) +}) + test.describe('票券规格契约', () => { test.beforeEach(async ({ page }) => await page.goto('/symbols.html')) diff --git a/apps/design-lab/e2e/visual.spec.ts-snapshots/shelf-chromium-linux.png b/apps/design-lab/e2e/visual.spec.ts-snapshots/shelf-chromium-linux.png index 0340b25..9578b93 100644 Binary files a/apps/design-lab/e2e/visual.spec.ts-snapshots/shelf-chromium-linux.png and b/apps/design-lab/e2e/visual.spec.ts-snapshots/shelf-chromium-linux.png differ diff --git a/apps/design-lab/e2e/visual.spec.ts-snapshots/symbols-chromium-linux.png b/apps/design-lab/e2e/visual.spec.ts-snapshots/symbols-chromium-linux.png index a417ebe..dd58d2f 100644 Binary files a/apps/design-lab/e2e/visual.spec.ts-snapshots/symbols-chromium-linux.png and b/apps/design-lab/e2e/visual.spec.ts-snapshots/symbols-chromium-linux.png differ diff --git a/apps/design-lab/src/components/shapes.tsx b/apps/design-lab/src/components/shapes.tsx index ec9bf64..998abfb 100644 --- a/apps/design-lab/src/components/shapes.tsx +++ b/apps/design-lab/src/components/shapes.tsx @@ -1,5 +1,5 @@ /** 七个语义形状——装饰即语义(取自 ai-era-tutorial 词汇表) */ -import type { CSSProperties } from 'react' +import type { CSSProperties, ReactNode } from 'react' interface ShapeProps { size?: number @@ -36,11 +36,14 @@ export const Wave = ({ size = 40, className, style }: ShapeProps) => ( ) -/** ▬ 价值区:实心条,过程就地写清 */ -export const Bar = ({ size = 34, className, style }: ShapeProps) => ( - - - +/** 荧光标记 价值区:色块骑在文字背后——是标记不是形状, + * 无描边、微斜、两端比字宽(荧光笔划过的手感),过程就地写清 */ +export const Mark = ({ children, className }: { children: ReactNode; className?: string }) => ( + + {children} + ) /** ⌇ 脱靶:竖立颤抖——图形入口,读者追随图形进入阅读 */ diff --git a/apps/design-lab/src/pages/shelf/App.tsx b/apps/design-lab/src/pages/shelf/App.tsx index ba585e4..ab19df3 100644 --- a/apps/design-lab/src/pages/shelf/App.tsx +++ b/apps/design-lab/src/pages/shelf/App.tsx @@ -7,7 +7,7 @@ import { RouteLine } from '../../components/RouteLine' import { AssignBlock, Ticket } from '../../components/Ticket' import { EntryGuide } from '../../components/EntryGuide' import { Scatter } from '../../components/Scatter' -import { Bar, Cross, Ring, Tremble, Tri, Wave } from '../../components/shapes' +import { Cross, Ring, Tremble, Tri, Wave } from '../../components/shapes' /* 场景坐标(节点=卡描边真实边缘):卡1(40,110,250) 卡2(380,44,250,rot) 卡3(700,44,140) */ const nodes = { @@ -32,7 +32,6 @@ export function App() { , , , - , , ]} /> diff --git a/apps/design-lab/src/pages/symbols/App.tsx b/apps/design-lab/src/pages/symbols/App.tsx index c48b542..97df6df 100644 --- a/apps/design-lab/src/pages/symbols/App.tsx +++ b/apps/design-lab/src/pages/symbols/App.tsx @@ -1,21 +1,22 @@ import { Page, Section } from '../../lib/ui' -import { Bar, BrickDot, Cross, Ring, Tremble, Tri, Wave } from '../../components/shapes' +import { BrickDot, Cross, Mark, Ring, Tremble, Tri, Wave } from '../../components/shapes' import { CHAPTERS } from '../../lib/chapters' import { Ticket } from '../../components/Ticket' +import type { ReactNode } from 'react' const SHAPES = [ { el: , n: '▲ 靶子', m: '目标,卡头打头', s: '靶子先行' }, { el: , n: '● 积木', m: '清单点列,实=已学', s: '积木清单' }, { el: , n: '○ 预期', m: '可核对的结果', s: '预期结果' }, { el: , n: '~ 代理区', m: '交给 agent', s: '每步先分类' }, - { el: , n: '▬ 价值区', m: '就地写过程', s: '每步先分类' }, + { el: 过程, n: '荧光标记 价值区', m: '划在文字上,不是散落图形', s: '每步先分类' }, { el: , n: '⌇ 脱靶', m: '图形入口:追随图形进入阅读', s: '脱靶提醒' }, { el: , n: '+ 指派', m: '位置/预期/场景', s: '指派学习' }, ] -const VOCAB: { p: string; rows: [string, string][] }[] = [ +const VOCAB: { p: string; rows: [ReactNode, string][] }[] = [ { p: '靶子', rows: [['▲ 目标', '做什么'], ['○ 预期结果', '做成长什么样、怎么核对'], ['● 积木清单', '要用到的零件——只列用到的;说零件不说知识']] }, - { p: '步骤分类', rows: [['~ 代理区', '无学习价值——交给 agent'], ['▬ 价值区', '有学习价值——就地写清']] }, + { p: '步骤分类', rows: [['~ 代理区', '无学习价值——交给 agent'], [价值区, '有学习价值——就地写清']] }, { p: '指派学习', rows: [['+ 三样(图形入口)', '教材只留三样,讲解交给 agent'], ['└ 位置', '知识体系中的坐标'], ['└ 预期', '实践结果应长什么样——当尺子'], ['└ 场景', '带回 agent 再做的练习——管巩固']] }, { p: '脱靶提醒', rows: [['⌇ 图形标记', '不人为挖坑;跟在指派后'], ['└ 可能性 / 长相', '怎么脱靶+脱靶什么样——撞上认出缺哪块']] }, { p: '认知基础', rows: [['底座纹·真机验收章', 'env/库/运行环境——脚下的地,不是积木']] },