@morya-ui/setup 0.2.7 → 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.
Files changed (41) hide show
  1. package/README.md +23 -40
  2. package/catalog/skills.json +28 -0
  3. package/package.json +2 -1
  4. package/src/cli.mjs +63 -36
  5. package/src/skills.mjs +154 -0
  6. package/src/styles.mjs +2 -87
  7. package/template/.agents/skills/fixing-accessibility/SKILL.md +138 -0
  8. package/template/.agents/skills/frontend-design/LICENSE.txt +177 -0
  9. package/template/.agents/skills/frontend-design/SKILL.md +57 -0
  10. package/template/.agents/skills/morya-ui-pages/SKILL.md +17 -16
  11. package/template/.agents/skills/morya-ui-pages/evals/evals.json +18 -12
  12. package/template/.agents/skills/morya-ui-pages/references/component-index.md +31 -9
  13. package/template/.agents/skills/morya-ui-pages/references/design-system.md +5 -3
  14. package/template/.agents/skills/morya-ui-pages/references/feedback.md +2 -2
  15. package/template/.agents/skills/morya-ui-pages/references/optional-companions.md +17 -12
  16. package/template/.agents/skills/morya-ui-pages/references/page-layouts.md +26 -16
  17. package/template/.agents/skills/morya-ui-pages/references/review-checklist.md +14 -2
  18. package/template/.agents/skills/morya-ui-pages/references/surfaces.md +4 -4
  19. package/template/.agents/skills/morya-ui-pages/references/visual-craft.md +121 -6
  20. package/template/.cursor/rules/component-usage.mdc +4 -4
  21. package/template/.cursor/rules/design-system.mdc +5 -5
  22. package/template/.cursor/rules/page-layout.mdc +7 -9
  23. package/template/DESIGN.md +29 -106
  24. package/LICENSE +0 -21
  25. package/template/design-tokens/tokens.css +0 -55
  26. package/template/design-tokens/tokens.json +0 -77
  27. package/template/docs/components.md +0 -145
  28. package/template/docs/feedback-message-vs-toast.md +0 -103
  29. package/template/docs/golden-pages/dashboard-page.vue +0 -103
  30. package/template/docs/golden-pages/empty-state.vue +0 -66
  31. package/template/docs/golden-pages/form-page.vue +0 -107
  32. package/template/docs/golden-pages/landing-page.vue +0 -328
  33. package/template/docs/golden-pages/list-page.vue +0 -138
  34. package/template/docs/golden-pages/login-page.vue +0 -191
  35. package/template/src/examples/DashboardPageExample.vue +0 -103
  36. package/template/src/examples/EmptyStateExample.vue +0 -66
  37. package/template/src/examples/FormPageExample.vue +0 -107
  38. package/template/src/examples/LandingPageExample.vue +0 -328
  39. package/template/src/examples/ListPageExample.vue +0 -138
  40. package/template/src/examples/LoginPageExample.vue +0 -191
  41. package/template/src/styles/morya-app-shell.css +0 -6
