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
@@ -1,49 +1,52 @@
1
- import { defineComponent as T, createVNode as e, createTextVNode as $ } from "vue";
2
- const t = 1e3, n = 4, r = 140, s = 250, l = 500, c = 0.8, w = /* @__PURE__ */ T({
1
+ import { defineComponent as p, createVNode as e, createTextVNode as I } from "vue";
2
+ const n = 1e3, t = 4, r = 140, s = 250, i = 500, c = 0.8, _ = /* @__PURE__ */ p({
3
3
  name: "AXSenderRecordingIcon",
4
4
  __name: "RecordingIcon",
5
5
  props: {
6
- className: null
6
+ className: null,
7
+ audioIcon: null,
8
+ audioDisabledIcon: null,
9
+ audioRecordingIcon: null
7
10
  },
8
11
  setup(u) {
9
- const i = r / 2;
12
+ const a = r / 2;
10
13
  return () => e("svg", {
11
14
  color: "currentColor",
12
- viewBox: `0 0 ${t} ${t}`,
15
+ viewBox: `0 0 ${n} ${n}`,
13
16
  xmlns: "http://www.w3.org/2000/svg",
14
17
  xmlnsXlink: "http://www.w3.org/1999/xlink",
15
18
  class: u.className
16
- }, [e("title", null, [$("Speech Recording")]), Array.from({
17
- length: n
18
- }).map((d, o) => {
19
- const m = (t - r * n) / (n - 1), g = o * (m + r), a = t / 2 - s / 2, p = t / 2 - l / 2;
19
+ }, [e("title", null, [I("Speech Recording")]), Array.from({
20
+ length: t
21
+ }).map((T, o) => {
22
+ const m = (n - r * t) / (t - 1), d = o * (m + r), l = n / 2 - s / 2, g = n / 2 - i / 2;
20
23
  return e("rect", {
21
24
  fill: "currentColor",
22
- rx: i,
23
- ry: i,
25
+ rx: a,
26
+ ry: a,
24
27
  height: s,
25
28
  width: r,
26
- x: g,
27
- y: a,
29
+ x: d,
30
+ y: l,
28
31
  key: o
29
32
  }, [e("animate", {
30
33
  attributeName: "height",
31
- values: `${s}; ${l}; ${s}`,
34
+ values: `${s}; ${i}; ${s}`,
32
35
  keyTimes: "0; 0.5; 1",
33
36
  dur: `${c}s`,
34
- begin: `${c / n * o}s`,
37
+ begin: `${c / t * o}s`,
35
38
  repeatCount: "indefinite"
36
39
  }, null), e("animate", {
37
40
  attributeName: "y",
38
- values: `${a}; ${p}; ${a}`,
41
+ values: `${l}; ${g}; ${l}`,
39
42
  keyTimes: "0; 0.5; 1",
40
43
  dur: `${c}s`,
41
- begin: `${c / n * o}s`,
44
+ begin: `${c / t * o}s`,
42
45
  repeatCount: "indefinite"
43
46
  }, null)]);
44
47
  })]);
45
48
  }
46
49
  });
47
50
  export {
48
- w as default
51
+ _ as default
49
52
  };
@@ -1,14 +1,14 @@
1
- import { defineComponent as c, mergeDefaults as d, computed as o, createVNode as l, mergeProps as m } from "vue";
2
- import { a as p } from "../../../attachments/Attachments2.mjs";
3
- import { theme as f } from "ant-design-vue";
4
- import y from "../ActionButton/index.mjs";
1
+ import { defineComponent as r, mergeDefaults as s, computed as i, createVNode as l, mergeProps as m } from "vue";
2
+ import { a as f } from "../../../attachments/Attachments2.mjs";
3
+ import { theme as p } from "ant-design-vue";
4
+ import I from "../ActionButton/index.mjs";
5
5
  import { useActionButtonContextInject as g } from "../ActionButton/context.mjs";
6
- import h from "./RecordingIcon.mjs";
7
- import { j as x, k as b } from "../../../attachments/FileList/FileList2.mjs";
8
- const j = /* @__PURE__ */ c({
6
+ import y from "./RecordingIcon.mjs";
7
+ import { j as b, k as h } from "../../../attachments/FileList/FileList2.mjs";
8
+ const A = /* @__PURE__ */ r({
9
9
  name: "AXSenderSpeechButton",
10
10
  __name: "index",
11
- props: d({
11
+ props: s({
12
12
  prefixCls: null,
13
13
  type: null,
14
14
  htmlType: null,
@@ -24,36 +24,42 @@ const j = /* @__PURE__ */ c({
24
24
  target: null,
25
25
  title: null,
26
26
  onClick: null,
27
- onMousedown: null
27
+ onMousedown: null,
28
+ audioIcon: null,
29
+ audioDisabledIcon: null,
30
+ audioRecordingIcon: null
28
31
  }, {
29
32
  type: "text",
30
- disabled: void 0
33
+ disabled: void 0,
34
+ audioIcon: () => l(h, null, null),
35
+ audioDisabledIcon: () => l(b, null, null),
36
+ audioRecordingIcon: void 0
31
37
  }),
32
- setup(n) {
33
- const u = p(n, ["type", "disabled"]), t = g(), {
34
- token: r
35
- } = f.useToken(), s = o(() => t.value.speechRecording), i = o(() => t.value.prefixCls), a = o(() => {
36
- let e;
37
- return s.value ? e = l(h, {
38
- className: `${i.value}-recording-icon`
39
- }, null) : t.value.onSpeechDisabled ? e = l(x, null, null) : e = l(b, null, null), e;
38
+ setup(e) {
39
+ const t = f(e, ["type", "disabled", "audioIcon", "audioDisabledIcon", "audioRecordingIcon"]), o = g(), {
40
+ token: u
41
+ } = p.useToken(), d = i(() => o.value.speechRecording), a = i(() => o.value.prefixCls), c = i(() => {
42
+ let n;
43
+ return d.value ? n = e.audioRecordingIcon ? e.audioRecordingIcon : l(y, {
44
+ className: `${a.value}-recording-icon`
45
+ }, null) : o.value.onSpeechDisabled ? n = e.audioDisabledIcon : n = e.audioIcon, n;
40
46
  });
41
- return () => l(y, m({
42
- type: n.type,
43
- disabled: n.disabled
44
- }, u, {
47
+ return () => l(I, m({
48
+ type: e.type,
49
+ disabled: e.disabled
50
+ }, t, {
45
51
  style: {
46
52
  display: "flex",
47
53
  justifyContent: "center",
48
54
  alignItems: "center",
49
- color: r.value.colorPrimary
55
+ color: u.value.colorPrimary
50
56
  },
51
57
  action: "onSpeech"
52
58
  }), {
53
- default: () => [a.value]
59
+ default: () => [c.value]
54
60
  });
55
61
  }
56
62
  });
57
63
  export {
58
- j as default
64
+ A as default
59
65
  };
@@ -1,9 +1,12 @@
1
- import e from "./Sender.mjs";
2
- import r from "./SenderHeader.mjs";
3
- const o = Object.assign(e, {
4
- Header: r
1
+ import t from "./Sender.mjs";
2
+ import o from "./SenderHeader.mjs";
3
+ const e = Object.assign(t, {
4
+ Header: o
5
5
  });
6
+ e.install = function(n) {
7
+ return n.component(e.name, e), n.component(o.name, o), n;
8
+ };
6
9
  export {
7
- o as Sender,
8
- o as default
10
+ e as Sender,
11
+ e as default
9
12
  };
@@ -1,16 +1,113 @@
1
- import { defineComponent as D, mergeDefaults as L, toRef as R, useSlots as X, computed as o, createVNode as h } from "vue";
2
- import { c as y } from "../attachments/Attachments2.mjs";
3
- import $ from "../x-provider/hooks/use-x-provider-context.mjs";
4
- import "../x-provider/context.mjs";
5
- import { Cascader as A } from "ant-design-vue";
6
- import B from "../_util/hooks/use-x-component-config.mjs";
7
- import I from "./style/index.mjs";
8
- import S from "../_util/hooks/use-state.mjs";
9
- import P from "./useActive.mjs";
10
- const H = /* @__PURE__ */ D({
1
+ import { onMounted as W, nextTick as I, unref as L, getCurrentScope as G, onScopeDispose as P, getCurrentInstance as V, computed as v, ref as y, watch as $, defineComponent as X, mergeDefaults as E, toRef as H, useSlots as K, createVNode as B } from "vue";
2
+ import { c as k } from "../attachments/Attachments2.mjs";
3
+ import "../x-provider/index.mjs";
4
+ import U from "../_util/hooks/use-x-component-config.mjs";
5
+ import j from "./style/index.mjs";
6
+ import A from "../_util/hooks/use-state.mjs";
7
+ import { Cascader as q } from "ant-design-vue";
8
+ import J from "./useActive.mjs";
9
+ import Q from "../x-provider/hooks/use-x-provider-context.mjs";
10
+ function Y(e) {
11
+ return G() ? (P(e), !0) : !1;
12
+ }
13
+ function D(e) {
14
+ return typeof e == "function" ? e() : L(e);
15
+ }
16
+ const Z = typeof window < "u" && typeof document < "u";
17
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
18
+ function _(e) {
19
+ return V();
20
+ }
21
+ function ee(e, n = !0, i) {
22
+ _() ? W(e, i) : n ? e() : I(e);
23
+ }
24
+ const M = Z ? window : void 0;
25
+ function g(e) {
26
+ var n;
27
+ const i = D(e);
28
+ return (n = i == null ? void 0 : i.$el) != null ? n : i;
29
+ }
30
+ function te() {
31
+ const e = y(!1), n = V();
32
+ return n && W(() => {
33
+ e.value = !0;
34
+ }, n), e;
35
+ }
36
+ function ne(e) {
37
+ const n = te();
38
+ return v(() => (n.value, !!e()));
39
+ }
40
+ function oe(e, n, i = {}) {
41
+ const { window: a = M, ...c } = i;
42
+ let r;
43
+ const l = ne(() => a && "ResizeObserver" in a), u = () => {
44
+ r && (r.disconnect(), r = void 0);
45
+ }, w = v(() => {
46
+ const t = D(e);
47
+ return Array.isArray(t) ? t.map((o) => g(o)) : [g(t)];
48
+ }), h = $(
49
+ w,
50
+ (t) => {
51
+ if (u(), l.value && a) {
52
+ r = new ResizeObserver(n);
53
+ for (const o of t)
54
+ o && r.observe(o, c);
55
+ }
56
+ },
57
+ { immediate: !0, flush: "post" }
58
+ ), m = () => {
59
+ u(), h();
60
+ };
61
+ return Y(m), {
62
+ isSupported: l,
63
+ stop: m
64
+ };
65
+ }
66
+ function se(e, n = { width: 0, height: 0 }, i = {}) {
67
+ const { window: a = M, box: c = "content-box" } = i, r = v(() => {
68
+ var t, o;
69
+ return (o = (t = g(e)) == null ? void 0 : t.namespaceURI) == null ? void 0 : o.includes("svg");
70
+ }), l = y(n.width), u = y(n.height), { stop: w } = oe(
71
+ e,
72
+ ([t]) => {
73
+ const o = c === "border-box" ? t.borderBoxSize : c === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
74
+ if (a && r.value) {
75
+ const f = g(e);
76
+ if (f) {
77
+ const d = f.getBoundingClientRect();
78
+ l.value = d.width, u.value = d.height;
79
+ }
80
+ } else if (o) {
81
+ const f = Array.isArray(o) ? o : [o];
82
+ l.value = f.reduce((d, { inlineSize: C }) => d + C, 0), u.value = f.reduce((d, { blockSize: C }) => d + C, 0);
83
+ } else
84
+ l.value = t.contentRect.width, u.value = t.contentRect.height;
85
+ },
86
+ i
87
+ );
88
+ ee(() => {
89
+ const t = g(e);
90
+ t && (l.value = "offsetWidth" in t ? t.offsetWidth : n.width, u.value = "offsetHeight" in t ? t.offsetHeight : n.height);
91
+ });
92
+ const h = $(
93
+ () => g(e),
94
+ (t) => {
95
+ l.value = t ? n.width : 0, u.value = t ? n.height : 0;
96
+ }
97
+ );
98
+ function m() {
99
+ w(), h();
100
+ }
101
+ return {
102
+ width: l,
103
+ height: u,
104
+ stop: m
105
+ };
106
+ }
107
+ const me = /* @__PURE__ */ X({
11
108
  name: "AXSuggestion",
12
109
  __name: "Suggestion",
13
- props: L({
110
+ props: E({
14
111
  prefixCls: null,
15
112
  className: null,
16
113
  rootClassName: null,
@@ -39,55 +136,63 @@ const H = /* @__PURE__ */ D({
39
136
  open: !1
40
137
  }),
41
138
  setup(e) {
42
- R(e, "prefixCls");
43
- const s = X(), {
44
- direction: N,
45
- getPrefixCls: x
46
- } = $(), n = o(() => x("suggestion", e.prefixCls));
47
- `${n.value}`;
48
- const a = o(() => N.value === "rtl"), i = B("suggestion"), [b, c, u] = I(n), [m, w] = S(e.open), [k, F] = S(), l = (t) => {
49
- var v;
50
- w(t), (v = e.onOpenChange) == null || v.call(e, t);
51
- }, r = (t) => {
52
- t === !1 ? l(!1) : (F(t), l(!0));
53
- }, f = () => {
54
- l(!1);
55
- }, g = o(() => typeof e.items == "function" ? e.items(k.value) : e.items), C = (t) => {
56
- e.onSelect && e.onSelect(t[t.length - 1]), l(!1);
57
- }, [O, d] = P(g, m, a, C, f), V = o(() => {
58
- var t;
59
- return s.default ? s.default({
60
- onTrigger: r,
61
- onKeyDown: d
62
- }) : (t = e.children) == null ? void 0 : t.call(e, {
63
- onTrigger: r,
64
- onKeyDown: d
139
+ H(e, "prefixCls");
140
+ const n = K(), {
141
+ direction: i,
142
+ getPrefixCls: a
143
+ } = Q(), c = v(() => a("suggestion", e.prefixCls));
144
+ `${c.value}`;
145
+ const r = v(() => i.value === "rtl"), l = U("suggestion"), u = y(), [w, h, m] = j(c), {
146
+ width: t
147
+ } = se(u), o = v(() => {
148
+ if (e.block && t.value)
149
+ return {
150
+ width: `${t.value}px`
151
+ };
152
+ }), [f, d] = A(e.open), [C, T] = A(), p = (s) => {
153
+ var N;
154
+ d(s), (N = e.onOpenChange) == null || N.call(e, s);
155
+ }, b = (s) => {
156
+ s === !1 ? p(!1) : (T(s), p(!0));
157
+ }, S = () => {
158
+ p(!1);
159
+ }, x = v(() => typeof e.items == "function" ? e.items(C.value) : e.items), R = (s) => {
160
+ e.onSelect && e.onSelect(s[s.length - 1]), p(!1);
161
+ }, [z, O] = J(x, f, r, R, S), F = v(() => {
162
+ var s;
163
+ return n.default ? n.default({
164
+ onTrigger: b,
165
+ onKeyDown: O
166
+ }) : (s = e.children) == null ? void 0 : s.call(e, {
167
+ onTrigger: b,
168
+ onKeyDown: O
65
169
  });
66
170
  });
67
- return () => b(h(A, {
68
- options: g.value,
69
- open: m.value,
70
- value: O.value,
71
- placement: a.value ? "topRight" : "topLeft",
72
- onDropdownVisibleChange: (t) => {
73
- t || f();
171
+ return () => w(B(q, {
172
+ options: x.value,
173
+ open: f.value,
174
+ value: z.value,
175
+ placement: r.value ? "topRight" : "topLeft",
176
+ onDropdownVisibleChange: (s) => {
177
+ s || S();
74
178
  },
75
- class: y(e.rootClassName, n.value, c, u, {
76
- [`${n.value}-block`]: e.block
179
+ class: k(e.rootClassName, c.value, h, m, {
180
+ [`${c.value}-block`]: e.block
77
181
  }),
78
- onChange: C,
79
- dropdownMatchSelectWidth: e.block
182
+ onChange: R,
183
+ dropdownStyle: o.value
80
184
  }, {
81
- default: () => h("div", {
82
- class: y(n.value, i.value.className, e.rootClassName, e.className, `${n.value}-wrapper`, c.value, u),
185
+ default: () => B("div", {
186
+ ref: u,
187
+ class: k(c.value, l.value.className, e.rootClassName, e.className, `${c.value}-wrapper`, h.value, m),
83
188
  style: {
84
- ...i.value.style,
189
+ ...l.value.style,
85
190
  ...e.style
86
191
  }
87
- }, [V.value])
192
+ }, [F.value])
88
193
  }));
89
194
  }
90
195
  });
91
196
  export {
92
- H as default
197
+ me as default
93
198
  };
@@ -1,5 +1,8 @@
1
- import o from "./Suggestion.mjs";
1
+ import n from "./Suggestion.mjs";
2
+ n.install = function(t) {
3
+ return t.component(n.name, n), t;
4
+ };
2
5
  export {
3
- o as Suggestion,
4
- o as default
6
+ n as Suggestion,
7
+ n as default
5
8
  };
@@ -1,10 +1,9 @@
1
1
  import i from "../_util/cssinjs-utils/util/genStyleUtils.mjs";
2
- import n from "../x-provider/hooks/use-x-provider-context.mjs";
3
- import { unref as m } from "vue";
4
- import "../x-provider/context.mjs";
5
- import "ant-design-vue";
2
+ import "../x-provider/index.mjs";
6
3
  import { useInternalToken as l } from "./useToken.mjs";
7
- const { genStyleHooks: c, genComponentStyleHook: P, genSubStyleComponent: d } = i({
4
+ import { unref as m } from "vue";
5
+ import n from "../x-provider/hooks/use-x-provider-context.mjs";
6
+ const { genStyleHooks: C, genComponentStyleHook: c, genSubStyleComponent: P } = i({
8
7
  usePrefix: () => {
9
8
  const { getPrefixCls: e, iconPrefixCls: o } = n();
10
9
  return {
@@ -26,7 +25,7 @@ const { genStyleHooks: c, genComponentStyleHook: P, genSubStyleComponent: d } =
26
25
  }
27
26
  });
28
27
  export {
29
- P as genComponentStyleHook,
30
- c as genStyleHooks,
31
- d as genSubStyleComponent
28
+ c as genComponentStyleHook,
29
+ C as genStyleHooks,
30
+ P as genSubStyleComponent
32
31
  };
@@ -1,15 +1,14 @@
1
1
  import { defineComponent as F, mergeDefaults as H, toRef as C, computed as o, createVNode as i, mergeProps as k } from "vue";
2
- import { a as p, c as l } from "../attachments/Attachments2.mjs";
3
- import $ from "../_util/pick-attrs.mjs";
4
- import z from "../x-provider/hooks/use-x-provider-context.mjs";
5
- import "../x-provider/context.mjs";
6
- import "ant-design-vue";
7
- import S from "../_util/hooks/use-x-component-config.mjs";
8
- import T from "./hooks/useCollapsible.mjs";
9
- import V from "./style/index.mjs";
10
- import { ThoughtChainNodeContextProvider as X } from "./context.mjs";
11
- import j from "./item.mjs";
12
- const L = /* @__PURE__ */ F({
2
+ import { a as $, c as l } from "../attachments/Attachments2.mjs";
3
+ import p from "../_util/pick-attrs.mjs";
4
+ import "../x-provider/index.mjs";
5
+ import z from "../_util/hooks/use-x-component-config.mjs";
6
+ import S from "./hooks/useCollapsible.mjs";
7
+ import T from "./style/index.mjs";
8
+ import { ThoughtChainNodeContextProvider as V } from "./context.mjs";
9
+ import X from "./item.mjs";
10
+ import j from "../x-provider/hooks/use-x-provider-context.mjs";
11
+ const J = /* @__PURE__ */ F({
13
12
  name: "AXThoughtChain",
14
13
  __name: "ThoughtChain",
15
14
  props: H({
@@ -28,21 +27,21 @@ const L = /* @__PURE__ */ F({
28
27
  size: "middle"
29
28
  }),
30
29
  setup(e) {
31
- const f = p(e, ["prefixCls", "rootClassName", "class", "items", "collapsible", "styles", "style", "classNames", "size"]);
30
+ const f = $(e, ["prefixCls", "rootClassName", "class", "items", "collapsible", "styles", "style", "classNames", "size"]);
32
31
  C(e, "class"), C(e, "prefixCls");
33
- const y = o(() => $(f, {
32
+ const y = o(() => p(f, {
34
33
  attr: !0,
35
34
  aria: !0,
36
35
  data: !0
37
36
  })), {
38
37
  getPrefixCls: n,
39
38
  direction: r
40
- } = z(), v = o(() => n()), s = o(() => n("thought-chain", e.prefixCls)), t = S("thoughtChain"), [
39
+ } = j(), v = o(() => n()), s = o(() => n("thought-chain", e.prefixCls)), t = z("thoughtChain"), [
41
40
  d,
42
41
  N,
43
42
  h
44
43
  // collapseMotion
45
- ] = T(() => e.collapsible, s.value, v.value), [x, g, P] = V(s), b = o(() => l(e.class, e.rootClassName, s.value, t.value.className, g.value, P, {
44
+ ] = S(() => e.collapsible, s.value, v.value), [x, g, P] = T(s), b = o(() => l(e.class, e.rootClassName, s.value, t.value.className, g.value, P, {
46
45
  [`${s.value}-rtl`]: r.value === "rtl"
47
46
  }, `${s.value}-${e.size}`));
48
47
  return () => x(i("div", k(y.value, {
@@ -51,7 +50,7 @@ const L = /* @__PURE__ */ F({
51
50
  ...typeof t.value.style == "object" ? t.value.style : {},
52
51
  ...typeof e.style == "object" ? e.style : {}
53
52
  }
54
- }), [i(X, {
53
+ }), [i(V, {
55
54
  value: {
56
55
  prefixCls: s.value,
57
56
  enableCollapse: d.value,
@@ -83,7 +82,7 @@ const L = /* @__PURE__ */ F({
83
82
  var u;
84
83
  return [(u = e.items) == null ? void 0 : u.map((a, m) => {
85
84
  var c;
86
- return i(j, {
85
+ return i(X, {
87
86
  key: a.key || `key_${m}`,
88
87
  class: l(t.value.classNames.item, e.classNames.item),
89
88
  style: {
@@ -103,5 +102,5 @@ const L = /* @__PURE__ */ F({
103
102
  }
104
103
  });
105
104
  export {
106
- L as default
105
+ J as default
107
106
  };
@@ -1,5 +1,8 @@
1
- import o from "./ThoughtChain.mjs";
1
+ import n from "./ThoughtChain.mjs";
2
+ n.install = function(t) {
3
+ return t.component(n.name, n), t;
4
+ };
2
5
  export {
3
- o as ThoughtChain,
4
- o as default
6
+ n as ThoughtChain,
7
+ n as default
5
8
  };