@morya-ui/setup 0.3.4 → 0.3.5

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.
@@ -3,68 +3,68 @@
3
3
  "evals": [
4
4
  {
5
5
  "id": 1,
6
- "prompt": "我们内部教务系统用 Vue3 + morya-ui。请做一个「课程列表」后台页:按课程名搜索、按开课状态(全部/开课中/已结课)筛选;表格列:名称、状态、学分、更新时间;行内「编辑」进抽屉表单,「删除」要二次确认;右上角「新建课程」。保存/删除成功只要一句话提示。输出单个 Vue SFC,结构对齐列表黄金样例,并做 Ops 精致化(侧栏图标、状态用 MStatus、空态用 MEmpty、行操作不要一排实心按钮)。",
7
- "expected_output": "Ops list: MLayout/MPageHeader/MPageFilters/MTable rows, optional batch MPageToolbar, MSelect status, MDrawer edit, MConfirmDialog delete, message not toast, MStatus for status, MEmpty in #empty, menu icons, text/small row actions, craft pass applied, no second UI kit.",
6
+ "prompt": "我们内部教务系统用 Vue3 + morya-ui。请做一个「课程列表」后台页:按课程名搜索、按开课状态(全部/开课中/已结课)筛选;表格列:名称、状态、学分、更新时间;行内「编辑」进抽屉表单,「删除」要二次确认;右上角「新建课程」。保存/删除成功只要一句话提示。输出单个 Vue SFC,用 list-filters-stack / list-table / form-in-drawer / confirm-delete / page-header-actions 等 snippets 拼装并对齐 page-layouts 块顺序,并做 Ops 精致化(侧栏图标、状态用 MStatus、空态用 MEmpty、行操作不要一排实心按钮)。",
7
+ "expected_output": "Ops list composition-first: MLayout/MPageHeader/list-filters-stack (collapsible+#advanced+FilterChips)/MTable rows, page-header-actions one primary, form-in-drawer edit, confirm-delete, message not toast, MStatus, MEmpty in #empty, menu icons, text/small row actions, craft pass, no second UI kit; do not require whole golden-page clone.",
8
8
  "files": []
9
9
  },
10
10
  {
11
11
  "id": 2,
12
12
  "prompt": "同一个 morya-ui 项目里,生成「新建员工」独立表单页:姓名、工作邮箱、部门(下拉)、入职日期;窄栏;页头有标题和一句说明;底栏保存(primary)/取消(secondary)。不要做成营销落地页,不要用 Toast 提示「已保存」。输出单个 Vue SFC。",
13
- "expected_output": "Ops form golden: narrow MPageContent, MPageHeader, MPageSection form/actions, MForm + MSelect/MDatePicker, message for success if shown, one primary, no landing hero.",
13
+ "expected_output": "Ops form snippets: page-content-form + form-header/body/actions, narrow MPageContent, MForm + MSelect/MDatePicker, message for success if shown, one primary, no landing hero.",
14
14
  "files": []
15
15
  },
16
16
  {
17
17
  "id": 3,
18
18
  "prompt": "运营后台首页仪表盘:四个 KPI(今日订单、待处理、转化率、退款率)、中间一块图表占位、右侧或下方「最近告警」表格(级别、内容、时间)。Vue3 + morya-ui,可先用静态假数据;告警级别可用 Tag,状态用 MStatus。",
19
- "expected_output": "Dashboard: MPageStat grid with domain labels, MCard shadow=always + MEmpty chart pending, recent MTable with MStatus, MLayout shell, --m-* only, spacious density.",
19
+ "expected_output": "Dashboard snippets: dashboard-kpi-grid, dashboard-chart-card, dashboard-recent-table, MLayout shell, --m-* only, spacious density.",
20
20
  "files": []
21
21
  },
22
22
  {
23
23
  "id": 4,
24
24
  "prompt": "给「青禾书房」这个独立书店品牌做登录页:左品牌、右表单(邮箱+密码+登录)。要有一点品牌感(token 氛围即可),但控件必须用 morya-ui;登录失败用表单区常驻错误(字段 errorMessage 或 token role=alert),不要一闪而过的 Toast,也不要把 MMessage 当成内嵌 Alert。输出单个 Vue SFC。",
25
- "expected_output": "Account+craft: split shell, MForm/MInputPassword/MButton, token role=alert or field error for failure, brand panel with --m-* color-mix, no MMessage severity alert, no second UI kit.",
25
+ "expected_output": "Account+craft via auth-split-shell: split shell, MForm/MInputPassword/MButton, token role=alert or field error for failure, brand panel with flat --m-* color-mix (no stacked radial+linear aurora), no MMessage severity alert, no second UI kit.",
26
26
  "files": []
27
27
  },
28
28
  {
29
29
  "id": 5,
30
30
  "prompt": "课程列表在零数据时太空了。请设计一个空状态区块(可嵌在列表页内容区):说明还没有课程、引导「创建第一门课程」;视觉克制,用 morya-ui 默认空态即可,不要自定义 dashed 框或径向光晕。只要空状态相关模板片段或带空状态的列表 SFC 均可。",
31
- "expected_output": "Flow empty: MPageHeader + MEmpty + next-action MButton, short copy, no custom dashed/radial shell, fits list content slot.",
31
+ "expected_output": "Flow empty via empty-block: MEmpty + next-action MButton, short copy, no custom dashed/radial shell, fits list content slot.",
32
32
  "files": []
33
33
  },
34
34
  {
35
35
  "id": 6,
36
- "prompt": "为「流水线 CI」产品写一个营销落地首页(不是后台):首屏只有品牌名、一句主标题、一句副文、一组 CTA;下面再分「为何选择」「能力」「客户」三节。技术实现用 Vue3 + morya-ui 组件做按钮/标签/折叠 FAQ;颜色走 --m-*,避免紫渐变和奶油衬线陶土那套 AI 默认脸。可有 1–2 个微动效,强度跟 useMotion / data-m-motion。输出单个 Vue SFC。",
37
- "expected_output": "Express landing: single-job hero, MButton CTAs, sections with one job each, MAccordion FAQ optional, no purple/cream-terracotta defaults, no admin MPageFilters shell, motion gated by useMotion / data-m-motion.",
36
+ "prompt": "为「流水线 CI」产品写一个营销落地首页(不是后台):首屏只有品牌名、一句主标题、一句副文、一组 CTA;下面再分「为何选择」「能力」「客户」三节。技术实现用 Vue3 + morya-ui 组件做按钮/标签/折叠 FAQ;颜色走 --m-*,风格偏简洁扁平(不要紫渐变 aurora、奶油衬线陶土、霓虹毛玻璃)。可有 1–2 个微动效,强度跟 useMotion / data-m-motion。输出单个 Vue SFC。",
37
+ "expected_output": "Express landing: single-job hero, MButton CTAs, sections with one job each, MAccordion FAQ optional, flat/simple surfaces (no purple aurora / cream-terracotta / unsolicited glass-neon), no admin MPageFilters shell, motion gated by useMotion / data-m-motion.",
38
38
  "files": []
39
39
  },
40
40
  {
41
41
  "id": 7,
42
42
  "prompt": "做一个三步「创建工作空间」向导:1 名称与地区 2 邀请成员(邮箱标签)3 确认。用 morya-ui 的 Stepper + Form;每步一个主任务;最后提交成功进入结果页(查看工作空间 / 返回)。输出一个或两个 SFC。",
43
- "expected_output": "Flow wizard: wizard-form golden — MStepper :steps, per-step MForm, MInputTags invites, clear next/back/submit, message success, validate_usage clean.",
43
+ "expected_output": "Flow wizard via wizard-steps (+ result-block): MStepper :steps, per-step MForm, MInputTags invites, clear next/back/submit, message success, validate_usage clean.",
44
44
  "files": []
45
45
  },
46
46
  {
47
47
  "id": 8,
48
48
  "prompt": "用户点了删除项目但权限不足:做一张「无权限」系统页(或全页占位),说明原因,并提供返回上一页、联系管理员。用 morya-ui,文案直接别玩梗。",
49
- "expected_output": "System surface: result-page golden — MResult status=403, #footer escape actions, no jokey 404 essay, on-token, validate_usage clean.",
49
+ "expected_output": "System surface via result-block: MResult status=403, #footer escape actions, no jokey 404 essay, on-token, validate_usage clean.",
50
50
  "files": []
51
51
  },
52
52
  {
53
53
  "id": 9,
54
54
  "prompt": "把上面的课程列表再 polish 一轮:去掉多余实心按钮、保证只有一个主按钮、表格状态改成 MStatus、补上 MEmpty。不要改成营销页。",
55
- "expected_output": "Ops quieter polish: one primary, MStatus, MEmpty, text row actions, still list golden structure.",
55
+ "expected_output": "Ops quieter polish: one primary, MStatus, MEmpty, text row actions, still list block-order / snippets structure.",
56
56
  "files": []
57
57
  },
58
58
  {
59
59
  "id": 10,
60
- "prompt": "给「用户管理」做资源详情页:面包屑、标题旁启用状态、编辑/返回/删除;摘要标签;基本信息属性网格;下方近期活动表。Vue3 + morya-ui,对齐详情黄金样例,不要做成落地页。",
61
- "expected_output": "Ops detail: MPageHeader + MStatus, property MCard, related MTable rows, --m-* only, no marketing hero.",
60
+ "prompt": "给「用户管理」做资源详情页:面包屑、标题旁启用状态、编辑/返回/删除;摘要标签;基本信息属性网格;下方近期活动表。Vue3 + morya-ui,按 detail 块顺序 + detail-toolbar 拼装,不要做成落地页。",
61
+ "expected_output": "Ops detail composition: detail-toolbar MPageHeader + MStatus, property MCard, related MTable rows, --m-* only, no marketing hero.",
62
62
  "files": []
63
63
  },
64
64
  {
65
65
  "id": 11,
66
66
  "prompt": "用户列表页上「新建/编辑」不要另开路由:同页 MDialog(约 32rem)里放短表单(姓名、邮箱、角色),页脚取消/保存;保存成功用 message 一句话。输出单个 Vue SFC。",
67
- "expected_output": "form-in-dialog: list stays, MDialog + MForm + #footer, message.success not toast string, MTable rows.",
67
+ "expected_output": "form-in-dialog snippet: list stays, MDialog + MForm + #footer, message.success not toast string, MTable rows.",
68
68
  "files": []
69
69
  },
70
70
  {
@@ -76,13 +76,13 @@
76
76
  {
77
77
  "id": 13,
78
78
  "prompt": "列表行删除:点删除后用 MConfirmDialog(危险确认),确认后 message.success('已删除')。不要用 toast,也不要手写 Dialog 当确认框。输出片段或 SFC 均可。",
79
- "expected_output": "confirm-choice + feedback-choice: MConfirmDialog v-model header/message acceptSeverity=danger @accept, message.success not toast, no hand Dialog confirm.",
79
+ "expected_output": "confirm-delete snippet + feedback-choice: MConfirmDialog v-model header/message acceptSeverity=danger @accept, message.success not toast, no hand Dialog confirm.",
80
80
  "files": []
81
81
  },
82
82
  {
83
83
  "id": 14,
84
84
  "prompt": "短新建弹窗:MDialog v-model + header + #footer(取消 secondary、保存 primary);表单字段 fluid。保存成功 message 一句话。不要用 v-model:visible。",
85
- "expected_output": "form-surface Dialog recipe: v-model not visible, #footer actions, fluid fields, message.success.",
85
+ "expected_output": "form-in-dialog / form-surface Dialog recipe: v-model not visible, #footer actions, fluid fields, message.success, relatedSnippets include form-in-dialog.",
86
86
  "files": []
87
87
  }
88
88
  ]
@@ -6,7 +6,7 @@ Generated from `packages/ui-mcp/src/decisions.ts`. **Do not hand-edit** this fil
6
6
  pnpm --filter @morya-ui/mcp generate:recipes
7
7
  ```
8
8
 
9
- MCP: `recommend_component` (list / read by `decision` / query). Full prop manuals still come from `get_component` + `validate_usage`.
9
+ MCP: `recommend_component` (list / read by `decision` / query; options may include `relatedSnippets`). Full prop manuals still come from `get_component` + `validate_usage`. Prefer page snippets for composition; golden pages are optional block-order checks.
10
10
 
11
11
  This file is the **offline** mirror for agents without MCP.
12
12
 
@@ -31,7 +31,7 @@ This file is the **offline** mirror for agents without MCP.
31
31
 
32
32
  - v-model / modelValue 控制开关(不要用 visible)
33
33
  - header 或 title 设弹窗标题
34
- - width 约 32rem 适配短表单(见 form-in-dialog 黄金样例)
34
+ - width 约 32rem 适配短表单(见 form-in-dialog snippet)
35
35
  - 表单字段用 fluid;主按钮 severity="primary"
36
36
 
37
37
  **Recipe · slots**
@@ -44,6 +44,11 @@ This file is the **offline** mirror for agents without MCP.
44
44
  - @close 重置表单模型
45
45
  - 保存可用按钮 @click,或 MForm @submit + type="submit"
46
46
 
47
+ **Related snippets**
48
+
49
+ - `form-in-dialog`
50
+ - `page-header-actions`
51
+
47
52
  **Anti-patterns**
48
53
 
49
54
  - 用普通 Dialog 手写删除确认 → MConfirmDialog
@@ -77,6 +82,10 @@ This file is the **offline** mirror for agents without MCP.
77
82
 
78
83
  - @close 清理草稿
79
84
 
85
+ **Related snippets**
86
+
87
+ - `form-in-drawer`
88
+
80
89
  **Anti-patterns**
81
90
 
82
91
  - 极短 2–3 字段也用 Drawer → Dialog
@@ -110,6 +119,13 @@ This file is the **offline** mirror for agents without MCP.
110
119
  - MForm @submit(或 @submit.prevent)
111
120
  - 提交按钮 type="submit" + severity="primary"
112
121
 
122
+ **Related snippets**
123
+
124
+ - `page-content-form`
125
+ - `form-header`
126
+ - `form-body`
127
+ - `form-actions`
128
+
113
129
  **Anti-patterns**
114
130
 
115
131
  - 列表短 CRUD 开独立路由 → form-in-dialog
@@ -151,6 +167,10 @@ This file is the **offline** mirror for agents without MCP.
151
167
 
152
168
  - @close / @update:modelValue
153
169
 
170
+ **Related snippets**
171
+
172
+ - `form-in-dialog`
173
+
154
174
  **Anti-patterns**
155
175
 
156
176
  - Dialog + 手写「确定删除」→ MConfirmDialog
@@ -184,6 +204,10 @@ This file is the **offline** mirror for agents without MCP.
184
204
 
185
205
  - @close
186
206
 
207
+ **Related snippets**
208
+
209
+ - `form-in-drawer`
210
+
187
211
  **Anti-patterns**
188
212
 
189
213
  - 简单 Yes/No 确认用 Drawer → ConfirmDialog / ConfirmPopup
@@ -727,17 +751,30 @@ This file is the **offline** mirror for agents without MCP.
727
751
 
728
752
  **Recipe · props**
729
753
 
730
- - 内放 MInput / MSelect 等筛选控件
731
- - 可 collapsible + #advanced
732
- - 不要外包 MCard
754
+ - 内放 MInput / MSelect;同行用 MSpace wrap
755
+ - 查询/重置放 #actions(与折叠切换同列)
756
+ - 默认 variant="filled";dense craft 用 plain + size="small"
757
+ - 有次要条件:collapsible + v-model:expanded + #advanced
758
+ - toggle 默认「高级筛选/收起」+ chevron;已选用 FilterChips
733
759
 
734
760
  **Recipe · slots**
735
761
 
762
+ - #actions 查询/重置
736
763
  - #advanced 高级筛选
764
+ - #active 可选;更常见是下方 FilterChips
765
+
766
+ **Related snippets**
767
+
768
+ - `list-filters-stack`
769
+ - `list-filters`
770
+ - `list-filters-collapsible`
771
+ - `list-filter-chips`
772
+ - `list-filters-dense`
737
773
 
738
774
  **Anti-patterns**
739
775
 
740
776
  - 表单字段组用 PageFilters → PageSection form / Fieldset
777
+ - 手写已选条 → list-filter-chips / list-filters-stack
741
778
 
742
779
 
743
780
  ### PageToolbar
@@ -1299,6 +1336,10 @@ This file is the **offline** mirror for agents without MCP.
1299
1336
 
1300
1337
  - #extra 放下一步按钮(创建…)
1301
1338
 
1339
+ **Related snippets**
1340
+
1341
+ - `empty-block`
1342
+
1302
1343
  **Anti-patterns**
1303
1344
 
1304
1345
  - 403/404 用 Empty → Result
@@ -1328,6 +1369,10 @@ This file is the **offline** mirror for agents without MCP.
1328
1369
 
1329
1370
  - #footer 逃逸/下一步按钮
1330
1371
 
1372
+ **Related snippets**
1373
+
1374
+ - `result-block`
1375
+
1331
1376
  **Anti-patterns**
1332
1377
 
1333
1378
  - 表格无数据用 Result → Empty
@@ -1358,6 +1403,11 @@ This file is the **offline** mirror for agents without MCP.
1358
1403
  - 触发器放默认插槽(按钮/图标)
1359
1404
  - 危险项用文档 severity / 确认流
1360
1405
 
1406
+ **Related snippets**
1407
+
1408
+ - `row-actions-menu`
1409
+ - `list-row-actions`
1410
+
1361
1411
  **Anti-patterns**
1362
1412
 
1363
1413
  - 表单枚举用 Dropdown → Select
@@ -1475,6 +1525,11 @@ This file is the **offline** mirror for agents without MCP.
1475
1525
  - message.success('已保存') / info / warn / error
1476
1526
  - 大多数操作反馈的默认选择
1477
1527
 
1528
+ **Related snippets**
1529
+
1530
+ - `confirm-delete`
1531
+ - `form-in-dialog`
1532
+
1478
1533
  **Anti-patterns**
1479
1534
 
1480
1535
  - toast.add({ summary: '已保存' }) → message.success('已保存')
@@ -1520,6 +1575,10 @@ This file is the **offline** mirror for agents without MCP.
1520
1575
  - 表单级:token 样式的 role="alert" 条(见 login-page)
1521
1576
  - <MMessage> 只是 message 宿主,不是内嵌 Alert
1522
1577
 
1578
+ **Related snippets**
1579
+
1580
+ - `auth-split-shell`
1581
+
1523
1582
  **Anti-patterns**
1524
1583
 
1525
1584
  - 登录失败只闪 Toast → 表单区 alert / errorMessage
@@ -1557,6 +1616,10 @@ This file is the **offline** mirror for agents without MCP.
1557
1616
  - @accept 执行删除
1558
1617
  - @reject 关闭
1559
1618
 
1619
+ **Related snippets**
1620
+
1621
+ - `confirm-delete`
1622
+
1560
1623
  **Anti-patterns**
1561
1624
 
1562
1625
  - 普通 Dialog 手写「确定/取消」删除 → ConfirmDialog
@@ -1586,6 +1649,10 @@ This file is the **offline** mirror for agents without MCP.
1586
1649
 
1587
1650
  - @accept / @reject
1588
1651
 
1652
+ **Related snippets**
1653
+
1654
+ - `confirm-delete`
1655
+
1589
1656
  **Anti-patterns**
1590
1657
 
1591
1658
  - 无 target 的全局危险确认 → ConfirmDialog
@@ -1,107 +1,62 @@
1
1
  # Optional companions (craft bridge)
2
2
 
3
- `morya-ui-pages` is **standalone**: contract + golden structure + [visual-craft.md](visual-craft.md) + [style-presets.md](style-presets.md) are enough to ship.
3
+ `morya-ui-pages` is **standalone**: contract + page snippets / decision recipes + block-order checklists + [visual-craft.md](visual-craft.md) + [style-presets.md](style-presets.md) are enough. Golden pages are optional structure demos. **No named style-preset catalog.**
4
4
 
5
- Installed market skills (**Frontend Design**, **Impeccable**, **UI-UX-Pro-Max**, **fixing-accessibility**, …) are **soft upgrades**. Use them to raise taste and polish — **never** to replace `M*` / `--m-*` / golden layouts / MCP APIs.
5
+ Installed market skills are **soft upgrades** — never replace `M*` / `--m-*` / page-layout block order / MCP / the **user’s** style direction.
6
6
 
7
7
  ## Conflict rule (hard)
8
8
 
9
- Whenever a companion conflicts with this skill, project `DESIGN.md`, or MCP (`get_component` / `validate_usage`):
10
-
11
9
  **morya-ui-pages + DESIGN.md + MCP win.**
12
10
 
13
- Forbidden outcomes from any companion:
11
+ Forbidden from any companion:
14
12
 
15
- - Second UI kit (shadcn / Element / Ant / raw HTML “design system”)
16
- - Invented `M*` props or parallel token hex soup
17
- - Replacing Ops golden shell with a marketing hero “to look less stiff”
18
- - Replacing library overlays with custom ARIA widgets (unless fixing-accessibility is only auditing names/focus on top of `M*`)
13
+ - Second UI kit
14
+ - Invented `M*` props or hex soup
15
+ - Replacing Ops block-order shell with a marketing hero
16
+ - Custom ARIA widgets replacing library overlays
17
+ - **Unearned AI atmosphere** the user did not ask for (aurora, cream-serif-terracotta, dual neon, frosted glass, neumorph on dense tables)
18
+ - Overriding an explicit user reference or description
19
19
 
20
- ## When to load which companion
20
+ ## When to load
21
21
 
22
- | Need | Prefer companion | After / instead use distilled |
22
+ | Need | Prefer companion | Else |
23
23
  | --- | --- | --- |
24
- | Express / landing / branded login panel — distinctive POV | `frontend-design` | [visual-craft.md](visual-craft.md) § Design plan + anti-defaults |
25
- | Named polish / audit / bolder / quieter / typeset / delight | `impeccable` (`polish`, `bolder`, `quieter`, …) | [visual-craft.md](visual-craft.md) § Polish modes |
26
- | Industry / mood / palette keywords for Express | `ui-ux-pro-max` (search only) | [style-presets.md](style-presets.md) heuristics + visual-craft mood |
27
- | a11y names, keyboard, focus, forms | `fixing-accessibility` | review-checklist a11y + MCP validate |
28
- | Routine Ops CRUD | **none** — style preset + Ops polish | [style-presets.md](style-presets.md) |
29
-
30
- ### Load budget
31
-
32
- - Default: **morya-ui-pages only**
33
- - Max one **visual** companion per task (`frontend-design` **or** `impeccable` **or** `ui-ux-pro-max`)
34
- - a11y companion may stack **after** visual pass (pages → one visual → optional a11y)
35
- - If absent: **do not** ask the user to install mid-task; use distilled craft and continue
36
-
37
- ## Mode bridge (Impeccable → morya lanes)
38
-
39
- | Impeccable mode | morya lane | What companion may change | What stays locked |
40
- | --- | --- | --- | --- |
41
- | **Operate** | Ops / System / most Settings | Density, hierarchy, copy verbs, chrome polish, style preset | Golden block order, `MTable`/`MPage*`, feedback API |
42
- | **Persuade** | Express / marketing CTA | Design plan, signature, type/atmosphere | Controls still `M*`; colors map to `--m-*` |
43
- | **Read** | Docs chrome / long detail | Typeset, spacing, reading measure | No second kit |
44
- | **Experience** | Gallery / showcase | Artifact-first layout | Interactive chrome still `M*` |
45
-
46
- Pick the mode from the **surface**, not the company name (a tool’s landing page is still Persuade).
47
-
48
- ## Frontend Design bridge (Express & brand moments)
49
-
50
- When `frontend-design` is available **or** you are on Express / branded Account:
24
+ | Express / brand POV | `frontend-design` | visual-craft design plan |
25
+ | Named polish / audit / bolder / quieter | `impeccable` | visual-craft polish modes |
26
+ | Mood keywords | `ui-ux-pro-max` (search only) | infer from prompt → `--m-*` |
27
+ | a11y | `fixing-accessibility` | review-checklist |
28
+ | Routine Ops | **none** | Ops polish + resolved direction |
51
29
 
52
- 1. **Ground the subject** — concrete product, audience, single job (same as this skill step 1).
53
- 2. **Short design plan** before code — color roles, type roles, layout concept, **one** signature risk.
54
- 3. **Critique the plan** — if it matches the plan you’d write for any SaaS, revise for **this** subject.
55
- 4. **Anti-defaults** — do not spend free axes on cream+serif+terracotta / acid-green dark / broadsheet / purple gradient (see visual-craft).
56
- 5. **Remediate with morya-ui** — implement the plan using `M*` + `--m-*` / `color-mix`; do not introduce Inter-as-display on Express when the brief allows character **unless** the project theme already fixes fonts.
30
+ Load budget: max one visual companion; a11y may follow. If absent, do not ask to install mid-task.
57
31
 
58
- Ops lists: Frontend Design may inform **copy tone and hierarchy**, not a new scaffold aesthetic.
32
+ ## Frontend Design bridge
59
33
 
60
- ## Impeccable bridge (polish commands)
34
+ 1. Ground subject / audience / job.
35
+ 2. Resolve style direction first ([style-presets.md](style-presets.md)).
36
+ 3. Short design plan; signature fits the **user’s** words.
37
+ 4. Strip AI-default faces unless the user asked.
38
+ 5. Remediate with `M*` + `--m-*`; flat shells by default.
61
39
 
62
- Map user asks to Impeccable-style passes (run companion if installed; else visual-craft polish modes):
40
+ ## Impeccable bridge
63
41
 
64
- | User intent | Pass | morya constraint |
42
+ | User intent | Pass | Constraint |
65
43
  | --- | --- | --- |
66
- | 太平 / 太呆板 / 大胆一点 | `bolder` | Amplify **one** signature or style preset (`studio`/`rail`); keep Ops golden |
67
- | 太花 / 太吵 | `quieter` | Remove competing accents; keep one primary |
68
- | 提交前收一遍 | `polish` | Ops polish + style preset cues + a11y basics |
69
- | 文案/空态/错误看不懂 | `clarify` | Domain verbs; `MEmpty` / `errorMessage` |
70
- | 字阶乱 | `typeset` | Theme font tokens; no random CDN font stacks on Ops |
71
- | 加点微交互 | `delight` / `animate` | 1–2 moments; `useMotion` / `data-m-motion` |
72
- | 无障碍 | `audit` + fixing-accessibility | Labels on `M*`; don’t replace Dialog/Menu |
44
+ | 太平 / 大胆一点 | `bolder` | One signature inside current direction; ask before changing the whole face |
45
+ | 太花 / 太像 AI | `quieter` | Strip unearned gradients / glow / glass |
46
+ | 提交前 | `polish` | Ops polish + direction + a11y basics |
47
+ | 文案 | `clarify` | Domain verbs |
48
+ | 微交互 | `delight` | 1–2 moments; `useMotion` |
73
49
 
74
- **Brief wins** (Impeccable): if the user pinned a reference or named a [style preset](style-presets.md), do not redirect toward companion taste.
50
+ **Brief wins.**
75
51
 
76
- ## UI-UX-Pro-Max bridge (mood only)
77
-
78
- Safe: search mood / industry / palette **keywords**, then map onto `--m-*` roles and a style preset.
79
-
80
- Unsafe: adopting suggested React/Tailwind/shadcn stacks, GSAP-heavy landing kits, or chart libraries that replace `M*` patterns.
81
-
82
- ## Combined workflow (pages + companions)
52
+ ## Combined workflow
83
53
 
84
54
  ```text
85
- 1. Style direction → reference → preset → cues → ask ([style-presets.md](style-presets.md))
86
- 2. Structure → recommend_page / get_golden_page (MCP)
87
- 3. Contract → recommend_component / get_component / validate_usage
88
- 4. Craft → visual-craft Ops polish or Express design plan
89
- 5. Companion (opt.) → frontend-design (Express) OR impeccable polish command
90
- 6. a11y (opt.) → fixing-accessibility
55
+ 1. Style direction → user reference/description → cues → ask if uncertain
56
+ 2. Compose → recommend_page.suggestedSnippets / get_page_snippet + recommend_component
57
+ 3. Optional structure → get_golden_page only for whole-page block-order check
58
+ 4. Contract → get_component / validate_usage
59
+ 5. Craft → visual-craft (flat shells by default)
60
+ 6. Companion (opt.) → deepen inside the resolved direction
91
61
  7. Gate → validate_usage + validate_page
92
62
  ```
93
-
94
- ## Install via setup
95
-
96
- ```bash
97
- npx @morya-ui/setup ai
98
- npx @morya-ui/setup ai --skills=morya-ui-pages,frontend-design,impeccable,fixing-accessibility
99
- npx @morya-ui/setup ai --skills=all
100
- ```
101
-
102
- | Companion | Source | Safe use | Unsafe use |
103
- | --- | --- | --- | --- |
104
- | `frontend-design` | `anthropics/skills` | Express / brand panel POV after surface + contract fixed | Replacing Ops golden shell; second UI kit |
105
- | `impeccable` | `pbakaus/impeccable` | Operate/Persuade polish passes aligned with visual-craft | New token schema; swap `M*` for raw controls |
106
- | `ui-ux-pro-max` | local / marketplace | Mood & industry keywords for Express | Stack swap; ignoring morya tokens |
107
- | `fixing-accessibility` | `ibelick/ui-skills` | Names, keyboard, focus on top of `M*` | Custom ARIA widgets replacing library overlays |
@@ -1,46 +1,46 @@
1
1
  # Page layouts
2
2
 
3
- When generating a full page, pick a type and **mirror the golden-page block order**. Source: MCP `get_golden_page`.
4
-
5
- | Type | `get_golden_page` id |
6
- | --- | --- |
7
- | List (structure · soft) | `list-page` |
8
- | List · dense craft | `list-page-dense` |
9
- | List · rail craft | `list-page-rail` |
10
- | Form (long / dedicated) | `form-page` |
11
- | List create/edit dialog | `form-in-dialog` |
12
- | Detail | `detail-page` |
13
- | Dashboard | `dashboard-page` |
14
- | Login | `login-page` |
15
- | Landing | `landing-page` |
16
- | Empty | `empty-state` |
17
- | Result / 403 / terminal | `result-page` |
18
- | Settings | `settings-page` |
19
- | Wizard | `wizard-form` |
20
-
21
- Via MCP: `recommend_page({ style? })` → resolves list craft (`dense`→`list-page-dense`, `rail`→`list-page-rail`, else `list-page`) → `get_golden_page`; then apply `styleDirection` (or a user reference). Local edits: `get_page_snippet` (`filters`, `toolbar`, `form-actions`, `scrollable-panel`, …). Styles: `list_style_presets` / `get_style_preset`.
22
-
23
- **List craft variants** share the same block order; only density / chrome / copy change. Prefer `recommend_page` style routing over hand-picking unless the user named a variant id.
3
+ When generating a full page, pick a type and follow the **block-order checklist** below. Fill each block with MCP **`get_page_snippet`** / `recommend_page.suggestedSnippets` (composition-first). Optional: `get_golden_page` only to cross-check whole-page order or when the user asks to mirror a golden sample.
4
+
5
+ Golden pages are **assembly demos / structure baselines**, not the default clone source. Do not add new craft variants (`list-page-*`); density / sider cues inform polish via style direction.
6
+
7
+ | Type | Checklist below | Optional `get_golden_page` | Typical snippets |
8
+ | --- | --- | --- | --- |
9
+ | List | List page | `list-page` (`list-page-dense` / `list-page-rail` craft only) | `layout-app-shell`, `page-header-actions`, **`list-filters-stack`** (dense → `list-filters-dense`), `list-table`, `form-in-dialog`, `confirm-delete` |
10
+ | Form (long / dedicated) | Form page | `form-page` | `page-content-form`, `form-header`, `form-body`, `form-actions` |
11
+ | List create/edit dialog | List create/edit dialog | `form-in-dialog` | **`form-in-dialog`** (preferred) |
12
+ | Detail | Detail page | `detail-page` | `detail-toolbar`, `form-in-dialog` |
13
+ | Dashboard | Dashboard | `dashboard-page` | `dashboard-kpi-grid`, `dashboard-chart-card`, `dashboard-recent-table` |
14
+ | Login | — (see [surfaces.md](surfaces.md)) | `login-page` | **`auth-split-shell`** |
15
+ | Landing | — (see [surfaces.md](surfaces.md)) | `landing-page` | — |
16
+ | Empty | — | `empty-state` | **`empty-block`** |
17
+ | Result / 403 / terminal | — | `result-page` | **`result-block`** |
18
+ | Settings | Settings page | `settings-page` | `form-header`, `form-body`, `form-actions` |
19
+ | Wizard | Wizard | `wizard-form` | **`wizard-steps`** |
20
+
21
+ Via MCP: `recommend_page({ style? })` → use **`suggestedSnippets`** + `recommend_component` / `get_page_snippet`; apply `styleDirection` (user reference/description — no preset catalog). Call `get_golden_page` only when needed for block-order check. Style: `get_style_direction`.
22
+
23
+ **List craft variants** share the same block order; only density / chrome / copy change. Prefer style-direction cues over inventing new golden ids.
24
24
 
25
25
  ## Product defaults
26
26
 
27
- - **Short create/edit** (about ≤8 fields, single section): same-page `MDialog` + `MForm` — do not invent a new route form for every entity.
28
- - **Long / multi-section / wizard**: dedicated form page (`form-page`) or `MDrawer`.
27
+ - **Short create/edit** (about ≤8 fields, single section): same-page `MDialog` + `MForm` — snippet `form-in-dialog`; do not invent a new route form for every entity.
28
+ - **Long / multi-section / wizard**: dedicated form page (`form-page`) or `MDrawer` (`form-in-drawer`).
29
29
  - **One-line success/error**: `message` API; title + detail or async notify → `toast` (see [feedback.md](feedback.md)).
30
30
 
31
31
  ## List page — block order
32
32
 
33
- 1. `MLayout fillViewport` + optional `MLayoutSider bordered`
33
+ 1. `MLayout fillViewport` + optional `MLayoutSider bordered` → snippet `layout-app-shell`
34
34
  2. Sider `MMenu` (**every item has `icon`**)
35
35
  3. `MLayoutHeader` → `MBreadcrumb`
36
- 4. `MLayoutContent` → `MPageContent` (**add `fill` only when the height rule below applies**)
37
- 5. `MPageHeader` — page title + `#actions` primary (**one** filled primary in viewport)
38
- 6. `MPageFilters` — `variant="filled"` optional; inner `MSpace wrap` + Input/Select + query/reset (query/reset → secondary); optional `collapsible` + `#advanced` for secondary fields
39
- 7. Optional `MPageFilterChips` + closable `MTag` when filters are applied (after filters, before table)
40
- 8. Optional `MPageToolbar` — batch actions only (no page title)
41
- 9. `MTable` directly in content (usually **no** wrapping `MCard`); status → `MStatus`; `#empty` → `MEmpty`
36
+ 4. `MLayoutContent` → `MPageContent` (**add `fill` only when the height rule below applies**) → `page-content-list`
37
+ 5. `MPageHeader` — page title + `#actions` primary (**one** filled primary in viewport) → `page-header-actions`
38
+ 6. `MPageFilters` — 默认 **`list-filters-stack`**(`#actions` 查询/重置 + collapsible「高级筛选/收起」chevron + `#advanced` + FilterChips);条件少无高级区用 `list-filters`;dense craft 用 `list-filters-dense`
39
+ 7. Optional `MPageFilterChips` — 已含在 `list-filters-stack`;单独增量用 `list-filter-chips`
40
+ 8. Optional `MPageToolbar` — batch actions only → `list-toolbar` / `list-batch-toolbar`
41
+ 9. `MTable` directly in content; status → `MStatus`; `#empty` → `MEmpty` → `list-table` + `list-status-dot` + `empty-block`
42
42
  10. Pagination via `MTable paginator` or sibling `MPagination`
43
- 11. Short create/edit → `MDialog` + `MForm` on the same page (default)
43
+ 11. Short create/edit → same-page `MDialog` + `MForm` → **`form-in-dialog`**; delete → **`confirm-delete`**
44
44
 
45
45
  ### List height — decide, don’t always fill
46
46
 
@@ -65,17 +65,17 @@ Craft: [visual-craft.md](visual-craft.md) § Ops polish.
65
65
  ## Form page — block order
66
66
 
67
67
  1. `MLayout fillViewport` → `MLayoutHeader` → `MBreadcrumb`
68
- 2. `MPageContent width="narrow"`
69
- 3. `MPageHeader` (title + description)
70
- 4. `MPageSection variant="form"` → `MForm`
71
- 5. `MPageSection variant="actions"` — save (`primary`) + cancel (`secondary`)
68
+ 2. `MPageContent width="narrow"` → `page-content-form`
69
+ 3. `MPageHeader` (title + description) → `form-header`
70
+ 4. `MPageSection variant="form"` → `MForm` → `form-body`
71
+ 5. `MPageSection variant="actions"` — save (`primary`) + cancel (`secondary`) → `form-actions`
72
72
 
73
73
  ## Dashboard — block order
74
74
 
75
75
  1. `MLayout fillViewport` → `MLayoutHeader` → `MBreadcrumb`
76
76
  2. `MPageContent density="spacious"` → `MPageHeader` (title + short domain description when useful)
77
- 3. KPI row: `MGrid` + `MPageStat` (4 columns or responsive) — real metric names, not “Metric 1”
78
- 4. Main split: `MCard shadow="always"` + `MEmpty` (chart pending) and/or recent `MTable` (row status → `MStatus`)
77
+ 3. KPI row: `MGrid` + `MPageStat` (4 columns or responsive) — `dashboard-kpi-grid`
78
+ 4. Main split: `MCard shadow="always"` + `MEmpty` (chart pending) and/or recent `MTable` — `dashboard-chart-card` / `dashboard-recent-table`
79
79
 
80
80
  Craft: spacious density + Ops polish; do not turn the first viewport into a marketing hero.
81
81
 
@@ -97,22 +97,18 @@ Inline style is acceptable for control widths (e.g. filter `width: 14rem`).
97
97
  ## Detail page — block order
98
98
 
99
99
  1. Same admin chrome as list (breadcrumb → `MPageContent`)
100
- 2. `MPageHeader` — title, `MStatus` in `#actions` (or chip `MTag` for categories), primary/secondary/danger actions
100
+ 2. `MPageHeader` — title, `MStatus` in `#actions`, primary/secondary/danger → `detail-toolbar`
101
101
  3. Summary `MPageSection` + property `MCard` (definition grid with `--m-*` only)
102
102
  4. Related data: `MCard` + `MTable` / tabs / timeline
103
- 5. Short edit → same-page `MDialog` (`form-in-dialog`); long edit → `form-page` / `MDrawer`
104
-
105
- Mirror MCP `get_golden_page` `detail-page`.
103
+ 5. Short edit → `form-in-dialog`; long edit → form page / `form-in-drawer`
106
104
 
107
105
  ## List create/edit dialog — block order
108
106
 
109
107
  1. Stay on the list page (`MPageHeader` + filters/table; optional batch `MPageToolbar`)
110
- 2. `MDialog` ~`28–36rem` + `MForm` fields
108
+ 2. `MDialog` ~`28–36rem` + `MForm` fields → snippet **`form-in-dialog`**
111
109
  3. Actions in Dialog `#footer` (cancel secondary/text + save primary)
112
110
  4. Success → `message.success` one-liner, then close
113
111
 
114
- Mirror MCP `get_golden_page` `form-in-dialog`.
115
-
116
112
  ## Settings page — block order
117
113
 
118
114
  1. Admin chrome + `MPageContent width="narrow"`
@@ -121,21 +117,17 @@ Mirror MCP `get_golden_page` `form-in-dialog`.
121
117
  4. Per tab: `MPageSection variant="form"` + `MForm` + save in `variant="actions"`
122
118
  5. Dangerous zone last: `severity="danger"` + confirm
123
119
 
124
- Mirror MCP `get_golden_page` `settings-page`.
125
-
126
120
  ## Wizard — block order
127
121
 
128
122
  1. Narrow `MPageContent` + `MPageHeader`
129
- 2. `MStepper v-model` + **`:steps`** (not `:items`)
123
+ 2. `MStepper v-model` + **`:steps`** (not `:items`) → snippet **`wizard-steps`**
130
124
  3. One form/job per step; sticky `上一步` / `下一步` / `创建`
131
- 4. Success → `result-page` / `MResult`
132
-
133
- Mirror MCP `get_golden_page` `wizard-form`.
125
+ 4. Success → `result-block` / `MResult`
134
126
 
135
127
  ## Hybrids
136
128
 
137
- - List + row edit dialog → `form-in-dialog` golden (or list golden + dialog body).
138
- - List + side detail → list + `MDrawer`.
139
- - Resource detail → `detail-page` golden.
129
+ - List + row edit dialog → `form-in-dialog` snippet on the list.
130
+ - List + side detail → list + `form-in-drawer`.
131
+ - Resource detail → detail checklist + `detail-toolbar`.
140
132
  - Settings without admin chrome → still use `MPageContent` + `MPageSection`; omit sider only if the host app already provides chrome.
141
- - Non-Ops surfaces (auth, landing, empty, wizard) → [surfaces.md](surfaces.md), not these golden orders.
133
+ - Non-Ops surfaces (auth, landing, empty, wizard) → [surfaces.md](surfaces.md) + matching snippets, not Ops list chrome.