ant-design-x-vue 1.2.6 → 1.2.8
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.esm.js +39148 -0
- package/dist/index.umd.js +244 -13
- package/es/_util/cssinjs/StyleContext.mjs +48 -42
- package/es/_util/motion.mjs +11 -13
- package/es/attachments/Attachments2.mjs +14 -14
- package/es/attachments/FileList/FileListCard.mjs +21 -21
- package/es/attachments/index.mjs +7 -4
- package/es/bubble/Bubble.mjs +11 -11
- package/es/bubble/BubbleList.mjs +28 -29
- package/es/bubble/index.mjs +10 -7
- package/es/components.mjs +31 -0
- package/es/components.ts2.mjs +35 -0
- package/es/conversations/Conversations.mjs +14 -15
- package/es/conversations/index.mjs +6 -3
- package/es/hooks.mjs +13 -0
- package/es/index.mjs +81 -36
- package/es/prompts/Prompts.mjs +16 -13
- package/es/prompts/index.mjs +6 -3
- package/es/sender/Sender.mjs +154 -134
- package/es/sender/components/ActionButton/index.mjs +15 -12
- package/es/sender/components/ClearButton.mjs +15 -12
- package/es/sender/components/LoadingButton.mjs +16 -13
- package/es/sender/components/SendButton.mjs +17 -14
- package/es/sender/components/SpeechButton/RecordingIcon.mjs +21 -18
- package/es/sender/components/SpeechButton/index.mjs +31 -25
- package/es/sender/index.mjs +9 -6
- package/es/suggestion/Suggestion.mjs +155 -50
- package/es/suggestion/index.mjs +6 -3
- package/es/theme/genStyleUtils.mjs +7 -8
- package/es/thought-chain/ThoughtChain.mjs +17 -18
- package/es/thought-chain/index.mjs +6 -3
- package/es/welcome/Welcome.mjs +45 -37
- package/es/welcome/index.mjs +6 -3
- package/es/x-provider/index.mjs +9 -6
- package/es/x-provider/index2.mjs +5 -5
- package/lib/_util/cssinjs/StyleContext.js +1 -1
- package/lib/_util/motion.js +1 -1
- package/lib/attachments/Attachments2.js +2 -2
- package/lib/attachments/FileList/FileListCard.js +1 -1
- package/lib/attachments/index.js +1 -1
- package/lib/bubble/Bubble.js +1 -1
- package/lib/bubble/BubbleList.js +1 -1
- package/lib/bubble/index.js +1 -1
- package/lib/components.js +1 -0
- package/lib/components.ts2.js +1 -0
- package/lib/conversations/Conversations.js +1 -1
- package/lib/conversations/index.js +1 -1
- package/lib/hooks.js +1 -0
- package/lib/index.js +1 -1
- package/lib/prompts/Prompts.js +1 -1
- package/lib/prompts/index.js +1 -1
- package/lib/sender/Sender.js +1 -1
- package/lib/sender/components/ActionButton/index.js +1 -1
- package/lib/sender/components/ClearButton.js +1 -1
- package/lib/sender/components/LoadingButton.js +1 -1
- package/lib/sender/components/SendButton.js +1 -1
- package/lib/sender/components/SpeechButton/RecordingIcon.js +1 -1
- package/lib/sender/components/SpeechButton/index.js +1 -1
- package/lib/sender/index.js +1 -1
- package/lib/suggestion/Suggestion.js +1 -1
- package/lib/suggestion/index.js +1 -1
- package/lib/theme/genStyleUtils.js +1 -1
- package/lib/thought-chain/ThoughtChain.js +1 -1
- package/lib/thought-chain/index.js +1 -1
- package/lib/welcome/Welcome.js +1 -1
- package/lib/welcome/index.js +1 -1
- package/lib/x-provider/index.js +1 -1
- package/lib/x-provider/index2.js +1 -1
- package/package.json +6 -5
- package/typings/_util/cssinjs/StyleContext.d.ts +6 -6
- package/typings/_util/cssinjs/index.d.ts +3 -3
- package/typings/attachments/index.d.ts +1 -1
- package/typings/bubble/Bubble.vue.d.ts +6 -6
- package/typings/bubble/hooks/useTypingConfig.d.ts +1 -1
- package/typings/bubble/index.d.ts +12 -12
- package/typings/bubble/interface.d.ts +1 -1
- package/typings/components.d.ts +9 -0
- package/typings/hooks.d.ts +4 -0
- package/typings/index.d.ts +9 -13
- package/typings/prompts/interface.d.ts +1 -1
- package/typings/sender/Sender.vue.d.ts +4 -4
- package/typings/sender/SenderHeader.vue.d.ts +12 -10
- package/typings/sender/index.d.ts +19 -32
- package/typings/sender/interface.d.ts +19 -3
- package/typings/sender/useSpeech.d.ts +5 -1
- package/typings/welcome/interface.d.ts +4 -4
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import "./x-provider/index.mjs";
|
|
2
|
+
import o from "./bubble/index.mjs";
|
|
3
|
+
import "./conversations/index.mjs";
|
|
4
|
+
import "./welcome/index.mjs";
|
|
5
|
+
import "./prompts/index.mjs";
|
|
6
|
+
import "./suggestion/index.mjs";
|
|
7
|
+
import r from "./sender/index.mjs";
|
|
8
|
+
import m from "./attachments/index.mjs";
|
|
9
|
+
import "./thought-chain/index.mjs";
|
|
10
|
+
import { _ as t } from "./x-provider/index2.mjs";
|
|
11
|
+
import i, { defaultPrefixCls as e } from "./x-provider/hooks/use-x-provider-context.mjs";
|
|
12
|
+
import f from "./bubble/BubbleList.mjs";
|
|
13
|
+
import p from "./conversations/Conversations.mjs";
|
|
14
|
+
import n from "./welcome/Welcome.mjs";
|
|
15
|
+
import s from "./prompts/Prompts.mjs";
|
|
16
|
+
import _ from "./suggestion/Suggestion.mjs";
|
|
17
|
+
import a from "./thought-chain/ThoughtChain.mjs";
|
|
18
|
+
const T = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
19
|
+
__proto__: null,
|
|
20
|
+
Attachments: m,
|
|
21
|
+
Bubble: o,
|
|
22
|
+
BubbleList: f,
|
|
23
|
+
Conversations: p,
|
|
24
|
+
Prompts: s,
|
|
25
|
+
Sender: r,
|
|
26
|
+
Suggestion: _,
|
|
27
|
+
ThoughtChain: a,
|
|
28
|
+
Welcome: n,
|
|
29
|
+
XProvider: t,
|
|
30
|
+
defaultPrefixCls: e,
|
|
31
|
+
useXProviderContext: i
|
|
32
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
33
|
+
export {
|
|
34
|
+
T as c
|
|
35
|
+
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { defineComponent as $, mergeDefaults as S, toRef as
|
|
1
|
+
import { defineComponent as $, mergeDefaults as S, toRef as n, ref as G, computed as m, watch as V, createVNode as s, mergeProps as X } from "vue";
|
|
2
2
|
import { a as j, c as v } from "../attachments/Attachments2.mjs";
|
|
3
3
|
import w from "../_util/pick-attrs.mjs";
|
|
4
4
|
import F from "./ConversationsItem.mjs";
|
|
5
5
|
import y from "./GroupTitle.mjs";
|
|
6
6
|
import M from "../_util/hooks/useMergedState.mjs";
|
|
7
|
-
import
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
const _ = /* @__PURE__ */ $({
|
|
7
|
+
import "../x-provider/index.mjs";
|
|
8
|
+
import R from "./hooks/useGroupable.mjs";
|
|
9
|
+
import T from "../_util/hooks/use-x-component-config.mjs";
|
|
10
|
+
import D from "./style/index.mjs";
|
|
11
|
+
import { GroupTitleContextProvider as L } from "./context.mjs";
|
|
12
|
+
import q from "../x-provider/hooks/use-x-provider-context.mjs";
|
|
13
|
+
const I = /* @__PURE__ */ $({
|
|
15
14
|
name: "AXConversations",
|
|
16
15
|
__name: "Conversations",
|
|
17
16
|
props: S({
|
|
@@ -35,8 +34,8 @@ const _ = /* @__PURE__ */ $({
|
|
|
35
34
|
}),
|
|
36
35
|
setup(e) {
|
|
37
36
|
const C = j(e, ["prefixCls", "rootClassName", "items", "activeKey", "defaultActiveKey", "onActiveChange", "menu", "styles", "classNames", "groupable", "class", "style"]);
|
|
38
|
-
|
|
39
|
-
const c = G(e.activeKey), f =
|
|
37
|
+
n(e, "class"), n(e, "activeKey"), n(e, "prefixCls");
|
|
38
|
+
const c = G(e.activeKey), f = m(() => w(C, {
|
|
40
39
|
attr: !0,
|
|
41
40
|
aria: !0,
|
|
42
41
|
data: !0
|
|
@@ -46,10 +45,10 @@ const _ = /* @__PURE__ */ $({
|
|
|
46
45
|
V(() => e.activeKey, () => {
|
|
47
46
|
c.value = e.activeKey;
|
|
48
47
|
});
|
|
49
|
-
const u =
|
|
48
|
+
const u = R(() => e.groupable, () => e.items), {
|
|
50
49
|
getPrefixCls: k,
|
|
51
50
|
direction: r
|
|
52
|
-
} =
|
|
51
|
+
} = q(), l = m(() => k("conversations", e.prefixCls)), i = T("conversations"), [K, A, N] = D(l), g = m(() => v(l.value, i.value.className, e.class, e.rootClassName, A.value, N, {
|
|
53
52
|
[`${l.value}-rtl`]: r.value === "rtl"
|
|
54
53
|
})), P = (t) => {
|
|
55
54
|
x(t.key), e.onActiveChange && e.onActiveChange(t.key);
|
|
@@ -77,7 +76,7 @@ const _ = /* @__PURE__ */ $({
|
|
|
77
76
|
}, null));
|
|
78
77
|
return u.value.enableGroup ? s("li", {
|
|
79
78
|
key: t.name || `key-${b}`
|
|
80
|
-
}, [s(
|
|
79
|
+
}, [s(L, {
|
|
81
80
|
value: {
|
|
82
81
|
prefixCls: l.value
|
|
83
82
|
}
|
|
@@ -101,5 +100,5 @@ const _ = /* @__PURE__ */ $({
|
|
|
101
100
|
}
|
|
102
101
|
});
|
|
103
102
|
export {
|
|
104
|
-
|
|
103
|
+
I as default
|
|
105
104
|
};
|
package/es/hooks.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as a } from "./x-stream/x-stream.mjs";
|
|
2
|
+
import { default as f } from "./x-request/x-fetch.mjs";
|
|
3
|
+
import { default as s } from "./x-request/x-request.mjs";
|
|
4
|
+
import { XAgent as m, default as X } from "./use-x-agent/use-x-agent.mjs";
|
|
5
|
+
import { default as l } from "./use-x-chat/use-x-chat.mjs";
|
|
6
|
+
export {
|
|
7
|
+
m as XAgent,
|
|
8
|
+
f as XFetch,
|
|
9
|
+
s as XRequest,
|
|
10
|
+
a as XStream,
|
|
11
|
+
X as useXAgent,
|
|
12
|
+
l as useXChat
|
|
13
|
+
};
|
package/es/index.mjs
CHANGED
|
@@ -1,38 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { default as A } from "./x-
|
|
12
|
-
import { default as B } from "./
|
|
13
|
-
import { default as
|
|
14
|
-
import {
|
|
15
|
-
import { default as
|
|
16
|
-
import {
|
|
17
|
-
import { default as
|
|
1
|
+
import { c as r } from "./components.ts2.mjs";
|
|
2
|
+
import a from "./_util/cssinjs/index.mjs";
|
|
3
|
+
import { _experimental as x } from "./_util/cssinjs/index.mjs";
|
|
4
|
+
import { default as d } from "./x-stream/x-stream.mjs";
|
|
5
|
+
import { default as c } from "./x-request/x-fetch.mjs";
|
|
6
|
+
import { default as h } from "./x-request/x-request.mjs";
|
|
7
|
+
import { XAgent as y, default as C } from "./use-x-agent/use-x-agent.mjs";
|
|
8
|
+
import { default as X } from "./use-x-chat/use-x-chat.mjs";
|
|
9
|
+
import { theme as T } from "ant-design-vue";
|
|
10
|
+
import { _ as L } from "./x-provider/index2.mjs";
|
|
11
|
+
import { defaultPrefixCls as k, default as A } from "./x-provider/hooks/use-x-provider-context.mjs";
|
|
12
|
+
import { default as B } from "./bubble/BubbleList.mjs";
|
|
13
|
+
import { default as _ } from "./conversations/Conversations.mjs";
|
|
14
|
+
import { default as E } from "./welcome/Welcome.mjs";
|
|
15
|
+
import { default as I } from "./prompts/Prompts.mjs";
|
|
16
|
+
import { default as N } from "./suggestion/Suggestion.mjs";
|
|
17
|
+
import { default as W } from "./thought-chain/ThoughtChain.mjs";
|
|
18
|
+
import { default as z } from "./_util/cssinjs/theme/Theme.mjs";
|
|
19
|
+
import { default as G } from "./_util/cssinjs/theme/createTheme.mjs";
|
|
20
|
+
import { e as J, u as M } from "./_util/cssinjs/hooks/useStyleRegister/index.tsx2.mjs";
|
|
21
|
+
import { u as U } from "./_util/cssinjs/hooks/useCacheToken.tsx2.mjs";
|
|
22
|
+
import { default as Z } from "./_util/cssinjs/Keyframes.mjs";
|
|
23
|
+
import { default as ee } from "./_util/cssinjs/transformers/legacyLogicalProperties.mjs";
|
|
24
|
+
import { default as re } from "./_util/cssinjs/transformers/px2rem.mjs";
|
|
25
|
+
import { default as ae } from "./_util/cssinjs/linters/logicalPropertiesLinter.mjs";
|
|
26
|
+
import { default as se } from "./_util/cssinjs/linters/legacyNotSelectorLinter.mjs";
|
|
27
|
+
import { default as le } from "./_util/cssinjs/linters/parentSelectorLinter.mjs";
|
|
28
|
+
import { default as pe } from "./_util/cssinjs/hooks/useCSSVarRegister.mjs";
|
|
29
|
+
import { default as ne } from "./bubble/index.mjs";
|
|
30
|
+
import { default as ie } from "./sender/index.mjs";
|
|
31
|
+
import { default as Se } from "./attachments/index.mjs";
|
|
32
|
+
import { StyleProvider as ge, createCache as ye, useStyleInject as Ce, useStyleProvider as Pe } from "./_util/cssinjs/StyleContext.mjs";
|
|
33
|
+
import { token2CSSVar as ve, unit as Te } from "./_util/cssinjs/util.mjs";
|
|
34
|
+
const f = function(e) {
|
|
35
|
+
return Object.keys(r).forEach((o) => {
|
|
36
|
+
const t = r[o];
|
|
37
|
+
t.install && e.use(t);
|
|
38
|
+
}), e.use(a.StyleProvider), e;
|
|
39
|
+
}, l = {
|
|
40
|
+
install: f
|
|
41
|
+
};
|
|
18
42
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
Se as Attachments,
|
|
44
|
+
ne as Bubble,
|
|
45
|
+
B as BubbleList,
|
|
46
|
+
_ as Conversations,
|
|
47
|
+
Z as Keyframes,
|
|
48
|
+
I as Prompts,
|
|
49
|
+
ie as Sender,
|
|
50
|
+
ge as StyleProvider,
|
|
51
|
+
N as Suggestion,
|
|
52
|
+
z as Theme,
|
|
53
|
+
W as ThoughtChain,
|
|
54
|
+
E as Welcome,
|
|
55
|
+
y as XAgent,
|
|
56
|
+
c as XFetch,
|
|
57
|
+
L as XProvider,
|
|
58
|
+
h as XRequest,
|
|
59
|
+
d as XStream,
|
|
60
|
+
x as _experimental,
|
|
61
|
+
ye as createCache,
|
|
62
|
+
G as createTheme,
|
|
63
|
+
l as default,
|
|
64
|
+
k as defaultPrefixCls,
|
|
65
|
+
J as extractStyle,
|
|
66
|
+
f as install,
|
|
67
|
+
ee as legacyLogicalPropertiesTransformer,
|
|
68
|
+
se as legacyNotSelectorLinter,
|
|
69
|
+
ae as logicalPropertiesLinter,
|
|
70
|
+
le as parentSelectorLinter,
|
|
71
|
+
re as px2remTransformer,
|
|
72
|
+
T as theme,
|
|
73
|
+
ve as token2CSSVar,
|
|
74
|
+
Te as unit,
|
|
75
|
+
pe as useCSSVarRegister,
|
|
76
|
+
U as useCacheToken,
|
|
77
|
+
Ce as useStyleInject,
|
|
78
|
+
Pe as useStyleProvider,
|
|
79
|
+
M as useStyleRegister,
|
|
80
|
+
C as useXAgent,
|
|
81
|
+
X as useXChat,
|
|
82
|
+
A as useXProviderContext
|
|
38
83
|
};
|
package/es/prompts/Prompts.mjs
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { defineComponent as k, mergeDefaults as x, toRef as u, useSlots as g, computed as
|
|
1
|
+
import { defineComponent as k, mergeDefaults as x, toRef as u, useSlots as g, computed as m, createVNode as a, mergeProps as I } from "vue";
|
|
2
2
|
import { a as P, c as i } from "../attachments/Attachments2.mjs";
|
|
3
3
|
import w from "./style/index.mjs";
|
|
4
|
-
import
|
|
5
|
-
import "../x-
|
|
4
|
+
import "../x-provider/index.mjs";
|
|
5
|
+
import S from "../_util/hooks/use-x-component-config.mjs";
|
|
6
6
|
import { Typography as L } from "ant-design-vue";
|
|
7
|
-
import
|
|
7
|
+
import "./index.mjs";
|
|
8
|
+
import V from "../x-provider/hooks/use-x-provider-context.mjs";
|
|
8
9
|
const X = /* @__PURE__ */ k({
|
|
9
10
|
name: "AXPrompts",
|
|
10
11
|
__name: "Prompts",
|
|
11
12
|
props: x({
|
|
12
13
|
items: null,
|
|
13
|
-
title:
|
|
14
|
+
title: {
|
|
15
|
+
type: Function
|
|
16
|
+
},
|
|
14
17
|
onItemClick: {
|
|
15
18
|
type: Function
|
|
16
19
|
},
|
|
@@ -34,17 +37,17 @@ const X = /* @__PURE__ */ k({
|
|
|
34
37
|
const n = g(), {
|
|
35
38
|
getPrefixCls: v,
|
|
36
39
|
direction: C
|
|
37
|
-
} =
|
|
40
|
+
} = V(), t = v("prompts", e.prefixCls), l = S("prompts"), [d, N, f] = w(t), $ = m(() => i(t, l.value.className, e.class, e.rootClassName, N.value, f, {
|
|
38
41
|
[`${t}-rtl`]: C.value === "rtl"
|
|
39
|
-
})), b =
|
|
42
|
+
})), b = m(() => i(`${t}-list`, l.value.classNames.list, e.classNames.list, {
|
|
40
43
|
[`${t}-list-wrap`]: e.wrap
|
|
41
44
|
}, {
|
|
42
45
|
[`${t}-list-vertical`]: e.vertical
|
|
43
|
-
})), o =
|
|
46
|
+
})), o = m(() => n.title ? n.title() : typeof e.title == "function" ? e.title() : e.title);
|
|
44
47
|
return () => {
|
|
45
48
|
var r;
|
|
46
49
|
return d(a("div", I(y, {
|
|
47
|
-
class:
|
|
50
|
+
class: $.value,
|
|
48
51
|
style: {
|
|
49
52
|
...typeof e.style == "object" ? e.style : {},
|
|
50
53
|
...typeof l.value.style == "object" ? l.value.style : {}
|
|
@@ -65,7 +68,7 @@ const X = /* @__PURE__ */ k({
|
|
|
65
68
|
...e.styles.list
|
|
66
69
|
}
|
|
67
70
|
}, [(r = e.items) == null ? void 0 : r.map((s, h) => {
|
|
68
|
-
const
|
|
71
|
+
const c = s.children && s.children.length > 0;
|
|
69
72
|
return a("div", {
|
|
70
73
|
key: s.key || `key_${h}`,
|
|
71
74
|
style: {
|
|
@@ -74,10 +77,10 @@ const X = /* @__PURE__ */ k({
|
|
|
74
77
|
},
|
|
75
78
|
class: i(`${t}-item`, l.value.classNames.item, e.classNames.item, {
|
|
76
79
|
[`${t}-item-disabled`]: s.disabled,
|
|
77
|
-
[`${t}-item-has-nest`]:
|
|
80
|
+
[`${t}-item-has-nest`]: c
|
|
78
81
|
}),
|
|
79
82
|
onClick: () => {
|
|
80
|
-
!
|
|
83
|
+
!c && e.onItemClick && e.onItemClick({
|
|
81
84
|
data: s
|
|
82
85
|
});
|
|
83
86
|
}
|
|
@@ -93,7 +96,7 @@ const X = /* @__PURE__ */ k({
|
|
|
93
96
|
class: `${t}-label`
|
|
94
97
|
}, [s.label]), s.description && a("p", {
|
|
95
98
|
class: `${t}-desc`
|
|
96
|
-
}, [s.description]),
|
|
99
|
+
}, [s.description]), c && a(X, {
|
|
97
100
|
class: `${t}-nested`,
|
|
98
101
|
items: s.children,
|
|
99
102
|
vertical: !0,
|