@morya-ui/setup 0.3.3 → 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.
Files changed (31) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +107 -103
  3. package/bin/morya-ui-setup.js +14 -14
  4. package/catalog/skills.json +46 -46
  5. package/package.json +1 -1
  6. package/src/cli.mjs +312 -335
  7. package/src/copy-template.mjs +78 -78
  8. package/src/fs-utils.mjs +24 -24
  9. package/src/install.mjs +134 -63
  10. package/src/mcp.mjs +50 -50
  11. package/src/package-json.mjs +30 -30
  12. package/src/skills.mjs +223 -223
  13. package/src/styles.mjs +119 -119
  14. package/template/.agents/skills/morya-ui-pages/SKILL.md +188 -164
  15. package/template/.agents/skills/morya-ui-pages/evals/evals.json +89 -89
  16. package/template/.agents/skills/morya-ui-pages/references/component-index.md +99 -99
  17. package/template/.agents/skills/morya-ui-pages/references/decision-recipes.md +104 -5
  18. package/template/.agents/skills/morya-ui-pages/references/design-system.md +101 -100
  19. package/template/.agents/skills/morya-ui-pages/references/feedback.md +68 -68
  20. package/template/.agents/skills/morya-ui-pages/references/optional-companions.md +62 -34
  21. package/template/.agents/skills/morya-ui-pages/references/page-layouts.md +133 -119
  22. package/template/.agents/skills/morya-ui-pages/references/review-checklist.md +63 -61
  23. package/template/.agents/skills/morya-ui-pages/references/style-presets.md +45 -0
  24. package/template/.agents/skills/morya-ui-pages/references/surfaces.md +91 -89
  25. package/template/.agents/skills/morya-ui-pages/references/visual-craft.md +129 -196
  26. package/template/.cursor/rules/coding-style.mdc +41 -41
  27. package/template/.cursor/rules/component-usage.mdc +41 -41
  28. package/template/.cursor/rules/design-system.mdc +17 -17
  29. package/template/.cursor/rules/page-layout.mdc +97 -78
  30. package/template/DESIGN.md +59 -59
  31. package/template/scripts/check-raw-colors.mjs +74 -74
