@morya-ui/mcp 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/data/catalog.json +74 -74
- package/data/example-coverage.json +2 -2
- package/data/golden-pages/dashboard-page.vue +41 -8
- package/data/golden-pages/empty-state.vue +22 -1
- package/data/golden-pages/form-page.vue +1 -1
- package/data/golden-pages/landing-page.vue +31 -1
- package/data/golden-pages/list-page.vue +25 -12
- package/data/golden-pages/login-page.vue +44 -4
- package/dist/__tests__/tools.test.js +10 -0
- package/dist/decisions.js +136 -1
- package/dist/page-snippets.js +27 -17
- package/dist/patterns.d.ts +4 -2
- package/dist/patterns.js +4 -2
- package/dist/tools.js +23 -3
- package/package.json +1 -1
package/dist/patterns.d.ts
CHANGED
|
@@ -92,13 +92,15 @@ export declare const designRules: {
|
|
|
92
92
|
readonly status: {
|
|
93
93
|
readonly preferred: "MStatus";
|
|
94
94
|
readonly chip: "MTag";
|
|
95
|
+
readonly badge: "MBadge";
|
|
96
|
+
readonly entity: "MChip";
|
|
95
97
|
readonly mapping: {
|
|
96
98
|
readonly active: "success";
|
|
97
99
|
readonly pending: "warn";
|
|
98
100
|
readonly disabled: "secondary";
|
|
99
101
|
readonly error: "danger";
|
|
100
102
|
};
|
|
101
|
-
readonly note: "行内轻量状态用 MStatus
|
|
103
|
+
readonly note: "行内轻量状态用 MStatus;分类或可关闭标签用 MTag;数量角标用 MBadge;可移除实体用 MChip";
|
|
102
104
|
};
|
|
103
105
|
readonly feedback: {
|
|
104
106
|
readonly default: "message";
|
|
@@ -126,7 +128,7 @@ export declare const designRules: {
|
|
|
126
128
|
readonly api: "field errorMessage | token-styled role=alert";
|
|
127
129
|
readonly when: readonly ["登录/表单区常驻错误:优先字段 errorMessage", "表单级总结:使用 --m-* 样式的 role=alert 条(见 login-page 黄金样例)", "MMessage 组件当前主要为 message 服务宿主,勿臆造 severity 子节点 API"];
|
|
128
130
|
};
|
|
129
|
-
readonly doc: "
|
|
131
|
+
readonly doc: "design-kit/.agents/skills/morya-ui-pages/references/feedback.md";
|
|
130
132
|
};
|
|
131
133
|
readonly global: readonly ["优先使用组件库组件和 --m-* Token", "操作反馈默认 message;仅一行文案时优先于 toast", "空态用 MEmpty;结果/阻断页用 MResult;行内状态优先 MStatus", "图标按钮建议提供 aria-label;表单字段建议有可见 label", "浮层默认 Teleport 到 body;有明确布局约束时再改 appendTo", "优先使用组件 documented variant,少写深层 CSS 覆盖"];
|
|
132
134
|
};
|
package/dist/patterns.js
CHANGED
|
@@ -693,8 +693,10 @@ export const designRules = {
|
|
|
693
693
|
status: {
|
|
694
694
|
preferred: 'MStatus',
|
|
695
695
|
chip: 'MTag',
|
|
696
|
+
badge: 'MBadge',
|
|
697
|
+
entity: 'MChip',
|
|
696
698
|
mapping: { active: 'success', pending: 'warn', disabled: 'secondary', error: 'danger' },
|
|
697
|
-
note: '行内轻量状态用 MStatus
|
|
699
|
+
note: '行内轻量状态用 MStatus;分类或可关闭标签用 MTag;数量角标用 MBadge;可移除实体用 MChip',
|
|
698
700
|
},
|
|
699
701
|
feedback: {
|
|
700
702
|
default: 'message',
|
|
@@ -726,7 +728,7 @@ export const designRules = {
|
|
|
726
728
|
'MMessage 组件当前主要为 message 服务宿主,勿臆造 severity 子节点 API',
|
|
727
729
|
],
|
|
728
730
|
},
|
|
729
|
-
doc: '
|
|
731
|
+
doc: 'design-kit/.agents/skills/morya-ui-pages/references/feedback.md',
|
|
730
732
|
},
|
|
731
733
|
global: [
|
|
732
734
|
'优先使用组件库组件和 --m-* Token',
|
package/dist/tools.js
CHANGED
|
@@ -1003,13 +1003,25 @@ export function createToolHandlers(catalog = loadCatalog()) {
|
|
|
1003
1003
|
destructive: { component: 'MButton', props: ['severity="danger"'], requiresConfirmation: true },
|
|
1004
1004
|
cancel: { component: 'MButton', props: ['severity="secondary"', 'text'] },
|
|
1005
1005
|
},
|
|
1006
|
-
status: {
|
|
1006
|
+
status: {
|
|
1007
|
+
preferred: 'MStatus',
|
|
1008
|
+
chip: 'MTag',
|
|
1009
|
+
badge: 'MBadge',
|
|
1010
|
+
entity: 'MChip',
|
|
1011
|
+
mapping: { active: 'success', pending: 'warn', disabled: 'secondary', error: 'danger' },
|
|
1012
|
+
note: 'Inline status uses MStatus; category or closable labels use MTag; counts use MBadge.',
|
|
1013
|
+
},
|
|
1007
1014
|
feedback: {
|
|
1008
1015
|
default: 'message',
|
|
1009
1016
|
message: { when: ['single-line action result', 'save/delete/create confirmations'] },
|
|
1010
1017
|
toast: { when: ['summary + detail', 'async or background notifications'] },
|
|
1011
|
-
|
|
1012
|
-
|
|
1018
|
+
empty: { component: 'MEmpty', when: ['no rows', 'no filter matches', 'first use'] },
|
|
1019
|
+
result: { component: 'MResult', when: ['terminal success/failure', '403 / 404 / 500'] },
|
|
1020
|
+
inlineMessage: {
|
|
1021
|
+
api: 'field errorMessage | token-styled role=alert',
|
|
1022
|
+
when: ['persistent form/auth errors; MMessage is the message host, not an inline alert'],
|
|
1023
|
+
},
|
|
1024
|
+
doc: 'design-kit/.agents/skills/morya-ui-pages/references/feedback.md',
|
|
1013
1025
|
},
|
|
1014
1026
|
global: [
|
|
1015
1027
|
'Prefer library components and --m-* tokens.',
|
|
@@ -1104,6 +1116,14 @@ export function createToolHandlers(catalog = loadCatalog()) {
|
|
|
1104
1116
|
install: 'pnpm add morya-ui',
|
|
1105
1117
|
peer: 'vue@^3.3.0',
|
|
1106
1118
|
styles: "import 'morya-ui/styles.css'",
|
|
1119
|
+
aiSetup: {
|
|
1120
|
+
command: 'npx @morya-ui/setup',
|
|
1121
|
+
skill: 'morya-ui-pages',
|
|
1122
|
+
mcp: 'npx -y @morya-ui/mcp',
|
|
1123
|
+
note: locale === 'en-US'
|
|
1124
|
+
? 'setup installs the library, copies the page skill and Cursor rules, and merges MCP. Table data uses the rows prop. MMessage is the message host, not an inline alert.'
|
|
1125
|
+
: 'setup 会安装组件库、复制页面 skill 与 Cursor 规则,并合并 MCP。表格数据用 rows。MMessage 是 message 宿主,不是内嵌 Alert。',
|
|
1126
|
+
},
|
|
1107
1127
|
guides: {
|
|
1108
1128
|
introduction: pickMarkdown(intro),
|
|
1109
1129
|
quickStart: pickMarkdown(quickStart),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morya-ui/mcp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.9",
|
|
5
5
|
"description": "MCP server for morya-ui — component docs, examples, and usage guidance for AI coding agents.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/morya-space/morya-ui/tree/main/packages/ui-mcp#readme",
|