@deep-eye/core 0.2.1 → 0.4.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 +26 -44
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -1,61 +1,43 @@
|
|
|
1
1
|
# @deep-eye/core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Vue 3 组件库,提供思维导图和 AI 会话组件。
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
Deep-Eye 是为深瞳前端团队打造的企业级组件库,封装了团队内部常用且难以重新封装的组件。这是 King 为深瞳前端团队付出的一份努力,旨在提升团队开发效率,统一技术标准。
|
|
8
|
-
|
|
9
|
-
Deep-Eye is an enterprise-grade component library built for the DeepTong frontend team, encapsulating commonly used and hard-to-reimplement components. This is King's contribution to the DeepTong frontend team, aiming to improve development efficiency and unify technical standards.
|
|
10
|
-
|
|
11
|
-
## 安装 Installation
|
|
5
|
+
## 安装
|
|
12
6
|
|
|
13
7
|
```bash
|
|
14
|
-
# npm
|
|
15
|
-
npm install @deep-eye/core
|
|
16
|
-
|
|
17
|
-
# pnpm
|
|
18
8
|
pnpm add @deep-eye/core
|
|
19
|
-
|
|
20
|
-
# yarn
|
|
21
|
-
yarn add @deep-eye/core
|
|
22
9
|
```
|
|
23
10
|
|
|
24
|
-
## 使用
|
|
11
|
+
## 使用
|
|
25
12
|
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
```ts
|
|
14
|
+
import {
|
|
15
|
+
D3MindMap,
|
|
16
|
+
AiConversation,
|
|
17
|
+
useConversation,
|
|
18
|
+
ASK_USER_FORM_SYSTEM_PROMPT,
|
|
19
|
+
} from '@deep-eye/core'
|
|
29
20
|
import '@deep-eye/core/style.css'
|
|
30
|
-
|
|
31
|
-
const data = {
|
|
32
|
-
nodeData: {
|
|
33
|
-
id: 'root',
|
|
34
|
-
topic: 'Deep-Eye',
|
|
35
|
-
root: true,
|
|
36
|
-
children: [
|
|
37
|
-
{ id: '1', topic: '可视化组件' },
|
|
38
|
-
{ id: '2', topic: '布局组件' },
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
}
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<template>
|
|
45
|
-
<D3MindMap :data="data" height="600px" />
|
|
46
|
-
</template>
|
|
47
21
|
```
|
|
48
22
|
|
|
49
|
-
|
|
23
|
+
### AiConversation
|
|
50
24
|
|
|
51
|
-
|
|
52
|
-
|
|
25
|
+
```ts
|
|
26
|
+
const { messages, appendDelta } = useConversation()
|
|
27
|
+
appendDelta({ id: 'a1', role: 'assistant', contentDelta: chunk })
|
|
28
|
+
appendDelta({ id: 'a1', done: true })
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```vue
|
|
32
|
+
<AiConversation :messages="messages" @action="onAction" />
|
|
33
|
+
```
|
|
53
34
|
|
|
54
|
-
|
|
35
|
+
AskUserForm 使用 `ASK_USER_FORM_SYSTEM_PROMPT`;多个问题可切换,结果以 `formId` 区分。
|
|
55
36
|
|
|
56
|
-
|
|
37
|
+
### D3MindMap
|
|
57
38
|
|
|
58
|
-
|
|
39
|
+
```vue
|
|
40
|
+
<D3MindMap :data="data" height="600px" show-toolbar />
|
|
41
|
+
```
|
|
59
42
|
|
|
60
|
-
|
|
61
|
-
**团队 Team:深瞳前端团队 DeepTong Frontend Team**
|
|
43
|
+
Node ≥ 22 · Vue ≥ 3.5 · MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deep-eye/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,7 +35,10 @@
|
|
|
35
35
|
"component-library",
|
|
36
36
|
"ui",
|
|
37
37
|
"mindmap",
|
|
38
|
-
"visualization"
|
|
38
|
+
"visualization",
|
|
39
|
+
"ai",
|
|
40
|
+
"chat",
|
|
41
|
+
"conversation"
|
|
39
42
|
],
|
|
40
43
|
"author": "King <xintao.king@example.com>",
|
|
41
44
|
"license": "MIT",
|