@@ -1,119 +1,133 @@
1
- # Page layouts
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 | `list-page` |
8
- | Form (long / dedicated) | `form-page` |
9
- | List create/edit dialog | `form-in-dialog` |
10
- | Detail | `detail-page` |
11
- | Dashboard | `dashboard-page` |
12
- | Login | `login-page` |
13
- | Landing | `landing-page` |
14
- | Empty | `empty-state` |
15
- | Result / 403 / terminal | `result-page` |
16
- | Settings | `settings-page` |
17
- | Wizard | `wizard-form` |
18
-
19
- Via MCP: `recommend_page` → `get_golden_page`; local edits: `get_page_snippet` (`filters`, `toolbar`, `form-actions`, `scrollable-panel`, …).
20
-
21
- ## Product defaults
22
-
23
- - **Short create/edit** (about ≤8 fields, single section): same-page `MDialog` + `MForm` — do not invent a new route form for every entity.
24
- - **Long / multi-section / wizard**: dedicated form page (`form-page`) or `MDrawer`.
25
- - **One-line success/error**: `message` API; title + detail or async notify → `toast` (see [feedback.md](feedback.md)).
26
-
27
- ## List page — block order
28
-
29
- 1. `MLayout fillViewport` + optional `MLayoutSider bordered`
30
- 2. Sider `MMenu` (**every item has `icon`**)
31
- 3. `MLayoutHeader` → `MBreadcrumb`
32
- 4. `MLayoutContent` → `MPageContent`
33
- 5. `MPageHeader` — page title + `#actions` primary (**one** filled primary in viewport)
34
- 6. `MPageFilters` — `variant="filled"` optional; inner `MSpace wrap` + Input/Select + query/reset (query/reset → secondary); optional `collapsible` + `#advanced` for secondary fields
35
- 7. Optional `MPageFilterChips` + closable `MTag` when filters are applied (after filters, before table)
36
- 8. Optional `MPageToolbar` — batch actions only (no page title)
37
- 9. `MTable` directly in content (usually **no** wrapping `MCard`); status → `MStatus`; `#empty` → `MEmpty`
38
- 10. Pagination via `MTable` paginator or sibling `MPagination`
39
- 11. Short create/edit → `MDialog` + `MForm` on the same page (default)
40
-
41
- Craft: [visual-craft.md](visual-craft.md) § Ops polish.
42
-
43
- ## Form page — block order
44
-
45
- 1. `MLayout fillViewport` → `MLayoutHeader` → `MBreadcrumb`
46
- 2. `MPageContent width="narrow"`
47
- 3. `MPageHeader` (title + description)
48
- 4. `MPageSection variant="form"` → `MForm`
49
- 5. `MPageSection variant="actions"` — save (`primary`) + cancel (`secondary`)
50
-
51
- ## Dashboard — block order
52
-
53
- 1. `MLayout fillViewport` → `MLayoutHeader` → `MBreadcrumb`
54
- 2. `MPageContent density="spacious"` → `MPageHeader` (title + short domain description when useful)
55
- 3. KPI row: `MGrid` + `MPageStat` (4 columns or responsive) — real metric names, not “Metric 1”
56
- 4. Main split: `MCard shadow="always"` + `MEmpty` (chart pending) and/or recent `MTable` (row status → `MStatus`)
57
-
58
- Craft: spacious density + Ops polish; do not turn the first viewport into a marketing hero.
59
-
60
- ## Composition standards
61
-
62
- | Topic | Prefer | Usually avoid |
63
- | --- | --- | --- |
64
- | Shell | `MLayout fillViewport` + `MPageContent` | Padding on `MLayoutContent` |
65
- | Sections | `MPageFilters` / `MPageToolbar` / `MPageSection` | Custom `.page-*`; extra `MCard` wrappers |
66
- | List table | `MTable` in `MPageContent` | Border card solely to wrap the table |
67
- | Spacing | `MSpace` / `MFlex` for peers; page gap from `MPageContent` | Nested padded divs stacking gaps |
68
- | Scroll | Rely on layout scroll; explicit `MScrollbar` for local panes | Forcing overflow on every content slot |
69
- | Color | `--m-*` | Page-level hex / rgb |
70
- | Feedback | One-line → `message`; danger → confirm dialog | Toast for a single short string |
71
- | A11y | Labels + icon `aria-label` | Unlabeled icon controls |
72
-
73
- Inline style is acceptable for control widths (e.g. filter `width: 14rem`).
74
-
75
- ## Detail page — block order
76
-
77
- 1. Same admin chrome as list (breadcrumb → `MPageContent`)
78
- 2. `MPageHeader` — title, `MStatus` in `#actions` (or chip `MTag` for categories), primary/secondary/danger actions
79
- 3. Summary `MPageSection` + property `MCard` (definition grid with `--m-*` only)
80
- 4. Related data: `MCard` + `MTable` / tabs / timeline
81
- 5. Short edit → same-page `MDialog` (`form-in-dialog`); long edit → `form-page` / `MDrawer`
82
-
83
- Mirror MCP `get_golden_page` `detail-page`.
84
-
85
- ## List create/edit dialog — block order
86
-
87
- 1. Stay on the list page (`MPageHeader` + filters/table; optional batch `MPageToolbar`)
88
- 2. `MDialog` ~`28–36rem` + `MForm` fields
89
- 3. Actions in Dialog `#footer` (cancel secondary/text + save primary)
90
- 4. Success → `message.success` one-liner, then close
91
-
92
- Mirror MCP `get_golden_page` `form-in-dialog`.
93
-
94
- ## Settings page — block order
95
-
96
- 1. Admin chrome + `MPageContent width="narrow"`
97
- 2. `MPageHeader` (title + short description)
98
- 3. `MTabs` with **`v-model` + `:tabs`** (not `:items` / `:value`)
99
- 4. Per tab: `MPageSection variant="form"` + `MForm` + save in `variant="actions"`
100
- 5. Dangerous zone last: `severity="danger"` + confirm
101
-
102
- Mirror MCP `get_golden_page` `settings-page`.
103
-
104
- ## Wizard — block order
105
-
106
- 1. Narrow `MPageContent` + `MPageHeader`
107
- 2. `MStepper v-model` + **`:steps`** (not `:items`)
108
- 3. One form/job per step; sticky `上一步` / `下一步` / `创建`
109
- 4. Success → `result-page` / `MResult`
110
-
111
- Mirror MCP `get_golden_page` `wizard-form`.
112
-
113
- ## Hybrids
114
-
115
- - List + row edit dialog → `form-in-dialog` golden (or list golden + dialog body).
116
- - List + side detail → list + `MDrawer`.
117
- - Resource detail → `detail-page` golden.
118
- - Settings without admin chrome → still use `MPageContent` + `MPageSection`; omit sider only if the host app already provides chrome.
119
- - Non-Ops surfaces (auth, landing, empty, wizard) → [surfaces.md](surfaces.md), not these golden orders.
1
+ # Page layouts
2
+
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
+
25
+ ## Product defaults
26
+
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
+ - **One-line success/error**: `message` API; title + detail or async notify → `toast` (see [feedback.md](feedback.md)).
30
+
31
+ ## List page — block order
32
+
33
+ 1. `MLayout fillViewport` + optional `MLayoutSider bordered` → snippet `layout-app-shell`
34
+ 2. Sider `MMenu` (**every item has `icon`**)
35
+ 3. `MLayoutHeader` → `MBreadcrumb`
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
+ 10. Pagination via `MTable paginator` or sibling `MPagination`
43
+ 11. Short create/edit → same-page `MDialog` + `MForm` → **`form-in-dialog`**; delete → **`confirm-delete`**
44
+
45
+ ### List height — decide, don’t always fill
46
+
47
+ Use **`MPageContent fill` + `MTable fill paginator`** only when **most** of these are true:
48
+
49
+ - The screen is a **full-viewport admin list** (`MLayout fillViewport`) whose **main job** is browsing one data table
50
+ - Leaving the table content-sized would leave a large empty band with pagination floating mid-page
51
+ - You want **table-body scroll** and pagination pinned to the **bottom of the page**
52
+
53
+ Skip `fill` when any of these apply:
54
+
55
+ - Embedded / secondary tables (dashboard “recent”, detail related lists, cards)
56
+ - Short or sparse pages where a content-sized table looks fine
57
+ - The page should **scroll as a whole document** (long filters + notes + table)
58
+ - Tables inside `MDialog` / `MDrawer`
59
+ - Mixed layouts where the table is not the sole middle region
60
+
61
+ Do not invent `min-height` / `calc` hacks when `fill` is the right tool — and do not force `fill` when it isn’t.
62
+
63
+ Craft: [visual-craft.md](visual-craft.md) § Ops polish.
64
+
65
+ ## Form page — block order
66
+
67
+ 1. `MLayout fillViewport` → `MLayoutHeader` → `MBreadcrumb`
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
+
73
+ ## Dashboard — block order
74
+
75
+ 1. `MLayout fillViewport` → `MLayoutHeader` → `MBreadcrumb`
76
+ 2. `MPageContent density="spacious"` → `MPageHeader` (title + short domain description when useful)
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
+
80
+ Craft: spacious density + Ops polish; do not turn the first viewport into a marketing hero.
81
+
82
+ ## Composition standards
83
+
84
+ | Topic | Prefer | Usually avoid |
85
+ | --- | --- | --- |
86
+ | Shell | `MLayout fillViewport` + `MPageContent` | Padding on `MLayoutContent` |
87
+ | Sections | `MPageFilters` / `MPageToolbar` / `MPageSection` | Custom `.page-*`; extra `MCard` wrappers |
88
+ | List table | `MTable` in `MPageContent`; add `fill` only when the height rule applies | Border card solely to wrap the table; forcing `fill` on every table |
89
+ | Spacing | `MSpace` / `MFlex` for peers; page gap from `MPageContent` | Nested padded divs stacking gaps |
90
+ | Scroll | Full-viewport main lists may use table-body scroll via `fill`; otherwise layout / local `MScrollbar` | Forcing overflow on every content slot; stacked page + table scrollbars without reason |
91
+ | Color | `--m-*` | Page-level hex / rgb |
92
+ | Feedback | One-line → `message`; danger → confirm dialog | Toast for a single short string |
93
+ | A11y | Labels + icon `aria-label` | Unlabeled icon controls |
94
+
95
+ Inline style is acceptable for control widths (e.g. filter `width: 14rem`).
96
+
97
+ ## Detail page — block order
98
+
99
+ 1. Same admin chrome as list (breadcrumb → `MPageContent`)
100
+ 2. `MPageHeader` — title, `MStatus` in `#actions`, primary/secondary/danger → `detail-toolbar`
101
+ 3. Summary `MPageSection` + property `MCard` (definition grid with `--m-*` only)
102
+ 4. Related data: `MCard` + `MTable` / tabs / timeline
103
+ 5. Short edit → `form-in-dialog`; long edit → form page / `form-in-drawer`
104
+
105
+ ## List create/edit dialog — block order
106
+
107
+ 1. Stay on the list page (`MPageHeader` + filters/table; optional batch `MPageToolbar`)
108
+ 2. `MDialog` ~`28–36rem` + `MForm` fields → snippet **`form-in-dialog`**
109
+ 3. Actions in Dialog `#footer` (cancel secondary/text + save primary)
110
+ 4. Success → `message.success` one-liner, then close
111
+
112
+ ## Settings page — block order
113
+
114
+ 1. Admin chrome + `MPageContent width="narrow"`
115
+ 2. `MPageHeader` (title + short description)
116
+ 3. `MTabs` with **`v-model` + `:tabs`** (not `:items` / `:value`)
117
+ 4. Per tab: `MPageSection variant="form"` + `MForm` + save in `variant="actions"`
118
+ 5. Dangerous zone last: `severity="danger"` + confirm
119
+
120
+ ## Wizard — block order
121
+
122
+ 1. Narrow `MPageContent` + `MPageHeader`
123
+ 2. `MStepper v-model` + **`:steps`** (not `:items`) → snippet **`wizard-steps`**
124
+ 3. One form/job per step; sticky `上一步` / `下一步` / `创建`
125
+ 4. Success → `result-block` / `MResult`
126
+
127
+ ## Hybrids
128
+
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`.
132
+ - Settings without admin chrome → still use `MPageContent` + `MPageSection`; omit sider only if the host app already provides chrome.
133
+ - Non-Ops surfaces (auth, landing, empty, wizard) → [surfaces.md](surfaces.md) + matching snippets, not Ops list chrome.
@@ -1,61 +1,63 @@
1
- # Review checklist
2
-
3
- ## Contract (all lanes)
4
-
5
- - [ ] Only `morya-ui` UI primitives (no second kit)
6
- - [ ] `morya-ui/styles.css` imported at app/demo entry
7
- - [ ] `MConfigProvider` at a sensible root when building a full screen
8
- - [ ] No invented props / events / slots (MCP `get_component` / docs checked)
9
- - [ ] MCP **`validate_usage`** run; no unresolved `unknown-prop` / `unknown-event`
10
- - [ ] Select vs Dropdown roles correct
11
- - [ ] `MTable` uses `rows` (not `data`)
12
- - [ ] One-line results use `message`; summary+detail / async use `toast`
13
- - [ ] Destructive flows use confirm dialogs
14
- - [ ] MCP **`validate_page`** run when generating a full page (advisory suggestions addressed or consciously waived)
15
-
16
- ## Craft (all lanes — default pass)
17
-
18
- - [ ] Lane craft from [visual-craft.md](visual-craft.md) applied (Ops polish and/or atmosphere)
19
- - [ ] At most one primary filled button in the main viewport
20
- - [ ] Copy is domain-real; empty / error states say what to do next
21
- - [ ] No AI-default look clusters unless the brief asked for them
22
- - [ ] Motion (if any) is 1–3 intentional moments and follows `useMotion` / `data-m-motion` (not OS `prefers-reduced-motion`)
23
-
24
- ## Ops
25
-
26
- - [ ] Matches golden / [page-layouts.md](page-layouts.md) block order
27
- - [ ] `MPage*` used instead of ad-hoc page chrome where applicable
28
- - [ ] Tables not wrapped in decorative `MCard` solely for borders
29
- - [ ] Filters / toolbar / form actions follow documented patterns
30
- - [ ] Sider `MMenu` items have icons; status cells use `MStatus` (not decorative `MTag`)
31
- - [ ] Empty table uses `MEmpty` (or equivalent next-action empty)
32
- - [ ] No marketing hero bolted onto a CRUD shell
33
-
34
- ## Account / Flow / System
35
-
36
- - [ ] Primary CTA obvious; escape paths present (back / home / support)
37
- - [ ] Auth errors stay on the form via field `errorMessage` or a token `role="alert"` (`<MMessage>` is the message host, not an inline alert)
38
- - [ ] Empty uses `MEmpty` (or table `#empty` with `MEmpty`); success / HTTP errors use `MResult`
39
- - [ ] Empty / success states tell the user the next action
40
- - [ ] Inline status prefers `MStatus`; chip-like labels use `MTag`
41
- - [ ] Wizard steps: one job each; actions labeled clearly
42
- - [ ] Brand / empty atmosphere uses token-only CSS (see visual-craft recipes)
43
-
44
- ## Express
45
-
46
- - [ ] Short design plan existed (subject, palette roles, signature)
47
- - [ ] First viewport has one job (not a dashboard of promos)
48
- - [ ] Controls still `M*`; colors/spacing map to `--m-*` / theme
49
- - [ ] Avoided AI-default looks unless brief requested them ([visual-craft.md](visual-craft.md))
50
- - [ ] Motion limited and respectful of reduced-motion
51
-
52
- ## Tokens, a11y, responsive
53
-
54
- - [ ] No raw hex/rgb theme colors in new CSS (control widths OK inline; `color-mix` from `--m-*` OK)
55
- - [ ] Labels visible; icon buttons have `aria-label`
56
- - [ ] Usable on a narrow viewport
57
- - [ ] Focus visible on interactive elements
58
-
59
- When MCP is available, contract checks above (**`validate_usage`** / **`validate_page`**) are required — not optional.
60
-
61
- If the project has `pnpm check:colors`, suggest running it after edits.
1
+ # Review checklist
2
+
3
+ ## Contract (all lanes)
4
+
5
+ - [ ] Only `morya-ui` UI primitives (no second kit)
6
+ - [ ] `morya-ui/styles.css` imported at app/demo entry
7
+ - [ ] `MConfigProvider` at a sensible root when building a full screen
8
+ - [ ] No invented props / events / slots (MCP `get_component` / docs checked)
9
+ - [ ] MCP **`validate_usage`** run; no unresolved `unknown-prop` / `unknown-event`
10
+ - [ ] Select vs Dropdown roles correct
11
+ - [ ] `MTable` uses `rows` (not `data`)
12
+ - [ ] One-line results use `message`; summary+detail / async use `toast`
13
+ - [ ] Destructive flows use confirm dialogs
14
+ - [ ] MCP **`validate_page`** run when generating a full page (advisory suggestions addressed or consciously waived)
15
+
16
+ ## Craft (all lanes — default pass)
17
+
18
+ - [ ] Style direction resolved: followed user reference/description, or inferred from clear cues, or **asked** when uncertain — never silent invent; **no preset catalog**
19
+ - [ ] Lane craft from [visual-craft.md](visual-craft.md) applied
20
+ - [ ] If companions ran: still only `M*` + `--m-*`; no second kit ([optional-companions.md](optional-companions.md))
21
+ - [ ] At most one primary filled button in the main viewport
22
+ - [ ] Copy is domain-real; empty / error states say what to do next
23
+ - [ ] No AI-default look clusters unless the user/reference asked for them
24
+ - [ ] No unearned atmosphere: stacked radial+linear washes, purple mesh, frosted glass, neon glow stacks
25
+ - [ ] Motion (if any) is 1–3 intentional moments and follows `useMotion` / `data-m-motion`
26
+
27
+ ## Ops
28
+
29
+ - [ ] Matches [page-layouts.md](page-layouts.md) block order (snippets composed; golden page optional check only)
30
+ - [ ] `MPage*` used instead of ad-hoc page chrome where applicable
31
+ - [ ] List height: if this is a full-viewport main data list, consider `MPageContent fill` + `MTable fill`; if embedded/short/document-scroll, skip `fill`
32
+ - [ ] Tables not wrapped in decorative `MCard` solely for borders
33
+ - [ ] Filters / toolbar / form actions follow documented patterns
34
+ - [ ] Sider `MMenu` items have icons; status cells use `MStatus` (not decorative `MTag`)
35
+ - [ ] Empty table uses `MEmpty` (or equivalent next-action empty)
36
+ - [ ] No marketing hero bolted onto a CRUD shell
37
+
38
+ ## Account / Flow / System
39
+
40
+ - [ ] Primary CTA obvious; escape paths present (back / home / support)
41
+ - [ ] Auth errors stay on the form via field `errorMessage` or a token `role="alert"`
42
+ - [ ] Empty uses `MEmpty`; success / HTTP errors use `MResult`
43
+ - [ ] Brand / empty atmosphere follows the **resolved direction** (defaults are flat token shells)
44
+ - [ ] Wizard steps: one job each; actions labeled clearly
45
+
46
+ ## Express
47
+
48
+ - [ ] Short design plan existed (subject, palette roles, signature)
49
+ - [ ] First viewport has one job
50
+ - [ ] Controls still `M*`; colors/spacing map to `--m-*`
51
+ - [ ] Avoided AI-default looks unless user/reference requested them
52
+ - [ ] Motion limited and gated by `useMotion` / `data-m-motion`
53
+
54
+ ## Tokens, a11y, responsive
55
+
56
+ - [ ] No raw hex/rgb theme colors in new CSS (control widths OK inline; `color-mix` from `--m-*` OK)
57
+ - [ ] Labels visible; icon buttons have `aria-label`
58
+ - [ ] Usable on a narrow viewport
59
+ - [ ] Focus visible on interactive elements
60
+
61
+ When MCP is available, contract checks (**`validate_usage`** / **`validate_page`**) are required.
62
+
63
+ If the project has `pnpm check:colors`, suggest running it after edits.
@@ -0,0 +1,45 @@
1
+ # Style direction (no preset catalog)
2
+
3
+ Golden pages lock **block order and APIs**. They are **not** the only allowed look. There is **no** named style-preset table (`simple` / `glass` / …). Resolve the look from the **user**, then map onto `M*` + `--m-*`.
4
+
5
+ ## Resolution order (required)
6
+
7
+ 1. **User reference or explicit description (highest)**
8
+ Screenshot / mock / existing page / URL / “像 XX”, or clear words (“毛玻璃一点”、“深蓝科技风”).
9
+ **Must follow.** Remap to `--m-*` + `M*`. Do not switch kits, do not “improve” into another face.
10
+
11
+ 2. **Clear prompt cues (when not explicit)**
12
+ Industry / mood words in the brief → infer and **state your reading in one sentence**.
13
+ Decorative glass / neon / full-page gradients only when the prompt clearly asks.
14
+
15
+ 3. **Uncertain → ask (required)**
16
+ No reference, vague cues → **ask once** for a short description or a reference.
17
+ Do not invent the full look in silence.
18
+
19
+ 4. **Only if user declines**
20
+ “你看着办 / 直接写” with still no cues → quiet flat on-token admin face, **say so**, continue.
21
+ Never default to aurora / neon / unsolicited glass / cream-serif-terracotta.
22
+
23
+ MCP: `get_style_direction` / `recommend_page({ style? })` → `styleDirection`.
24
+ `resolution: "ask"` means **ask the user**, not free-style.
25
+
26
+ ## What `style` means
27
+
28
+ - Free-text from the user (or a short paraphrase of their reference).
29
+ - **Not** a preset id.
30
+ - Optional craft cues for list goldens only: words like `dense` / `compact` / `高密` → `list-page-dense`; `rail` / `品牌侧栏` → `list-page-rail`.
31
+
32
+ ## Anti-defaults (unless user/reference asks)
33
+
34
+ - Purple→indigo / aurora / mesh washes
35
+ - Warm cream + serif + terracotta kit
36
+ - Broadsheet newspaper columns
37
+ - Unsolicited glassmorphism, neon glow stacks, neumorph on dense tables
38
+ - Companion “atmosphere” that overrides the user’s words
39
+
40
+ ## How to apply
41
+
42
+ 1. Mirror golden **structure** via `recommend_page` / `get_golden_page`.
43
+ 2. Apply the resolved direction with tokens + layout/type — see [visual-craft.md](visual-craft.md).
44
+ 3. Run Ops polish when on Operate surfaces.
45
+ 4. Companions deepen **inside** the resolved direction only ([optional-companions.md](optional-companions.md)).