@sdata/web-vue-mcp 0.1.0 → 1.0.0

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.
Files changed (3) hide show
  1. package/README.md +13 -20
  2. package/dist/index.js +36 -15
  3. package/package.json +9 -9
package/README.md CHANGED
@@ -100,17 +100,10 @@ args = ["-y", "@sdata/web-vue-mcp"]
100
100
 
101
101
  ## 本地开发
102
102
 
103
- 尚未发布到 npm 时,可直接指向本仓库构建产物:
103
+ 直接用 npx 运行(与上文安装方式一致):
104
104
 
105
- ```json
106
- {
107
- "mcpServers": {
108
- "sd-design": {
109
- "command": "node",
110
- "args": ["D:/work/sd-design-mcp/packages/sd-mcp/dist/index.js"]
111
- }
112
- }
113
- }
105
+ ```bash
106
+ npx -y @sdata/web-vue-mcp
114
107
  ```
115
108
 
116
109
  在本仓库内开发:
@@ -128,16 +121,16 @@ pnpm --filter @sdata/web-vue-mcp run typecheck
128
121
 
129
122
  ## 可用工具
130
123
 
131
- | 工具 | 说明 |
132
- | ----------------------- | ----------------------------------------------------------------- |
133
- | `list_components` | 列出所有组件(分类、双语标题、API 数量),可按分类过滤 |
134
- | `get_categories` | 列出所有组件分类及各分类组件数量 |
135
- | `get_component` | 获取组件完整信息:描述、导入语句、文档链接、全部 Props/Events/Slots |
136
- | `search_components` | 跨名称、标题、描述与 Props/Events/Slots 文本搜索(中英文) |
137
- | `get_component_props` | 仅获取组件的 Props |
138
- | `get_component_events` | 仅获取组件的 Events |
139
- | `get_component_slots` | 仅获取组件的 Slots |
140
- | `find_by_prop` | 查找暴露了某个 Prop 的组件(如「哪些组件有 size 属性?」) |
124
+ | 工具 | 说明 |
125
+ | ---------------------- | ------------------------------------------------------------------- |
126
+ | `list_components` | 列出所有组件(分类、双语标题、API 数量),可按分类过滤 |
127
+ | `get_categories` | 列出所有组件分类及各分类组件数量 |
128
+ | `get_component` | 获取组件完整信息:描述、导入语句、文档链接、全部 Props/Events/Slots |
129
+ | `search_components` | 跨名称、标题、描述与 Props/Events/Slots 文本搜索(中英文) |
130
+ | `get_component_props` | 仅获取组件的 Props |
131
+ | `get_component_events` | 仅获取组件的 Events |
132
+ | `get_component_slots` | 仅获取组件的 Slots |
133
+ | `find_by_prop` | 查找暴露了某个 Prop 的组件(如「哪些组件有 size 属性?」) |
141
134
 
142
135
  ## 示例提问
143
136
 
package/dist/index.js CHANGED
@@ -5,8 +5,8 @@ import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprot
5
5
  //#endregion
6
6
  //#region src/index.ts
7
7
  const data = {
8
- version: "3.8.0",
9
- generatedAt: "2026-07-14T06:31:20.171Z",
8
+ version: "3.11.0",
9
+ generatedAt: "2026-07-15T07:34:46.345Z",
10
10
  library: {
11
11
  "name": "@sdata/web-vue",
12
12
  "framework": "Vue 3",
@@ -1609,6 +1609,18 @@ const data = {
1609
1609
  }
1610
1610
  ]
1611
1611
  },
1612
+ {
1613
+ "name": "sd-selectable-card",
1614
+ "title": "可选择卡片 SelectableCard",
1615
+ "category": "数据展示",
1616
+ "description": "以卡片形式承载单个可选择项,适用于套餐、模板、指标和配置方案选择。",
1617
+ "docUrl": "https://sd-design.js.org/components/selectable-card",
1618
+ "importPath": "@sdata/web-vue",
1619
+ "importName": "SelectableCard",
1620
+ "props": [],
1621
+ "events": [],
1622
+ "slots": []
1623
+ },
1612
1624
  {
1613
1625
  "name": "sd-carousel",
1614
1626
  "title": "图片轮播 Carousel",
@@ -3214,7 +3226,7 @@ const data = {
3214
3226
  },
3215
3227
  {
3216
3228
  "name": "scroll",
3217
- "type": "{\r\n x?: number | string;\r\n y?: number | string;\r\n minWidth?: number | string;\r\n maxHeight?: number | string;\r\n}",
3229
+ "type": "{\n x?: number | string;\n y?: number | string;\n minWidth?: number | string;\n maxHeight?: number | string;\n}",
3218
3230
  "default": "",
3219
3231
  "description": {
3220
3232
  "zh": "表格的滚动属性配置。`2.13.0` 版本增加字符型值的支持。`2.20.0` 版本增加 `minWidth`,`maxHeight` 的支持。",
@@ -3277,7 +3289,7 @@ const data = {
3277
3289
  },
3278
3290
  {
3279
3291
  "name": "span-method",
3280
- "type": "(data: {\r\n record: TableData;\r\n column: TableColumnData | TableOperationColumn;\r\n rowIndex: number;\r\n columnIndex: number;\r\n}) => { rowspan?: number; colspan?: number } | void",
3292
+ "type": "(data: {\n record: TableData;\n column: TableColumnData | TableOperationColumn;\n rowIndex: number;\n columnIndex: number;\n}) => { rowspan?: number; colspan?: number } | void",
3281
3293
  "default": "",
3282
3294
  "description": {
3283
3295
  "zh": "单元格合并方法(索引从数据项开始计数)",
@@ -3367,7 +3379,7 @@ const data = {
3367
3379
  },
3368
3380
  {
3369
3381
  "name": "summary-span-method",
3370
- "type": "(data: {\r\n record: TableData;\r\n column: TableColumnData | TableOperationColumn;\r\n rowIndex: number;\r\n columnIndex: number;\r\n}) => { rowspan?: number; colspan?: number } | void",
3382
+ "type": "(data: {\n record: TableData;\n column: TableColumnData | TableOperationColumn;\n rowIndex: number;\n columnIndex: number;\n}) => { rowspan?: number; colspan?: number } | void",
3371
3383
  "default": "",
3372
3384
  "description": {
3373
3385
  "zh": "总结行的单元格合并方法",
@@ -4505,6 +4517,15 @@ const data = {
4505
4517
  "en": "Whether the node occupies a row"
4506
4518
  }
4507
4519
  },
4520
+ {
4521
+ "name": "switcher",
4522
+ "type": "boolean",
4523
+ "default": "true",
4524
+ "description": {
4525
+ "zh": "是否显示节点的展开/收起 switcher,设为 `false` 时不渲染 `switcher` 节点",
4526
+ "en": "Whether to display the expand/collapse switcher of the node. When set to `false`, the switcher node will not be rendered"
4527
+ }
4528
+ },
4508
4529
  {
4509
4530
  "name": "default-expand-all",
4510
4531
  "type": "boolean",
@@ -4525,7 +4546,7 @@ const data = {
4525
4546
  },
4526
4547
  {
4527
4548
  "name": "checkable",
4528
- "type": "| boolean\r\n| ((\r\n node: TreeNodeData,\r\n info: {\r\n level: number;\r\n isLeaf: boolean;\r\n },\r\n ) => boolean)",
4549
+ "type": "| boolean\n| ((\n node: TreeNodeData,\n info: {\n level: number;\n isLeaf: boolean;\n },\n ) => boolean)",
4529
4550
  "default": "false",
4530
4551
  "description": {
4531
4552
  "zh": "是否在节点前添加复选框,从 `2.27.0` 开始支持函数格式",
@@ -4534,7 +4555,7 @@ const data = {
4534
4555
  },
4535
4556
  {
4536
4557
  "name": "selectable",
4537
- "type": "| boolean\r\n| ((\r\n node: TreeNodeData,\r\n info: {\r\n level: number;\r\n isLeaf: boolean;\r\n },\r\n ) => boolean)",
4558
+ "type": "| boolean\n| ((\n node: TreeNodeData,\n info: {\n level: number;\n isLeaf: boolean;\n },\n ) => boolean)",
4538
4559
  "default": "true",
4539
4560
  "description": {
4540
4561
  "zh": "是否支持选择,从 `2.27.0` 开始支持函数格式",
@@ -5340,7 +5361,7 @@ const data = {
5340
5361
  {
5341
5362
  "name": "simple",
5342
5363
  "type": "boolean",
5343
- "default": "(props: any) => {\r\n return props.notice;\r\n}",
5364
+ "default": "(props: any) => {\n return props.notice;\n}",
5344
5365
  "description": {
5345
5366
  "zh": "是否开启简单模式",
5346
5367
  "en": "Whether to enable simple mode"
@@ -5502,7 +5523,7 @@ const data = {
5502
5523
  {
5503
5524
  "name": "mask-animation-name",
5504
5525
  "type": "string",
5505
- "default": "(props: Record<string, any>) => {\r\n if (props.fullscreen) {\r\n return 'fade-in-standard';\r\n }\r\n return 'fade-modal';\r\n}",
5526
+ "default": "(props: Record<string, any>) => {\n if (props.fullscreen) {\n return 'fade-in-standard';\n }\n return 'fade-modal';\n}",
5506
5527
  "description": {
5507
5528
  "zh": "遮罩层动画名字",
5508
5529
  "en": "Mask layer animation name"
@@ -5511,7 +5532,7 @@ const data = {
5511
5532
  {
5512
5533
  "name": "modal-animation-name",
5513
5534
  "type": "string",
5514
- "default": "(props: Record<string, any>) => {\r\n if (props.fullscreen) {\r\n return 'zoom-in';\r\n }\r\n return 'zoom-modal';\r\n}",
5535
+ "default": "(props: Record<string, any>) => {\n if (props.fullscreen) {\n return 'zoom-in';\n }\n return 'zoom-modal';\n}",
5515
5536
  "description": {
5516
5537
  "zh": "对话框动画名字",
5517
5538
  "en": "Modal animation name"
@@ -6844,7 +6865,7 @@ const data = {
6844
6865
  {
6845
6866
  "name": "label-col-props",
6846
6867
  "type": "object",
6847
- "default": "{\r\n span: 5,\r\n offset: 0\r\n}",
6868
+ "default": "{\n span: 5,\n offset: 0\n}",
6848
6869
  "description": {
6849
6870
  "zh": "标签元素布局选项。参数同 `<col>` 组件一致",
6850
6871
  "en": "Label element layout options. The parameters are the same as the `<col>` component"
@@ -6853,7 +6874,7 @@ const data = {
6853
6874
  {
6854
6875
  "name": "wrapper-col-props",
6855
6876
  "type": "object",
6856
- "default": "{\r\n span: 19,\r\n offset: 0\r\n}",
6877
+ "default": "{\n span: 19,\n offset: 0\n}",
6857
6878
  "description": {
6858
6879
  "zh": "表单控件布局选项。参数同 `<col>` 组件一致",
6859
6880
  "en": "Form control layout options. The parameters are the same as the `<col>` component"
@@ -8861,7 +8882,7 @@ const data = {
8861
8882
  },
8862
8883
  {
8863
8884
  "name": "step",
8864
- "type": "{\r\n hour?: number;\r\n minute?: number;\r\n second?: number;\r\n}",
8885
+ "type": "{\n hour?: number;\n minute?: number;\n second?: number;\n}",
8865
8886
  "default": "",
8866
8887
  "description": {
8867
8888
  "zh": "设置 时 / 分 / 秒 的选择间隔",
@@ -9496,7 +9517,7 @@ const data = {
9496
9517
  },
9497
9518
  {
9498
9519
  "name": "selectable",
9499
- "type": "| boolean\r\n| 'leaf'\r\n| ((node: TreeNodeData, info: { isLeaf: boolean; level: number }) => boolean)",
9520
+ "type": "| boolean\n| 'leaf'\n| ((node: TreeNodeData, info: { isLeaf: boolean; level: number }) => boolean)",
9500
9521
  "default": "true",
9501
9522
  "description": {
9502
9523
  "zh": "设置可选择的节点,默认全部可选",
@@ -9779,7 +9800,7 @@ const data = {
9779
9800
  },
9780
9801
  {
9781
9802
  "name": "duration",
9782
- "type": "| number\r\n| {\r\n enter: number;\r\n leave: number;\r\n }",
9803
+ "type": "| number\n| {\n enter: number;\n leave: number;\n }",
9783
9804
  "default": "",
9784
9805
  "description": {
9785
9806
  "zh": "弹出动画的持续时间",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdata/web-vue-mcp",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "Model Context Protocol (MCP) server for the SD Design Vue component library",
5
5
  "keywords": [
6
6
  "ai",
@@ -44,12 +44,6 @@
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "scripts": {
48
- "gen": "node ./scripts/gen-component-data.mjs",
49
- "build": "pnpm run gen && tsdown",
50
- "typecheck": "pnpm run gen && tsc --noEmit",
51
- "dev:link": "pnpm link --global && npm link"
52
- },
53
47
  "dependencies": {
54
48
  "@modelcontextprotocol/sdk": "^1.29.0"
55
49
  },
@@ -64,10 +58,16 @@
64
58
  "fast-glob": "^3.3.3",
65
59
  "semantic-release": "^25.0.5",
66
60
  "tsdown": "^0.22.0",
67
- "typescript": "catalog:",
61
+ "typescript": "^6.0.3",
68
62
  "vue-docgen-api": "4.79.2"
69
63
  },
70
64
  "engines": {
71
65
  "node": ">=20"
66
+ },
67
+ "scripts": {
68
+ "gen": "node ./scripts/gen-component-data.mjs",
69
+ "build": "pnpm run gen && tsdown",
70
+ "typecheck": "pnpm run gen && tsc --noEmit",
71
+ "dev:link": "pnpm link --global && npm link"
72
72
  }
73
- }
73
+ }