@sdata/web-vue-mcp 3.8.4 → 3.8.6
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/dist/index.js +11 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,8 +5,8 @@ import * as z from "zod/v4";
|
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/index.ts
|
|
7
7
|
const data = {
|
|
8
|
-
version: "5.7.
|
|
9
|
-
generatedAt: "2026-10-
|
|
8
|
+
version: "5.7.4",
|
|
9
|
+
generatedAt: "2026-10-03T23:13:17.128Z",
|
|
10
10
|
library: {
|
|
11
11
|
"name": "@sdata/web-vue",
|
|
12
12
|
"framework": "Vue 3",
|
|
@@ -12168,8 +12168,14 @@ const importStatements = (component) => ({
|
|
|
12168
12168
|
`app.use(SDVue);`
|
|
12169
12169
|
].join("\n")
|
|
12170
12170
|
});
|
|
12171
|
+
/**
|
|
12172
|
+
* 比较前统一去掉分隔符:属性名在数据里是 kebab-case(`allow-clear`),
|
|
12173
|
+
* 而调用方(尤其是 AI)多半按代码里的写法提问(`allowClear`)。
|
|
12174
|
+
* 不归一化的话 camelCase 查询会一条都搜不到。
|
|
12175
|
+
*/
|
|
12176
|
+
const normalizeForSearch = (value) => value.toLowerCase().replace(/[-_\s]/g, "");
|
|
12171
12177
|
const search = (query) => {
|
|
12172
|
-
const needle = query.
|
|
12178
|
+
const needle = normalizeForSearch(query.trim());
|
|
12173
12179
|
if (!needle) return [];
|
|
12174
12180
|
const matches = [];
|
|
12175
12181
|
for (const component of components) {
|
|
@@ -12195,7 +12201,7 @@ const search = (query) => {
|
|
|
12195
12201
|
])
|
|
12196
12202
|
];
|
|
12197
12203
|
const matched = /* @__PURE__ */ new Set();
|
|
12198
|
-
for (const field of haystack) if (typeof field === "string" && field
|
|
12204
|
+
for (const field of haystack) if (typeof field === "string" && normalizeForSearch(field).includes(needle)) {
|
|
12199
12205
|
matched.add(field);
|
|
12200
12206
|
if (matched.size >= 3) break;
|
|
12201
12207
|
}
|
|
@@ -12224,7 +12230,7 @@ const findByProp = (prop) => {
|
|
|
12224
12230
|
const createServer = () => {
|
|
12225
12231
|
const server = new McpServer({
|
|
12226
12232
|
name: PKG_NAME,
|
|
12227
|
-
version: "3.8.
|
|
12233
|
+
version: "3.8.6"
|
|
12228
12234
|
});
|
|
12229
12235
|
server.registerTool("list_components", {
|
|
12230
12236
|
description: "List all SD Design components with their category, bilingual title and API size. Optionally filter by category. Use this first to discover what is available.",
|