@morya-ui/mcp 0.2.6 → 0.2.8
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/data/catalog.json +841 -249
- package/data/example-coverage.json +58 -20
- package/dist/decisions.js +69 -0
- package/dist/golden-pages.js +1 -1
- package/dist/patterns.js +7 -7
- package/dist/tools.js +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-09-
|
|
3
|
-
"catalogGeneratedAt": "2026-09-
|
|
2
|
+
"generatedAt": "2026-09-21T01:37:39.078Z",
|
|
3
|
+
"catalogGeneratedAt": "2026-09-21T01:37:31.355Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"id": "Accordion",
|
|
@@ -844,12 +844,15 @@
|
|
|
844
844
|
{
|
|
845
845
|
"id": "Empty",
|
|
846
846
|
"exportName": "MEmpty",
|
|
847
|
-
"examples":
|
|
847
|
+
"examples": 12,
|
|
848
848
|
"props": {
|
|
849
|
-
"total":
|
|
850
|
-
"covered":
|
|
849
|
+
"total": 10,
|
|
850
|
+
"covered": 5,
|
|
851
851
|
"missing": [
|
|
852
|
+
"showDescription",
|
|
853
|
+
"showIcon",
|
|
852
854
|
"image",
|
|
855
|
+
"size",
|
|
853
856
|
"pt"
|
|
854
857
|
]
|
|
855
858
|
},
|
|
@@ -859,13 +862,12 @@
|
|
|
859
862
|
"missing": []
|
|
860
863
|
},
|
|
861
864
|
"slots": {
|
|
862
|
-
"total":
|
|
865
|
+
"total": 5,
|
|
863
866
|
"covered": 2,
|
|
864
867
|
"missing": [
|
|
865
868
|
"icon",
|
|
866
869
|
"image",
|
|
867
|
-
"title"
|
|
868
|
-
"description"
|
|
870
|
+
"title"
|
|
869
871
|
]
|
|
870
872
|
},
|
|
871
873
|
"methods": {
|
|
@@ -1602,6 +1604,41 @@
|
|
|
1602
1604
|
"missing": []
|
|
1603
1605
|
}
|
|
1604
1606
|
},
|
|
1607
|
+
{
|
|
1608
|
+
"id": "Loading",
|
|
1609
|
+
"exportName": "MLoading",
|
|
1610
|
+
"examples": 14,
|
|
1611
|
+
"props": {
|
|
1612
|
+
"total": 11,
|
|
1613
|
+
"covered": 4,
|
|
1614
|
+
"missing": [
|
|
1615
|
+
"ariaLabel",
|
|
1616
|
+
"background",
|
|
1617
|
+
"customClass",
|
|
1618
|
+
"fullscreen",
|
|
1619
|
+
"lock",
|
|
1620
|
+
"delay",
|
|
1621
|
+
"pt"
|
|
1622
|
+
]
|
|
1623
|
+
},
|
|
1624
|
+
"events": {
|
|
1625
|
+
"total": 0,
|
|
1626
|
+
"covered": 0,
|
|
1627
|
+
"missing": []
|
|
1628
|
+
},
|
|
1629
|
+
"slots": {
|
|
1630
|
+
"total": 2,
|
|
1631
|
+
"covered": 1,
|
|
1632
|
+
"missing": [
|
|
1633
|
+
"indicator"
|
|
1634
|
+
]
|
|
1635
|
+
},
|
|
1636
|
+
"methods": {
|
|
1637
|
+
"total": 0,
|
|
1638
|
+
"covered": 0,
|
|
1639
|
+
"missing": []
|
|
1640
|
+
}
|
|
1641
|
+
},
|
|
1605
1642
|
{
|
|
1606
1643
|
"id": "MegaMenu",
|
|
1607
1644
|
"exportName": "MMegaMenu",
|
|
@@ -2085,12 +2122,11 @@
|
|
|
2085
2122
|
{
|
|
2086
2123
|
"id": "Result",
|
|
2087
2124
|
"exportName": "MResult",
|
|
2088
|
-
"examples":
|
|
2125
|
+
"examples": 10,
|
|
2089
2126
|
"props": {
|
|
2090
|
-
"total":
|
|
2091
|
-
"covered":
|
|
2127
|
+
"total": 6,
|
|
2128
|
+
"covered": 4,
|
|
2092
2129
|
"missing": [
|
|
2093
|
-
"title",
|
|
2094
2130
|
"icon",
|
|
2095
2131
|
"pt"
|
|
2096
2132
|
]
|
|
@@ -2501,10 +2537,10 @@
|
|
|
2501
2537
|
{
|
|
2502
2538
|
"id": "Status",
|
|
2503
2539
|
"exportName": "MStatus",
|
|
2504
|
-
"examples":
|
|
2540
|
+
"examples": 10,
|
|
2505
2541
|
"props": {
|
|
2506
|
-
"total":
|
|
2507
|
-
"covered":
|
|
2542
|
+
"total": 8,
|
|
2543
|
+
"covered": 7,
|
|
2508
2544
|
"missing": [
|
|
2509
2545
|
"color"
|
|
2510
2546
|
]
|
|
@@ -2515,9 +2551,11 @@
|
|
|
2515
2551
|
"missing": []
|
|
2516
2552
|
},
|
|
2517
2553
|
"slots": {
|
|
2518
|
-
"total":
|
|
2554
|
+
"total": 2,
|
|
2519
2555
|
"covered": 1,
|
|
2520
|
-
"missing": [
|
|
2556
|
+
"missing": [
|
|
2557
|
+
"icon"
|
|
2558
|
+
]
|
|
2521
2559
|
},
|
|
2522
2560
|
"methods": {
|
|
2523
2561
|
"total": 0,
|
|
@@ -3191,8 +3229,8 @@
|
|
|
3191
3229
|
}
|
|
3192
3230
|
],
|
|
3193
3231
|
"summary": {
|
|
3194
|
-
"components":
|
|
3195
|
-
"componentsWithMissingCoverage":
|
|
3196
|
-
"totalExamples":
|
|
3232
|
+
"components": 93,
|
|
3233
|
+
"componentsWithMissingCoverage": 88,
|
|
3234
|
+
"totalExamples": 803
|
|
3197
3235
|
}
|
|
3198
3236
|
}
|
package/dist/decisions.js
CHANGED
|
@@ -383,6 +383,75 @@ export const componentDecisions = [
|
|
|
383
383
|
},
|
|
384
384
|
],
|
|
385
385
|
},
|
|
386
|
+
{
|
|
387
|
+
id: 'loading-choice',
|
|
388
|
+
title: '如何选择加载反馈',
|
|
389
|
+
titleEn: 'Choosing a loading indicator',
|
|
390
|
+
question: '这是区域或全屏等待、已知布局的占位、可量化进度,还是只需要阻止交互?',
|
|
391
|
+
questionEn: 'Is this a region or fullscreen wait, a placeholder for a known layout, measurable progress, or interaction blocking without a loading message?',
|
|
392
|
+
keywords: [
|
|
393
|
+
'加载',
|
|
394
|
+
'等待',
|
|
395
|
+
'遮罩',
|
|
396
|
+
'骨架',
|
|
397
|
+
'进度',
|
|
398
|
+
'loading',
|
|
399
|
+
'spinner',
|
|
400
|
+
'skeleton',
|
|
401
|
+
'progress',
|
|
402
|
+
'v-loading',
|
|
403
|
+
'mloading',
|
|
404
|
+
],
|
|
405
|
+
options: [
|
|
406
|
+
{
|
|
407
|
+
component: 'Loading',
|
|
408
|
+
when: [
|
|
409
|
+
'一块区域或整页正在等待,用户暂时不能操作这块内容',
|
|
410
|
+
'需要加载文案、多种动效,或用 v-loading / loading.service 盖住已有节点',
|
|
411
|
+
'全屏提交、保存、跳转前的短暂等待',
|
|
412
|
+
],
|
|
413
|
+
whenEn: [
|
|
414
|
+
'A region or the whole page is waiting and that content should not be operated',
|
|
415
|
+
'A caption, effect, v-loading, or loading.service mask over an existing node is needed',
|
|
416
|
+
'A short fullscreen wait before submit, save, or navigation',
|
|
417
|
+
],
|
|
418
|
+
avoidWhen: ['布局已知、希望用占位块避免跳动', '进度可以量化', '只是按钮自己的 loading 状态'],
|
|
419
|
+
avoidWhenEn: [
|
|
420
|
+
'The layout is known and a placeholder should prevent jump',
|
|
421
|
+
'Progress can be measured',
|
|
422
|
+
'Only the button’s own loading state is needed',
|
|
423
|
+
],
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
component: 'Skeleton',
|
|
427
|
+
when: ['内容结构已知,用占位块表示即将出现的卡片、文本或列表', '仪表盘或详情初次进入'],
|
|
428
|
+
whenEn: ['The content structure is known and placeholders stand in for cards, text, or lists', 'First paint of a dashboard or detail view'],
|
|
429
|
+
avoidWhen: ['需要明确的“正在加载”遮罩', '进度可量化'],
|
|
430
|
+
avoidWhenEn: ['An explicit loading mask is required', 'Progress can be measured'],
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
component: 'ProgressBar',
|
|
434
|
+
when: ['进度有百分比或可估算完成度', '上传、导入等长任务'],
|
|
435
|
+
whenEn: ['Progress has a percentage or an estimated completion', 'Long tasks such as upload or import'],
|
|
436
|
+
avoidWhen: ['不知道还要等多久', '只是挡住一块区域'],
|
|
437
|
+
avoidWhenEn: ['Duration is unknown', 'The only goal is to cover a region'],
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
component: 'ProgressSpinner',
|
|
441
|
+
when: ['行内或控件旁需要一个很小的转圈,不盖住内容'],
|
|
442
|
+
whenEn: ['A small inline spinner beside a control, without covering content'],
|
|
443
|
+
avoidWhen: ['区域遮罩、全屏等待或带文案的加载态'],
|
|
444
|
+
avoidWhenEn: ['A region mask, fullscreen wait, or loading state with a caption'],
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
component: 'BlockUI',
|
|
448
|
+
when: ['只需要阻止点击,不需要表达“正在加载”'],
|
|
449
|
+
whenEn: ['Interaction should be blocked without saying that something is loading'],
|
|
450
|
+
avoidWhen: ['用户需要知道正在等待结果'],
|
|
451
|
+
avoidWhenEn: ['The user needs to know a result is still pending'],
|
|
452
|
+
},
|
|
453
|
+
],
|
|
454
|
+
},
|
|
386
455
|
];
|
|
387
456
|
export function findDecision(name) {
|
|
388
457
|
const key = name.trim().toLowerCase().replace(/[-_\s]/g, '');
|
package/dist/golden-pages.js
CHANGED
|
@@ -47,7 +47,7 @@ export const goldenPageCatalog = [
|
|
|
47
47
|
];
|
|
48
48
|
const pkgRoot = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
49
49
|
const bundledDir = join(pkgRoot, 'data/golden-pages');
|
|
50
|
-
const repoDir = join(pkgRoot, '../../
|
|
50
|
+
const repoDir = join(pkgRoot, '../../design-kit/docs/golden-pages');
|
|
51
51
|
function resolveGoldenPagesDir() {
|
|
52
52
|
if (existsSync(bundledDir))
|
|
53
53
|
return bundledDir;
|
package/dist/patterns.js
CHANGED
|
@@ -5,7 +5,7 @@ export const pagePatterns = [
|
|
|
5
5
|
titleEn: 'Admin list page',
|
|
6
6
|
description: '用于资源管理、设备管理、用户管理等带筛选和行操作的数据列表。',
|
|
7
7
|
descriptionEn: 'A resource-management list with filters, actions, row operations, and pagination.',
|
|
8
|
-
goldenPage: '
|
|
8
|
+
goldenPage: 'list-page',
|
|
9
9
|
keywords: [
|
|
10
10
|
'列表',
|
|
11
11
|
'表格',
|
|
@@ -93,7 +93,7 @@ export const pagePatterns = [
|
|
|
93
93
|
titleEn: 'Create or edit form page',
|
|
94
94
|
description: '用于创建或编辑业务对象,包含分组字段、校验和提交状态。',
|
|
95
95
|
descriptionEn: 'A create or edit page with grouped fields, validation, and submit states.',
|
|
96
|
-
goldenPage: '
|
|
96
|
+
goldenPage: 'form-page',
|
|
97
97
|
keywords: ['表单', '新增', '编辑', '创建', '配置', '设置', 'form', 'create', 'edit', 'settings'],
|
|
98
98
|
components: [
|
|
99
99
|
{ component: 'ConfigProvider', role: '应用根包裹' },
|
|
@@ -216,7 +216,7 @@ export const pagePatterns = [
|
|
|
216
216
|
{ component: 'Button', role: '刷新、查看详情和快捷操作', required: false },
|
|
217
217
|
{ component: 'Skeleton', role: '初始加载占位', required: false },
|
|
218
218
|
],
|
|
219
|
-
goldenPage: '
|
|
219
|
+
goldenPage: 'dashboard-page',
|
|
220
220
|
structure: [
|
|
221
221
|
'ConfigProvider',
|
|
222
222
|
'└── Layout',
|
|
@@ -267,7 +267,7 @@ export const pagePatterns = [
|
|
|
267
267
|
titleEn: 'Empty state / no results page',
|
|
268
268
|
description: '用于首次使用、搜索无结果、资源已清空或暂时没有内容的场景。',
|
|
269
269
|
descriptionEn: 'For first use, no search results, empty resources, or temporarily unavailable content.',
|
|
270
|
-
goldenPage: '
|
|
270
|
+
goldenPage: 'empty-state',
|
|
271
271
|
keywords: ['空状态', '无数据', '无结果', '首次使用', 'empty', 'no results', 'no data', 'zero state'],
|
|
272
272
|
components: [
|
|
273
273
|
{ component: 'PageContent', role: '承载空态的内容区', required: false },
|
|
@@ -297,7 +297,7 @@ export const pagePatterns = [
|
|
|
297
297
|
titleEn: 'Login / authentication page',
|
|
298
298
|
description: '用于登录、注册、找回密码和二次认证流程。',
|
|
299
299
|
descriptionEn: 'For login, registration, password recovery, and second-factor authentication flows.',
|
|
300
|
-
goldenPage: '
|
|
300
|
+
goldenPage: 'login-page',
|
|
301
301
|
keywords: ['登录', '注册', '认证', '密码', '验证码', 'login', 'register', 'authentication', 'password', 'otp'],
|
|
302
302
|
components: [
|
|
303
303
|
{ component: 'ConfigProvider', role: '应用根包裹' },
|
|
@@ -329,7 +329,7 @@ export const pagePatterns = [
|
|
|
329
329
|
titleEn: 'Marketing landing page',
|
|
330
330
|
description: '用于产品官网、发布页、定价前导等公开营销表面;首屏单一任务,控件仍用 morya-ui。',
|
|
331
331
|
descriptionEn: 'Public marketing surfaces (product home, launch, pre-pricing). One job in the first viewport; controls still use morya-ui.',
|
|
332
|
-
goldenPage: '
|
|
332
|
+
goldenPage: 'landing-page',
|
|
333
333
|
keywords: [
|
|
334
334
|
'落地页',
|
|
335
335
|
'营销',
|
|
@@ -432,7 +432,7 @@ export const pagePatterns = [
|
|
|
432
432
|
'不使用大面积自定义背景色覆盖组件库 surface Token',
|
|
433
433
|
],
|
|
434
434
|
interactionRules: [
|
|
435
|
-
'
|
|
435
|
+
'已知布局用 Skeleton 占位;区域或全屏等待用 Loading(MLoading / v-loading / loading.service)',
|
|
436
436
|
'资源不存在用 MResult status="404";列表空数据用 MEmpty,不要混用',
|
|
437
437
|
'危险操作必须确认并在成功后刷新或离开当前详情页',
|
|
438
438
|
],
|
package/dist/tools.js
CHANGED
|
@@ -933,8 +933,8 @@ export function createToolHandlers(catalog = loadCatalog()) {
|
|
|
933
933
|
standardId: 'layout-shell',
|
|
934
934
|
type: 'height-chain',
|
|
935
935
|
message: locale === 'en-US'
|
|
936
|
-
? 'Prefer layout-app-shell / golden pages:
|
|
937
|
-
: '对齐 layout-app-shell /
|
|
936
|
+
? 'Prefer layout-app-shell / golden pages: with MLayout, set html, body, #app { height: 100% } when the shell is not using fillViewport.'
|
|
937
|
+
: '对齐 layout-app-shell / 黄金样例:未使用 fillViewport 时,配合 MLayout 设置 html, body, #app { height: 100% }。',
|
|
938
938
|
});
|
|
939
939
|
}
|
|
940
940
|
if (/<MMenu\b/i.test(code)) {
|
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.8",
|
|
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",
|