@morya-ui/setup 0.2.8 → 0.2.9

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.
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: frontend-design
3
+ description: Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
4
+ license: Complete terms in LICENSE.txt
5
+ ---
6
+
7
+ # Frontend Design
8
+
9
+ > **morya-ui consumer note:** Use this skill for Express / brand taste only. Always implement interactive controls with `M*` and colors/spacing with `--m-*`. When this skill conflicts with project `DESIGN.md`, `morya-ui-pages`, or MCP APIs, **those win**.
10
+
11
+ Approach this as the design lead at a small studio known for giving every client a visual identity that could not be mistaken for anyone else's. This client has already rejected proposals that felt templated, and is paying for a distinctive point of view: make deliberate, opinionated choices about palette, typography, and layout that are specific to this brief, and take one real aesthetic risk you can justify.
12
+
13
+ ## Ground it in the subject
14
+
15
+ If the brief does not pin down what the product or subject is, pin it yourself before designing: name one concrete subject, its audience, and the page's single job, and state your choice. If there's any information in your memory about the human's preferences, context about what they're building, or designs you've made before – use that as a hint. The subject's own world, its materials, instruments, artifacts, and vernacular, is where distinctive choices come from. Build with the brief's real content and subject matter throughout.
16
+
17
+ ## Design principles
18
+
19
+ For web designs, the hero is a thesis. Open with the most characteristic thing in the subject's world, in whatever form makes sense for it: a headline, an image, an animation, a live demo, an interactive moment. Be deliberate with your choice: a big number with a small label, supporting stats, and a gradient accent is the template answer, only use if that's truly the best option.
20
+
21
+ Typography carries the personality of the page. Pair the display and body faces deliberately, not the same families you would reach for on any other project, and set a clear type scale with intentional weights, widths, and spacing. Make the type treatment itself a memorable part of the design, not a neutral delivery vehicle for the content.
22
+
23
+ Structure is information. Structural devices, numbering, eyebrows, dividers, labels, should encode something true about the content, not decorate it. Many generic designs use numbered markers (01 / 02 / 03), but that's only appropriate if the content actually is a sequence - like a real process or a typed timeline where order carries information the reader needs. Question if choices like numbered markers actually make sense before incorporating them.
24
+
25
+ Leverage motion deliberately. Think about where and if animation can serve the subject: a page-load sequence, a scroll-triggered reveal, hover micro-interactions, ambient atmosphere. An orchestrated moment usually lands harder than scattered effects; choose what the direction calls for. However, sometimes less is more, and extra animation contributes to the feeling that the design is AI-generated.
26
+
27
+ Match complexity to the vision. Maximalist directions need elaborate execution; minimal directions need precision in spacing, type, and detail. Elegance is executing the chosen vision well.
28
+
29
+ Consider written content carefully. Often a design brief may not contain real content, and it's up to you to come up with copy. Copy can make a design feel as templated as the design itself. See the below section on writing for more guidance.
30
+
31
+ ## Process: brainstorm, explore, plan, critique, build, critique again
32
+
33
+ For calibration: AI-generated design right now clusters around three looks: (1) a warm cream background (near #F4F1EA) with a high-contrast serif display and a terracotta accent; (2) a near-black background with a single bright acid-green or vermilion accent; (3) a broadsheet-style layout with hairline rules, zero border-radius, and dense newspaper-like columns. All three are legitimate for some briefs, but they are defaults rather than choices, and they appear regardless of subject. Where the brief pins down a visual direction, follow it exactly — the brief's own words always win, including when it asks for one of these looks. Where it leaves an axis free, don't spend that freedom on one of these defaults. Just like a human designer who's hired, there's often a careful balance between doing what you're good at and taking each project as a chance to experiment and learn.
34
+
35
+ Work in two passes. First, brainstorm a short design plan based on the human's design brief: create a compact token system with color, type, layout, and signature. Color: describe the palette as 4–6 named hex values. Type: the typefaces for 2+ roles (a characterful display face that's used with restraint, a complementary body face, and a utility face for captions or data if needed). Layout: a layout concept, using one-sentence prose descriptions and ASCII wireframes to ideate and compare. Signature: the single unique element this page will be remembered by that embodies the brief in an appropriate way.
36
+
37
+ Then review that plan against the brief before building: if any part of it reads like the generic default you would produce for any similar page (work through a similar prompt to see if you arrive somewhere similar) rather than a choice made for this specific brief — revise that part, say what you changed and why. Only after you've confirmed the relative uniqueness of your design plan should you start to write the code, following the revised plan exactly and deriving every color and type decision from it.
38
+
39
+ When writing the code, be careful of structuring your CSS selector specificities. It's easy to generate CSS classes that cancel each other out (especially with a type-based selector like .section and a element-based selector like .cta). This can happen often with paddings/margins between sections.
40
+
41
+ Try to do a lot of this planning and iteration in your thinking, and only show ideas to the user when you have higher confidence it'll delight them.
42
+
43
+ ## Restraint and self-critique
44
+
45
+ Spend your boldness in one place. Let the signature element be the one memorable thing, keep everything around it quiet and disciplined, and cut any decoration that does not serve the brief. Not taking a risk can be a risk itself! Build to a quality floor without announcing it: responsive down to mobile, visible keyboard focus, reduced motion respected. Critique your own work as you build, taking screenshots if your environment supports it – a picture is worth 1000 tokens. Consider Chanel's advice: before leaving the house, take a look in the mirror and remove one accessory. Human creators have memory and always try to do something new, so if you have a space to quickly jot down notes about what you've tried, it can help you in future passes.
46
+
47
+ ## More on writing in design
48
+
49
+ Words appear in a design for one reason: to make it easier to understand, and therefore easier to use. They are design material, not decoration. Bring the same intentionality to copy that you would bring to spacing and color. Before writing anything, ask what the design needs to say, and how it can best be said to help the person navigate the experience.
50
+
51
+ Write from the end user's side of the screen. Name things by what people control and recognize, never by how the system is built. A person manages notifications, not webhook config. Describe what something does in plain terms rather than selling it. Being specific is always better than being clever.
52
+
53
+ Use active voice as default. A control should say exactly what happens when it's used: "Save changes," not "Submit." An action keeps the same name through the whole flow, so the button that says "Publish" produces a toast that says "Published." The vocabulary of an interface is the signposting for someone navigating the product. Cohesion and consistency are how people learn their way around.
54
+
55
+ Treat failure and emptiness as moments for direction, not mood. Explain what went wrong and how to fix it, in the interface's voice rather than a person's. Errors don't apologize, and they are never vague about what happened. An empty screen is an invitation to act.
56
+
57
+ Keep the register conversational and tuned: plain verbs, sentence case, no filler, with tone matched to the brand and the audience. Let each element do exactly one job. A label labels, an example demonstrates, and nothing quietly does double duty.
@@ -65,7 +65,7 @@ For Express / branded Account moments, also draft a tiny **design plan** (see [v
65
65
  | --- | --- | --- |
66
66
  | Ops pattern | `recommend_page` → `get_golden_page` | [page-layouts.md](references/page-layouts.md) |
67
67
  | Account / Express / empty | `recommend_page` → `get_golden_page` (`login-page` / `landing-page` / `empty-state`) | [surfaces.md](references/surfaces.md) |
68
- | Visual direction | — | [visual-craft.md](references/visual-craft.md) (Express / polish / anti-defaults) |
68
+ | Visual direction | — | [visual-craft.md](references/visual-craft.md) (Ops polish / atmosphere / anti-defaults) |
69
69
  | Components | `search` / `get_component` / `recommend_component` | [component-index.md](references/component-index.md) |
70
70
  | Tokens / rules | `get_design_rules` | [design-system.md](references/design-system.md) |
71
71
  | Snippet | `get_page_snippet` | golden / surface excerpt |
@@ -76,7 +76,7 @@ For Express / branded Account moments, also draft a tiny **design plan** (see [v
76
76
 
77
77
  **Ops:** mirror golden-page block order; prefer `MPage*` over custom chrome.
78
78
 
79
- **Account / Flow / System:** centered or split shells with `MCard` / `MForm` / `MMessage` / `MEmpty` / `MResult` (see surfaces); keep controls as `M*`.
79
+ **Account / Flow / System:** centered or split shells with `MCard` / `MForm` / `MEmpty` / `MResult` (see surfaces); keep controls as `M*`. Persistent form errors use field `errorMessage` or a token-styled `role="alert"` — `<MMessage>` is the `message` host, not an inline alert.
80
80
 
81
81
  **Express:** hero + sections with intentional hierarchy; interactive bits still `MButton` / `MTag` / etc.; atmosphere via layout, motion, and tokens — not a second component library.
82
82
 
@@ -86,23 +86,25 @@ For Express / branded Account moments, also draft a tiny **design plan** (see [v
86
86
 
87
87
  - Import from `morya-ui` (or documented subpath + style).
88
88
  - Forms: `MForm` + fields; `@submit` + `type="submit"`.
89
- - Tables: `columns` + `data` + `row-key`; `#cell-{key}`.
89
+ - Tables: `columns` + `rows` + `row-key`; `#cell-{key}`. There is no `data` prop.
90
90
  - Enums → `MSelect` / `MTreeSelect`; action menus → `MDropdown`.
91
91
  - Destructive → `MConfirmDialog` / `MConfirmPopup`.
92
92
  - Feedback → default **`message`**; `toast` only for summary+detail / async. See [feedback.md](references/feedback.md).
93
93
 
94
- ### 5. Craft pass (lane-aware)
94
+ ### 5. Craft pass (always — lane-aware)
95
95
 
96
- - **Ops:** restraint — clarity over spectacle; cut decoration.
97
- - **Express / branded auth:** one signature moment; avoid AI-default looks listed in [visual-craft.md](references/visual-craft.md).
98
- - **All lanes:** responsive, focus visible, respect `prefers-reduced-motion` when adding motion.
99
- - Copy: user language, active voice, specific — not filler marketing on Ops screens.
96
+ Run **before** delivery. Do not stop at a structurally correct shell.
100
97
 
101
- Optional polish modes (Impeccable-inspired): `quieter` | `bolder` | `clarify` | `audit` — apply as a second pass when the user asks. See [visual-craft.md](references/visual-craft.md) § Polish modes.
98
+ - **Ops:** apply [visual-craft.md](references/visual-craft.md) § Ops polish (one primary, menu icons, `MStatus` in tables, designed empty, no decorative cards).
99
+ - **Account / Flow:** one calm brand or empty-state cue from § Atmosphere recipes; form errors via `errorMessage` / token `role="alert"`.
100
+ - **Express:** short design plan + one signature; avoid AI-default looks; optional 1–2 token-only motions with `prefers-reduced-motion`.
101
+ - **All lanes:** responsive, focus visible, domain-real copy (active voice).
102
+
103
+ Named polish modes (`quieter` | `bolder` | `clarify` | `audit` | …): use as an **extra** pass when the user asks to improve an existing screen. See [visual-craft.md](references/visual-craft.md) § Polish modes.
102
104
 
103
105
  ### 6. Review
104
106
 
105
- Use [review-checklist.md](references/review-checklist.md) (Ops + Express sections). Run MCP `validate_page` when available (advisory).
107
+ Use [review-checklist.md](references/review-checklist.md) (contract + craft sections). Run MCP `validate_page` when available (advisory).
106
108
 
107
109
  ## Hard boundaries
108
110
 
@@ -130,8 +132,9 @@ Details: [optional-companions.md](references/optional-companions.md). Distilled
130
132
 
131
133
  - Vue 3 `<script setup lang="ts">`.
132
134
  - PascalCase `M*` in templates.
133
- - Domain-real copy and data shapes.
134
- - Scoped CSS minimal; tokens only (control widths may be inline).
135
+ - Domain-real copy and data shapes (not placeholder “示例 / Name / No data” when the brief names a product).
136
+ - Scoped CSS minimal; tokens only (`color-mix` / gradients from `--m-*` OK; control widths may be inline).
137
+ - Craft pass completed for the lane (see step 5).
135
138
  - For multi-file asks: sensible `views/` / `components/` split; otherwise one SFC is fine.
136
139
 
137
140
  ## Bundled references
@@ -140,7 +143,7 @@ Details: [optional-companions.md](references/optional-companions.md). Distilled
140
143
  | --- | --- |
141
144
  | [surfaces.md](references/surfaces.md) | Choosing / composing non-Ops (and hybrid) surfaces |
142
145
  | [page-layouts.md](references/page-layouts.md) | Ops golden layouts |
143
- | [visual-craft.md](references/visual-craft.md) | Design plan, anti-defaults, polish modes, Express craft |
146
+ | [visual-craft.md](references/visual-craft.md) | Ops polish, atmosphere recipes, anti-defaults, polish modes |
144
147
  | [design-system.md](references/design-system.md) | Principles, tokens, bans |
145
148
  | [component-index.md](references/component-index.md) | Scenario → component |
146
149
  | [feedback.md](references/feedback.md) | message / toast / MMessage |
@@ -3,38 +3,38 @@
3
3
  "evals": [
4
4
  {
5
5
  "id": 1,
6
- "prompt": "我们内部教务系统用 Vue3 + morya-ui。请做一个「课程列表」后台页:按课程名搜索、按开课状态(全部/开课中/已结课)筛选;表格列:名称、状态 Tag、学分、更新时间;行内「编辑」进抽屉表单,「删除」要二次确认;右上角「新建课程」。保存/删除成功只要一句话提示。输出单个 Vue SFC,结构对齐列表黄金样例。",
7
- "expected_output": "Ops list: MLayout/MPageFilters/MPageToolbar/MTable, MSelect status, MDrawer or route edit, MConfirmDialog delete, message not toast, MTag for status, no second UI kit.",
6
+ "prompt": "我们内部教务系统用 Vue3 + morya-ui。请做一个「课程列表」后台页:按课程名搜索、按开课状态(全部/开课中/已结课)筛选;表格列:名称、状态、学分、更新时间;行内「编辑」进抽屉表单,「删除」要二次确认;右上角「新建课程」。保存/删除成功只要一句话提示。输出单个 Vue SFC,结构对齐列表黄金样例,并做 Ops 精致化(侧栏图标、状态用 MStatus、空态用 MEmpty、行操作不要一排实心按钮)。",
7
+ "expected_output": "Ops list: MLayout/MPageFilters/MPageToolbar/MTable rows, 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.",
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, no landing hero.",
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.",
14
14
  "files": []
15
15
  },
16
16
  {
17
17
  "id": 3,
18
- "prompt": "运营后台首页仪表盘:四个 KPI(今日订单、待处理、转化率、退款率)、中间一块图表占位、右侧或下方「最近告警」表格(级别、内容、时间)。Vue3 + morya-ui,可先用静态假数据。",
19
- "expected_output": "Dashboard: MPageStat grid, MPagePlaceholder/chart card, recent MTable, MLayout shell, --m-* only.",
18
+ "prompt": "运营后台首页仪表盘:四个 KPI(今日订单、待处理、转化率、退款率)、中间一块图表占位、右侧或下方「最近告警」表格(级别、内容、时间)。Vue3 + morya-ui,可先用静态假数据;告警级别可用 Tag,状态用 MStatus。",
19
+ "expected_output": "Dashboard: MPageStat grid with domain labels, MPagePlaceholder/chart card, recent MTable with MStatus, MLayout shell, --m-* only, spacious density.",
20
20
  "files": []
21
21
  },
22
22
  {
23
23
  "id": 4,
24
- "prompt": "给「青禾书房」这个独立书店品牌做登录页:左品牌、右表单(邮箱+密码+登录)。要有一点品牌感,但控件必须用 morya-ui;登录失败用表单区常驻错误,不要一闪而过的 Toast。输出单个 Vue SFC。",
25
- "expected_output": "Account+craft: split shell, MForm/MInputPassword/MButton, MMessage or field error for failure, brand panel without second UI kit, tokens for colors.",
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.",
26
26
  "files": []
27
27
  },
28
28
  {
29
29
  "id": 5,
30
- "prompt": "课程列表在零数据时太空了。请设计一个空状态区块(可嵌在列表页内容区):说明还没有课程、引导「创建第一门课程」,视觉克制但有一个记忆点。只要空状态相关模板片段或带空状态的列表 SFC 均可,须 morya-ui。",
31
- "expected_output": "Flow empty: clear next action CTA with MButton, short copy, one signature visual, no emoji clutter, fits list content slot.",
30
+ "prompt": "课程列表在零数据时太空了。请设计一个空状态区块(可嵌在列表页内容区):说明还没有课程、引导「创建第一门课程」,视觉克制但有一个记忆点(dashed shell + 轻径向光)。只要空状态相关模板片段或带空状态的列表 SFC 均可,须 morya-ui。",
31
+ "expected_output": "Flow empty: MEmpty + next-action MButton, short copy, token atmosphere shell, no emoji clutter, 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 默认脸。输出单个 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.",
36
+ "prompt": "为「流水线 CI」产品写一个营销落地首页(不是后台):首屏只有品牌名、一句主标题、一句副文、一组 CTA;下面再分「为何选择」「能力」「客户」三节。技术实现用 Vue3 + morya-ui 组件做按钮/标签/折叠 FAQ;颜色走 --m-*,避免紫渐变和奶油衬线陶土那套 AI 默认脸。可有 1–2 个微动效并尊重 prefers-reduced-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, reduced-motion aware.",
38
38
  "files": []
39
39
  },
40
40
  {
@@ -46,7 +46,13 @@
46
46
  {
47
47
  "id": 8,
48
48
  "prompt": "用户点了删除项目但权限不足:做一张「无权限」系统页(或全页占位),说明原因,并提供返回上一页、联系管理员。用 morya-ui,文案直接别玩梗。",
49
- "expected_output": "System surface: plain explanation, escape actions with MButton, no jokey 404 essay, on-token.",
49
+ "expected_output": "System surface: MResult 403 or equivalent, plain explanation, escape actions with MButton, no jokey 404 essay, on-token.",
50
+ "files": []
51
+ },
52
+ {
53
+ "id": 9,
54
+ "prompt": "把上面的课程列表再 polish 一轮:去掉多余实心按钮、保证只有一个主按钮、表格状态改成 MStatus、补上 MEmpty。不要改成营销页。",
55
+ "expected_output": "Ops quieter polish: one primary, MStatus, MEmpty, text row actions, still list golden structure.",
50
56
  "files": []
51
57
  }
52
58
  ]
@@ -7,21 +7,27 @@ Full API: docs site `/components` or MCP (`get_component`, `search`, `validate_u
7
7
  | Component | Use |
8
8
  | --- | --- |
9
9
  | `MConfigProvider` | Root locale / theme / density / defaults |
10
- | `MLayout` family | Admin chrome |
10
+ | `MLayout` family | Admin chrome (`MLayoutSider` is the layout sider) |
11
+ | `MSidebar` | Standalone nav rail (not a `MDrawer`, not a substitute for `MLayoutSider` inside `MLayout`) |
11
12
  | `MBreadcrumb` | Path |
12
13
  | `MPageContent` / `MPageFilters` / `MPageToolbar` / `MPageHeader` / `MPageSection` / `MPageStat` / `MPagePlaceholder` | Page composition |
14
+ | `MDock` | App dock / launcher, not page actions |
15
+
16
+ ## Actions
17
+
18
+ `MButton` / `MButtonGroup` (primary `severity="primary"`, danger `severity="danger"`), `MSplitButton` (main action + menu), `MSpeedDial` (floating action cluster)
13
19
 
14
20
  ## Forms · inputs
15
21
 
16
- `MForm`, `MFormItem`, `MInput`, `MInputPassword`, `MInputNumber`, `MTextarea`, `MSelect`, `MTreeSelect`, `MCascadeSelect`, `MDatePicker`, `MAutoComplete`, `MCheckbox` / `MCheckboxGroup`, `MRadio` / `MRadioGroup`, `MSwitch`, `MSlider`, `MRating`, `MInputTags`, `MFileUpload`, `MFloatLabel`, `MIconField`
22
+ `MForm`, `MFormItem`, `MInput`, `MInputPassword`, `MInputNumber`, `MTextarea`, `MInputOtp`, `MInputColor`, `MInputGroup`, `MInputTags`, `MSelect`, `MTreeSelect`, `MCascadeSelect`, `MListbox`, `MSelectButton`, `MDatePicker`, `MAutoComplete`, `MCheckbox` / `MCheckboxGroup`, `MRadio` / `MRadioGroup`, `MSwitch`, `MToggleButton`, `MSlider`, `MRating`, `MKnob`, `MFileUpload`, `MFloatLabel`, `MIconField`, `MLabel`
17
23
 
18
24
  ## Layout helpers
19
25
 
20
- `MGrid` / `MGridItem`, `MFlex`, `MSpace`, `MFluid`, `MDivider`, `MFieldset`
26
+ `MGrid` / `MGridItem`, `MFlex`, `MSpace`, `MFluid`, `MDivider`, `MFieldset`, `MSplitter`, `MToolbar`
21
27
 
22
28
  ## Data
23
29
 
24
- `MTable`, `MTreeTable`, `MDataView`, `MTree`, `MPagination`, `MStatus` / `MTag` / `MChip` / `MBadge`, `MAvatar` / `MAvatarGroup`, `MTimeline`, `MMeterGroup`, `MVirtualScroller`
30
+ `MTable` (`columns` + **`rows`**, not `data`), `MTreeTable`, `MDataView`, `MTree`, `MPagination`, `MOrderList`, `MPickList`, `MStatus` / `MTag` / `MChip` / `MBadge`, `MAvatar` / `MAvatarGroup`, `MTimeline`, `MMeterGroup`, `MVirtualScroller`
25
31
 
26
32
  ## Feedback
27
33
 
@@ -29,7 +35,8 @@ Full API: docs site `/components` or MCP (`get_component`, `search`, `validate_u
29
35
  | --- | --- |
30
36
  | `message` | **Default** one-line CRUD result |
31
37
  | `toast` | `summary` + `detail`, or async / background feel |
32
- | `<MMessage>` | Persistent in-page error / warning |
38
+ | `<MMessage>` | Optional host for the `message` service (`appendTo` / placement). **Not** an inline alert |
39
+ | field `errorMessage` or token `role="alert"` | Persistent form / auth error |
33
40
  | `MEmpty` | No-data / first-use / filtered empty (not an error) |
34
41
  | `MResult` | Terminal outcome: success, failure, 403 / 404 / 500 |
35
42
  | `MLoading` / `v-loading` / `loading.service` | **Default** region or fullscreen loading mask |
@@ -40,11 +47,11 @@ Full API: docs site `/components` or MCP (`get_component`, `search`, `validate_u
40
47
 
41
48
  ## Overlays & menus
42
49
 
43
- `MDialog`, `MDrawer`, `MConfirmDialog` / `MConfirmPopup`, `MPopover`, `MTooltip`, `MDropdown` (**actions only**), `MMenu` / `MMenubar` / `MTieredMenu` / `MMegaMenu`, `MTabs`, `MStepper`, `MCommandMenu`
50
+ `MDialog`, `MDrawer`, `MConfirmDialog` / `MConfirmPopup`, `MPopover`, `MTooltip`, `MDropdown` (**actions only**), `MContextMenu` (right-click), `MCommandMenu` (searchable command palette), `MMenu` / `MMenubar` / `MTieredMenu` / `MMegaMenu`, `MTabs`, `MStepper`
44
51
 
45
52
  ## Surfaces / media
46
53
 
47
- `MCard`, `MPanel`, `MAccordion`, `MCarousel`, `MGallery`, `MIcon`, `MScrollbar`
54
+ `MCard`, `MPanel`, `MAccordion`, `MCarousel`, `MGallery`, `MIcon`, `MScrollbar`, `MInplace`, `MScrollTop`, `MTerminal`
48
55
 
49
56
  ## Scenario → pick
50
57
 
@@ -65,13 +72,22 @@ Full API: docs site `/components` or MCP (`get_component`, `search`, `validate_u
65
72
  | Submit success / HTTP error page | `MResult` |
66
73
  | Region or page is waiting | `MLoading`, `v-loading`, or `loading.service`; known layout → `MSkeleton` |
67
74
  | Local capped scroll | Explicit `MScrollbar` |
68
- | Admin sider nav | `MMenu` |
75
+ | Admin sider nav | `MMenu` inside `MLayoutSider` (or `MSidebar` when the shell is not `MLayout`) |
76
+ | Few options, all visible | `MRadio` or `MSelectButton` |
77
+ | Always-visible option list | `MListbox` |
78
+ | Multi-level cascade (not a tree dropdown) | `MCascadeSelect` |
79
+ | Right-click actions | `MContextMenu` |
80
+ | Global command search | `MCommandMenu` |
81
+ | Count or dot on a control | `MBadge` |
82
+ | Removable entity chip | `MChip` |
69
83
 
70
84
  ## Common mistakes
71
85
 
72
86
  | Wrong | Right |
73
87
  | --- | --- |
74
88
  | `MDropdown` as form enum | `MSelect` |
89
+ | `MTable` `:data` | `:rows` (`row-key` defaults to `id`) |
90
+ | `<MMessage severity>` as an inline alert | Field `errorMessage`, or a token-styled `role="alert"` |
75
91
  | Hand `<table>` | `MTable` |
76
92
  | Hand modal div | `MDialog` |
77
93
  | Hand spinner or `MProgressSpinner` as a region / page mask | `MLoading` / `v-loading` |
@@ -58,11 +58,13 @@ import 'morya-ui/styles.css'
58
58
 
59
59
  ## Data display
60
60
 
61
- - `MTable` with columns + data + `row-key`.
62
- - Row actions: text/link `MButton` or `MDropdown`.
61
+ - `MTable` with `columns` + **`rows`** + `row-key` (default `id`). There is no `data` prop.
62
+ - Row status → `MStatus`; categories / closable labels → `MTag`.
63
+ - Row actions: text/link `MButton` or `MDropdown` (avoid a row of filled buttons).
63
64
  - Pagination: table `paginator` or sibling `MPagination`.
64
65
  - Empty states: `MEmpty` in `#empty` / Flow golden — never a silent blank table.
65
66
  - Terminal outcomes (success / 403 / 404 / 500): `MResult` — do not reuse `MEmpty` for errors.
67
+ - Visual polish: [visual-craft.md](visual-craft.md) (Ops polish + atmosphere).
66
68
 
67
69
  ## Overlays
68
70
 
@@ -8,7 +8,7 @@
8
8
  | --- | --- | --- | --- |
9
9
  | Message service | Top-centered one-liner | `message.success('已保存')` | Most CRUD results |
10
10
  | Toast service | Corner notice with `summary` + optional `detail` | `toast.success({ summary, detail })` | Extra explanation, job results |
11
- | `MMessage` | In-page bar, stays | `<MMessage severity="error">…</MMessage>` | Persistent form / auth errors |
11
+ | `MMessage` | Optional host for the `message` service | `<MMessage />` | Custom `appendTo` / placement only. Not an inline alert |
12
12
 
13
13
  ## Decision tree
14
14
 
@@ -1,28 +1,33 @@
1
1
  # Optional companions
2
2
 
3
- This skill is **standalone**. Distilled craft lives in [visual-craft.md](visual-craft.md). Companions are optional soft upgrades when already present in the consumer repo.
3
+ This skill is **standalone**. Distilled craft lives in [visual-craft.md](visual-craft.md). Companions are optional soft upgrades installed by `@morya-ui/setup` (or already present in the repo).
4
4
 
5
5
  ## Conflict rule
6
6
 
7
7
  `morya-ui-pages` + project `DESIGN.md` + MCP APIs **override** companion advice whenever they disagree (component choice, tokens, Ops layout, feedback API).
8
8
 
9
- ## How to combine
9
+ ## Install via setup
10
10
 
11
- | Installed companion | Safe use | Unsafe use |
12
- | --- | --- | --- |
13
- | `frontend-design` | Express / brand panel taste after surface + contract are fixed | Replacing Ops golden shell with a custom landing |
14
- | `impeccable` | Named passes (`audit`, `quieter`, …) aligned with [visual-craft.md](visual-craft.md) polish modes | Swapping `M*` for raw HTML controls or new token schema |
15
- | `ui-ux-pro-max` | Mood / industry keywords for Express | Adopting its React/shadcn/Flutter stack suggestions |
11
+ ```bash
12
+ # Interactive (TTY): toggle optional skills
13
+ npx @morya-ui/setup ai
16
14
 
17
- Suggested prompt glue:
15
+ # Non-interactive
16
+ npx @morya-ui/setup ai --skills=morya-ui-pages,frontend-design,fixing-accessibility
17
+ npx @morya-ui/setup ai --skills=all
18
+ ```
18
19
 
19
- > Follow morya-ui-pages for surface, components, and tokens. Optionally apply \<companion\> only for visual taste on Express sections; remediate with M* and --m-*.
20
+ | Companion | Safe use | Unsafe use |
21
+ | --- | --- | --- |
22
+ | `frontend-design` | Express / brand panel taste after surface + contract are fixed | Replacing Ops golden shell or introducing a second UI kit |
23
+ | `fixing-accessibility` | Names, keyboard, focus, form errors on top of `M*` | Replacing library dialogs/menus with custom ARIA widgets |
24
+ | `impeccable` (if present locally) | Named polish passes aligned with [visual-craft.md](visual-craft.md) | New token schema or swapping `M*` for raw HTML controls |
20
25
 
21
26
  ## Load budget
22
27
 
23
- - Default: **this skill only**
24
- - Max: this skill + **one** companion
25
- - Broad redesign review: this skill + impeccable-style `audit` (or the real skill if installed) — still one companion
28
+ - Default: **morya-ui-pages only**
29
+ - Max: pages + **one** optional companion for a given task
30
+ - Broad redesign review: pages + accessibility pass, or pages + one visual companion — still prefer one companion at a time
26
31
 
27
32
  ## If companions are absent
28
33
 
@@ -13,18 +13,26 @@ When generating a full page, pick a type and **mirror the golden-page block orde
13
13
 
14
14
  Via MCP: `recommend_page` → `get_golden_page`; local edits: `get_page_snippet` (`filters`, `toolbar`, `form-actions`, `scrollable-panel`, …).
15
15
 
16
+ ## Product defaults
17
+
18
+ - **Short create/edit** (about ≤8 fields, single section): same-page `MDialog` + `MForm` — do not invent a new route form for every entity.
19
+ - **Long / multi-section / wizard**: dedicated form page (`form-page`) or `MDrawer`.
20
+ - **One-line success/error**: `message` API; title + detail or async notify → `toast` (see [feedback.md](feedback.md)).
21
+
16
22
  ## List page — block order
17
23
 
18
24
  1. `MLayout fillViewport` + optional `MLayoutSider bordered`
19
- 2. Sider `MMenu`
25
+ 2. Sider `MMenu` (**every item has `icon`**)
20
26
  3. `MLayoutHeader` → `MBreadcrumb`
21
27
  4. `MLayoutContent` → `MPageContent`
22
- 5. `MPageFilters` — inner `MSpace` + Input/Select + query/reset
23
- 6. `MPageToolbar` — title + `#actions` primary action
24
- 7. `MTable` directly in content (usually **no** wrapping `MCard`)
28
+ 5. `MPageFilters` — inner `MSpace wrap` + Input/Select + query/reset (search ~`14rem`, select ~`10–12rem`)
29
+ 6. `MPageToolbar` — title + `#actions` primary action (**one** filled primary)
30
+ 7. `MTable` directly in content (usually **no** wrapping `MCard`); status → `MStatus`; `#empty` → `MEmpty`
25
31
  8. Pagination via `MTable` paginator or sibling `MPagination`
26
32
  9. Short create/edit → `MDialog` + `MForm` on the same page (default)
27
33
 
34
+ Craft: [visual-craft.md](visual-craft.md) § Ops polish.
35
+
28
36
  ## Form page — block order
29
37
 
30
38
  1. `MLayout fillViewport` → `MLayoutHeader` → `MBreadcrumb`
@@ -36,9 +44,11 @@ Via MCP: `recommend_page` → `get_golden_page`; local edits: `get_page_snippet`
36
44
  ## Dashboard — block order
37
45
 
38
46
  1. `MLayout fillViewport` → `MLayoutHeader` → `MBreadcrumb`
39
- 2. `MPageContent density="spacious"` → `MPageHeader`
40
- 3. KPI row: `MGrid` + `MPageStat` (4 columns or responsive)
41
- 4. Main split: `MCard` + `MPagePlaceholder` and/or recent `MTable`
47
+ 2. `MPageContent density="spacious"` → `MPageHeader` (title + short domain description when useful)
48
+ 3. KPI row: `MGrid` + `MPageStat` (4 columns or responsive) — real metric names, not “Metric 1”
49
+ 4. Main split: `MCard` + `MPagePlaceholder` and/or recent `MTable` (row status → `MStatus`)
50
+
51
+ Craft: spacious density + Ops polish; do not turn the first viewport into a marketing hero.
42
52
 
43
53
  ## Composition standards
44
54