@@ -0,0 +1,138 @@
1
+ ---
2
+ name: fixing-accessibility
3
+ description: Audit and fix HTML accessibility issues including ARIA labels, keyboard navigation, focus management, color contrast, and form errors. Use when adding interactive controls, forms, dialogs, or reviewing WCAG compliance.
4
+ ---
5
+
6
+ # fixing-accessibility
7
+
8
+ > **morya-ui consumer note:** Prefer library defaults (`label`, `aria-label`, Esc-dismiss overlays). Do not replace `M*` widgets with custom ARIA hacks. When guidance conflicts with `DESIGN.md` or `morya-ui-pages`, **those win**.
9
+
10
+ Fix accessibility issues.
11
+
12
+ ## how to use
13
+
14
+ - `/fixing-accessibility`
15
+ Apply these constraints to any UI work in this conversation.
16
+
17
+ - `/fixing-accessibility <file>`
18
+ Review the file against all rules below and report:
19
+ - violations (quote the exact line or snippet)
20
+ - why it matters (one short sentence)
21
+ - a concrete fix (code-level suggestion)
22
+
23
+ Do not rewrite large parts of the UI. Prefer minimal, targeted fixes.
24
+
25
+ ## when to apply
26
+
27
+ Reference these guidelines when:
28
+ - adding or changing buttons, links, inputs, menus, dialogs, tabs, dropdowns
29
+ - building forms, validation, error states, helper text
30
+ - implementing keyboard shortcuts or custom interactions
31
+ - working on focus states, focus trapping, or modal behavior
32
+ - rendering icon-only controls
33
+ - adding hover-only interactions or hidden content
34
+
35
+ ## rule categories by priority
36
+
37
+ | priority | category | impact |
38
+ |----------|----------|--------|
39
+ | 1 | accessible names | critical |
40
+ | 2 | keyboard access | critical |
41
+ | 3 | focus and dialogs | critical |
42
+ | 4 | semantics | high |
43
+ | 5 | forms and errors | high |
44
+ | 6 | announcements | medium-high |
45
+ | 7 | contrast and states | medium |
46
+ | 8 | media and motion | low-medium |
47
+ | 9 | tool boundaries | critical |
48
+
49
+ ## quick reference
50
+
51
+ ### 1. accessible names (critical)
52
+
53
+ - every interactive control must have an accessible name
54
+ - icon-only buttons must have aria-label or aria-labelledby
55
+ - every input, select, and textarea must be labeled
56
+ - links must have meaningful text (no “click here”)
57
+ - decorative icons must be aria-hidden
58
+
59
+ ### 2. keyboard access (critical)
60
+
61
+ - do not use div or span as buttons without full keyboard support
62
+ - all interactive elements must be reachable by Tab
63
+ - focus must be visible for keyboard users
64
+ - do not use tabindex greater than 0
65
+ - Escape must close dialogs or overlays when applicable
66
+
67
+ ### 3. focus and dialogs (critical)
68
+
69
+ - modals must trap focus while open
70
+ - restore focus to the trigger on close
71
+ - set initial focus inside dialogs
72
+ - opening a dialog should not scroll the page unexpectedly
73
+
74
+ ### 4. semantics (high)
75
+
76
+ - prefer native elements (button, a, input) over role-based hacks
77
+ - if a role is used, required aria attributes must be present
78
+ - lists must use ul or ol with li
79
+ - do not skip heading levels
80
+ - tables must use th for headers when applicable
81
+
82
+ ### 5. forms and errors (high)
83
+
84
+ - errors must be linked to fields using aria-describedby
85
+ - required fields must be announced
86
+ - invalid fields must set aria-invalid
87
+ - helper text must be associated with inputs
88
+ - disabled submit actions must explain why
89
+
90
+ ### 6. announcements (medium-high)
91
+
92
+ - critical form errors should use aria-live
93
+ - loading states should use aria-busy or status text
94
+ - toasts must not be the only way to convey critical information
95
+ - expandable controls must use aria-expanded and aria-controls
96
+
97
+ ### 7. contrast and states (medium)
98
+
99
+ - ensure sufficient contrast for text and icons
100
+ - hover-only interactions must have keyboard equivalents
101
+ - disabled states must not rely on color alone
102
+ - do not remove focus outlines without a visible replacement
103
+
104
+ ### 8. media and motion (low-medium)
105
+
106
+ - images must have correct alt text (meaningful or empty)
107
+ - videos with speech should provide captions when relevant
108
+ - respect prefers-reduced-motion for non-essential motion
109
+ - avoid autoplaying media with sound
110
+
111
+ ### 9. tool boundaries (critical)
112
+
113
+ - prefer minimal changes, do not refactor unrelated code
114
+ - do not add aria when native semantics already solve the problem
115
+ - do not migrate UI libraries unless requested
116
+
117
+ ## common fixes
118
+
119
+ ```html
120
+ <!-- icon-only button: add aria-label -->
121
+ <!-- before --> <button><svg>...</svg></button>
122
+ <!-- after --> <button aria-label="Close"><svg aria-hidden="true">...</svg></button>
123
+
124
+ <!-- div as button: use native element -->
125
+ <!-- before --> <div onclick="save()">Save</div>
126
+ <!-- after --> <button onclick="save()">Save</button>
127
+
128
+ <!-- form error: link with aria-describedby -->
129
+ <!-- before --> <input id="email" /> <span>Invalid email</span>
130
+ <!-- after --> <input id="email" aria-describedby="email-err" aria-invalid="true" /> <span id="email-err">Invalid email</span>
131
+ ```
132
+
133
+ ## review guidance
134
+
135
+ - fix critical issues first (names, keyboard, focus, tool boundaries)
136
+ - prefer native HTML before adding aria
137
+ - quote the exact snippet, state the failure, propose a small fix
138
+ - for complex widgets (menu, dialog, combobox), prefer established accessible primitives over custom behavior
@@ -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.
@@ -44,9 +44,7 @@ Full taxonomy: [references/surfaces.md](references/surfaces.md).
44
44
 
