@morya-ui/mcp 0.3.6 → 0.3.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 +472 -374
- package/data/example-coverage.json +56 -74
- package/dist/decisions.js +6 -16
- package/dist/tools.js +7 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-09-
|
|
3
|
-
"catalogGeneratedAt": "2026-09-
|
|
2
|
+
"generatedAt": "2026-09-29T02:45:02.429Z",
|
|
3
|
+
"catalogGeneratedAt": "2026-09-29T02:44:57.903Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"id": "Accordion",
|
|
@@ -781,15 +781,14 @@
|
|
|
781
781
|
{
|
|
782
782
|
"id": "Drawer",
|
|
783
783
|
"exportName": "MDrawer",
|
|
784
|
-
"examples":
|
|
784
|
+
"examples": 8,
|
|
785
785
|
"props": {
|
|
786
786
|
"total": 16,
|
|
787
|
-
"covered":
|
|
787
|
+
"covered": 4,
|
|
788
788
|
"missing": [
|
|
789
789
|
"modal",
|
|
790
790
|
"dismissable",
|
|
791
791
|
"showCloseIcon",
|
|
792
|
-
"width",
|
|
793
792
|
"height",
|
|
794
793
|
"blockScroll",
|
|
795
794
|
"teleport",
|
|
@@ -813,8 +812,8 @@
|
|
|
813
812
|
]
|
|
814
813
|
},
|
|
815
814
|
"slots": {
|
|
816
|
-
"total":
|
|
817
|
-
"covered":
|
|
815
|
+
"total": 3,
|
|
816
|
+
"covered": 2,
|
|
818
817
|
"missing": [
|
|
819
818
|
"header"
|
|
820
819
|
]
|
|
@@ -2763,14 +2762,20 @@
|
|
|
2763
2762
|
{
|
|
2764
2763
|
"id": "Table",
|
|
2765
2764
|
"exportName": "MTable",
|
|
2766
|
-
"examples":
|
|
2765
|
+
"examples": 36,
|
|
2767
2766
|
"props": {
|
|
2768
|
-
"total":
|
|
2769
|
-
"covered":
|
|
2767
|
+
"total": 72,
|
|
2768
|
+
"covered": 27,
|
|
2770
2769
|
"missing": [
|
|
2771
2770
|
"fit",
|
|
2772
2771
|
"selectedItem",
|
|
2772
|
+
"pageSizes",
|
|
2773
|
+
"showHeader",
|
|
2774
|
+
"showRowsPerPage",
|
|
2773
2775
|
"fill",
|
|
2776
|
+
"columnOrder",
|
|
2777
|
+
"expandConfig",
|
|
2778
|
+
"radioConfig",
|
|
2774
2779
|
"rowHover",
|
|
2775
2780
|
"sortField",
|
|
2776
2781
|
"sortOrder",
|
|
@@ -2778,7 +2783,6 @@
|
|
|
2778
2783
|
"searchField",
|
|
2779
2784
|
"searchValue",
|
|
2780
2785
|
"filterOptions",
|
|
2781
|
-
"maxHeight",
|
|
2782
2786
|
"showOverflowTooltip",
|
|
2783
2787
|
"rowKey",
|
|
2784
2788
|
"size",
|
|
@@ -2788,11 +2792,9 @@
|
|
|
2788
2792
|
"bodyRowClassName",
|
|
2789
2793
|
"bodyTextDirection",
|
|
2790
2794
|
"checkboxColumnWidth",
|
|
2791
|
-
"clickEventType",
|
|
2792
2795
|
"clickRowToExpand",
|
|
2793
2796
|
"currentRowKey",
|
|
2794
2797
|
"expandColumnWidth",
|
|
2795
|
-
"expandedRowKeys",
|
|
2796
2798
|
"filters",
|
|
2797
2799
|
"fixedCheckbox",
|
|
2798
2800
|
"fixedExpand",
|
|
@@ -2801,51 +2803,42 @@
|
|
|
2801
2803
|
"headerClassName",
|
|
2802
2804
|
"headerItemClassName",
|
|
2803
2805
|
"headerTextDirection",
|
|
2804
|
-
"hideHeader",
|
|
2805
|
-
"hideRowsPerPage",
|
|
2806
2806
|
"indexColumnWidth",
|
|
2807
2807
|
"multiSort",
|
|
2808
2808
|
"mustSort",
|
|
2809
|
-
"preventContextMenuRow",
|
|
2810
|
-
"rowsItems",
|
|
2811
|
-
"rowsOfPageSeparatorMessage",
|
|
2812
|
-
"rowsPerPageMessage",
|
|
2813
|
-
"showHeader",
|
|
2814
2809
|
"showIndex",
|
|
2815
2810
|
"showIndexSymbol",
|
|
2816
2811
|
"tableClassName",
|
|
2817
2812
|
"tableHeight",
|
|
2818
2813
|
"tableMinHeight",
|
|
2819
|
-
"tableNodeId",
|
|
2820
2814
|
"pt"
|
|
2821
2815
|
]
|
|
2822
2816
|
},
|
|
2823
2817
|
"events": {
|
|
2824
|
-
"total":
|
|
2825
|
-
"covered":
|
|
2818
|
+
"total": 20,
|
|
2819
|
+
"covered": 6,
|
|
2826
2820
|
"missing": [
|
|
2827
2821
|
"sort",
|
|
2828
|
-
"page",
|
|
2829
2822
|
"row-click",
|
|
2823
|
+
"row-dblclick",
|
|
2824
|
+
"row-contextmenu",
|
|
2825
|
+
"select-row",
|
|
2826
|
+
"deselect-row",
|
|
2827
|
+
"select-all",
|
|
2830
2828
|
"current-change",
|
|
2831
2829
|
"expand",
|
|
2832
2830
|
"update:current-row-key",
|
|
2833
|
-
"contextmenuRow",
|
|
2834
|
-
"deselectRow",
|
|
2835
2831
|
"filter",
|
|
2836
|
-
"selectAll",
|
|
2837
|
-
"selectRow",
|
|
2838
|
-
"update:expandedRowKeys",
|
|
2839
2832
|
"update:filters",
|
|
2840
|
-
"update:
|
|
2841
|
-
"
|
|
2842
|
-
"updateTotalItems"
|
|
2833
|
+
"update:columnOrder",
|
|
2834
|
+
"update:selectedItem"
|
|
2843
2835
|
]
|
|
2844
2836
|
},
|
|
2845
2837
|
"slots": {
|
|
2846
|
-
"total":
|
|
2838
|
+
"total": 11,
|
|
2847
2839
|
"covered": 1,
|
|
2848
2840
|
"missing": [
|
|
2841
|
+
"footer",
|
|
2849
2842
|
"body-cell",
|
|
2850
2843
|
"empty",
|
|
2851
2844
|
"loading",
|
|
@@ -2858,7 +2851,7 @@
|
|
|
2858
2851
|
]
|
|
2859
2852
|
},
|
|
2860
2853
|
"methods": {
|
|
2861
|
-
"total":
|
|
2854
|
+
"total": 39,
|
|
2862
2855
|
"covered": 0,
|
|
2863
2856
|
"missing": [
|
|
2864
2857
|
"currentPageFirstIndex",
|
|
@@ -2874,7 +2867,32 @@
|
|
|
2874
2867
|
"rowsPerPageOptions",
|
|
2875
2868
|
"rowsPerPageActiveOption",
|
|
2876
2869
|
"updateRowsPerPageActiveOption",
|
|
2877
|
-
"setFilters"
|
|
2870
|
+
"setFilters",
|
|
2871
|
+
"clearFilter",
|
|
2872
|
+
"setColumnWidths",
|
|
2873
|
+
"setHiddenColumns",
|
|
2874
|
+
"setColumnOrder",
|
|
2875
|
+
"clearSort",
|
|
2876
|
+
"getCheckboxRecords",
|
|
2877
|
+
"setCheckboxRow",
|
|
2878
|
+
"clearCheckboxRow",
|
|
2879
|
+
"isCheckedByCheckboxRow",
|
|
2880
|
+
"isAllCheckboxChecked",
|
|
2881
|
+
"getCheckboxIndeterminateRecords",
|
|
2882
|
+
"scrollTo",
|
|
2883
|
+
"scrollToRow",
|
|
2884
|
+
"setRowExpand",
|
|
2885
|
+
"setAllRowExpand",
|
|
2886
|
+
"toggleRowExpand",
|
|
2887
|
+
"clearRowExpand",
|
|
2888
|
+
"isRowExpandByRow",
|
|
2889
|
+
"getRowExpandRecords",
|
|
2890
|
+
"setTreeExpand",
|
|
2891
|
+
"setAllTreeExpand",
|
|
2892
|
+
"toggleTreeExpand",
|
|
2893
|
+
"clearTreeExpand",
|
|
2894
|
+
"isTreeExpandByRow",
|
|
2895
|
+
"getTreeExpandRecords"
|
|
2878
2896
|
]
|
|
2879
2897
|
}
|
|
2880
2898
|
},
|
|
@@ -3317,42 +3335,6 @@
|
|
|
3317
3335
|
"missing": []
|
|
3318
3336
|
}
|
|
3319
3337
|
},
|
|
3320
|
-
{
|
|
3321
|
-
"id": "TreeTable",
|
|
3322
|
-
"exportName": "MTreeTable",
|
|
3323
|
-
"examples": 8,
|
|
3324
|
-
"props": {
|
|
3325
|
-
"total": 5,
|
|
3326
|
-
"covered": 2,
|
|
3327
|
-
"missing": [
|
|
3328
|
-
"emptyMessage",
|
|
3329
|
-
"expandedKeys",
|
|
3330
|
-
"pt"
|
|
3331
|
-
]
|
|
3332
|
-
},
|
|
3333
|
-
"events": {
|
|
3334
|
-
"total": 3,
|
|
3335
|
-
"covered": 0,
|
|
3336
|
-
"missing": [
|
|
3337
|
-
"node-expand",
|
|
3338
|
-
"node-collapse",
|
|
3339
|
-
"update:expandedKeys"
|
|
3340
|
-
]
|
|
3341
|
-
},
|
|
3342
|
-
"slots": {
|
|
3343
|
-
"total": 2,
|
|
3344
|
-
"covered": 0,
|
|
3345
|
-
"missing": [
|
|
3346
|
-
"expansion",
|
|
3347
|
-
"empty"
|
|
3348
|
-
]
|
|
3349
|
-
},
|
|
3350
|
-
"methods": {
|
|
3351
|
-
"total": 0,
|
|
3352
|
-
"covered": 0,
|
|
3353
|
-
"missing": []
|
|
3354
|
-
}
|
|
3355
|
-
},
|
|
3356
3338
|
{
|
|
3357
3339
|
"id": "VirtualScroller",
|
|
3358
3340
|
"exportName": "MVirtualScroller",
|
|
@@ -3387,8 +3369,8 @@
|
|
|
3387
3369
|
}
|
|
3388
3370
|
],
|
|
3389
3371
|
"summary": {
|
|
3390
|
-
"components":
|
|
3391
|
-
"componentsWithMissingCoverage":
|
|
3392
|
-
"totalExamples":
|
|
3372
|
+
"components": 92,
|
|
3373
|
+
"componentsWithMissingCoverage": 92,
|
|
3374
|
+
"totalExamples": 821
|
|
3393
3375
|
}
|
|
3394
3376
|
}
|
package/dist/decisions.js
CHANGED
|
@@ -234,14 +234,20 @@ export const componentDecisions = [
|
|
|
234
234
|
['全视口主列表可 MPageContent fill + MTable fill;嵌入/短页跳过', 'Full-viewport main lists may use fill; skip for embedded/short pages'],
|
|
235
235
|
['分页:paginator + rows-per-page 或 v-model:page', 'Paging: paginator + rows-per-page or v-model:page'],
|
|
236
236
|
['行选择:selectionMode + v-model:selection', 'Row select: selectionMode + v-model:selection'],
|
|
237
|
+
['大行数:virtual + maxHeight/tableHeight/fill', 'Large row sets: virtual + maxHeight/tableHeight/fill'],
|
|
238
|
+
['列宽/表头筛选:resizable / filterable', 'Column resize/header filter: resizable / filterable'],
|
|
239
|
+
['树表:tree-config + v-model:expanded-row-keys(children 或 transform)', 'Tree: tree-config + v-model:expanded-row-keys (children or transform)'],
|
|
237
240
|
], [
|
|
238
241
|
['#cell-{key} 自定义单元格', '#cell-{key} custom cells'],
|
|
239
242
|
['#empty 放 MEmpty', '#empty with MEmpty'],
|
|
243
|
+
['多级表头 children;表尾 show-footer + footer-method', 'Grouped headers via children; footer via show-footer + footer-method'],
|
|
240
244
|
]),
|
|
241
245
|
...anti([
|
|
242
246
|
[':data → :rows', ':data → :rows'],
|
|
243
247
|
['手写 <table> → MTable', 'Hand-rolled <table> → MTable'],
|
|
244
248
|
['嵌入表硬套 fill → 去掉 fill', 'Forced fill on embedded table → remove fill'],
|
|
249
|
+
['无高度开 virtual → 配 maxHeight/tableHeight/fill', 'virtual without height → set maxHeight/tableHeight/fill'],
|
|
250
|
+
['无层级硬套 treeConfig → 普通 Table', 'No hierarchy but treeConfig → plain Table'],
|
|
245
251
|
]),
|
|
246
252
|
},
|
|
247
253
|
{
|
|
@@ -261,22 +267,6 @@ export const componentDecisions = [
|
|
|
261
267
|
], [['#list / #grid 等项模板', '#list / #grid item templates']]),
|
|
262
268
|
...anti([['需要列对齐比较仍用 DataView → Table', 'Need column compare but used DataView → Table']]),
|
|
263
269
|
},
|
|
264
|
-
{
|
|
265
|
-
component: 'TreeTable',
|
|
266
|
-
when: ['数据同时具有表格列和父子层级', '用户需要展开、收起层级节点'],
|
|
267
|
-
whenEn: [
|
|
268
|
-
'Data has both table columns and parent-child hierarchy',
|
|
269
|
-
'Users need to expand and collapse hierarchy nodes',
|
|
270
|
-
],
|
|
271
|
-
avoidWhen: ['数据没有真实层级关系', '普通 Table 已能表达关系'],
|
|
272
|
-
avoidWhenEn: ['There is no real hierarchy', 'A regular Table already expresses the relationship'],
|
|
273
|
-
recipe: recipe([
|
|
274
|
-
['columns + 带 children 的行数据', 'columns + rows with children'],
|
|
275
|
-
['展开相关 prop 按文档(expandedKeys 等)', 'Expansion props per docs (expandedKeys etc.)'],
|
|
276
|
-
['row-key 稳定', 'Stable row-key'],
|
|
277
|
-
], [['#cell-{key}', '#cell-{key}']]),
|
|
278
|
-
...anti([['无层级硬用 TreeTable → Table', 'No hierarchy but TreeTable → Table']]),
|
|
279
|
-
},
|
|
280
270
|
{
|
|
281
271
|
component: 'Tree',
|
|
282
272
|
when: ['主要任务是浏览或选择层级节点', '节点信息不需要多列比较'],
|
package/dist/tools.js
CHANGED
|
@@ -1069,6 +1069,13 @@ export function createToolHandlers(catalog = loadCatalog()) {
|
|
|
1069
1069
|
if (/<MTable\b[^>]*(?::data|v-bind:data)\s*=/i.test(code) || /<MTable\b[^>]*\sdata\s*=/i.test(code)) {
|
|
1070
1070
|
push('contract', 'feedback', 'table-data-prop', '契约:MTable 行数据使用 rows,不要用 data。见黄金样例 list-page / get_component Table。', 'Contract: MTable row data uses the rows prop (not data). See golden list-page / get_component Table.');
|
|
1071
1071
|
}
|
|
1072
|
+
if (/<MTable\b[^>]*\bvirtual\b/i.test(code)
|
|
1073
|
+
&& !(/<MTable\b[^>]*(?:max-height|maxHeight|table-height|tableHeight|fill)\b/i.test(code))) {
|
|
1074
|
+
push('contract', 'feedback', 'table-virtual-height', '契约:MTable virtual 需要明确高度(maxHeight / tableHeight / fill),否则视口无法计算。', 'Contract: MTable virtual requires an explicit height (maxHeight / tableHeight / fill).');
|
|
1075
|
+
}
|
|
1076
|
+
if (/vxe-table|VXETable|ElTableColumn|a-table\b/i.test(code) && /MTable|morya-ui/i.test(code)) {
|
|
1077
|
+
push('craft', 'feedback', 'table-prefer-mtable', '参考建议:管理列表优先用 MTable(virtual / resizable / filterable / edit-config 等企业能力)。仅当需要 Excel 级框选/透视时再引入专用网格库。', 'Advisory: prefer MTable for admin lists (virtual / resizable / filterable / edit-config). Reach for Excel-class grids only when area-select/pivot is required.');
|
|
1078
|
+
}
|
|
1072
1079
|
if (/fill-viewport|fillViewport/i.test(code) &&
|
|
1073
1080
|
/<MTable\b[^>]*\bpaginator\b/i.test(code) &&
|
|
1074
1081
|
/<MPageContent\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.3.
|
|
4
|
+
"version": "0.3.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",
|