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.
Files changed (86) hide show
  1. package/dist/index.esm.js +39148 -0
  2. package/dist/index.umd.js +244 -13
  3. package/es/_util/cssinjs/StyleContext.mjs +48 -42
  4. package/es/_util/motion.mjs +11 -13
  5. package/es/attachments/Attachments2.mjs +14 -14
  6. package/es/attachments/FileList/FileListCard.mjs +21 -21
  7. package/es/attachments/index.mjs +7 -4
  8. package/es/bubble/Bubble.mjs +11 -11
  9. package/es/bubble/BubbleList.mjs +28 -29
  10. package/es/bubble/index.mjs +10 -7
  11. package/es/components.mjs +31 -0
  12. package/es/components.ts2.mjs +35 -0
  13. package/es/conversations/Conversations.mjs +14 -15
  14. package/es/conversations/index.mjs +6 -3
  15. package/es/hooks.mjs +13 -0
  16. package/es/index.mjs +81 -36
  17. package/es/prompts/Prompts.mjs +16 -13
  18. package/es/prompts/index.mjs +6 -3
  19. package/es/sender/Sender.mjs +154 -134
  20. package/es/sender/components/ActionButton/index.mjs +15 -12
  21. package/es/sender/components/ClearButton.mjs +15 -12
  22. package/es/sender/components/LoadingButton.mjs +16 -13
  23. package/es/sender/components/SendButton.mjs +17 -14
  24. package/es/sender/components/SpeechButton/RecordingIcon.mjs +21 -18
  25. package/es/sender/components/SpeechButton/index.mjs +31 -25
  26. package/es/sender/index.mjs +9 -6
  27. package/es/suggestion/Suggestion.mjs +155 -50
  28. package/es/suggestion/index.mjs +6 -3
  29. package/es/theme/genStyleUtils.mjs +7 -8
  30. package/es/thought-chain/ThoughtChain.mjs +17 -18
  31. package/es/thought-chain/index.mjs +6 -3
  32. package/es/welcome/Welcome.mjs +45 -37
  33. package/es/welcome/index.mjs +6 -3
  34. package/es/x-provider/index.mjs +9 -6
  35. package/es/x-provider/index2.mjs +5 -5
  36. package/lib/_util/cssinjs/StyleContext.js +1 -1
  37. package/lib/_util/motion.js +1 -1
  38. package/lib/attachments/Attachments2.js +2 -2
  39. package/lib/attachments/FileList/FileListCard.js +1 -1
  40. package/lib/attachments/index.js +1 -1
  41. package/lib/bubble/Bubble.js +1 -1
  42. package/lib/bubble/BubbleList.js +1 -1
  43. package/lib/bubble/index.js +1 -1
  44. package/lib/components.js +1 -0
  45. package/lib/components.ts2.js +1 -0
  46. package/lib/conversations/Conversations.js +1 -1
  47. package/lib/conversations/index.js +1 -1
  48. package/lib/hooks.js +1 -0
  49. package/lib/index.js +1 -1
  50. package/lib/prompts/Prompts.js +1 -1
  51. package/lib/prompts/index.js +1 -1
  52. package/lib/sender/Sender.js +1 -1
  53. package/lib/sender/components/ActionButton/index.js +1 -1
  54. package/lib/sender/components/ClearButton.js +1 -1
  55. package/lib/sender/components/LoadingButton.js +1 -1
  56. package/lib/sender/components/SendButton.js +1 -1
  57. package/lib/sender/components/SpeechButton/RecordingIcon.js +1 -1
  58. package/lib/sender/components/SpeechButton/index.js +1 -1
  59. package/lib/sender/index.js +1 -1
  60. package/lib/suggestion/Suggestion.js +1 -1
  61. package/lib/suggestion/index.js +1 -1
  62. package/lib/theme/genStyleUtils.js +1 -1
  63. package/lib/thought-chain/ThoughtChain.js +1 -1
  64. package/lib/thought-chain/index.js +1 -1
  65. package/lib/welcome/Welcome.js +1 -1
  66. package/lib/welcome/index.js +1 -1
  67. package/lib/x-provider/index.js +1 -1
  68. package/lib/x-provider/index2.js +1 -1
  69. package/package.json +6 -5
  70. package/typings/_util/cssinjs/StyleContext.d.ts +6 -6
  71. package/typings/_util/cssinjs/index.d.ts +3 -3
  72. package/typings/attachments/index.d.ts +1 -1
  73. package/typings/bubble/Bubble.vue.d.ts +6 -6
  74. package/typings/bubble/hooks/useTypingConfig.d.ts +1 -1
  75. package/typings/bubble/index.d.ts +12 -12
  76. package/typings/bubble/interface.d.ts +1 -1
  77. package/typings/components.d.ts +9 -0
  78. package/typings/hooks.d.ts +4 -0
  79. package/typings/index.d.ts +9 -13
  80. package/typings/prompts/interface.d.ts +1 -1
  81. package/typings/sender/Sender.vue.d.ts +4 -4
  82. package/typings/sender/SenderHeader.vue.d.ts +12 -10
  83. package/typings/sender/index.d.ts +19 -32
  84. package/typings/sender/interface.d.ts +19 -3
  85. package/typings/sender/useSpeech.d.ts +5 -1
  86. 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 m, ref as G, computed as n, watch as V, createVNode as s, mergeProps as X } from "vue";
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 R from "../x-provider/hooks/use-x-provider-context.mjs";
8
- import "../x-provider/context.mjs";
9
- import "ant-design-vue";
10
- import T from "./hooks/useGroupable.mjs";
11
- import D from "../_util/hooks/use-x-component-config.mjs";
12
- import L from "./style/index.mjs";
13
- import { GroupTitleContextProvider as q } from "./context.mjs";
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
- m(e, "class"), m(e, "activeKey"), m(e, "prefixCls");
39
- const c = G(e.activeKey), f = n(() => w(C, {
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 = T(() => e.groupable, () => e.items), {
48
+ const u = R(() => e.groupable, () => e.items), {
50
49
  getPrefixCls: k,
51
50
  direction: r
52
- } = R(), l = n(() => k("conversations", e.prefixCls)), i = D("conversations"), [K, A, N] = L(l), g = n(() => v(l.value, i.value.className, e.class, e.rootClassName, A.value, N, {
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(q, {
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
- _ as default
103
+ I as default
105
104
  };
@@ -1,5 +1,8 @@
1
- import o from "./Conversations.mjs";
1
+ import n from "./Conversations.mjs";
2
+ n.install = function(o) {
3
+ return o.component(n.name, n), o;
4
+ };
2
5
  export {
3
- o as Conversations,
4
- o as default
6
+ n as Conversations,
7
+ n as default
5
8
  };
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 { defaultPrefixCls as o, default as r } from "./x-provider/hooks/use-x-provider-context.mjs";
2
- import { _ as f } from "./x-provider/index2.mjs";
3
- import { default as u } from "./bubble/index.mjs";
4
- import { default as l } from "./conversations/Conversations.mjs";
5
- import { default as x } from "./welcome/Welcome.mjs";
6
- import { default as n } from "./prompts/Prompts.mjs";
7
- import { default as h } from "./suggestion/Suggestion.mjs";
8
- import { default as g } from "./sender/index.mjs";
9
- import { default as b } from "./attachments/index.mjs";
10
- import { default as c } from "./thought-chain/ThoughtChain.mjs";
11
- import { default as A } from "./x-stream/x-stream.mjs";
12
- import { default as B } from "./x-request/x-fetch.mjs";
13
- import { default as F } from "./x-request/x-request.mjs";
14
- import { XAgent as R, default as T } from "./use-x-agent/use-x-agent.mjs";
15
- import { default as _ } from "./use-x-chat/use-x-chat.mjs";
16
- import { theme as k } from "ant-design-vue";
17
- import { default as y } from "./bubble/BubbleList.mjs";
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
- b as Attachments,
20
- u as Bubble,
21
- y as BubbleList,
22
- l as Conversations,
23
- n as Prompts,
24
- g as Sender,
25
- h as Suggestion,
26
- c as ThoughtChain,
27
- x as Welcome,
28
- R as XAgent,
29
- B as XFetch,
30
- f as XProvider,
31
- F as XRequest,
32
- A as XStream,
33
- o as defaultPrefixCls,
34
- k as theme,
35
- T as useXAgent,
36
- _ as useXChat,
37
- r as useXProviderContext
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
  };
@@ -1,16 +1,19 @@
1
- import { defineComponent as k, mergeDefaults as x, toRef as u, useSlots as g, computed as c, createVNode as a, mergeProps as I } from "vue";
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 S from "../x-provider/hooks/use-x-provider-context.mjs";
5
- import "../x-provider/context.mjs";
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 V from "../_util/hooks/use-x-component-config.mjs";
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: null,
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
- } = S(), t = v("prompts", e.prefixCls), l = V("prompts"), [d, N, $] = w(t), f = c(() => i(t, l.value.className, e.class, e.rootClassName, N.value, $, {
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 = c(() => i(`${t}-list`, l.value.classNames.list, e.classNames.list, {
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 = c(() => n.title ? n.title() : e.title);
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: f.value,
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 m = s.children && s.children.length > 0;
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`]: m
80
+ [`${t}-item-has-nest`]: c
78
81
  }),
79
82
  onClick: () => {
80
- !m && e.onItemClick && e.onItemClick({
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]), m && a(X, {
99
+ }, [s.description]), c && a(X, {
97
100
  class: `${t}-nested`,
98
101
  items: s.children,
99
102
  vertical: !0,
@@ -1,5 +1,8 @@
1
- import m from "./Prompts.mjs";
1
+ import n from "./Prompts.mjs";
2
+ n.install = function(t) {
3
+ return t.component(n.name, n), t;
4
+ };
2
5
  export {
3
- m as Prompts,
4
- m as default
6
+ n as Prompts,
7
+ n as default
5
8
  };