kui-vue 5.5.1 → 5.7.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/AI.en-US.md +53 -0
- package/AI.md +59 -0
- package/README.md +51 -17
- package/README.zh-CN.md +52 -18
- package/ai/cli.mjs +27 -0
- package/ai/evals/cases.json +122 -0
- package/ai/kui-components.json +13690 -0
- package/ai/kui-components.schema.json +139 -0
- package/ai/mcp.mjs +196 -0
- package/ai/skills/kui-vue/SKILL.md +24 -0
- package/ai/skills/kui-vue/references/components.md +10 -0
- package/ai/skills/kui-vue/references/mcp.md +14 -0
- package/dist/index.js +2 -2
- package/es/index.js +10062 -6298
- package/es/locale/de.js +1 -1
- package/es/locale/el.js +1 -1
- package/es/locale/en.js +1 -1
- package/es/locale/fr.js +1 -1
- package/es/locale/it.js +1 -1
- package/es/locale/ja.js +1 -1
- package/es/locale/ko.js +1 -1
- package/es/locale/ru.js +1 -1
- package/es/locale/th.js +1 -1
- package/es/locale/uk.js +1 -1
- package/es/locale/vi.js +1 -1
- package/es/locale/zh-CN.js +1 -1
- package/es/locale/zh-TW.js +1 -1
- package/lib/index.cjs +9 -0
- package/lib/locale/{de.js → de.cjs} +1 -1
- package/lib/locale/{el.js → el.cjs} +1 -1
- package/lib/locale/{en.js → en.cjs} +1 -1
- package/lib/locale/{fr.js → fr.cjs} +1 -1
- package/lib/locale/{it.js → it.cjs} +1 -1
- package/lib/locale/{ja.js → ja.cjs} +1 -1
- package/lib/locale/{ko.js → ko.cjs} +1 -1
- package/lib/locale/{ru.js → ru.cjs} +1 -1
- package/lib/locale/{th.js → th.cjs} +1 -1
- package/lib/locale/{uk.js → uk.cjs} +1 -1
- package/lib/locale/{vi.js → vi.cjs} +1 -1
- package/lib/locale/{zh-CN.js → zh-CN.cjs} +1 -1
- package/lib/locale/{zh-TW.js → zh-TW.cjs} +1 -1
- package/package.json +74 -26
- package/style/base.css +9 -0
- package/style/components.css +9 -0
- package/style/index.css +2 -2
- package/style/motion.css +9 -0
- package/style/theme.css +9 -0
- package/types/affix/index.d.ts +6 -6
- package/types/alert/index.d.ts +27 -1
- package/types/anchor/anchor.d.ts +5 -11
- package/types/anchor/context.d.ts +8 -0
- package/types/auto-complete/index.d.ts +130 -0
- package/types/avatar/avatar-group.d.ts +3 -0
- package/types/avatar/context.d.ts +1 -1
- package/types/badge/index.d.ts +5 -2
- package/types/breadcrumb/breadcrumb.d.ts +5 -5
- package/types/card/index.d.ts +40 -1
- package/types/cascader/index.d.ts +4 -4
- package/types/check-card/check-card-group.d.ts +78 -0
- package/types/check-card/check-card.d.ts +101 -0
- package/types/check-card/context.d.ts +19 -0
- package/types/check-card/index.d.ts +7 -0
- package/types/check-card/types.d.ts +22 -0
- package/types/checkbox/checkbox-group.d.ts +8 -13
- package/types/checkbox/checkbox.d.ts +4 -8
- package/types/checkbox/index.d.ts +3 -2
- package/types/checkbox/types.d.ts +11 -0
- package/types/collapse/collapse.d.ts +27 -1
- package/types/color-picker/alpha.d.ts +3 -2
- package/types/color-picker/index.d.ts +82 -1
- package/types/color-picker/mode.d.ts +4 -3
- package/types/color-picker/paint.d.ts +12 -3
- package/types/components.d.ts +35 -11
- package/types/config/index.d.ts +14 -2
- package/types/config/popup.d.ts +4 -0
- package/types/const/types.d.ts +11 -2
- package/types/date-picker/index.d.ts +216 -17
- package/types/descriptions/descriptions.d.ts +14 -1
- package/types/drawer/index.d.ts +1 -5
- package/types/dropdown/dropdown-context.d.ts +11 -0
- package/types/dropdown/dropdown.d.ts +6 -6
- package/types/feature-card/index.d.ts +27 -1
- package/types/feedback-panel/feedback-panel.d.ts +28 -1
- package/types/feedback-panel/index.d.ts +2 -1
- package/types/flame-wrap/engine.d.ts +65 -0
- package/types/flame-wrap/index.d.ts +72 -0
- package/types/flex/index.d.ts +3 -4
- package/types/flex/types.d.ts +4 -0
- package/types/form/form.d.ts +4 -13
- package/types/form/index.d.ts +4 -2
- package/types/form/types.d.ts +11 -2
- package/types/global.d.ts +52 -2
- package/types/grid/grid.d.ts +5 -1
- package/types/icon/index.d.ts +2 -4
- package/types/icon/types.d.ts +4 -0
- package/types/image/image.d.ts +31 -4
- package/types/image/index.d.ts +2 -2
- package/types/image/instance.d.ts +9 -1
- package/types/index.d.cts +11 -0
- package/types/index.d.ts +1 -1
- package/types/input/input-box.d.ts +7 -7
- package/types/input/input.d.ts +3 -3
- package/types/input/textarea.d.ts +2 -2
- package/types/input-number/index.d.ts +1 -1
- package/types/input-otp/index.d.ts +2 -1
- package/types/input-otp/input-otp.d.ts +2 -1
- package/types/input-otp/types.d.ts +1 -0
- package/types/input-tag/index.d.ts +114 -0
- package/types/locale/de.d.cts +65 -0
- package/types/locale/el.d.cts +65 -0
- package/types/locale/en.d.cts +65 -0
- package/types/locale/fr.d.cts +65 -0
- package/types/locale/it.d.cts +65 -0
- package/types/locale/ja.d.cts +65 -0
- package/types/locale/ko.d.cts +65 -0
- package/types/locale/ru.d.cts +65 -0
- package/types/locale/th.d.cts +65 -0
- package/types/locale/uk.d.cts +65 -0
- package/types/locale/vi.d.cts +65 -0
- package/types/locale/zh-CN.d.cts +65 -0
- package/types/locale/zh-TW.d.cts +65 -0
- package/types/mentions/index.d.ts +147 -0
- package/types/menu/index.d.ts +2 -1
- package/types/menu/menu-context.d.ts +19 -0
- package/types/menu/menu.d.ts +3 -14
- package/types/menu/recursive-menu.d.ts +1 -1
- package/types/menu/types.d.ts +14 -0
- package/types/message/index.d.ts +7 -6
- package/types/modal/index.d.ts +4 -3
- package/types/modal/modal.d.ts +114 -0
- package/types/notice/content.d.ts +80 -6
- package/types/page/index.d.ts +17 -1
- package/types/popconfirm/index.d.ts +57 -5
- package/types/poptip/index.d.ts +53 -6
- package/types/progress/index.d.ts +6 -8
- package/types/qrcode/index.d.ts +28 -3
- package/types/radio/index.d.ts +2 -1
- package/types/radio/radio-button.d.ts +4 -4
- package/types/radio/radio-group.d.ts +1 -8
- package/types/radio/types.d.ts +7 -0
- package/types/rate/index.d.ts +8 -8
- package/types/rate/star.d.ts +8 -7
- package/types/result/index.d.ts +2 -1
- package/types/result/result.d.ts +2 -1
- package/types/ripple/engine.d.ts +48 -0
- package/types/ripple/index.d.ts +42 -0
- package/types/row-col/col.d.ts +36 -1
- package/types/row-col/index.d.ts +1 -1
- package/types/select/index.d.ts +2 -1
- package/types/select/option.d.ts +2 -4
- package/types/select/select.d.ts +42 -13
- package/types/select/types.d.ts +10 -0
- package/types/skeleton/skeleton-avatar.d.ts +3 -3
- package/types/skeleton/skeleton-button.d.ts +3 -3
- package/types/skeleton/skeleton-image.d.ts +3 -3
- package/types/skeleton/skeleton-text.d.ts +3 -3
- package/types/skeleton/skeleton.d.ts +3 -3
- package/types/skeleton/types.d.ts +1 -1
- package/types/slider/index.d.ts +2 -2
- package/types/stat-card/index.d.ts +2 -1
- package/types/stat-card/stat-card.d.ts +30 -15
- package/types/stat-card/types.d.ts +14 -0
- package/types/stat-card/utils/countup.d.ts +5 -5
- package/types/steps/index.d.ts +85 -0
- package/types/switch/index.d.ts +14 -1
- package/types/table/index.d.ts +122 -28
- package/types/table/types.d.ts +23 -0
- package/types/table/utils.d.ts +13 -0
- package/types/tabs/types.d.ts +1 -1
- package/types/tag/index.d.ts +7 -3
- package/types/time-line/index.d.ts +2 -1
- package/types/time-line/timeline-item.d.ts +4 -3
- package/types/time-line/timeline.d.ts +2 -1
- package/types/tooltip/index.d.ts +36 -6
- package/types/tour/index.d.ts +97 -0
- package/types/transfer/index.d.ts +109 -0
- package/types/tree/index.d.ts +47 -8
- package/types/tree/types.d.ts +6 -0
- package/types/tree/utils.d.ts +1 -1
- package/types/tree-select/index.d.ts +47 -5
- package/types/typography/index.d.ts +309 -0
- package/types/upload/file-list.d.ts +5 -4
- package/types/upload/index.d.ts +7 -21
- package/types/upload/selector.d.ts +9 -7
- package/types/upload/types.d.ts +17 -0
- package/types/utils/checked.d.ts +1 -1
- package/types/utils/element.d.ts +17 -4
- package/types/utils/number.d.ts +4 -4
- package/types/utils/share.d.ts +4 -4
- package/types/utils/vnode.d.ts +5 -2
- package/types/utils/vue.d.ts +2 -2
- package/types/virtual-list/index.d.ts +74 -0
- package/types/virtual-list/range.d.ts +14 -0
- package/types/watermark/index.d.ts +6 -15
- package/types/watermark/types.d.ts +11 -0
- package/vetur/attributes.json +6336 -6104
- package/vetur/tags.json +2001 -1520
- package/vetur/web-types.json +8191 -9040
- package/lib/index.js +0 -9
package/AI.en-US.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Kui Vue AI integration
|
|
2
|
+
|
|
3
|
+
Each Kui Vue npm release includes version-matched component metadata, a JSON Schema, an Agent Skill, an MCP server, and evaluation cases. This lets AI clients query the installed public API instead of guessing props.
|
|
4
|
+
|
|
5
|
+
## Initialize a project
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add kui-vue kui-icons
|
|
9
|
+
pnpm exec kui-vue-ai init
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The command adds Kui Vue guidance to `AGENTS.md` and is safe to run repeatedly.
|
|
13
|
+
|
|
14
|
+
## MCP server
|
|
15
|
+
|
|
16
|
+
Add this server to any client that supports stdio MCP:
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"mcpServers": {
|
|
21
|
+
"kui-vue": {
|
|
22
|
+
"command": "pnpm",
|
|
23
|
+
"args": ["exec", "kui-vue-mcp"]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Configuration locations vary by client version, so add the command through the client's current MCP settings. The server exposes component search, exact API lookup, component recommendations, template usage validation, component resources, and reusable prompts.
|
|
30
|
+
|
|
31
|
+
## Client guidance
|
|
32
|
+
|
|
33
|
+
- Codex: run the initializer, install `node_modules/kui-vue/ai/skills/kui-vue` as a Skill, and add the server in MCP settings. See the [official Codex documentation](https://developers.openai.com/codex/).
|
|
34
|
+
- Claude Code and Cursor: run the initializer and add the stdio command in their MCP settings.
|
|
35
|
+
- GitHub Copilot: run the initializer so agents can read `AGENTS.md`; the Kui Vue section can also be copied to `.github/copilot-instructions.md`.
|
|
36
|
+
|
|
37
|
+
## Published resources
|
|
38
|
+
|
|
39
|
+
- Compact index: <https://k-ui.cn/llms.txt>
|
|
40
|
+
- Complete documentation: <https://k-ui.cn/llms-full.txt>
|
|
41
|
+
- Metadata: <https://k-ui.cn/kui-components.json>
|
|
42
|
+
- JSON Schema: <https://k-ui.cn/schema/kui-components.schema.json>
|
|
43
|
+
- Package exports: `kui-vue/metadata`, `kui-vue/metadata/schema`, and `kui-vue/skill`
|
|
44
|
+
|
|
45
|
+
## Maintainer checks
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pnpm generate:ai
|
|
49
|
+
pnpm check:ai-assets
|
|
50
|
+
pnpm check:ai-evals
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The asset check detects stale generated files. The eval check compiles 20 representative Vue SFC cases and verifies component coverage.
|
package/AI.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Kui Vue AI 开发接入
|
|
2
|
+
|
|
3
|
+
Kui Vue 随 npm 版本一起发布组件元数据、JSON Schema、Agent Skill、MCP Server 和评测用例。AI 工具因此可以查询当前安装版本的真实 API,而不是猜测属性。
|
|
4
|
+
|
|
5
|
+
## 项目初始化
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add kui-vue kui-icons
|
|
9
|
+
pnpm exec kui-vue-ai init
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
初始化命令会把 Kui Vue 使用约束追加到项目的 `AGENTS.md`,重复执行不会重复写入。
|
|
13
|
+
|
|
14
|
+
## MCP Server
|
|
15
|
+
|
|
16
|
+
在支持 stdio MCP 的客户端中添加下面的服务:
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"mcpServers": {
|
|
21
|
+
"kui-vue": {
|
|
22
|
+
"command": "pnpm",
|
|
23
|
+
"args": ["exec", "kui-vue-mcp"]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
不同客户端的配置文件位置会随版本变化,请在客户端的 MCP 设置页面中添加该命令。服务提供:
|
|
30
|
+
|
|
31
|
+
- 组件搜索和完整 API 查询
|
|
32
|
+
- 根据需求推荐组件
|
|
33
|
+
- Vue 模板未知属性检查
|
|
34
|
+
- 每个组件的 `kui-vue://components/{Name}` 资源
|
|
35
|
+
- 表单、表格和弹窗编辑器提示词
|
|
36
|
+
|
|
37
|
+
## 各客户端建议
|
|
38
|
+
|
|
39
|
+
- Codex:运行初始化命令,并把 `node_modules/kui-vue/ai/skills/kui-vue` 作为 Skill 安装;在 MCP 设置中添加上述服务。参见 [Codex 官方文档](https://developers.openai.com/codex/)。
|
|
40
|
+
- Claude Code、Cursor:运行初始化命令,再通过各自的 MCP 设置添加上述 stdio 服务。
|
|
41
|
+
- GitHub Copilot:运行初始化命令,使 Agent 读取 `AGENTS.md`;也可以把其中 Kui Vue 段落同步到 `.github/copilot-instructions.md`。
|
|
42
|
+
|
|
43
|
+
## 可直接读取的资源
|
|
44
|
+
|
|
45
|
+
- 在线精简索引:<https://k-ui.cn/llms.txt>
|
|
46
|
+
- 在线完整文档:<https://k-ui.cn/llms-full.txt>
|
|
47
|
+
- 在线元数据:<https://k-ui.cn/kui-components.json>
|
|
48
|
+
- JSON Schema:<https://k-ui.cn/schema/kui-components.schema.json>
|
|
49
|
+
- npm 导出:`kui-vue/metadata`、`kui-vue/metadata/schema`、`kui-vue/skill`
|
|
50
|
+
|
|
51
|
+
## 维护验证
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pnpm generate:ai
|
|
55
|
+
pnpm check:ai-assets
|
|
56
|
+
pnpm check:ai-evals
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`check:ai-assets` 防止生成物过期,`check:ai-evals` 编译 20 个代表性 Vue SFC 用例并检查组件覆盖。
|
package/README.md
CHANGED
|
@@ -1,27 +1,45 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<a href="https://k-ui.cn">
|
|
3
|
+
<img width="88" src="https://cdn.chuchur.com/img/logo-kui.svg" alt="KUI Vue logo">
|
|
4
|
+
</a>
|
|
5
5
|
</p>
|
|
6
|
-
<h1 align="center">
|
|
7
|
-
Kui for Vue
|
|
8
|
-
</h1>
|
|
6
|
+
<h1 align="center">KUI Vue</h1>
|
|
9
7
|
|
|
10
|
-
<
|
|
8
|
+
<p align="center">
|
|
9
|
+
<strong>A modern, TypeScript-first UI component library for Vue 3.</strong>
|
|
10
|
+
</p>
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
<p align="center">
|
|
13
|
+
70+ polished components · Light & dark themes · SSR & Nuxt ready · Flexible design tokens
|
|
14
|
+
</p>
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://www.npmjs.com/package/kui-vue"><img src="https://img.shields.io/npm/v/kui-vue?style=flat-square&color=5b9cff" alt="npm version"></a>
|
|
18
|
+
<a href="https://www.npmjs.com/package/kui-vue"><img src="https://img.shields.io/npm/dm/kui-vue?style=flat-square&color=5b9cff" alt="npm downloads"></a>
|
|
19
|
+
<a href="https://github.com/smallerqiu/kui-vue/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/smallerqiu/kui-vue/ci.yml?branch=master&style=flat-square&label=CI" alt="CI status"></a>
|
|
20
|
+
<a href="https://github.com/smallerqiu/kui-vue"><img src="https://img.shields.io/github/stars/smallerqiu/kui-vue?style=flat-square&color=5b9cff" alt="GitHub stars"></a>
|
|
21
|
+
<a href="./LICENSE"><img src="https://img.shields.io/npm/l/kui-vue?style=flat-square" alt="MIT license"></a>
|
|
22
|
+
</p>
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
<p align="center">
|
|
25
|
+
<a href="https://k-ui.cn"><strong>Documentation</strong></a> ·
|
|
26
|
+
<a href="https://k-ui.cn/guide/quick-started">Quick Start</a> ·
|
|
27
|
+
<a href="https://k-ui.cn/guide/components">Components</a> ·
|
|
28
|
+
<a href="https://k-ui.cn/guide/dark-mode">Dark Mode</a> ·
|
|
29
|
+
<a href="https://github.com/smallerqiu/kui-vue/issues">Issues</a>
|
|
30
|
+
</p>
|
|
21
31
|
|
|
22
|
-
|
|
32
|
+
<p align="center">
|
|
33
|
+
English · <a href="README.zh-CN.md">简体中文</a>
|
|
34
|
+
</p>
|
|
23
35
|
|
|
24
|
-
|
|
36
|
+
<p align="center">
|
|
37
|
+
<a href="https://k-ui.cn">
|
|
38
|
+
<img src=".github/assets/demo.png" alt="KUI Vue component library preview">
|
|
39
|
+
</a>
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
<p align="center"><code>pnpm add kui-vue</code></p>
|
|
25
43
|
|
|
26
44
|
# Documentation
|
|
27
45
|
|
|
@@ -34,7 +52,7 @@ English | [简体中文](README.zh-CN.md)
|
|
|
34
52
|
|
|
35
53
|
# Features
|
|
36
54
|
|
|
37
|
-
- Up to
|
|
55
|
+
- Up to 70 high-quality Components.
|
|
38
56
|
- Internationalization Support for Dozens of Languages.
|
|
39
57
|
- Develop with TypeScript
|
|
40
58
|
- Supports Vue.js 3.x
|
|
@@ -109,6 +127,22 @@ pnpm build # Build the component library and styles
|
|
|
109
127
|
|
|
110
128
|
KUI Vue supports the latest two versions of major modern browsers, including Chrome, Edge, Firefox, and Safari. Internet Explorer is not supported.
|
|
111
129
|
|
|
130
|
+
## AI-assisted development
|
|
131
|
+
|
|
132
|
+
Kui Vue publishes version-matched component metadata, an Agent Skill, and an MCP server so coding assistants can use the public API without guessing.
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
pnpm exec kui-vue-ai init
|
|
136
|
+
pnpm exec kui-vue-mcp
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
- AI index: https://k-ui.cn/llms.txt
|
|
140
|
+
- Complete AI documentation: https://k-ui.cn/llms-full.txt
|
|
141
|
+
- Package metadata: `kui-vue/metadata`
|
|
142
|
+
- Metadata schema: `kui-vue/metadata/schema`
|
|
143
|
+
- Agent Skill: `kui-vue/skill`
|
|
144
|
+
- [Complete setup guide](./AI.en-US.md)
|
|
145
|
+
|
|
112
146
|
## Contributing
|
|
113
147
|
|
|
114
148
|
Issues and pull requests are welcome. Before submitting code, please ensure that the type checks and relevant builds pass.
|
package/README.zh-CN.md
CHANGED
|
@@ -1,31 +1,49 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<a href="https://k-ui.cn">
|
|
3
|
+
<img width="88" src="https://cdn.chuchur.com/img/logo-kui.svg" alt="KUI Vue 标志">
|
|
4
|
+
</a>
|
|
5
5
|
</p>
|
|
6
|
-
<h1 align="center">
|
|
7
|
-
Kui for Vue
|
|
8
|
-
</h1>
|
|
6
|
+
<h1 align="center">KUI Vue</h1>
|
|
9
7
|
|
|
10
|
-
<
|
|
8
|
+
<p align="center">
|
|
9
|
+
<strong>面向 Vue 3 的现代 TypeScript UI 组件库。</strong>
|
|
10
|
+
</p>
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
<p align="center">
|
|
13
|
+
70+ 精心设计的组件 · 明暗主题 · 支持 SSR 与 Nuxt · 灵活的设计 Token
|
|
14
|
+
</p>
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://www.npmjs.com/package/kui-vue"><img src="https://img.shields.io/npm/v/kui-vue?style=flat-square&color=5b9cff" alt="npm 版本"></a>
|
|
18
|
+
<a href="https://www.npmjs.com/package/kui-vue"><img src="https://img.shields.io/npm/dm/kui-vue?style=flat-square&color=5b9cff" alt="npm 下载量"></a>
|
|
19
|
+
<a href="https://github.com/smallerqiu/kui-vue/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/smallerqiu/kui-vue/ci.yml?branch=master&style=flat-square&label=CI" alt="CI 状态"></a>
|
|
20
|
+
<a href="https://github.com/smallerqiu/kui-vue"><img src="https://img.shields.io/github/stars/smallerqiu/kui-vue?style=flat-square&color=5b9cff" alt="GitHub Stars"></a>
|
|
21
|
+
<a href="./LICENSE"><img src="https://img.shields.io/npm/l/kui-vue?style=flat-square" alt="MIT 许可证"></a>
|
|
22
|
+
</p>
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
<p align="center">
|
|
25
|
+
<a href="https://k-ui.cn"><strong>文档</strong></a> ·
|
|
26
|
+
<a href="https://k-ui.cn/guide/quick-started">快速开始</a> ·
|
|
27
|
+
<a href="https://k-ui.cn/guide/components">组件总览</a> ·
|
|
28
|
+
<a href="https://k-ui.cn/guide/dark-mode">暗色模式</a> ·
|
|
29
|
+
<a href="https://github.com/smallerqiu/kui-vue/issues">问题反馈</a>
|
|
30
|
+
</p>
|
|
21
31
|
|
|
22
|
-
|
|
32
|
+
<p align="center">
|
|
33
|
+
<a href="README.md">English</a> · 简体中文
|
|
34
|
+
</p>
|
|
23
35
|
|
|
24
|
-
|
|
36
|
+
<p align="center">
|
|
37
|
+
<a href="https://k-ui.cn">
|
|
38
|
+
<img src=".github/assets/demo.png" alt="KUI Vue 组件库预览">
|
|
39
|
+
</a>
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
<p align="center"><code>pnpm add kui-vue</code></p>
|
|
25
43
|
|
|
26
44
|
# 特性
|
|
27
45
|
|
|
28
|
-
-
|
|
46
|
+
- 70+高质量组件
|
|
29
47
|
- 国际化支持 14 种语言
|
|
30
48
|
- 使用TypeScript开发
|
|
31
49
|
- 支持Vue3.x
|
|
@@ -107,13 +125,29 @@ pnpm build # 构建组件库及样式
|
|
|
107
125
|
|
|
108
126
|
支持主流现代浏览器的最近两个版本,包括 Chrome、Edge、Firefox 和 Safari;不支持 Internet Explorer。
|
|
109
127
|
|
|
128
|
+
## AI 辅助开发
|
|
129
|
+
|
|
130
|
+
Kui Vue 随版本发布组件 metadata、Agent Skill 和 MCP 服务,让 AI 编程工具根据真实公开 API 生成代码,而不是猜测属性。
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
pnpm exec kui-vue-ai init
|
|
134
|
+
pnpm exec kui-vue-mcp
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
- AI 索引:https://k-ui.cn/llms.txt
|
|
138
|
+
- 完整 AI 文档:https://k-ui.cn/llms-full.txt
|
|
139
|
+
- npm 组件数据:`kui-vue/metadata`
|
|
140
|
+
- 组件数据 Schema:`kui-vue/metadata/schema`
|
|
141
|
+
- Agent Skill:`kui-vue/skill`
|
|
142
|
+
- [完整接入指南](./AI.md)
|
|
143
|
+
|
|
110
144
|
## 参与贡献
|
|
111
145
|
|
|
112
146
|
欢迎提交 Issue 和 Pull Request。在提交代码前,请确保类型检查和相关构建能够通过。
|
|
113
147
|
|
|
114
148
|
- [GitHub 仓库](https://github.com/smallerqiu/kui-vue)
|
|
115
149
|
- [Gitee 仓库](https://gitee.com/chuchur/kui-vue)
|
|
116
|
-
- [问题反馈](https://
|
|
150
|
+
- [问题反馈](https://github.com/smallerqiu/kui-vue/issues)
|
|
117
151
|
|
|
118
152
|
## 开源协议
|
|
119
153
|
|
package/ai/cli.mjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import process from "node:process";
|
|
5
|
+
|
|
6
|
+
const command = process.argv[2] || "help";
|
|
7
|
+
const cwd = process.cwd();
|
|
8
|
+
const marker = "## Kui Vue\n";
|
|
9
|
+
const instructions = `${marker}
|
|
10
|
+
- This project uses Vue 3 and Kui Vue. Prefer components and public APIs documented at https://k-ui.cn.
|
|
11
|
+
- Import components from \`kui-vue\` and icons from \`kui-icons\`; import \`kui-vue/style/index.css\` once.
|
|
12
|
+
- Read the installed \`kui-vue/metadata\` before using unfamiliar props, events, or slots. Do not invent component APIs.
|
|
13
|
+
- Keep \`theme\`, \`size\`, and \`shape\` consistent and run typecheck/lint after edits.
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
if (command === "init") {
|
|
17
|
+
const target = path.join(cwd, "AGENTS.md");
|
|
18
|
+
const current = fs.existsSync(target) ? fs.readFileSync(target, "utf8") : "";
|
|
19
|
+
if (!current.includes(marker.trim())) {
|
|
20
|
+
fs.writeFileSync(target, `${current.trim()}${current.trim() ? "\n\n" : ""}${instructions}`);
|
|
21
|
+
console.log(`Added Kui Vue guidance to ${target}`);
|
|
22
|
+
} else {
|
|
23
|
+
console.log("Kui Vue guidance already exists in AGENTS.md");
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
console.log("Usage: kui-vue-ai init");
|
|
27
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "primary-action",
|
|
4
|
+
"prompt": "Create a primary submit button",
|
|
5
|
+
"components": ["Button"],
|
|
6
|
+
"source": "<template><Button type=\"primary\">Submit</Button></template>"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "login-form",
|
|
10
|
+
"prompt": "Create a login form",
|
|
11
|
+
"components": ["Form", "FormItem", "Input", "Button"],
|
|
12
|
+
"source": "<template><Form><FormItem label=\"Email\"><Input /></FormItem><Button>Login</Button></Form></template>"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "modal-editor",
|
|
16
|
+
"prompt": "Create a modal editor",
|
|
17
|
+
"components": ["Modal", "Form", "Input"],
|
|
18
|
+
"source": "<template><Modal title=\"Edit\"><Form><Input /></Form></Modal></template>"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "data-table",
|
|
22
|
+
"prompt": "Create a striped data table",
|
|
23
|
+
"components": ["Table"],
|
|
24
|
+
"source": "<template><Table striped :data=\"[]\" :columns=\"[]\" /></template>"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "multiple-select",
|
|
28
|
+
"prompt": "Create a multiple select",
|
|
29
|
+
"components": ["Select"],
|
|
30
|
+
"source": "<template><Select multiple :options=\"[]\" /></template>"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "tree-browser",
|
|
34
|
+
"prompt": "Create a checkable tree",
|
|
35
|
+
"components": ["Tree"],
|
|
36
|
+
"source": "<template><Tree checkable :data=\"[]\" /></template>"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "file-upload",
|
|
40
|
+
"prompt": "Create a file uploader",
|
|
41
|
+
"components": ["Upload", "Button"],
|
|
42
|
+
"source": "<template><Upload><Button>Upload</Button></Upload></template>"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "pagination",
|
|
46
|
+
"prompt": "Create simple pagination",
|
|
47
|
+
"components": ["Page"],
|
|
48
|
+
"source": "<template><Page simple :total=\"100\" /></template>"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "drawer",
|
|
52
|
+
"prompt": "Create a settings drawer",
|
|
53
|
+
"components": ["Drawer"],
|
|
54
|
+
"source": "<template><Drawer title=\"Settings\">Settings</Drawer></template>"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "tabs",
|
|
58
|
+
"prompt": "Create two tabs",
|
|
59
|
+
"components": ["Tabs", "TabPanel"],
|
|
60
|
+
"source": "<template><Tabs><TabPanel key=\"a\" title=\"A\">A</TabPanel><TabPanel key=\"b\" title=\"B\">B</TabPanel></Tabs></template>"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "steps",
|
|
64
|
+
"prompt": "Create a three-step flow",
|
|
65
|
+
"components": ["Steps"],
|
|
66
|
+
"source": "<template><Steps :items=\"[{ title: 'One' }, { title: 'Two' }, { title: 'Three' }]\" /></template>"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "autocomplete",
|
|
70
|
+
"prompt": "Create autocomplete",
|
|
71
|
+
"components": ["AutoComplete"],
|
|
72
|
+
"source": "<template><AutoComplete :options=\"[]\" /></template>"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "tags",
|
|
76
|
+
"prompt": "Create tag input",
|
|
77
|
+
"components": ["InputTag"],
|
|
78
|
+
"source": "<template><InputTag :model-value=\"[]\" /></template>"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "mentions",
|
|
82
|
+
"prompt": "Create mentions input",
|
|
83
|
+
"components": ["Mentions"],
|
|
84
|
+
"source": "<template><Mentions :options=\"[]\" /></template>"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "tour",
|
|
88
|
+
"prompt": "Create a guided tour",
|
|
89
|
+
"components": ["Tour"],
|
|
90
|
+
"source": "<template><Tour :steps=\"[]\" /></template>"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "date-picker",
|
|
94
|
+
"prompt": "Create a date picker",
|
|
95
|
+
"components": ["DatePicker"],
|
|
96
|
+
"source": "<template><DatePicker /></template>"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "transfer",
|
|
100
|
+
"prompt": "Create a transfer list",
|
|
101
|
+
"components": ["Transfer"],
|
|
102
|
+
"source": "<template><Transfer :data-source=\"[]\" /></template>"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "responsive-grid",
|
|
106
|
+
"prompt": "Create a responsive grid",
|
|
107
|
+
"components": ["Grid", "GridItem"],
|
|
108
|
+
"source": "<template><Grid :cols=\"3\"><GridItem>One</GridItem></Grid></template>"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "card",
|
|
112
|
+
"prompt": "Create a bordered card",
|
|
113
|
+
"components": ["Card"],
|
|
114
|
+
"source": "<template><Card bordered title=\"Profile\">Content</Card></template>"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "virtual-select",
|
|
118
|
+
"prompt": "Create a large virtual select",
|
|
119
|
+
"components": ["Select"],
|
|
120
|
+
"source": "<template><Select virtual :options=\"[]\" :item-height=\"33\" /></template>"
|
|
121
|
+
}
|
|
122
|
+
]
|