@reglow/reui-mcp 0.1.0 → 0.2.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.
- package/README.md +2 -2
- package/catalog.mjs +8 -0
- package/index.mjs +2 -2
- package/package.json +4 -1
- package/server.mjs +1 -1
- package/skills/reui-components/BEST_PRACTICES.md +1 -1
- package/skills/reui-components/COMPONENTS.md +13 -10
- package/skills/reui-components/WORKFLOWS.md +3 -1
package/README.md
CHANGED
|
@@ -107,7 +107,7 @@ npx -y -p @reglow/reui-mcp reui-skills --list # 查看可用
|
|
|
107
107
|
| `search_reui_docs` | `query` `component?` `category?` `limit?` `version?` | 跨组件文档与源码检索(多关键词「全部命中」),返回 `文件:行号 + 上下文 + 文档链接` |
|
|
108
108
|
| `get_reui_guide` | `topic?` `version?` | 库级指南章节:`overview` / `install` / `theme` / `i18n` / `nuxt` / `build` / `conventions` |
|
|
109
109
|
|
|
110
|
-
所有返回都以「知识源 + 组件库版本」开头(如 `知识源:项目本地已安装包|组件库版本:0.
|
|
110
|
+
所有返回都以「知识源 + 组件库版本」开头(如 `知识源:项目本地已安装包|组件库版本:0.2.0`),
|
|
111
111
|
当内容来自官方文档站点兜底时会额外标注 ⚠️,避免 AI 误判文档版本。
|
|
112
112
|
|
|
113
113
|
## 知识来源
|
|
@@ -128,7 +128,7 @@ npx -y -p @reglow/reui-mcp reui-skills --list # 查看可用
|
|
|
128
128
|
| 选项 | 说明 |
|
|
129
129
|
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
130
130
|
| `--root <dir>` | 指定 ReUI 仓库工作区(开发组件库时使用) |
|
|
131
|
-
| `--default-version <ver>` | 工具未传 `version` 时默认使用的版本(如 `0.
|
|
131
|
+
| `--default-version <ver>` | 工具未传 `version` 时默认使用的版本(如 `0.2.0`、`latest`、`^0.2.0`) |
|
|
132
132
|
| `--no-site` | 禁用官方文档站点兜底(完全离线) |
|
|
133
133
|
| `--check` | 自检:打印知识源、版本、组件数量后退出 |
|
|
134
134
|
| `--setup [tools]` | 一键配置 AI 工具(MCP 配置 + Skills),默认 `trae,codebuddy,qoder`;支持 `--scope user`、`--dry-run`、`--force`、`--skills-only`、`--mcp-only` |
|
package/catalog.mjs
CHANGED
|
@@ -40,6 +40,7 @@ export const CATEGORIES = [
|
|
|
40
40
|
{ name: "affix", cn: "固钉", desc: "滚动时固定元素位置" },
|
|
41
41
|
{ name: "breadcrumb", cn: "面包屑", desc: "显示页面层级路径" },
|
|
42
42
|
{ name: "dropdown-menu", cn: "下拉菜单", desc: "下拉操作菜单" },
|
|
43
|
+
{ name: "steps", cn: "步骤条", desc: "分步流程引导" },
|
|
43
44
|
{ name: "tabs", cn: "标签页", desc: "多标签内容切换" },
|
|
44
45
|
],
|
|
45
46
|
},
|
|
@@ -81,11 +82,18 @@ export const CATEGORIES = [
|
|
|
81
82
|
{ name: "badge", cn: "徽标", desc: "角标与状态点" },
|
|
82
83
|
{ name: "calendar", cn: "日历", desc: "日历展示" },
|
|
83
84
|
{ name: "card", cn: "卡片", desc: "内容容器卡片" },
|
|
85
|
+
{ name: "carousel", cn: "轮播图", desc: "循环播放的内容切换" },
|
|
84
86
|
{ name: "chat", cn: "对话", desc: "对话气泡组件" },
|
|
87
|
+
{ name: "collapse", cn: "折叠面板", desc: "可折叠的内容面板" },
|
|
85
88
|
{ name: "collapsible", cn: "折叠面板", desc: "可折叠内容" },
|
|
86
89
|
{ name: "empty", cn: "空状态", desc: "空数据占位" },
|
|
87
90
|
{ name: "hover-card", cn: "悬停卡片", desc: "悬停展示详情" },
|
|
88
91
|
{ name: "image-viewer", cn: "图片预览", desc: "图片放大预览" },
|
|
92
|
+
{
|
|
93
|
+
name: "list",
|
|
94
|
+
cn: "虚拟列表",
|
|
95
|
+
desc: "高性能列表(虚拟滚动/分组吸顶/拖拽排序)",
|
|
96
|
+
},
|
|
89
97
|
{ name: "popover", cn: "气泡卡片", desc: "悬浮气泡内容" },
|
|
90
98
|
{ name: "pricing-table", cn: "价格表", desc: "定价方案对比" },
|
|
91
99
|
{ name: "qr-code", cn: "二维码", desc: "二维码生成" },
|
package/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* 用法(客户端 mcpServers 配置中作为 command + args):
|
|
10
10
|
* npx -y @reglow/reui-mcp # 使用项目本地已安装版本
|
|
11
11
|
* npx -y @reglow/reui-mcp --root D:/path/to/reui # 指定工作区(开发组件库时)
|
|
12
|
-
* npx -y @reglow/reui-mcp --default-version 0.
|
|
12
|
+
* npx -y @reglow/reui-mcp --default-version 0.2.0 # 固定知识版本
|
|
13
13
|
* npx -y @reglow/reui-mcp --check # 自检:打印知识源与组件数量后退出
|
|
14
14
|
* npx -y @reglow/reui-mcp --setup # 为 Trae/CodeBuddy/Qoder 一键写 MCP 配置 + 装 Skills
|
|
15
15
|
* npx -y @reglow/reui-mcp --install-skills # 仅安装 Skills 知识包(等价于 reui-skills)
|
|
@@ -36,7 +36,7 @@ const USAGE = [
|
|
|
36
36
|
"",
|
|
37
37
|
"选项:",
|
|
38
38
|
" --root <dir> ReUI 仓库工作区路径(未指定时自动解析项目本地已安装的 @reglow/reui)",
|
|
39
|
-
" --default-version <ver> 工具未传 version 时默认使用的 @reglow/reui 版本(如 0.
|
|
39
|
+
" --default-version <ver> 工具未传 version 时默认使用的 @reglow/reui 版本(如 0.2.0、latest)",
|
|
40
40
|
" --no-site 禁用官方文档站点兜底(完全离线)",
|
|
41
41
|
" --check 自检:打印知识源、版本与组件数量后退出",
|
|
42
42
|
` --setup [tools] 一键配置 AI 工具(MCP 配置 + Skills),默认 ${DEFAULT_SETUP_TOOLS.join(",")}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reglow/reui-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "ReUI 组件库 MCP 服务器与 Skills 知识包:让 AI 助手查询 ReUI 组件文档、示例、源码与函数实现",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,6 +40,9 @@
|
|
|
40
40
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
41
41
|
"zod": "^4.0.0"
|
|
42
42
|
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"vitest": "^4.1.10"
|
|
45
|
+
},
|
|
43
46
|
"publishConfig": {
|
|
44
47
|
"access": "public"
|
|
45
48
|
}
|
package/server.mjs
CHANGED
|
@@ -196,7 +196,7 @@ export function createServer({ resolveKnowledge, defaultKnowledge }) {
|
|
|
196
196
|
.string()
|
|
197
197
|
.optional()
|
|
198
198
|
.describe(
|
|
199
|
-
"指定 @reglow/reui 版本(如 0.
|
|
199
|
+
"指定 @reglow/reui 版本(如 0.2.0、latest);不传则使用项目本地已安装版本",
|
|
200
200
|
),
|
|
201
201
|
source: z
|
|
202
202
|
.enum(["auto", "local", "site"])
|
|
@@ -59,7 +59,7 @@ ReUI 组件内部存在**动态拼装的类名**,依赖消费方 Tailwind 静
|
|
|
59
59
|
|
|
60
60
|
- 聚合规则:主入口 `export *` 两侧,**同名 reui 优先**,`ui` 只导出独有内容(`guide.md` §3)。
|
|
61
61
|
- `ui/input`、`ui/textarea`、`ui/avatar` 已标记 `@deprecated`,内部转发到 `reui` 版本——新代码统一从 `@reglow/reui` 或 `/reui/*` 取(头像组请用 `reui/avatar` 的 `AvatarGroup`)。
|
|
62
|
-
-
|
|
62
|
+
- 表格命名:`reui/table` 导出通用表格 **`Table`**、分页表格 **`PageTable`** 与基础原子组件 `TableRoot/TableHeader/TableBody/TableRow/TableHead/TableCell`;`ui/table` 已标记 `@deprecated`,仅转发到 `reui/table`(其 `Table` 即 `TableRoot`)。
|
|
63
63
|
|
|
64
64
|
## 5. 主题
|
|
65
65
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> 分类与文档链接取自官网组件总览 https://reglow.huoli.tech/components-library/reui (同源仓库文件:`reglow-docs/content/components-library/1.reui/1.index.md`)。
|
|
4
4
|
> 导入符号已逐一核对各组件目录的 `index.ts`(`reui/components/reui/*/index.ts`、`reui/components/ui/*/index.ts`)。
|
|
5
|
-
> 版本基线:`@reglow/reui` 0.
|
|
5
|
+
> 版本基线:`@reglow/reui` 0.4.0(`reui/package.json`)。
|
|
6
6
|
|
|
7
7
|
## 使用方式
|
|
8
8
|
|
|
@@ -43,6 +43,7 @@ import { Button } from "@reglow/reui/ui/button";
|
|
|
43
43
|
| [affix](https://reglow.huoli.tech/components-library/reui/components/navigation/affix) | 固钉 | 滚动时固定元素位置 | `Affix` | `reui/affix` |
|
|
44
44
|
| [breadcrumb](https://reglow.huoli.tech/components-library/reui/components/navigation/breadcrumb) | 面包屑 | 显示页面层级路径 | `Breadcrumb` | `reui/breadcrumb` |
|
|
45
45
|
| [dropdown-menu](https://reglow.huoli.tech/components-library/reui/components/navigation/dropdown-menu) | 下拉菜单 | 下拉操作菜单(reka-ui 透传) | `DropdownMenu` / `DropdownMenuTrigger` / `DropdownMenuContent` / `DropdownMenuItem` / `DropdownMenuSub` … | `reui/dropdown-menu` |
|
|
46
|
+
| [steps](https://reglow.huoli.tech/components-library/reui/components/navigation/steps) | 步骤条 | 分步流程引导(配置式/复合式、6 种类型) | `Steps` / `StepsItem` / `StepsIcon` | `reui/steps` |
|
|
46
47
|
| [tabs](https://reglow.huoli.tech/components-library/reui/components/navigation/tabs) | 标签页 | 多标签内容切换(配置式 / 复合式,6 种样式) | `Tabs` / `TabsList` / `TabsTrigger` / `TabsContent` | `reui/tabs` |
|
|
47
48
|
|
|
48
49
|
## 数据录入 data-entry
|
|
@@ -90,6 +91,7 @@ import { Button } from "@reglow/reui/ui/button";
|
|
|
90
91
|
| [empty](https://reglow.huoli.tech/components-library/reui/components/data-display/empty) | 空状态 | 空数据占位 | `Empty` | `reui/empty` |
|
|
91
92
|
| [hover-card](https://reglow.huoli.tech/components-library/reui/components/data-display/hover-card) | 悬停卡片 | 悬停展示详情 | `HoverCard` / `HoverCardTrigger` / `HoverCardContent` | `reui/hover-card` |
|
|
92
93
|
| [image-viewer](https://reglow.huoli.tech/components-library/reui/components/data-display/image-viewer) | 图片预览 | 图片放大预览 | `Image` / `ImageViewer` / `PreviewGroup` | `reui/image-viewer` |
|
|
94
|
+
| [list](https://reglow.huoli.tech/components-library/reui/components/data-display/list) | 虚拟列表 | 高性能列表(虚拟滚动/分组吸顶/拖拽排序) | `List` / `ListItemMeta` | `reui/list` |
|
|
93
95
|
| [popover](https://reglow.huoli.tech/components-library/reui/components/data-display/popover) | 气泡卡片 | 悬浮气泡内容 | `Popover` / `PopoverTrigger` / `PopoverContent` | `reui/popover` |
|
|
94
96
|
| [pricing-table](https://reglow.huoli.tech/components-library/reui/components/data-display/pricing-table) | 价格表 | 定价方案对比 | `PricingTable` | `reui/pricing-table` |
|
|
95
97
|
| [qr-code](https://reglow.huoli.tech/components-library/reui/components/data-display/qr-code) | 二维码 | 二维码生成 | `QRCode` | `reui/qr-code` |
|
|
@@ -130,12 +132,13 @@ import { Button } from "@reglow/reui/ui/button";
|
|
|
130
132
|
|
|
131
133
|
## 常见选型对照
|
|
132
134
|
|
|
133
|
-
| 需求
|
|
134
|
-
|
|
|
135
|
-
| 带分页/搜索/行操作的数据列表
|
|
136
|
-
| 通用表格(排序/行选择/展开行)
|
|
137
|
-
| 模态确认删除
|
|
138
|
-
| 表单内日期输入
|
|
139
|
-
| 左右分栏可拖拽
|
|
140
|
-
|
|
|
141
|
-
|
|
|
135
|
+
| 需求 | 选它 | 不要选 |
|
|
136
|
+
| ------------------------------------ | --------------------------------------------------------- | ------------------------------------------------- |
|
|
137
|
+
| 带分页/搜索/行操作的数据列表 | `PageTable`(`reui/table`) | `Table`(通用表格,不含分页/搜索/列管理) |
|
|
138
|
+
| 通用表格(排序/行选择/展开行) | `Table`(`reui/table`) | `TableRoot` + 原子组件(无排序/选择,需完全自建) |
|
|
139
|
+
| 模态确认删除 | `Modal.confirm` / `PopConfirm` | `ui/alert-dialog`(reka-ui 风格,需自行组装) |
|
|
140
|
+
| 表单内日期输入 | `DatePicker` / `DateRangePicker`(`Dayjs` 值) | `Calendar`(面板形态,用于嵌入式日历) |
|
|
141
|
+
| 左右分栏可拖拽 | `Splitter` + `SplitterPanel` | `MasonryGrid`(瀑布流,不同场景) |
|
|
142
|
+
| 长列表(虚拟滚动/分组吸顶/拖拽排序) | `List`(`sortable` 开启拖拽、`v-model:items` 同步顺序) | `PageTable`(表格形态)/ `MasonryGrid`(瀑布流) |
|
|
143
|
+
| 可折叠内容区 | `Collapse`(多面板、手风琴)/ `Collapsible`(单个折叠区) | — |
|
|
144
|
+
| 代码展示 / 编辑 | `CodeEditor`(`readonly` 作展示) | `Textarea`(无高亮) |
|
|
@@ -77,9 +77,11 @@ const sizes = ref(["30%", "70%"]);
|
|
|
77
77
|
|
|
78
78
|
### 示例 2:列表页表格(PageTable:分页 + 搜索 + 行操作)
|
|
79
79
|
|
|
80
|
+
> `reui/table` 同时导出通用表格 **`Table`** 与分页表格 **`PageTable`**:只是把数据以表格形式展示(排序 / 行选择 / 展开行 / 单元格自定义)用 `Table`;后台列表页(搜索 / 分页 / 列管理 / 行操作 / 服务端排序)用 `PageTable`。
|
|
81
|
+
|
|
80
82
|
| 步骤 | 调用 | 参数 | 判断 |
|
|
81
83
|
| ---- | ------------------------ | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
82
|
-
| 1 | `get_reui_document` | `{ component: "table" }` | 确认导出名是 **`PageTable
|
|
84
|
+
| 1 | `get_reui_document` | `{ component: "table" }` | 确认导出名是 **`PageTable`**(通用表格则为 **`Table`**;组件目录名均为 `table`,聚合清单里写作 `Table / PageTable`) |
|
|
83
85
|
| 2 | `get_reui_code_examples` | `{ component: "table" }` | 取"基本用法""分页""搜索""行操作"四段 |
|
|
84
86
|
| 3 | `get_reui_document` | `{ component: "table" }` | 核对 `rowActions` 的 `RowAction` 结构(`key/label/variant/confirm/onClick/show/tooltip`)与 `v-model:page`、`v-model:page-size` |
|
|
85
87
|
| 4 | `search_reui_docs` | `{ keywords: ["rowActions", "confirm"], limit: 10 }` | 确认删除二次确认是 `confirm: { title, description? }` |
|