@morya-ui/mcp 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/data/catalog.json +278 -118
- package/data/example-coverage.json +24 -14
- package/data/golden-pages/dashboard-page.vue +10 -8
- package/data/golden-pages/empty-state.vue +20 -51
- package/data/golden-pages/form-in-dialog.vue +3 -3
- package/data/golden-pages/list-page.vue +77 -12
- package/dist/__tests__/tools.test.js +1 -1
- package/dist/page-snippets.js +127 -35
- package/dist/tools.js +23 -16
- package/package.json +1 -1
package/dist/tools.js
CHANGED
|
@@ -67,9 +67,9 @@ function generatedPageCode(patternId, intent, locale) {
|
|
|
67
67
|
: '';
|
|
68
68
|
const listImports = isList ? ', MEmpty, MSelect, MSpace, MTable' : '';
|
|
69
69
|
const formImports = isForm || isAuth || isWizard ? ', MForm, MFormItem, MSelect' : '';
|
|
70
|
-
const dashboardImports = isDashboard ? ', MCard, MGrid, MGridItem,
|
|
70
|
+
const dashboardImports = isDashboard ? ', MCard, MGrid, MGridItem, MEmpty, MPageStat, MSkeleton, MTable' : '';
|
|
71
71
|
const detailImports = isDetail ? ', MSpace' : '';
|
|
72
|
-
const emptyImports = isEmpty ? ', MEmpty,
|
|
72
|
+
const emptyImports = isEmpty ? ', MEmpty, MPageContent, MPageHeader' : '';
|
|
73
73
|
const wizardImports = isWizard ? ', MStepper, MSpace' : '';
|
|
74
74
|
const settingsImports = isSettings ? ', MTabs' : '';
|
|
75
75
|
const statusImports = isList || isDetail || isDashboard ? ', MStatus' : '';
|
|
@@ -104,18 +104,18 @@ async function submit() {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
</script>`;
|
|
107
|
-
const listContent = ` <
|
|
107
|
+
const listContent = ` <MPageHeader :title="title">
|
|
108
|
+
<template #actions>
|
|
109
|
+
<MButton severity="primary">${zh ? '新建' : 'Create'}</MButton>
|
|
110
|
+
</template>
|
|
111
|
+
</MPageHeader>
|
|
112
|
+
<MPageFilters variant="filled" :aria-label="${zh ? '筛选' : 'Filters'}">
|
|
108
113
|
<MSpace wrap>
|
|
109
114
|
<MInput v-model="keyword" placeholder="${zh ? '搜索关键词' : 'Search keyword'}" clearable style="width: 14rem" />
|
|
110
|
-
<MButton severity="
|
|
115
|
+
<MButton severity="secondary">${zh ? '查询' : 'Search'}</MButton>
|
|
111
116
|
<MButton severity="secondary">${zh ? '重置' : 'Reset'}</MButton>
|
|
112
117
|
</MSpace>
|
|
113
118
|
</MPageFilters>
|
|
114
|
-
<MPageToolbar :title="title">
|
|
115
|
-
<template #actions>
|
|
116
|
-
<MButton severity="primary">${zh ? '新建' : 'Create'}</MButton>
|
|
117
|
-
</template>
|
|
118
|
-
</MPageToolbar>
|
|
119
119
|
<MTable :columns="columns" :rows="rows" :loading="loading" paginator :rows-per-page="10" striped bordered row-key="id">
|
|
120
120
|
<template #cell-status="{ value }">
|
|
121
121
|
<MStatus :label="String(value ?? '')" :severity="value === 'active' ? 'success' : 'secondary'" />
|
|
@@ -149,9 +149,14 @@ async function submit() {
|
|
|
149
149
|
<MPageStat :label="metric.label" :value="metric.value" icon="activity" />
|
|
150
150
|
</MGridItem>
|
|
151
151
|
</MGrid>
|
|
152
|
-
<MCard :title="${zh ? '趋势概览' : 'Trend overview'}">
|
|
152
|
+
<MCard shadow="always" :title="${zh ? '趋势概览' : 'Trend overview'}">
|
|
153
153
|
<MSkeleton v-if="loading" height="8rem" />
|
|
154
|
-
<
|
|
154
|
+
<MEmpty
|
|
155
|
+
v-else
|
|
156
|
+
:title="${zh ? '暂无图表数据' : 'No chart data yet'}"
|
|
157
|
+
:description="${zh ? '接入图表或业务组件。' : 'Connect charts or business widgets here.'}"
|
|
158
|
+
aria-label="${zh ? '图表占位' : 'Chart placeholder'}"
|
|
159
|
+
/>
|
|
155
160
|
</MCard>`;
|
|
156
161
|
const detailContent = ` <MPageHeader :title="title" :description="${zh ? '查看资源摘要与属性。' : 'Review summary and properties.'}">
|
|
157
162
|
<template #actions>
|
|
@@ -257,11 +262,12 @@ ${content}
|
|
|
257
262
|
else if (isEmpty) {
|
|
258
263
|
innerTemplate = `<MConfigProvider :locale="zhCN">
|
|
259
264
|
<main class="m-generated-page">
|
|
260
|
-
<
|
|
261
|
-
<
|
|
262
|
-
<
|
|
263
|
-
|
|
264
|
-
|
|
265
|
+
<MPageContent>
|
|
266
|
+
<MPageHeader :title="title">
|
|
267
|
+
<template #actions>
|
|
268
|
+
<MButton severity="primary" @click="submit">${zh ? '新建' : 'Create'}</MButton>
|
|
269
|
+
</template>
|
|
270
|
+
</MPageHeader>
|
|
265
271
|
<MEmpty
|
|
266
272
|
:title="${zh ? '暂无内容' : 'Nothing here yet'}"
|
|
267
273
|
:description="${zh ? '创建第一条记录开始使用。' : 'Create your first record to get started.'}"
|
|
@@ -271,6 +277,7 @@ ${content}
|
|
|
271
277
|
<MButton severity="primary" @click="submit">${zh ? '创建' : 'Create'}</MButton>
|
|
272
278
|
</template>
|
|
273
279
|
</MEmpty>
|
|
280
|
+
</MPageContent>
|
|
274
281
|
</main>
|
|
275
282
|
</MConfigProvider>`;
|
|
276
283
|
}
|
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.2",
|
|
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",
|