45
45
  1. `morya-ui` installed; `morya-ui/styles.css` imported.
46
46
  2. Prefer `@morya-ui/mcp` — never invent prop / event / slot names.
47
- 3. If the AI config pack is merged, prefer project files over bundled copies:
48
- - `DESIGN.md`
49
- - `docs/golden-pages/*.vue`, `docs/components.md`, `docs/feedback-message-vs-toast.md`
47
+ 3. Golden pages, component APIs, and feedback rules come from `@morya-ui/mcp`. Without MCP, use this skill's `references/`. Project `DESIGN.md` overrides generic taste when the AI pack is merged.
50
48
 
51
49
  ## Workflow
52
50
 
@@ -67,7 +65,7 @@ For Express / branded Account moments, also draft a tiny **design plan** (see [v
67
65
  | --- | --- | --- |
68
66
  | Ops pattern | `recommend_page` → `get_golden_page` | [page-layouts.md](references/page-layouts.md) |
69
67
  | Account / Express / empty | `recommend_page` → `get_golden_page` (`login-page` / `landing-page` / `empty-state`) | [surfaces.md](references/surfaces.md) |
70
- | 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) |
71
69
  | Components | `search` / `get_component` / `recommend_component` | [component-index.md](references/component-index.md) |
72
70
  | Tokens / rules | `get_design_rules` | [design-system.md](references/design-system.md) |
73
71
  | Snippet | `get_page_snippet` | golden / surface excerpt |
@@ -78,7 +76,7 @@ For Express / branded Account moments, also draft a tiny **design plan** (see [v
78
76
 
79
77
  **Ops:** mirror golden-page block order; prefer `MPage*` over custom chrome.
80
78
 
81
- **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.
82
80
 
83
81
  **Express:** hero + sections with intentional hierarchy; interactive bits still `MButton` / `MTag` / etc.; atmosphere via layout, motion, and tokens — not a second component library.
84
82
 
@@ -88,23 +86,25 @@ For Express / branded Account moments, also draft a tiny **design plan** (see [v
88
86
 
89
87
  - Import from `morya-ui` (or documented subpath + style).
90
88
  - Forms: `MForm` + fields; `@submit` + `type="submit"`.
91
- - Tables: `columns` + `data` + `row-key`; `#cell-{key}`.
89
+ - Tables: `columns` + `rows` + `row-key`; `#cell-{key}`. There is no `data` prop.
92
90
  - Enums → `MSelect` / `MTreeSelect`; action menus → `MDropdown`.
93
91
  - Destructive → `MConfirmDialog` / `MConfirmPopup`.
94
92
  - Feedback → default **`message`**; `toast` only for summary+detail / async. See [feedback.md](references/feedback.md).
95
93
 
96
- ### 5. Craft pass (lane-aware)
94
+ ### 5. Craft pass (always — lane-aware)
97
95
 
98
- - **Ops:** restraint — clarity over spectacle; cut decoration.
99
- - **Express / branded auth:** one signature moment; avoid AI-default looks listed in [visual-craft.md](references/visual-craft.md).
100
- - **All lanes:** responsive, focus visible, respect `prefers-reduced-motion` when adding motion.
101
- - Copy: user language, active voice, specific — not filler marketing on Ops screens.
96
+ Run **before** delivery. Do not stop at a structurally correct shell.
102
97
 
103
- 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.
104
104
 
105
105
  ### 6. Review
106
106
 
107
- 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).
108
108
 
109
109
  ## Hard boundaries
110
110
 
@@ -132,8 +132,9 @@ Details: [optional-companions.md](references/optional-companions.md). Distilled
132
132
 
133
133
  - Vue 3 `<script setup lang="ts">`.
134
134
  - PascalCase `M*` in templates.
135
- - Domain-real copy and data shapes.
136
- - 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).
137
138
  - For multi-file asks: sensible `views/` / `components/` split; otherwise one SFC is fine.
138
139
 
139
140
  ## Bundled references
@@ -142,7 +143,7 @@ Details: [optional-companions.md](references/optional-companions.md). Distilled
142
143
  | --- | --- |
143
144
  | [surfaces.md](references/surfaces.md) | Choosing / composing non-Ops (and hybrid) surfaces |
144
145
  | [page-layouts.md](references/page-layouts.md) | Ops golden layouts |
145
- | [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 |
146
147
  | [design-system.md](references/design-system.md) | Principles, tokens, bans |
147
148
  | [component-index.md](references/component-index.md) | Scenario → component |
148
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,18 +35,23 @@ 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
- | `MProgressBar` / `MProgressSpinner` / `MSkeleton` / `MBlockUI` | Loading / blocking |
42
+ | `MLoading` / `v-loading` / `loading.service` | **Default** region or fullscreen loading mask |
43
+ | `MSkeleton` | Layout is already known; placeholder while content arrives |
44
+ | `MProgressBar` | Determinate progress |
45
+ | `MProgressSpinner` | Inline spinner only, not a region mask |
46
+ | `MBlockUI` | Block interaction without a loading message |
36
47
 
37
48
  ## Overlays & menus
38
49
 
39
- `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`
40
51
 
41
52
  ## Surfaces / media
42
53
 
43
- `MCard`, `MPanel`, `MAccordion`, `MCarousel`, `MGallery`, `MIcon`, `MScrollbar`
54
+ `MCard`, `MPanel`, `MAccordion`, `MCarousel`, `MGallery`, `MIcon`, `MScrollbar`, `MInplace`, `MScrollTop`, `MTerminal`
44
55
 
45
56
  ## Scenario → pick
46
57
 
@@ -59,15 +70,26 @@ Full API: docs site `/components` or MCP (`get_component`, `search`, `validate_u
59
70
  | Marketing landing | `landing-page` golden + `MButton` / `MTag` / `MAccordion` |
60
71
  | Empty list / zero state | `MEmpty` (+ `empty-state` golden or `MTable` `#empty`) |
61
72
  | Submit success / HTTP error page | `MResult` |
73
+ | Region or page is waiting | `MLoading`, `v-loading`, or `loading.service`; known layout → `MSkeleton` |
62
74
  | Local capped scroll | Explicit `MScrollbar` |
63
- | 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` |
64
83
 
65
84
  ## Common mistakes
66
85
 
67
86
  | Wrong | Right |
68
87
  | --- | --- |
69
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"` |
70
91
  | Hand `<table>` | `MTable` |
71
92
  | Hand modal div | `MDialog` |
93
+ | Hand spinner or `MProgressSpinner` as a region / page mask | `MLoading` / `v-loading` |
72
94
  | Extra `MCard` around every `MPage*` block | Use page components' own surface/gap |
73
95
  | Assume undocumented props | MCP / docs lookup |