@morya-ui/mcp 0.4.0 → 0.4.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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "generatedAt": "2026-09-30T07:47:17.177Z",
3
- "catalogGeneratedAt": "2026-09-30T07:47:11.558Z",
2
+ "generatedAt": "2026-10-09T09:32:19.868Z",
3
+ "catalogGeneratedAt": "2026-10-09T09:31:59.453Z",
4
4
  "components": [
5
5
  {
6
6
  "id": "Accordion",
@@ -221,10 +221,11 @@
221
221
  "exportName": "MBadge",
222
222
  "examples": 10,
223
223
  "props": {
224
- "total": 6,
224
+ "total": 7,
225
225
  "covered": 5,
226
226
  "missing": [
227
- "offset"
227
+ "offset",
228
+ "pt"
228
229
  ]
229
230
  },
230
231
  "events": {
@@ -304,15 +305,15 @@
304
305
  {
305
306
  "id": "Button",
306
307
  "exportName": "MButton",
307
- "examples": 24,
308
+ "examples": 30,
308
309
  "props": {
309
- "total": 30,
310
- "covered": 24,
310
+ "total": 23,
311
+ "covered": 17,
311
312
  "missing": [
312
- "dashed",
313
- "ripple",
314
- "press",
315
- "nativeType",
313
+ "htmlType",
314
+ "href",
315
+ "target",
316
+ "autoInsertSpace",
316
317
  "autofocus",
317
318
  "pt"
318
319
  ]
@@ -412,13 +413,20 @@
412
413
  {
413
414
  "id": "Carousel",
414
415
  "exportName": "MCarousel",
415
- "examples": 6,
416
+ "examples": 12,
416
417
  "props": {
417
- "total": 9,
418
- "covered": 6,
418
+ "total": 21,
419
+ "covered": 11,
419
420
  "missing": [
420
- "showIndicators",
421
- "page",
421
+ "currentIndex",
422
+ "defaultIndex",
423
+ "showDots",
424
+ "centeredSlides",
425
+ "trigger",
426
+ "touchable",
427
+ "mousewheel",
428
+ "keyboard",
429
+ "transitionDuration",
422
430
  "pt"
423
431
  ]
424
432
  },
@@ -426,18 +434,26 @@
426
434
  "total": 1,
427
435
  "covered": 0,
428
436
  "missing": [
429
- "update:page"
437
+ "update:currentIndex"
430
438
  ]
431
439
  },
432
440
  "slots": {
433
- "total": 1,
441
+ "total": 3,
434
442
  "covered": 1,
435
- "missing": []
443
+ "missing": [
444
+ "arrow",
445
+ "dots"
446
+ ]
436
447
  },
437
448
  "methods": {
438
- "total": 0,
449
+ "total": 4,
439
450
  "covered": 0,
440
- "missing": []
451
+ "missing": [
452
+ "prev",
453
+ "next",
454
+ "to",
455
+ "getCurrentIndex"
456
+ ]
441
457
  }
442
458
  },
443
459
  {
@@ -522,10 +538,11 @@
522
538
  "exportName": "MChip",
523
539
  "examples": 4,
524
540
  "props": {
525
- "total": 7,
541
+ "total": 8,
526
542
  "covered": 6,
527
543
  "missing": [
528
- "image"
544
+ "image",
545
+ "pt"
529
546
  ]
530
547
  },
531
548
  "events": {
@@ -622,9 +639,8 @@
622
639
  "examples": 4,
623
640
  "props": {
624
641
  "total": 17,
625
- "covered": 6,
642
+ "covered": 7,
626
643
  "missing": [
627
- "type",
628
644
  "loading",
629
645
  "beforeAccept",
630
646
  "beforeReject",
@@ -675,7 +691,7 @@
675
691
  "teleport",
676
692
  "appendTo",
677
693
  "transition",
678
- "acceptSeverity",
694
+ "acceptColor",
679
695
  "pt"
680
696
  ]
681
697
  },
@@ -867,7 +883,7 @@
867
883
  "centered",
868
884
  "teleport",
869
885
  "appendTo",
870
- "positiveSeverity",
886
+ "positiveColor",
871
887
  "onNegativeClick",
872
888
  "ariaLabel",
873
889
  "transition",
@@ -912,11 +928,12 @@
912
928
  "exportName": "MDivider",
913
929
  "examples": 14,
914
930
  "props": {
915
- "total": 8,
931
+ "total": 9,
916
932
  "covered": 6,
917
933
  "missing": [
918
934
  "orientation",
919
- "size"
935
+ "size",
936
+ "pt"
920
937
  ]
921
938
  },
922
939
  "events": {
@@ -2439,10 +2456,11 @@
2439
2456
  "exportName": "MProgressBar",
2440
2457
  "examples": 6,
2441
2458
  "props": {
2442
- "total": 6,
2459
+ "total": 7,
2443
2460
  "covered": 5,
2444
2461
  "missing": [
2445
- "color"
2462
+ "color",
2463
+ "pt"
2446
2464
  ]
2447
2465
  },
2448
2466
  "events": {
@@ -3008,8 +3026,8 @@
3008
3026
  "covered": 2,
3009
3027
  "missing": [
3010
3028
  "icon",
3011
- "severity",
3012
- "outlined",
3029
+ "color",
3030
+ "variant",
3013
3031
  "size",
3014
3032
  "disabled",
3015
3033
  "teleport",
@@ -3393,10 +3411,11 @@
3393
3411
  "exportName": "MTag",
3394
3412
  "examples": 14,
3395
3413
  "props": {
3396
- "total": 11,
3414
+ "total": 12,
3397
3415
  "covered": 10,
3398
3416
  "missing": [
3399
- "disabled"
3417
+ "disabled",
3418
+ "pt"
3400
3419
  ]
3401
3420
  },
3402
3421
  "events": {
@@ -3985,6 +4004,6 @@
3985
4004
  "summary": {
3986
4005
  "components": 107,
3987
4006
  "componentsWithMissingCoverage": 106,
3988
- "totalExamples": 945
4007
+ "totalExamples": 957
3989
4008
  }
3990
4009
  }
@@ -67,13 +67,13 @@ const activityRows = [
67
67
  :label="profile.status === 'active' ? '启用' : '停用'"
68
68
  :severity="profile.status === 'active' ? 'success' : 'secondary'"
69
69
  />
70
- <MButton severity="primary">
70
+ <MButton type="primary">
71
71
  编辑
72
72
  </MButton>
73
- <MButton severity="secondary">
73
+ <MButton>
74
74
  返回
75
75
  </MButton>
76
- <MButton severity="danger" text>
76
+ <MButton type="text" danger>
77
77
  删除
78
78
  </MButton>
79
79
  </MSpace>
@@ -29,7 +29,7 @@ import {
29
29
  <MPageContent>
30
30
  <MPageHeader title="课程" description="管理目录与可见性。">
31
31
  <template #actions>
32
- <MButton severity="primary">
32
+ <MButton type="primary">
33
33
  新建课程
34
34
  </MButton>
35
35
  </template>
@@ -41,10 +41,10 @@ import {
41
41
  illustration="no-content"
42
42
  >
43
43
  <template #extra>
44
- <MButton severity="primary">
44
+ <MButton type="primary">
45
45
  创建第一门课程
46
46
  </MButton>
47
- <MButton severity="secondary" text>
47
+ <MButton type="text">
48
48
  从模板导入
49
49
  </MButton>
50
50
  </template>
@@ -103,7 +103,7 @@ async function onSave() {
103
103
  <MPageContent>
104
104
  <MPageHeader title="用户管理" description="短表单留在列表内弹窗;字段多时再走独立表单页。">
105
105
  <template #actions>
106
- <MButton severity="primary" @click="openCreate">
106
+ <MButton @click="openCreate" type="primary">
107
107
  新建用户
108
108
  </MButton>
109
109
  </template>
@@ -124,7 +124,7 @@ async function onSave() {
124
124
  />
125
125
  </template>
126
126
  <template #cell-actions="{ row }">
127
- <MButton severity="secondary" size="small" text @click="openEdit(row)">
127
+ <MButton size="small" @click="openEdit(row)" type="text">
128
128
  编辑
129
129
  </MButton>
130
130
  </template>
@@ -153,10 +153,10 @@ async function onSave() {
153
153
 
154
154
  <template #footer>
155
155
  <MSpace style="justify-content: flex-end; width: 100%">
156
- <MButton severity="secondary" text :disabled="submitting" @click="closeDialog">
156
+ <MButton :disabled="submitting" @click="closeDialog" type="text">
157
157
  取消
158
158
  </MButton>
159
- <MButton severity="primary" :loading="submitting" @click="onSave">
159
+ <MButton :loading="submitting" @click="onSave" type="primary">
160
160
  保存
161
161
  </MButton>
162
162
  </MSpace>
@@ -90,10 +90,10 @@ async function onSubmit() {
90
90
 
91
91
  <MPageSection variant="actions">
92
92
  <MSpace>
93
- <MButton native-type="submit" severity="primary" :loading="submitting">
93
+ <MButton type="primary" html-type="submit" :loading="submitting">
94
94
  保存
95
95
  </MButton>
96
- <MButton severity="secondary">
96
+ <MButton>
97
97
  取消
98
98
  </MButton>
99
99
  </MSpace>
@@ -44,7 +44,7 @@ const faqTabs = [
44
44
  </MParagraph>
45
45
  <div class="landing-hero__cta">
46
46
  <MButton label="开始使用" />
47
- <MButton label="查看文档" severity="secondary" text />
47
+ <MButton label="查看文档" type="text"/>
48
48
  </div>
49
49
  <div class="landing-hero__visual" role="img" aria-label="构建时间线示意">
50
50
  <div class="landing-hero__track">
@@ -142,7 +142,7 @@ const faqTabs = [
142
142
 
143
143
  <footer class="landing-footer">
144
144
  <span>流水线 CI</span>
145
- <MButton label="联系销售" severity="secondary" text />
145
+ <MButton label="联系销售" type="text"/>
146
146
  </footer>
147
147
  </div>
148
148
  </MConfigProvider>
@@ -88,7 +88,7 @@ const rows = [
88
88
  <MPageContent fill density="compact">
89
89
  <MPageHeader title="用户管理">
90
90
  <template #actions>
91
- <MButton severity="primary" size="small">
91
+ <MButton size="small" type="primary">
92
92
  新建
93
93
  </MButton>
94
94
  </template>
@@ -113,10 +113,10 @@ const rows = [
113
113
  />
114
114
  </MSpace>
115
115
  <template #actions>
116
- <MButton severity="secondary" size="small">
116
+ <MButton size="small">
117
117
  查询
118
118
  </MButton>
119
- <MButton severity="secondary" size="small" text @click="resetFilters">
119
+ <MButton size="small" @click="resetFilters" type="text">
120
120
  重置
121
121
  </MButton>
122
122
  </template>
@@ -142,10 +142,10 @@ const rows = [
142
142
  </template>
143
143
  <template #cell-actions>
144
144
  <MSpace>
145
- <MButton severity="secondary" size="small" text>
145
+ <MButton size="small" type="text">
146
146
  编辑
147
147
  </MButton>
148
- <MButton severity="danger" size="small" text>
148
+ <MButton size="small" type="text" danger>
149
149
  删除
150
150
  </MButton>
151
151
  </MSpace>
@@ -153,7 +153,7 @@ const rows = [
153
153
  <template #empty>
154
154
  <MEmpty title="暂无数据" description="创建后在此浏览。" icon="user">
155
155
  <template #extra>
156
- <MButton severity="primary" size="small">
156
+ <MButton size="small" type="primary">
157
157
  新建
158
158
  </MButton>
159
159
  </template>
@@ -126,7 +126,7 @@ const rows = [
126
126
  <MPageContent fill>
127
127
  <MPageHeader title="用户管理" description="维护账号、角色与权限。">
128
128
  <template #actions>
129
- <MButton severity="primary">
129
+ <MButton type="primary">
130
130
  新建用户
131
131
  </MButton>
132
132
  </template>
@@ -149,10 +149,10 @@ const rows = [
149
149
  />
150
150
  </MSpace>
151
151
  <template #actions>
152
- <MButton severity="secondary">
152
+ <MButton>
153
153
  查询
154
154
  </MButton>
155
- <MButton severity="secondary" text @click="resetFilters">
155
+ <MButton @click="resetFilters" type="text">
156
156
  重置
157
157
  </MButton>
158
158
  </template>
@@ -200,10 +200,10 @@ const rows = [
200
200
  </template>
201
201
  <template #cell-actions>
202
202
  <MSpace>
203
- <MButton severity="secondary" size="small" text>
203
+ <MButton size="small" type="text">
204
204
  编辑
205
205
  </MButton>
206
- <MButton severity="danger" size="small" text>
206
+ <MButton size="small" type="text" danger>
207
207
  删除
208
208
  </MButton>
209
209
  </MSpace>
@@ -215,7 +215,7 @@ const rows = [
215
215
  icon="user"
216
216
  >
217
217
  <template #extra>
218
- <MButton severity="primary">
218
+ <MButton type="primary">
219
219
  新建用户
220
220
  </MButton>
221
221
  </template>
@@ -118,7 +118,7 @@ const rows = [
118
118
  <MPageContent fill>
119
119
  <MPageHeader title="用户管理" description="维护账号、角色与权限。">
120
120
  <template #actions>
121
- <MButton severity="primary">
121
+ <MButton type="primary">
122
122
  新建用户
123
123
  </MButton>
124
124
  </template>
@@ -141,10 +141,10 @@ const rows = [
141
141
  />
142
142
  </MSpace>
143
143
  <template #actions>
144
- <MButton severity="secondary">
144
+ <MButton>
145
145
  查询
146
146
  </MButton>
147
- <MButton severity="secondary" text @click="resetFilters">
147
+ <MButton @click="resetFilters" type="text">
148
148
  重置
149
149
  </MButton>
150
150
  </template>
@@ -192,10 +192,10 @@ const rows = [
192
192
  </template>
193
193
  <template #cell-actions>
194
194
  <MSpace>
195
- <MButton severity="secondary" size="small" text>
195
+ <MButton size="small" type="text">
196
196
  编辑
197
197
  </MButton>
198
- <MButton severity="danger" size="small" text>
198
+ <MButton size="small" type="text" danger>
199
199
  删除
200
200
  </MButton>
201
201
  </MSpace>
@@ -207,7 +207,7 @@ const rows = [
207
207
  icon="user"
208
208
  >
209
209
  <template #extra>
210
- <MButton severity="primary">
210
+ <MButton type="primary">
211
211
  新建用户
212
212
  </MButton>
213
213
  </template>
@@ -96,8 +96,8 @@ async function onSubmit() {
96
96
  </MFormItem>
97
97
 
98
98
  <MSpace style="margin-top: var(--m-space-2)" alignment="center">
99
- <MButton type="submit" label="登录" severity="primary" :loading="submitting" />
100
- <MButton type="button" label="忘记密码" severity="secondary" text />
99
+ <MButton type="primary" html-type="submit" label="登录" :loading="submitting" />
100
+ <MButton type="text" label="忘记密码" />
101
101
  </MSpace>
102
102
  </MForm>
103
103
  </div>
@@ -43,10 +43,10 @@ import {
43
43
  >
44
44
  <template #footer>
45
45
  <MSpace>
46
- <MButton severity="primary">
46
+ <MButton type="primary">
47
47
  返回上一页
48
48
  </MButton>
49
- <MButton severity="secondary" text>
49
+ <MButton type="text">
50
50
  联系管理员
51
51
  </MButton>
52
52
  </MSpace>
@@ -106,10 +106,10 @@ async function saveNotify() {
106
106
  </MFormItem>
107
107
  <MPageSection variant="actions">
108
108
  <MSpace>
109
- <MButton native-type="submit" severity="primary" :loading="submitting">
109
+ <MButton type="primary" html-type="submit" :loading="submitting">
110
110
  保存资料
111
111
  </MButton>
112
- <MButton severity="secondary" text native-type="button">
112
+ <MButton html-type="button">
113
113
  恢复默认
114
114
  </MButton>
115
115
  </MSpace>
@@ -126,7 +126,7 @@ async function saveNotify() {
126
126
  <MSwitch v-model="notify.productUpdates" />
127
127
  </MFormItem>
128
128
  <MPageSection variant="actions">
129
- <MButton native-type="submit" severity="primary" :loading="submitting">
129
+ <MButton type="primary" html-type="submit" :loading="submitting">
130
130
  保存通知
131
131
  </MButton>
132
132
  </MPageSection>
@@ -135,13 +135,13 @@ async function saveNotify() {
135
135
 
136
136
  <MPageSection v-else variant="form" title="安全">
137
137
  <p class="settings-hint">
138
- 修改密码、两步验证等敏感操作放在此区;危险动作使用 severity="danger" 并配合确认。
138
+ 修改密码、两步验证等敏感操作放在此区;危险动作使用 danger / color="danger" 并配合确认。
139
139
  </p>
140
140
  <MSpace>
141
- <MButton severity="secondary">
141
+ <MButton>
142
142
  修改密码
143
143
  </MButton>
144
- <MButton severity="danger" text>
144
+ <MButton type="text" danger>
145
145
  注销账号
146
146
  </MButton>
147
147
  </MSpace>
@@ -130,28 +130,13 @@ async function finish() {
130
130
 
131
131
  <MPageSection variant="actions">
132
132
  <MSpace>
133
- <MButton
134
- severity="secondary"
135
- text
136
- :disabled="activeStep === 0 || submitting"
137
- @click="back"
138
- >
133
+ <MButton :disabled="activeStep === 0 || submitting" @click="back" type="text">
139
134
  上一步
140
135
  </MButton>
141
- <MButton
142
- v-if="activeStep < steps.length - 1"
143
- severity="primary"
144
- :disabled="!canNext"
145
- @click="next"
146
- >
136
+ <MButton v-if="activeStep < steps.length - 1" :disabled="!canNext" @click="next" type="primary">
147
137
  下一步
148
138
  </MButton>
149
- <MButton
150
- v-else
151
- severity="primary"
152
- :loading="submitting"
153
- @click="finish"
154
- >
139
+ <MButton v-else :loading="submitting" @click="finish" type="primary">
155
140
  创建
156
141
  </MButton>
157
142
  </MSpace>
@@ -40,7 +40,7 @@ describe('@morya-ui/mcp handlers', () => {
40
40
  it('reports unknown props without rejecting valid props', () => {
41
41
  const result = read(handlers.validateUsage({
42
42
  component: 'Button',
43
- code: '<MButton label="Save" severity="danger" foo="bar" />',
43
+ code: '<MButton label="Save" danger foo="bar" />',
44
44
  }));
45
45
  expect(result.ok).toBe(false);
46
46
  expect(result.issues).toEqual([
package/dist/decisions.js CHANGED
@@ -46,7 +46,7 @@ export const componentDecisions = [
46
46
  ['v-model / modelValue 控制开关(不要用 visible)', 'v-model / modelValue for open state (not visible)'],
47
47
  ['header 或 title 设弹窗标题', 'header or title for the dialog title'],
48
48
  ['width 约 32rem 适配短表单(见 form-in-dialog snippet)', 'width ~32rem for short forms (see form-in-dialog snippet)'],
49
- ['表单字段用 fluid;主按钮 severity="primary"', 'Form fields use fluid; primary button severity="primary"'],
49
+ ['表单字段用 fluid;主按钮 type="primary"', 'Form fields use fluid; primary button type="primary"'],
50
50
  ], [
51
51
  ['#footer 放取消/保存', '#footer for cancel / save'],
52
52
  ['默认插槽放 MForm + MFormItem', 'Default slot: MForm + MFormItem'],
@@ -97,7 +97,7 @@ export const componentDecisions = [
97
97
  ['字段 v-model + fluid;校验用 invalid / errorMessage', 'Fields v-model + fluid; validation via invalid / errorMessage'],
98
98
  ], [['默认插槽:MFormItem 字段', 'Default: MFormItem fields']], [
99
99
  ['MForm @submit(或 @submit.prevent)', 'MForm @submit (or @submit.prevent)'],
100
- ['提交按钮 type="submit" + severity="primary"', 'Submit button type="submit" + severity="primary"'],
100
+ ['提交按钮 html-type="submit" + type="primary"', 'Submit button html-type="submit" + type="primary"'],
101
101
  ]),
102
102
  relatedSnippets: ['page-content-form', 'form-header', 'form-body', 'form-actions'],
103
103
  ...anti([
@@ -639,7 +639,7 @@ export const componentDecisions = [
639
639
  avoidWhenEn: ['Form intro areas with long descriptions'],
640
640
  recipe: recipe([
641
641
  ['左侧标题、右侧主按钮', 'Title left, primary action right'],
642
- ['主按钮 severity="primary";全页仅一个主按钮', 'Primary button severity="primary"; one primary per page'],
642
+ ['主按钮 type="primary";全页仅一个主按钮', 'Primary button type="primary"; one primary per page'],
643
643
  ['批量操作条也可放工具栏区', 'Bulk action bars can sit in the toolbar area'],
644
644
  ], [['#actions 右侧操作', '#actions for right-side actions']]),
645
645
  ...anti([['需要长描述仍用 Toolbar → PageHeader', 'Long description but Toolbar → PageHeader']]),
@@ -1064,7 +1064,10 @@ export const componentDecisions = [
1064
1064
  ['severity;max 封顶', 'severity; max cap'],
1065
1065
  ['默认插槽包裹宿主控件', 'Default slot wraps the host control'],
1066
1066
  ], [['默认插槽:被角标包裹的控件', 'Default slot: host control']]),
1067
- ...anti([['独立状态文案用 Badge → Status / Tag', 'Standalone status sentence via Badge → Status / Tag']]),
1067
+ ...anti([
1068
+ ['独立状态文案用 Badge → Status / Tag', 'Standalone status sentence via Badge → Status / Tag'],
1069
+ ['MButton badge / badgeColor → 用 MBadge 包裹按钮', 'MButton badge / badgeColor → wrap the button with MBadge'],
1070
+ ]),
1068
1071
  },
1069
1072
  ],
1070
1073
  },
@@ -1332,7 +1335,7 @@ export const componentDecisions = [
1332
1335
  ['v-model / modelValue', 'v-model / modelValue'],
1333
1336
  ['header + message', 'header + message'],
1334
1337
  ['acceptLabel / rejectLabel', 'acceptLabel / rejectLabel'],
1335
- ['acceptSeverity="danger" 用于删除', 'acceptSeverity="danger" for delete'],
1338
+ ['acceptColor="danger" 用于删除', 'acceptColor="danger" for delete'],
1336
1339
  ], undefined, [
1337
1340
  ['@accept 执行删除', '@accept to perform delete'],
1338
1341
  ['@reject 关闭', '@reject to dismiss'],
@@ -1357,7 +1360,7 @@ export const componentDecisions = [
1357
1360
  ],
1358
1361
  recipe: recipe([
1359
1362
  ['v-model / modelValue', 'v-model / modelValue'],
1360
- ['message;acceptSeverity="danger" 按需', 'message; acceptSeverity="danger" as needed'],
1363
+ ['message;acceptColor="danger" 按需', 'message; acceptColor="danger" as needed'],
1361
1364
  ['target 锚定触发元素(或 position)', 'target anchors the trigger (or position)'],
1362
1365
  ['placement top|bottom|left|right', 'placement top|bottom|left|right'],
1363
1366
  ], undefined, [['@accept / @reject', '@accept / @reject']]),