@morya-ui/setup 0.3.3 → 0.3.4
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.
- package/README.md +103 -103
- package/bin/morya-ui-setup.js +14 -14
- package/catalog/skills.json +46 -46
- package/package.json +5 -3
- package/src/cli.mjs +335 -335
- package/src/copy-template.mjs +78 -78
- package/src/fs-utils.mjs +24 -24
- package/src/install.mjs +63 -63
- package/src/mcp.mjs +50 -50
- package/src/package-json.mjs +30 -30
- package/src/skills.mjs +223 -223
- package/src/styles.mjs +119 -119
- package/template/.agents/skills/morya-ui-pages/SKILL.md +184 -164
- package/template/.agents/skills/morya-ui-pages/evals/evals.json +89 -89
- package/template/.agents/skills/morya-ui-pages/references/component-index.md +99 -99
- package/template/.agents/skills/morya-ui-pages/references/decision-recipes.md +32 -0
- package/template/.agents/skills/morya-ui-pages/references/design-system.md +101 -100
- package/template/.agents/skills/morya-ui-pages/references/feedback.md +68 -68
- package/template/.agents/skills/morya-ui-pages/references/optional-companions.md +107 -34
- package/template/.agents/skills/morya-ui-pages/references/page-layouts.md +141 -119
- package/template/.agents/skills/morya-ui-pages/references/review-checklist.md +64 -61
- package/template/.agents/skills/morya-ui-pages/references/style-presets.md +73 -0
- package/template/.agents/skills/morya-ui-pages/references/surfaces.md +91 -89
- package/template/.agents/skills/morya-ui-pages/references/visual-craft.md +221 -196
- package/template/.cursor/rules/coding-style.mdc +41 -41
- package/template/.cursor/rules/component-usage.mdc +41 -41
- package/template/.cursor/rules/design-system.mdc +17 -17
- package/template/.cursor/rules/page-layout.mdc +97 -78
- package/template/DESIGN.md +59 -59
- package/template/scripts/check-raw-colors.mjs +74 -74
- package/LICENSE +0 -21
|
@@ -1,89 +1,91 @@
|
|
|
1
|
-
# Surface taxonomy
|
|
2
|
-
|
|
3
|
-
Pick a lane, then a surface. Prefer project golden pages for **Ops**; use the recipes below for everything else. Always implement interactive controls with `morya-ui`.
|
|
4
|
-
|
|
5
|
-
## Ops (admin / console)
|
|
6
|
-
|
|
7
|
-
| Surface | Job | Compose from |
|
|
8
|
-
| --- | --- | --- |
|
|
9
|
-
| List | Scan, filter, act on many rows | Golden list + [page-layouts.md](page-layouts.md); **create/edit with ≤~8 fields → `MDialog` on the list** |
|
|
10
|
-
| Form | Create / edit one entity as a **dedicated page** | Golden form — only when multi-section, many fields, or user asked for an independent form route |
|
|
11
|
-
| Dashboard | Orient + jump to work | Golden dashboard |
|
|
12
|
-
| Detail | Read-heavy record + secondary actions | `MPageHeader` + sections via `MCard`/`MPageSection`; edit via `MDialog` / `MDrawer` (prefer over a second form route) |
|
|
13
|
-
| Settings | Grouped preferences | Narrow `MPageContent` + stacked `MPageSection` / `MTabs` + `MForm` |
|
|
14
|
-
| Hybrid list | List + drawer/dialog | **Default Ops CRUD pattern**: list golden + `MDialog`/`MDrawer` form |
|
|
15
|
-
|
|
16
|
-
## Account
|
|
17
|
-
|
|
18
|
-
| Surface | Job | Recipe |
|
|
19
|
-
| --- | --- | --- |
|
|
20
|
-
| Login / register | Authenticate with trust | Golden: MCP `get_golden_page` `login-page` — split brand + `MForm` (`MInput`, `MInputPassword`); form-level errors via token `role="alert"` (not Toast). Brand wash: [visual-craft.md](visual-craft.md) § Atmosphere |
|
|
21
|
-
| Invite / accept | Join org | Same shell; show org name clearly |
|
|
22
|
-
| Forgot / reset | Recover access | Short form + success state with next step |
|
|
23
|
-
| Profile / account | Edit self | Settings-like sections; avatar via `MAvatar` |
|
|
24
|
-
|
|
25
|
-
Keep credential forms quiet: one primary CTA, clear labels, no decorative noise beside the brand panel.
|
|
26
|
-
|
|
27
|
-
## Flow
|
|
28
|
-
|
|
29
|
-
| Surface | Job | Recipe |
|
|
30
|
-
| --- | --- | --- |
|
|
31
|
-
| Empty state | Invite first action | Golden: MCP `get_golden_page` `empty-state` — `MEmpty` + primary/secondary `MButton` in `#extra`; dashed shell + radial wash from visual-craft |
|
|
32
|
-
| Onboarding | Teach the product path | `MStepper` or paced cards; one decision per step; finish → Ops home |
|
|
33
|
-
| Wizard | Multi-step create | `MStepper` + `MForm` per step + sticky actions (`上一步` / `下一步` / `提交`) |
|
|
34
|
-
| Success / result | Confirm completion | `MResult status="success"` / `error` + `#footer` next actions (`查看详情` / `返回列表`); same shell idea as `result-page` |
|
|
35
|
-
|
|
36
|
-
Copy must tell the user **what to do next**, not celebrate the system.
|
|
37
|
-
|
|
38
|
-
## System
|
|
39
|
-
|
|
40
|
-
| Surface | Job | Recipe |
|
|
41
|
-
| --- | --- | --- |
|
|
42
|
-
| Permission denied | Explain + escape | Golden: MCP `get_golden_page` `result-page` — `MResult status="403"` + `#footer` (not `#extra`) |
|
|
43
|
-
| 404 / not found | Reorient | `MResult status="404"` + `返回首页` / `返回上一页` (mirror `result-page` shell) |
|
|
44
|
-
| Maintenance / error | Honest status | `MResult status="500"`; what happened + retry + support. Persistent form errors: field `errorMessage` or a token `role="alert"`, not `<MMessage>` as an alert |
|
|
45
|
-
|
|
46
|
-
Avoid witty 404 essays that hide the exit paths.
|
|
47
|
-
|
|
48
|
-
## Express (marketing / public)
|
|
49
|
-
|
|
50
|
-
Use when the brief is landing, pricing, launch, or docs marketing — **not** for Ops CRUD shells.
|
|
51
|
-
|
|
52
|
-
| Surface | Job | Recipe |
|
|
53
|
-
| --- | --- | --- |
|
|
54
|
-
| Landing | Convert / explain product | Golden: MCP `get_golden_page` `landing-page` — one-job hero; CTAs → `MButton`; chips → `MTag`; FAQ → `MAccordion` |
|
|
55
|
-
| Pricing | Choose a plan | Clear plan cards (`MCard`) + primary CTA; highlight recommended plan without clutter |
|
|
56
|
-
| Feature showcase | Prove capability | Alternating media/copy; live `M*` demo only if lightweight |
|
|
57
|
-
| Docs marketing chrome | Frame documentation | Header + nav using `M*` where suitable; content area stays readable |
|
|
58
|
-
|
|
59
|
-
Before coding Express: short design plan in [visual-craft.md](visual-craft.md). Map colors to `--m-*` / theme overrides; do not paste a second kit.
|
|
60
|
-
|
|
61
|
-
**Anti-patterns for Express:** inset hero cards instead of a full-bleed thesis; pill-stat strips in the first viewport; purple-on-white / cream-terracotta / broadsheet defaults when the brief did not ask for them.
|
|
62
|
-
|
|
63
|
-
## Overlay
|
|
64
|
-
|
|
65
|
-
When the dialog/drawer **is** the task:
|
|
66
|
-
|
|
67
|
-
| Surface | Recipe |
|
|
68
|
-
| --- | --- |
|
|
69
|
-
| Edit / create dialog | `MDialog` + compact `MForm` + footer actions |
|
|
70
|
-
| Detail drawer | `MDrawer` + header + sections + optional edit |
|
|
71
|
-
| Confirm | `MConfirmDialog` / `MConfirmPopup` — do not reinvent |
|
|
72
|
-
| Command menu | `MCommandMenu` for keyboard-first jump / actions |
|
|
73
|
-
|
|
74
|
-
Host page stays stable; focus management comes from the overlay component.
|
|
75
|
-
|
|
76
|
-
## Lane mixing
|
|
77
|
-
|
|
78
|
-
| Ask | Treat as |
|
|
79
|
-
| --- | --- |
|
|
80
|
-
| “后台列表 + 好看一点” | Ops
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
1
|
+
# Surface taxonomy
|
|
2
|
+
|
|
3
|
+
Pick a lane, then a surface. Prefer project golden pages for **Ops**; use the recipes below for everything else. Always implement interactive controls with `morya-ui`.
|
|
4
|
+
|
|
5
|
+
## Ops (admin / console)
|
|
6
|
+
|
|
7
|
+
| Surface | Job | Compose from |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| List | Scan, filter, act on many rows | Golden list + [page-layouts.md](page-layouts.md); **create/edit with ≤~8 fields → `MDialog` on the list** |
|
|
10
|
+
| Form | Create / edit one entity as a **dedicated page** | Golden form — only when multi-section, many fields, or user asked for an independent form route |
|
|
11
|
+
| Dashboard | Orient + jump to work | Golden dashboard |
|
|
12
|
+
| Detail | Read-heavy record + secondary actions | `MPageHeader` + sections via `MCard`/`MPageSection`; edit via `MDialog` / `MDrawer` (prefer over a second form route) |
|
|
13
|
+
| Settings | Grouped preferences | Narrow `MPageContent` + stacked `MPageSection` / `MTabs` + `MForm` |
|
|
14
|
+
| Hybrid list | List + drawer/dialog | **Default Ops CRUD pattern**: list golden + `MDialog`/`MDrawer` form |
|
|
15
|
+
|
|
16
|
+
## Account
|
|
17
|
+
|
|
18
|
+
| Surface | Job | Recipe |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| Login / register | Authenticate with trust | Golden: MCP `get_golden_page` `login-page` — split brand + `MForm` (`MInput`, `MInputPassword`); form-level errors via token `role="alert"` (not Toast). Brand wash: [visual-craft.md](visual-craft.md) § Atmosphere |
|
|
21
|
+
| Invite / accept | Join org | Same shell; show org name clearly |
|
|
22
|
+
| Forgot / reset | Recover access | Short form + success state with next step |
|
|
23
|
+
| Profile / account | Edit self | Settings-like sections; avatar via `MAvatar` |
|
|
24
|
+
|
|
25
|
+
Keep credential forms quiet: one primary CTA, clear labels, no decorative noise beside the brand panel.
|
|
26
|
+
|
|
27
|
+
## Flow
|
|
28
|
+
|
|
29
|
+
| Surface | Job | Recipe |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| Empty state | Invite first action | Golden: MCP `get_golden_page` `empty-state` — `MEmpty` + primary/secondary `MButton` in `#extra`; dashed shell + radial wash from visual-craft |
|
|
32
|
+
| Onboarding | Teach the product path | `MStepper` or paced cards; one decision per step; finish → Ops home |
|
|
33
|
+
| Wizard | Multi-step create | `MStepper` + `MForm` per step + sticky actions (`上一步` / `下一步` / `提交`) |
|
|
34
|
+
| Success / result | Confirm completion | `MResult status="success"` / `error` + `#footer` next actions (`查看详情` / `返回列表`); same shell idea as `result-page` |
|
|
35
|
+
|
|
36
|
+
Copy must tell the user **what to do next**, not celebrate the system.
|
|
37
|
+
|
|
38
|
+
## System
|
|
39
|
+
|
|
40
|
+
| Surface | Job | Recipe |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| Permission denied | Explain + escape | Golden: MCP `get_golden_page` `result-page` — `MResult status="403"` + `#footer` (not `#extra`) |
|
|
43
|
+
| 404 / not found | Reorient | `MResult status="404"` + `返回首页` / `返回上一页` (mirror `result-page` shell) |
|
|
44
|
+
| Maintenance / error | Honest status | `MResult status="500"`; what happened + retry + support. Persistent form errors: field `errorMessage` or a token `role="alert"`, not `<MMessage>` as an alert |
|
|
45
|
+
|
|
46
|
+
Avoid witty 404 essays that hide the exit paths.
|
|
47
|
+
|
|
48
|
+
## Express (marketing / public)
|
|
49
|
+
|
|
50
|
+
Use when the brief is landing, pricing, launch, or docs marketing — **not** for Ops CRUD shells.
|
|
51
|
+
|
|
52
|
+
| Surface | Job | Recipe |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| Landing | Convert / explain product | Golden: MCP `get_golden_page` `landing-page` — one-job hero; CTAs → `MButton`; chips → `MTag`; FAQ → `MAccordion` |
|
|
55
|
+
| Pricing | Choose a plan | Clear plan cards (`MCard`) + primary CTA; highlight recommended plan without clutter |
|
|
56
|
+
| Feature showcase | Prove capability | Alternating media/copy; live `M*` demo only if lightweight |
|
|
57
|
+
| Docs marketing chrome | Frame documentation | Header + nav using `M*` where suitable; content area stays readable |
|
|
58
|
+
|
|
59
|
+
Before coding Express: short design plan in [visual-craft.md](visual-craft.md). Map colors to `--m-*` / theme overrides; do not paste a second kit.
|
|
60
|
+
|
|
61
|
+
**Anti-patterns for Express:** inset hero cards instead of a full-bleed thesis; pill-stat strips in the first viewport; purple-on-white / cream-terracotta / broadsheet defaults when the brief did not ask for them.
|
|
62
|
+
|
|
63
|
+
## Overlay
|
|
64
|
+
|
|
65
|
+
When the dialog/drawer **is** the task:
|
|
66
|
+
|
|
67
|
+
| Surface | Recipe |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| Edit / create dialog | `MDialog` + compact `MForm` + footer actions |
|
|
70
|
+
| Detail drawer | `MDrawer` + header + sections + optional edit |
|
|
71
|
+
| Confirm | `MConfirmDialog` / `MConfirmPopup` — do not reinvent |
|
|
72
|
+
| Command menu | `MCommandMenu` for keyboard-first jump / actions |
|
|
73
|
+
|
|
74
|
+
Host page stays stable; focus management comes from the overlay component.
|
|
75
|
+
|
|
76
|
+
## Lane mixing
|
|
77
|
+
|
|
78
|
+
| Ask | Treat as |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| “后台列表 + 好看一点” | Ops + pick a non-quiet preset (`soft`/`studio`) or ask once |
|
|
81
|
+
| “像附件截图一样” | Reference-first style resolution; still M* + `--m-*` |
|
|
82
|
+
| “登录页有品牌感” | Account + Express craft on brand panel only |
|
|
83
|
+
| “产品官网” | Express; Ops patterns do not apply |
|
|
84
|
+
| “空状态设计精致一点” | Flow empty + visual-craft signature (one risk) |
|
|
85
|
+
|
|
86
|
+
## MCP hints
|
|
87
|
+
|
|
88
|
+
- Ops whole page: `recommend_page({ style? })` → `get_golden_page` → apply `styleDirection` / reference
|
|
89
|
+
- Styles: `list_style_presets` / `get_style_preset`
|
|
90
|
+
- Section: `get_page_snippet`
|
|
91
|
+
- Any lane: `search` / `get_component` before unfamiliar APIs
|
|
@@ -1,196 +1,221 @@
|
|
|
1
|
-
# Visual craft (distilled)
|
|
2
|
-
|
|
3
|
-
Portable craft for morya-ui consumers. Inspired by **Frontend Design**, **Impeccable**, and **UI-UX-Pro-Max** — without requiring those skills to be installed. Implementation must still honor the morya-ui contract.
|
|
4
|
-
|
|
5
|
-
## When to lean on craft
|
|
6
|
-
|
|
7
|
-
| Lane | Craft intensity | Default pass |
|
|
8
|
-
| --- | --- | --- |
|
|
9
|
-
| Ops CRUD | Low — clarity, density, golden structure | **Always** run § Ops polish |
|
|
10
|
-
| Account / Flow / System | Medium — trust, hierarchy, one calm brand cue | **Always** run § Atmosphere recipes when relevant |
|
|
11
|
-
| Express | High — design plan + one signature risk | **Always** run design plan + anti-defaults |
|
|
12
|
-
|
|
13
|
-
Do **not** skip craft because the page is “just admin”. Polished Ops is quiet, aligned, and specific — not decorative.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
border-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
1
|
+
# Visual craft (distilled)
|
|
2
|
+
|
|
3
|
+
Portable craft for morya-ui consumers. Inspired by **Frontend Design**, **Impeccable**, and **UI-UX-Pro-Max** — without requiring those skills to be installed. Implementation must still honor the morya-ui contract.
|
|
4
|
+
|
|
5
|
+
## When to lean on craft
|
|
6
|
+
|
|
7
|
+
| Lane | Craft intensity | Default pass |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| Ops CRUD | Low — clarity, density, golden structure | **Always** run § Ops polish |
|
|
10
|
+
| Account / Flow / System | Medium — trust, hierarchy, one calm brand cue | **Always** run § Atmosphere recipes when relevant |
|
|
11
|
+
| Express | High — design plan + one signature risk | **Always** run design plan + anti-defaults |
|
|
12
|
+
|
|
13
|
+
Do **not** skip craft because the page is “just admin”. Polished Ops is quiet, aligned, and specific — not decorative.
|
|
14
|
+
|
|
15
|
+
**Style is not fixed to the golden look.** Resolve direction first ([style-presets.md](style-presets.md)): reference → named preset → prompt cues → offer a choice. Golden pages define structure; presets / references define craft variety so pages do not all look stiff and identical.
|
|
16
|
+
|
|
17
|
+
Market skills (**Frontend Design**, **Impeccable**, **UI-UX-Pro-Max**) deepen taste when installed — see [optional-companions.md](optional-companions.md). This file keeps a **distilled** subset so the skill stays standalone.
|
|
18
|
+
|
|
19
|
+
## Companion bridge (distilled)
|
|
20
|
+
|
|
21
|
+
Use these even when companions are **not** installed. If they **are** installed, run the matching companion pass **after** structure + contract, then remediate with `M*` + `--m-*`.
|
|
22
|
+
|
|
23
|
+
### Subject first (Frontend Design)
|
|
24
|
+
|
|
25
|
+
- Name a concrete **subject**, **audience**, and **single job** before visual choices.
|
|
26
|
+
- Pull personality from the subject’s world (materials, artifacts, vernacular) — not from a generic “SaaS admin” mood board.
|
|
27
|
+
- **One signature risk** per surface; everything else quieter (Chanel: remove one accessory).
|
|
28
|
+
|
|
29
|
+
### Mode (Impeccable)
|
|
30
|
+
|
|
31
|
+
| Mode | Use when | Craft budget |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| **Operate** | Ops lists, forms, settings, tools | Clarity, density, style preset; no marketing hero |
|
|
34
|
+
| **Persuade** | Landing, pricing, campaign | Design plan + signature; controls still `M*` |
|
|
35
|
+
| **Read** | Docs / long detail | Typeset + measure; calm chrome |
|
|
36
|
+
| **Experience** | Gallery / showcase | Artifact leads; UI recedes |
|
|
37
|
+
|
|
38
|
+
### Design plan (Express & branded Account — Frontend Design)
|
|
39
|
+
|
|
40
|
+
Before code, decide:
|
|
41
|
+
|
|
42
|
+
1. **Color** — 4–6 roles (bg, surface, text, muted, accent, danger). Prefer existing `--m-*`. If the project already customizes theme, extend that system; do not invent a parallel hex soup in scoped CSS. (Companions may suggest hex — **map** them onto tokens.)
|
|
43
|
+
2. **Type** — display vs body vs utility. For Ops / Operate, stick to theme fonts. For Express / Persuade, a distinctive pairing is OK if fonts are loadable and fallbacks exist.
|
|
44
|
+
3. **Layout concept** — one sentence + rough hierarchy (ASCII wireframe optional). Structure encodes meaning; numbered `01/02/03` only when order is real information.
|
|
45
|
+
4. **Signature** — the single memorable element (motion, crop, editorial type, product artifact). Everything else quieter.
|
|
46
|
+
|
|
47
|
+
Critique the plan: if it looks like the plan you would write for *any* SaaS, revise until it fits **this** subject. Brief / reference / named style preset **wins** over companion defaults.
|
|
48
|
+
|
|
49
|
+
## Ops polish (baseline — every Operate / Ops page)
|
|
50
|
+
|
|
51
|
+
Apply after the golden block order is correct **and** a style direction is resolved. These are **required** baseline rules; presets may change density/chrome on top:
|
|
52
|
+
|
|
53
|
+
1. **One primary** — exactly one filled `severity="primary"` in the main viewport (usually toolbar create / form save). Query can be primary; reset stays secondary.
|
|
54
|
+
2. **Sider icons** — every top-level `MMenu` item has an `icon`; icons come from one set (built-in Tabler names). No random emoji.
|
|
55
|
+
3. **Status cells** — row business state → `MStatus` (dot + label). `MTag` only for categories, filters, or closable chips.
|
|
56
|
+
4. **Row actions** — secondary `text` / `outlined` / `size="small"`; danger only on destructive. Prefer `MSpace` with a consistent gap; avoid a wall of filled buttons.
|
|
57
|
+
5. **Filter rhythm** — search ~`14rem`, compact selects ~`10–12rem`; wrap with `MSpace wrap`. Do not stretch filters full-bleed. Secondary fields → `MPageFilters collapsible` + `#advanced`; active criteria → `MPageFilterChips` + closable `MTag`.
|
|
58
|
+
6. **Empty is designed** — `MEmpty` (or table `#empty` with `MEmpty`) with a next action; never a silent blank table or a lone muted sentence.
|
|
59
|
+
7. **No extra cards** — do not wrap `MPageFilters` / `MTable` in decorative `MCard` “for polish”. Dashboard chart/detail modules may use `MCard`.
|
|
60
|
+
8. **Domain copy** — column labels, placeholders, and empty titles use product vernacular, not “Name / Status / No data”.
|
|
61
|
+
9. **Density** — prefer theme default; use `size="small"` on dense tables inside cards. Do not invent a second spacing scale.
|
|
62
|
+
10. **Quiet chrome** — breadcrumb + toolbar title are enough hierarchy; skip marketing heroes, pill-stat strips, and glow on Ops shells.
|
|
63
|
+
|
|
64
|
+
Ops beauty = **alignment + semantics + restraint**, not gradients.
|
|
65
|
+
|
|
66
|
+
## Anti-default looks (AI clusters)
|
|
67
|
+
|
|
68
|
+
Avoid spending free axes on these unless the brief asks:
|
|
69
|
+
|
|
70
|
+
1. Warm cream (~`#F4F1EA`) + high-contrast serif + terracotta
|
|
71
|
+
2. Near-black + single acid-green / vermilion accent
|
|
72
|
+
3. Broadsheet: hairline rules, zero radius, dense newspaper columns
|
|
73
|
+
4. Purple-on-white / purple-to-indigo gradient SaaS cliché
|
|
74
|
+
5. Glow stacks, pill chip clouds, emoji as decoration, multi-layer shadows as personality
|
|
75
|
+
|
|
76
|
+
Also avoid: Inter/Roboto/Arial as the *expressive* display choice on Express surfaces when the brief allows character (utility UI may keep system/theme fonts).
|
|
77
|
+
|
|
78
|
+
## Hierarchy & composition
|
|
79
|
+
|
|
80
|
+
- **Hero is a thesis** (Express): one job in the first viewport — not stats + schedule + promos together.
|
|
81
|
+
- **Structure encodes meaning**: numbered steps only when order is real information.
|
|
82
|
+
- **Cards**: default off for Express heroes; use `MCard` when it groups an interaction or plan choice.
|
|
83
|
+
- **Motion**: orchestrate 2–3 intentional moments max; gate custom CSS motion with `[data-m-motion="full"]` (library intensity from `useMotion`). Prefer transform/opacity over layout thrash.
|
|
84
|
+
- **Density**: Ops may be compact; Express needs breathing room — match the lane.
|
|
85
|
+
|
|
86
|
+
## Atmosphere recipes (token-only)
|
|
87
|
+
|
|
88
|
+
Copy patterns, remap brand copy. **No hex.** Prefer `color-mix` / gradients from `--m-*`. See golden pages `login-page`, `landing-page`, `empty-state`.
|
|
89
|
+
|
|
90
|
+
### Account — split brand panel
|
|
91
|
+
|
|
92
|
+
```css
|
|
93
|
+
.login-brand {
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
justify-content: flex-end;
|
|
97
|
+
gap: var(--m-space-4);
|
|
98
|
+
padding: clamp(2rem, 6vw, 4.5rem);
|
|
99
|
+
background:
|
|
100
|
+
radial-gradient(
|
|
101
|
+
80% 60% at 10% 20%,
|
|
102
|
+
color-mix(in srgb, var(--m-color-primary) 22%, transparent),
|
|
103
|
+
transparent 55%
|
|
104
|
+
),
|
|
105
|
+
linear-gradient(
|
|
106
|
+
165deg,
|
|
107
|
+
color-mix(in srgb, var(--m-color-primary) 16%, var(--m-color-surface)) 0%,
|
|
108
|
+
var(--m-color-surface) 55%,
|
|
109
|
+
color-mix(in srgb, var(--m-color-border) 35%, var(--m-color-surface)) 100%
|
|
110
|
+
);
|
|
111
|
+
border-right: 1px solid var(--m-color-border);
|
|
112
|
+
}
|
|
113
|
+
.login-brand__title {
|
|
114
|
+
margin: 0;
|
|
115
|
+
max-width: 12em;
|
|
116
|
+
font-size: clamp(2rem, 4vw, 3rem);
|
|
117
|
+
font-weight: 650;
|
|
118
|
+
line-height: 1.15;
|
|
119
|
+
letter-spacing: -0.03em;
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Form side stays calm: one panel ~`22rem`, token `role="alert"` for form-level errors (not Toast, not `<MMessage severity>`).
|
|
124
|
+
|
|
125
|
+
### Express — hero plane
|
|
126
|
+
|
|
127
|
+
Full-bleed thesis: brand mark (small) → one headline → one lead → CTA group → **one** dominant visual (timeline, product artifact, or edge-to-edge wash). Atmosphere:
|
|
128
|
+
|
|
129
|
+
```css
|
|
130
|
+
.landing-hero__visual {
|
|
131
|
+
margin-top: var(--m-space-5);
|
|
132
|
+
padding: var(--m-space-5);
|
|
133
|
+
border: 1px solid var(--m-color-border);
|
|
134
|
+
border-radius: var(--m-radius-md);
|
|
135
|
+
background:
|
|
136
|
+
linear-gradient(
|
|
137
|
+
135deg,
|
|
138
|
+
color-mix(in srgb, var(--m-color-primary) 12%, var(--m-color-surface)),
|
|
139
|
+
var(--m-color-surface) 60%
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Optional micro-motion (one signature only):
|
|
145
|
+
|
|
146
|
+
```css
|
|
147
|
+
[data-m-motion="full"] .landing-hero__track span {
|
|
148
|
+
animation: m-craft-fade-up 480ms ease both;
|
|
149
|
+
}
|
|
150
|
+
[data-m-motion="full"] .landing-hero__track span:nth-child(2) { animation-delay: 60ms; }
|
|
151
|
+
[data-m-motion="full"] .landing-hero__track span:nth-child(3) { animation-delay: 120ms; }
|
|
152
|
+
[data-m-motion="full"] .landing-hero__track span:nth-child(4) { animation-delay: 180ms; }
|
|
153
|
+
@keyframes m-craft-fade-up {
|
|
154
|
+
from { opacity: 0; transform: translateY(0.4rem); }
|
|
155
|
+
to { opacity: 1; transform: translateY(0); }
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Flow — empty state shell
|
|
160
|
+
|
|
161
|
+
```css
|
|
162
|
+
.empty-state-shell {
|
|
163
|
+
border: 1px dashed color-mix(in srgb, var(--m-color-border) 80%, var(--m-color-primary));
|
|
164
|
+
border-radius: var(--m-radius-md);
|
|
165
|
+
background:
|
|
166
|
+
radial-gradient(
|
|
167
|
+
120% 80% at 50% 0%,
|
|
168
|
+
color-mix(in srgb, var(--m-color-primary) 10%, transparent),
|
|
169
|
+
transparent 55%
|
|
170
|
+
),
|
|
171
|
+
var(--m-color-surface);
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Pair with `MEmpty` + primary next step + optional secondary text button. One memory cue (icon / wash) — no emoji collage.
|
|
176
|
+
|
|
177
|
+
## UX writing
|
|
178
|
+
|
|
179
|
+
- Name controls by user intent (`保存更改`), not system guts (`提交表单实体`).
|
|
180
|
+
- Active voice; same verb through the flow (Publish → Published).
|
|
181
|
+
- Errors: what failed + how to fix; no vague apology.
|
|
182
|
+
- Empty states: invitation to act, not a dead end.
|
|
183
|
+
- Ops copy stays plain; Express may have voice, still specific to the product.
|
|
184
|
+
|
|
185
|
+
## Polish modes (Impeccable-inspired)
|
|
186
|
+
|
|
187
|
+
**Default:** after compose, run a lane-appropriate light pass (§ Ops polish and/or atmosphere / design plan).
|
|
188
|
+
|
|
189
|
+
When the user asks to improve an existing surface — or when `impeccable` is installed — pick a named mode:
|
|
190
|
+
|
|
191
|
+
| Mode | Intent | Companion command (if installed) |
|
|
192
|
+
| --- | --- | --- |
|
|
193
|
+
| `audit` | Hierarchy, contrast, a11y, spacing, anti-patterns — report then fix | `impeccable audit` / `critique` |
|
|
194
|
+
| `clarify` | Labels, errors, empty copy, button verbs | `impeccable clarify` |
|
|
195
|
+
| `quieter` | Remove competing accents, chips, shadows; keep one focus | `impeccable quieter` |
|
|
196
|
+
| `bolder` | Strengthen the signature / style preset only; do not shout everywhere | `impeccable bolder` |
|
|
197
|
+
| `typeset` | Scale, weight, line-length, truncation | `impeccable typeset` |
|
|
198
|
+
| `adapt` | Responsive breakpoints; touch targets | `impeccable adapt` |
|
|
199
|
+
| `delight` | One tasteful micro-interaction — never clutter | `impeccable delight` / `animate` |
|
|
200
|
+
| `polish` | Final ship pass: Ops polish + style cues + a11y basics | `impeccable polish` |
|
|
201
|
+
|
|
202
|
+
Always remediate with `M*` + tokens, not raw replacement controls. Full routing: [optional-companions.md](optional-companions.md).
|
|
203
|
+
|
|
204
|
+
## Industry / mood (UI-UX-Pro-Max-inspired)
|
|
205
|
+
|
|
206
|
+
For Express briefs that only say “modern / professional / playful”:
|
|
207
|
+
|
|
208
|
+
1. Infer industry from the product (fintech ≠ kids education).
|
|
209
|
+
2. Pick mood keywords (e.g. “editorial + precise”, “warm workshop”, “clinical calm”).
|
|
210
|
+
3. Map mood → [style preset](style-presets.md) and/or token roles and signature — **then** implement with morya-ui.
|
|
211
|
+
4. If `ui-ux-pro-max` is installed, use it for **keyword / palette search only**; discard any suggestion to switch stacks (shadcn, generic Tailwind kit, etc.).
|
|
212
|
+
|
|
213
|
+
## Quality floor (all lanes)
|
|
214
|
+
|
|
215
|
+
- Responsive to a usable mobile layout
|
|
216
|
+
- Visible `:focus-visible`
|
|
217
|
+
- Keyboard reaches primary actions
|
|
218
|
+
- No raw theme colors that break dark mode when the app supports it
|
|
219
|
+
- Icons decorative vs informative handled correctly (`aria-hidden` vs `aria-label`)
|
|
220
|
+
- Craft pass completed for the lane (Ops polish and/or atmosphere / design plan) before delivery
|
|
221
|
+
- If a companion ran: still pass MCP `validate_usage` / `validate_page`
|