@morya-ui/setup 0.3.1 → 0.3.2
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/LICENSE +21 -0
- package/README.md +16 -10
- package/catalog/skills.json +18 -0
- package/package.json +1 -1
- package/src/cli.mjs +17 -2
- package/src/skills.mjs +73 -4
- package/template/.agents/skills/morya-ui-pages/SKILL.md +1 -1
- package/template/.agents/skills/morya-ui-pages/evals/evals.json +6 -6
- package/template/.agents/skills/morya-ui-pages/references/design-system.md +2 -2
- package/template/.agents/skills/morya-ui-pages/references/optional-companions.md +7 -7
- package/template/.agents/skills/morya-ui-pages/references/page-layouts.md +9 -7
- package/template/.agents/skills/morya-ui-pages/references/review-checklist.md +1 -1
- package/template/.agents/skills/morya-ui-pages/references/visual-craft.md +7 -9
- package/template/.cursor/rules/page-layout.mdc +8 -6
- package/template/DESIGN.md +1 -1
- package/template/.agents/skills/fixing-accessibility/SKILL.md +0 -138
- package/template/.agents/skills/frontend-design/LICENSE.txt +0 -177
- package/template/.agents/skills/frontend-design/SKILL.md +0 -57
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Morya UI contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Docs (zh/en):
|
|
|
9
9
|
- [Agent Skill](https://morya-space.github.io/morya-ui/docs/agent-skill) — `morya-ui-pages` behavior
|
|
10
10
|
- [Quick start](https://morya-space.github.io/morya-ui/docs/quick-start) — install and first component
|
|
11
11
|
|
|
12
|
-
Installs the UI library, copies Agent skills / Cursor rules / design docs from `design-kit`, merges Cursor MCP for [`@morya-ui/mcp`](https://www.npmjs.com/package/@morya-ui/mcp), and injects `import 'morya-ui/styles.css'`.
|
|
12
|
+
Installs the UI library, copies first-party Agent skills / Cursor rules / design docs from `design-kit`, installs optional companion skills at **latest** via the [skills CLI](https://skills.sh/), merges Cursor MCP for [`@morya-ui/mcp`](https://www.npmjs.com/package/@morya-ui/mcp), and injects `import 'morya-ui/styles.css'`.
|
|
13
13
|
|
|
14
14
|
## Usage
|
|
15
15
|
|
|
@@ -32,7 +32,7 @@ npx @morya-ui/setup app
|
|
|
32
32
|
|
|
33
33
|
# Non-interactive skill selection
|
|
34
34
|
npx @morya-ui/setup ai --yes
|
|
35
|
-
npx @morya-ui/setup ai --skills=morya-ui-pages,frontend-design
|
|
35
|
+
npx @morya-ui/setup ai --skills=morya-ui-pages,frontend-design,impeccable
|
|
36
36
|
npx @morya-ui/setup ai --skills=all
|
|
37
37
|
```
|
|
38
38
|
|
|
@@ -47,7 +47,7 @@ npx @morya-ui/setup ai --skills=all
|
|
|
47
47
|
| `--force` | Overwrite existing template files and the `morya-ui` MCP entry |
|
|
48
48
|
| `--dry-run` | Print actions without writing or installing |
|
|
49
49
|
| `--skip-install` | Do not install `morya-ui` |
|
|
50
|
-
| `--skip-template` | Do not copy AI skill / rules / docs |
|
|
50
|
+
| `--skip-template` | Do not copy AI skill / rules / docs (also skips companion skill install) |
|
|
51
51
|
| `--skip-mcp` | Do not write `.cursor/mcp.json` |
|
|
52
52
|
| `--skip-styles` | Do not inject `styles.css` |
|
|
53
53
|
| `--skip-scripts` | Do not add `check:colors` to `package.json` |
|
|
@@ -55,30 +55,36 @@ npx @morya-ui/setup ai --skills=all
|
|
|
55
55
|
|
|
56
56
|
### Skills
|
|
57
57
|
|
|
58
|
-
| Id | Default | Role |
|
|
59
|
-
| --- | --- | --- |
|
|
60
|
-
| `morya-ui-pages` | required | Page generation with `M*` + golden layouts |
|
|
61
|
-
| `frontend-design` | optional | Express / brand visual taste |
|
|
62
|
-
| `fixing-accessibility` | optional | A11y audit and targeted fixes |
|
|
58
|
+
| Id | Default | Install | Role |
|
|
59
|
+
| --- | --- | --- | --- |
|
|
60
|
+
| `morya-ui-pages` | required | template (from this package) | Page generation with `M*` + golden layouts |
|
|
61
|
+
| `frontend-design` | optional | skills CLI → `anthropics/skills` (latest) | Express / brand visual taste |
|
|
62
|
+
| `fixing-accessibility` | optional | skills CLI → `ibelick/ui-skills` (latest) | A11y audit and targeted fixes |
|
|
63
|
+
| `impeccable` | optional | skills CLI → `pbakaus/impeccable` (latest) | Named polish / audit / redesign passes |
|
|
63
64
|
|
|
64
65
|
Catalog: [`catalog/skills.json`](./catalog/skills.json).
|
|
65
66
|
|
|
66
67
|
### Conflict policy
|
|
67
68
|
|
|
68
69
|
- Template files and `.cursor/rules/*`: **skip** if the destination exists (unless `--force`).
|
|
70
|
+
- Companion skills (`skills-cli`): always reinstall/update to **latest** when selected.
|
|
69
71
|
- `.cursor/mcp.json`: merge other servers; skip existing `morya-ui` entry unless `--force`.
|
|
70
72
|
- `package.json` `check:colors`: add only if missing (unless `--force`).
|
|
71
73
|
- Styles: inject only when an entry file is found and the import is not already present.
|
|
72
74
|
|
|
73
|
-
### What gets copied
|
|
75
|
+
### What gets copied / installed
|
|
74
76
|
|
|
75
77
|
From the package `template/` (synced from repo `design-kit/`):
|
|
76
78
|
|
|
77
79
|
- `DESIGN.md` — core design contract (principles, tokens, bans)
|
|
78
|
-
- `.agents/skills
|
|
80
|
+
- `.agents/skills/morya-ui-pages/` — first-party page skill
|
|
79
81
|
- `.cursor/rules/`
|
|
80
82
|
- `scripts/check-raw-colors.mjs`
|
|
81
83
|
|
|
84
|
+
Via `npx skills add …` when optional companions are selected:
|
|
85
|
+
|
|
86
|
+
- `.agents/skills/frontend-design/`, `fixing-accessibility/`, and/or `impeccable/` (latest upstream)
|
|
87
|
+
|
|
82
88
|
### MCP (Cursor)
|
|
83
89
|
|
|
84
90
|
Writes / merges:
|
package/catalog/skills.json
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"description": "Build admin and product pages with M* components, golden layouts, and tokens.",
|
|
7
7
|
"required": true,
|
|
8
8
|
"default": true,
|
|
9
|
+
"install": "template",
|
|
9
10
|
"path": ".agents/skills/morya-ui-pages"
|
|
10
11
|
},
|
|
11
12
|
{
|
|
@@ -14,6 +15,9 @@
|
|
|
14
15
|
"description": "Distinctive visual direction for Express / brand surfaces (taste only; still remediate with M*).",
|
|
15
16
|
"required": false,
|
|
16
17
|
"default": false,
|
|
18
|
+
"install": "skills-cli",
|
|
19
|
+
"source": "anthropics/skills",
|
|
20
|
+
"skill": "frontend-design",
|
|
17
21
|
"path": ".agents/skills/frontend-design"
|
|
18
22
|
},
|
|
19
23
|
{
|
|
@@ -22,7 +26,21 @@
|
|
|
22
26
|
"description": "Audit and fix names, keyboard, focus, forms, and WCAG basics.",
|
|
23
27
|
"required": false,
|
|
24
28
|
"default": false,
|
|
29
|
+
"install": "skills-cli",
|
|
30
|
+
"source": "ibelick/ui-skills",
|
|
31
|
+
"skill": "fixing-accessibility",
|
|
25
32
|
"path": ".agents/skills/fixing-accessibility"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "impeccable",
|
|
36
|
+
"name": "Impeccable",
|
|
37
|
+
"description": "Named polish / audit / redesign passes for frontend UI (latest from pbakaus/impeccable).",
|
|
38
|
+
"required": false,
|
|
39
|
+
"default": false,
|
|
40
|
+
"install": "skills-cli",
|
|
41
|
+
"source": "pbakaus/impeccable",
|
|
42
|
+
"skill": "impeccable",
|
|
43
|
+
"path": ".agents/skills/impeccable"
|
|
26
44
|
}
|
|
27
45
|
]
|
|
28
46
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morya-ui/setup",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.2",
|
|
5
5
|
"description": "One-shot setup for morya-ui: install the library, Cursor MCP, Agent skills, and design config.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/morya-space/morya-ui/tree/main/packages/setup#readme",
|
package/src/cli.mjs
CHANGED
|
@@ -8,6 +8,7 @@ import { mergeMcpConfig } from './mcp.mjs'
|
|
|
8
8
|
import { ensureCheckColorsScript } from './package-json.mjs'
|
|
9
9
|
import {
|
|
10
10
|
buildAiInclude,
|
|
11
|
+
installSkillsCli,
|
|
11
12
|
loadSkillsCatalog,
|
|
12
13
|
parseSkillsFlag,
|
|
13
14
|
resolveSkillSelection,
|
|
@@ -39,7 +40,8 @@ export function printHelp() {
|
|
|
39
40
|
const { skills } = loadSkillsCatalog()
|
|
40
41
|
const skillList = skills.map((s) => {
|
|
41
42
|
const tag = s.required ? 'required' : s.default ? 'default' : 'optional'
|
|
42
|
-
|
|
43
|
+
const via = s.install === 'skills-cli' ? ' [skills-cli latest]' : ''
|
|
44
|
+
return ` ${s.id.padEnd(24)} (${tag})${via} ${s.description}`
|
|
43
45
|
}).join('\n')
|
|
44
46
|
|
|
45
47
|
console.log(`Usage: morya-ui-setup [command] [options]
|
|
@@ -243,6 +245,10 @@ export async function runSetup(options) {
|
|
|
243
245
|
include: aiInclude,
|
|
244
246
|
})
|
|
245
247
|
|
|
248
|
+
const remoteSkills = skipTemplate || !selectedSkills.length
|
|
249
|
+
? { installed: [], commands: [], skipped: true }
|
|
250
|
+
: installSkillsCli(cwd, selectedSkills, catalog.skills, { dryRun })
|
|
251
|
+
|
|
246
252
|
const mcp = skipMcp
|
|
247
253
|
? { path: join(cwd, '.cursor', 'mcp.json'), action: 'skipped-flag' }
|
|
248
254
|
: mergeMcpConfig(cwd, { force, dryRun })
|
|
@@ -277,6 +283,15 @@ export async function runSetup(options) {
|
|
|
277
283
|
}
|
|
278
284
|
}
|
|
279
285
|
|
|
286
|
+
if (remoteSkills.skipped) {
|
|
287
|
+
// no companions selected or template step skipped
|
|
288
|
+
} else if (remoteSkills.dryRun) {
|
|
289
|
+
console.log(`Skills CLI: dry-run — would install ${remoteSkills.installed.join(', ')}`)
|
|
290
|
+
for (const command of remoteSkills.commands) console.log(` $ ${command}`)
|
|
291
|
+
} else {
|
|
292
|
+
console.log(`Skills CLI: installed ${remoteSkills.installed.join(', ')} (latest)`)
|
|
293
|
+
}
|
|
294
|
+
|
|
280
295
|
if (mcp.action === 'skipped-flag') {
|
|
281
296
|
console.log('MCP: skipped (--skip-mcp or app mode)')
|
|
282
297
|
} else {
|
|
@@ -316,5 +331,5 @@ export async function runSetup(options) {
|
|
|
316
331
|
console.log(' 4. Optional: pnpm check:colors')
|
|
317
332
|
}
|
|
318
333
|
|
|
319
|
-
return { mode, install, template, mcp, styles, scripts, skills: selectedSkills }
|
|
334
|
+
return { mode, install, template, remoteSkills, mcp, styles, scripts, skills: selectedSkills }
|
|
320
335
|
}
|
package/src/skills.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { execSync } from 'node:child_process'
|
|
1
2
|
import { createInterface } from 'node:readline'
|
|
2
3
|
import { dirname, join } from 'node:path'
|
|
3
4
|
import { fileURLToPath } from 'node:url'
|
|
@@ -13,6 +14,9 @@ const CATALOG_PATH = join(__dirname, '..', 'catalog', 'skills.json')
|
|
|
13
14
|
* description: string
|
|
14
15
|
* required?: boolean
|
|
15
16
|
* default?: boolean
|
|
17
|
+
* install?: 'template' | 'skills-cli'
|
|
18
|
+
* source?: string
|
|
19
|
+
* skill?: string
|
|
16
20
|
* path: string
|
|
17
21
|
* }} SkillEntry
|
|
18
22
|
*/
|
|
@@ -24,6 +28,20 @@ export function loadSkillsCatalog() {
|
|
|
24
28
|
return readJson(CATALOG_PATH)
|
|
25
29
|
}
|
|
26
30
|
|
|
31
|
+
/**
|
|
32
|
+
* @param {SkillEntry} skill
|
|
33
|
+
*/
|
|
34
|
+
export function isTemplateSkill(skill) {
|
|
35
|
+
return !skill.install || skill.install === 'template'
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @param {SkillEntry} skill
|
|
40
|
+
*/
|
|
41
|
+
export function isSkillsCliSkill(skill) {
|
|
42
|
+
return skill.install === 'skills-cli'
|
|
43
|
+
}
|
|
44
|
+
|
|
27
45
|
/**
|
|
28
46
|
* @param {SkillEntry[]} skills
|
|
29
47
|
*/
|
|
@@ -63,21 +81,23 @@ export function parseSkillsFlag(raw, skills) {
|
|
|
63
81
|
}
|
|
64
82
|
|
|
65
83
|
/**
|
|
84
|
+
* Template-relative paths for skills that ship inside the package template.
|
|
66
85
|
* @param {string[]} skillIds
|
|
67
86
|
* @param {SkillEntry[]} skills
|
|
68
87
|
* @returns {string[]}
|
|
69
88
|
*/
|
|
70
89
|
export function skillPathsForIds(skillIds, skills) {
|
|
71
90
|
const byId = new Map(skills.map((s) => [s.id, s]))
|
|
72
|
-
return skillIds.
|
|
91
|
+
return skillIds.flatMap((id) => {
|
|
73
92
|
const entry = byId.get(id)
|
|
74
93
|
if (!entry) throw new Error(`Unknown skill id: ${id}`)
|
|
75
|
-
return
|
|
94
|
+
if (!isTemplateSkill(entry)) return []
|
|
95
|
+
return [entry.path]
|
|
76
96
|
})
|
|
77
97
|
}
|
|
78
98
|
|
|
79
99
|
/**
|
|
80
|
-
* Build template include prefixes for the AI pack.
|
|
100
|
+
* Build template include prefixes for the AI pack (first-party files only).
|
|
81
101
|
* @param {string[]} skillIds
|
|
82
102
|
* @param {SkillEntry[]} skills
|
|
83
103
|
*/
|
|
@@ -90,6 +110,54 @@ export function buildAiInclude(skillIds, skills) {
|
|
|
90
110
|
]
|
|
91
111
|
}
|
|
92
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Install selected companion skills via the skills CLI (always latest from source).
|
|
115
|
+
* @param {string} cwd
|
|
116
|
+
* @param {string[]} skillIds
|
|
117
|
+
* @param {SkillEntry[]} skills
|
|
118
|
+
* @param {{ dryRun?: boolean }} [options]
|
|
119
|
+
* @returns {{ installed: string[], commands: string[], dryRun?: boolean, skipped?: boolean }}
|
|
120
|
+
*/
|
|
121
|
+
export function installSkillsCli(cwd, skillIds, skills, { dryRun = false } = {}) {
|
|
122
|
+
const selected = skills.filter((s) => skillIds.includes(s.id) && isSkillsCliSkill(s))
|
|
123
|
+
if (!selected.length) {
|
|
124
|
+
return { installed: [], commands: [], skipped: true }
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
for (const entry of selected) {
|
|
128
|
+
if (!entry.source) {
|
|
129
|
+
throw new Error(`Skill "${entry.id}" is marked skills-cli but has no source`)
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** @type {Map<string, string[]>} */
|
|
134
|
+
const bySource = new Map()
|
|
135
|
+
for (const entry of selected) {
|
|
136
|
+
const name = entry.skill || entry.id
|
|
137
|
+
const list = bySource.get(entry.source) || []
|
|
138
|
+
list.push(name)
|
|
139
|
+
bySource.set(entry.source, list)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const commands = []
|
|
143
|
+
for (const [source, names] of bySource) {
|
|
144
|
+
const skillFlags = names.map((name) => `-s ${name}`).join(' ')
|
|
145
|
+
commands.push(`npx -y skills add ${source} ${skillFlags} -a cursor -y`)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (dryRun) {
|
|
149
|
+
return { installed: selected.map((s) => s.id), commands, dryRun: true }
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
console.log('Companion skills (latest via skills CLI):')
|
|
153
|
+
for (const command of commands) {
|
|
154
|
+
console.log(` $ ${command}`)
|
|
155
|
+
execSync(command, { cwd, stdio: 'inherit', shell: true })
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return { installed: selected.map((s) => s.id), commands }
|
|
159
|
+
}
|
|
160
|
+
|
|
93
161
|
/**
|
|
94
162
|
* Prompt for optional skills when stdin is a TTY.
|
|
95
163
|
* Required skills are always included.
|
|
@@ -108,7 +176,8 @@ export async function resolveSkillSelection(skills, { skipPrompt = false } = {})
|
|
|
108
176
|
console.log('Select optional Agent skills (in addition to required):')
|
|
109
177
|
optional.forEach((skill, index) => {
|
|
110
178
|
const mark = skill.default ? 'x' : ' '
|
|
111
|
-
|
|
179
|
+
const via = isSkillsCliSkill(skill) ? ' [latest via skills CLI]' : ''
|
|
180
|
+
console.log(` ${index + 1}. [${mark}] ${skill.id} — ${skill.description}${via}`)
|
|
112
181
|
})
|
|
113
182
|
console.log('')
|
|
114
183
|
console.log('Enter comma-separated numbers or ids (empty = defaults only).')
|
|
@@ -100,7 +100,7 @@ Run **before** delivery. Do not stop at a structurally correct shell.
|
|
|
100
100
|
|
|
101
101
|
- **Ops:** apply [visual-craft.md](references/visual-craft.md) § Ops polish (one primary, menu icons, `MStatus` in tables, designed empty, no decorative cards).
|
|
102
102
|
- **Account / Flow:** one calm brand or empty-state cue from § Atmosphere recipes; form errors via `errorMessage` / token `role="alert"`.
|
|
103
|
-
- **Express:** short design plan + one signature; avoid AI-default looks; optional 1–2 token-only motions;
|
|
103
|
+
- **Express:** short design plan + one signature; avoid AI-default looks; optional 1–2 token-only motions; intensity via `useMotion` (`full` / `reduced` / `none`), not the OS `prefers-reduced-motion` setting.
|
|
104
104
|
- **All lanes:** responsive, focus visible, domain-real copy (active voice).
|
|
105
105
|
|
|
106
106
|
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.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{
|
|
5
5
|
"id": 1,
|
|
6
6
|
"prompt": "我们内部教务系统用 Vue3 + morya-ui。请做一个「课程列表」后台页:按课程名搜索、按开课状态(全部/开课中/已结课)筛选;表格列:名称、状态、学分、更新时间;行内「编辑」进抽屉表单,「删除」要二次确认;右上角「新建课程」。保存/删除成功只要一句话提示。输出单个 Vue SFC,结构对齐列表黄金样例,并做 Ops 精致化(侧栏图标、状态用 MStatus、空态用 MEmpty、行操作不要一排实心按钮)。",
|
|
7
|
-
"expected_output": "Ops list: MLayout/MPageFilters/
|
|
7
|
+
"expected_output": "Ops list: MLayout/MPageHeader/MPageFilters/MTable rows, optional batch MPageToolbar, MSelect status, MDrawer edit, MConfirmDialog delete, message not toast, MStatus for status, MEmpty in #empty, menu icons, text/small row actions, craft pass applied, no second UI kit.",
|
|
8
8
|
"files": []
|
|
9
9
|
},
|
|
10
10
|
{
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
{
|
|
17
17
|
"id": 3,
|
|
18
18
|
"prompt": "运营后台首页仪表盘:四个 KPI(今日订单、待处理、转化率、退款率)、中间一块图表占位、右侧或下方「最近告警」表格(级别、内容、时间)。Vue3 + morya-ui,可先用静态假数据;告警级别可用 Tag,状态用 MStatus。",
|
|
19
|
-
"expected_output": "Dashboard: MPageStat grid with domain labels,
|
|
19
|
+
"expected_output": "Dashboard: MPageStat grid with domain labels, MCard shadow=always + MEmpty chart pending, recent MTable with MStatus, MLayout shell, --m-* only, spacious density.",
|
|
20
20
|
"files": []
|
|
21
21
|
},
|
|
22
22
|
{
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"id": 5,
|
|
30
|
-
"prompt": "
|
|
31
|
-
"expected_output": "Flow empty: MEmpty + next-action MButton, short copy,
|
|
30
|
+
"prompt": "课程列表在零数据时太空了。请设计一个空状态区块(可嵌在列表页内容区):说明还没有课程、引导「创建第一门课程」;视觉克制,用 morya-ui 默认空态即可,不要自定义 dashed 框或径向光晕。只要空状态相关模板片段或带空状态的列表 SFC 均可。",
|
|
31
|
+
"expected_output": "Flow empty: MPageHeader + MEmpty + next-action MButton, short copy, no custom dashed/radial shell, fits list content slot.",
|
|
32
32
|
"files": []
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"id": 6,
|
|
36
|
-
"prompt": "为「流水线 CI」产品写一个营销落地首页(不是后台):首屏只有品牌名、一句主标题、一句副文、一组 CTA;下面再分「为何选择」「能力」「客户」三节。技术实现用 Vue3 + morya-ui 组件做按钮/标签/折叠 FAQ;颜色走 --m-*,避免紫渐变和奶油衬线陶土那套 AI 默认脸。可有 1–2
|
|
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 个微动效,强度跟 useMotion / data-m-motion。输出单个 Vue SFC。",
|
|
37
|
+
"expected_output": "Express landing: single-job hero, MButton CTAs, sections with one job each, MAccordion FAQ optional, no purple/cream-terracotta defaults, no admin MPageFilters shell, motion gated by useMotion / data-m-motion.",
|
|
38
38
|
"files": []
|
|
39
39
|
},
|
|
40
40
|
{
|
|
@@ -43,9 +43,9 @@ import 'morya-ui/styles.css'
|
|
|
43
43
|
| Admin chrome | `MLayout fillViewport` + sider / header / content |
|
|
44
44
|
| Sider nav | `MMenu` |
|
|
45
45
|
| Page stack | `MPageContent` inside `MLayoutContent` |
|
|
46
|
-
|
|
|
46
|
+
| List chrome | `MPageHeader` + `MPageFilters` (+ optional batch `MPageToolbar`) |
|
|
47
47
|
| Form surfaces | `MPageHeader` + `MPageSection variant="form|actions"` |
|
|
48
|
-
| Dashboard KPI | `MPageStat` + `
|
|
48
|
+
| Dashboard KPI / chart pending | `MPageStat` + `MCard shadow="always"` + `MEmpty` |
|
|
49
49
|
| Module cards | `MCard` / `MPanel` / `MFieldset` |
|
|
50
50
|
| Grid / spacing | `MGrid` + `MGridItem`, or `MFlex` / `MSpace` |
|
|
51
51
|
|
|
@@ -1,6 +1,6 @@
|
|
|
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 installed by `@morya-ui/setup`
|
|
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` via the [skills CLI](https://skills.sh/) (always the latest published version).
|
|
4
4
|
|
|
5
5
|
## Conflict rule
|
|
6
6
|
|
|
@@ -13,15 +13,15 @@ This skill is **standalone**. Distilled craft lives in [visual-craft.md](visual-
|
|
|
13
13
|
npx @morya-ui/setup ai
|
|
14
14
|
|
|
15
15
|
# Non-interactive
|
|
16
|
-
npx @morya-ui/setup ai --skills=morya-ui-pages,frontend-design,fixing-accessibility
|
|
16
|
+
npx @morya-ui/setup ai --skills=morya-ui-pages,frontend-design,fixing-accessibility,impeccable
|
|
17
17
|
npx @morya-ui/setup ai --skills=all
|
|
18
18
|
```
|
|
19
19
|
|
|
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`
|
|
20
|
+
| Companion | Source | Safe use | Unsafe use |
|
|
21
|
+
| --- | --- | --- | --- |
|
|
22
|
+
| `frontend-design` | `anthropics/skills` | Express / brand panel taste after surface + contract are fixed | Replacing Ops golden shell or introducing a second UI kit |
|
|
23
|
+
| `fixing-accessibility` | `ibelick/ui-skills` | Names, keyboard, focus, form errors on top of `M*` | Replacing library dialogs/menus with custom ARIA widgets |
|
|
24
|
+
| `impeccable` | `pbakaus/impeccable` | Named polish / audit passes aligned with [visual-craft.md](visual-craft.md) | New token schema or swapping `M*` for raw HTML controls |
|
|
25
25
|
|
|
26
26
|
## Load budget
|
|
27
27
|
|
|
@@ -30,11 +30,13 @@ Via MCP: `recommend_page` → `get_golden_page`; local edits: `get_page_snippet`
|
|
|
30
30
|
2. Sider `MMenu` (**every item has `icon`**)
|
|
31
31
|
3. `MLayoutHeader` → `MBreadcrumb`
|
|
32
32
|
4. `MLayoutContent` → `MPageContent`
|
|
33
|
-
5. `
|
|
34
|
-
6. `
|
|
35
|
-
7. `
|
|
36
|
-
8.
|
|
37
|
-
9.
|
|
33
|
+
5. `MPageHeader` — page title + `#actions` primary (**one** filled primary in viewport)
|
|
34
|
+
6. `MPageFilters` — `variant="filled"` optional; inner `MSpace wrap` + Input/Select + query/reset (query/reset → secondary); optional `collapsible` + `#advanced` for secondary fields
|
|
35
|
+
7. Optional `MPageFilterChips` + closable `MTag` when filters are applied (after filters, before table)
|
|
36
|
+
8. Optional `MPageToolbar` — batch actions only (no page title)
|
|
37
|
+
9. `MTable` directly in content (usually **no** wrapping `MCard`); status → `MStatus`; `#empty` → `MEmpty`
|
|
38
|
+
10. Pagination via `MTable` paginator or sibling `MPagination`
|
|
39
|
+
11. Short create/edit → `MDialog` + `MForm` on the same page (default)
|
|
38
40
|
|
|
39
41
|
Craft: [visual-craft.md](visual-craft.md) § Ops polish.
|
|
40
42
|
|
|
@@ -51,7 +53,7 @@ Craft: [visual-craft.md](visual-craft.md) § Ops polish.
|
|
|
51
53
|
1. `MLayout fillViewport` → `MLayoutHeader` → `MBreadcrumb`
|
|
52
54
|
2. `MPageContent density="spacious"` → `MPageHeader` (title + short domain description when useful)
|
|
53
55
|
3. KPI row: `MGrid` + `MPageStat` (4 columns or responsive) — real metric names, not “Metric 1”
|
|
54
|
-
4. Main split: `MCard` + `
|
|
56
|
+
4. Main split: `MCard shadow="always"` + `MEmpty` (chart pending) and/or recent `MTable` (row status → `MStatus`)
|
|
55
57
|
|
|
56
58
|
Craft: spacious density + Ops polish; do not turn the first viewport into a marketing hero.
|
|
57
59
|
|
|
@@ -82,7 +84,7 @@ Mirror MCP `get_golden_page` `detail-page`.
|
|
|
82
84
|
|
|
83
85
|
## List create/edit dialog — block order
|
|
84
86
|
|
|
85
|
-
1. Stay on the list page (`
|
|
87
|
+
1. Stay on the list page (`MPageHeader` + filters/table; optional batch `MPageToolbar`)
|
|
86
88
|
2. `MDialog` ~`28–36rem` + `MForm` fields
|
|
87
89
|
3. Actions in Dialog `#footer` (cancel secondary/text + save primary)
|
|
88
90
|
4. Success → `message.success` one-liner, then close
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
- [ ] At most one primary filled button in the main viewport
|
|
20
20
|
- [ ] Copy is domain-real; empty / error states say what to do next
|
|
21
21
|
- [ ] No AI-default look clusters unless the brief asked for them
|
|
22
|
-
- [ ] Motion (if any) is 1–3 intentional moments and
|
|
22
|
+
- [ ] Motion (if any) is 1–3 intentional moments and follows `useMotion` / `data-m-motion` (not OS `prefers-reduced-motion`)
|
|
23
23
|
|
|
24
24
|
## Ops
|
|
25
25
|
|
|
@@ -31,7 +31,7 @@ Apply after the golden block order is correct. These are **required**, not optio
|
|
|
31
31
|
2. **Sider icons** — every top-level `MMenu` item has an `icon`; icons come from one set (built-in Tabler names). No random emoji.
|
|
32
32
|
3. **Status cells** — row business state → `MStatus` (dot + label). `MTag` only for categories, filters, or closable chips.
|
|
33
33
|
4. **Row actions** — secondary `text` / `outlined` / `size="small"`; danger only on destructive. Prefer `MSpace` with a consistent gap; avoid a wall of filled buttons.
|
|
34
|
-
5. **Filter rhythm** — search ~`14rem`, compact selects ~`10–12rem`; wrap with `MSpace wrap`. Do not stretch filters full-bleed.
|
|
34
|
+
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`.
|
|
35
35
|
6. **Empty is designed** — `MEmpty` (or table `#empty` with `MEmpty`) with a next action; never a silent blank table or a lone muted sentence.
|
|
36
36
|
7. **No extra cards** — do not wrap `MPageFilters` / `MTable` in decorative `MCard` “for polish”. Dashboard chart/detail modules may use `MCard`.
|
|
37
37
|
8. **Domain copy** — column labels, placeholders, and empty titles use product vernacular, not “Name / Status / No data”.
|
|
@@ -57,7 +57,7 @@ Also avoid: Inter/Roboto/Arial as the *expressive* display choice on Express sur
|
|
|
57
57
|
- **Hero is a thesis** (Express): one job in the first viewport — not stats + schedule + promos together.
|
|
58
58
|
- **Structure encodes meaning**: numbered steps only when order is real information.
|
|
59
59
|
- **Cards**: default off for Express heroes; use `MCard` when it groups an interaction or plan choice.
|
|
60
|
-
- **Motion**: orchestrate 2–3 intentional moments max;
|
|
60
|
+
- **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.
|
|
61
61
|
- **Density**: Ops may be compact; Express needs breathing room — match the lane.
|
|
62
62
|
|
|
63
63
|
## Atmosphere recipes (token-only)
|
|
@@ -121,14 +121,12 @@ Full-bleed thesis: brand mark (small) → one headline → one lead → CTA grou
|
|
|
121
121
|
Optional micro-motion (one signature only):
|
|
122
122
|
|
|
123
123
|
```css
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
animation: m-craft-fade-up 480ms ease both;
|
|
127
|
-
}
|
|
128
|
-
.landing-hero__track span:nth-child(2) { animation-delay: 60ms; }
|
|
129
|
-
.landing-hero__track span:nth-child(3) { animation-delay: 120ms; }
|
|
130
|
-
.landing-hero__track span:nth-child(4) { animation-delay: 180ms; }
|
|
124
|
+
[data-m-motion="full"] .landing-hero__track span {
|
|
125
|
+
animation: m-craft-fade-up 480ms ease both;
|
|
131
126
|
}
|
|
127
|
+
[data-m-motion="full"] .landing-hero__track span:nth-child(2) { animation-delay: 60ms; }
|
|
128
|
+
[data-m-motion="full"] .landing-hero__track span:nth-child(3) { animation-delay: 120ms; }
|
|
129
|
+
[data-m-motion="full"] .landing-hero__track span:nth-child(4) { animation-delay: 180ms; }
|
|
132
130
|
@keyframes m-craft-fade-up {
|
|
133
131
|
from { opacity: 0; transform: translateY(0.4rem); }
|
|
134
132
|
to { opacity: 1; transform: translateY(0); }
|
|
@@ -31,11 +31,13 @@ alwaysApply: false
|
|
|
31
31
|
2. 侧栏 `MMenu`
|
|
32
32
|
3. `MLayoutHeader` → `MBreadcrumb`
|
|
33
33
|
4. `MLayoutContent` → `MPageContent`
|
|
34
|
-
5. `
|
|
35
|
-
6. `
|
|
36
|
-
7. `
|
|
37
|
-
8.
|
|
38
|
-
9.
|
|
34
|
+
5. `MPageHeader`(页面标题 + `#actions` 主操作;视口内 **唯一** filled primary)
|
|
35
|
+
6. `MPageFilters`(可选 `variant="filled"`、`collapsible` + `#advanced`;查询/重置用 secondary)
|
|
36
|
+
7. 可选 `MPageFilterChips` + 可关闭 `MTag`(有已选条件时,放在筛选与表格之间)
|
|
37
|
+
8. 可选 `MPageToolbar`(仅批量操作,**不要**页面标题)
|
|
38
|
+
9. `MTable`(直接放置;`#empty` → `MEmpty`)
|
|
39
|
+
10. 分页由 `MTable paginator` 或同级 `MPagination`
|
|
40
|
+
11. 短新建/编辑:同页 `MDialog` + `MForm`
|
|
39
41
|
|
|
40
42
|
## 表单页区块顺序
|
|
41
43
|
|
|
@@ -50,7 +52,7 @@ alwaysApply: false
|
|
|
50
52
|
1. `MLayout fillViewport` → `MLayoutHeader` → `MBreadcrumb`
|
|
51
53
|
2. `MPageContent density="spacious"` → `MPageHeader`
|
|
52
54
|
3. KPI:`MGrid` + `MPageStat`(4 列或响应式)
|
|
53
|
-
4. 主区两栏:`MCard` + `
|
|
55
|
+
4. 主区两栏:`MCard shadow="always"` + `MEmpty`(图表未接入)/ 最近列表 `MTable`
|
|
54
56
|
|
|
55
57
|
## 页面标准
|
|
56
58
|
|
package/template/DESIGN.md
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
| 动效时长 | `--m-motion-fast/normal/enter/exit` |
|
|
35
35
|
| 进出场位移 / 缓动 | `--m-motion-distance` / `--m-motion-ease` |
|
|
36
36
|
|
|
37
|
-
动效强度用 `useMotion`(`data-m-motion
|
|
37
|
+
动效强度用 `useMotion`(`data-m-motion`:`full` / `reduced` / `none`),不跟随系统 `prefers-reduced-motion`;进出场预设用 `motion.transitions` / 组件 `transition`(见文档站「动效」)。
|
|
38
38
|
|
|
39
39
|
## 4. 禁止项
|
|
40
40
|
|
|
@@ -1,138 +0,0 @@
|
|
|
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
|
|
@@ -1,177 +0,0 @@
|
|
|
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
|
|
@@ -1,57 +0,0 @@
|
|
|
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.
|