ant-design-x-vue 1.2.6 → 1.2.7

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 (68) hide show
  1. package/dist/index.esm.js +38731 -0
  2. package/dist/index.umd.js +244 -13
  3. package/es/_util/motion.mjs +11 -13
  4. package/es/attachments/Attachments2.mjs +14 -14
  5. package/es/attachments/FileList/FileList2.mjs +10 -12
  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 +47 -36
  17. package/es/prompts/Prompts.mjs +16 -13
  18. package/es/prompts/index.mjs +6 -3
  19. package/es/sender/Sender.mjs +125 -109
  20. package/es/sender/index.mjs +9 -6
  21. package/es/suggestion/Suggestion.mjs +10 -10
  22. package/es/suggestion/index.mjs +6 -3
  23. package/es/theme/genStyleUtils.mjs +7 -8
  24. package/es/thought-chain/ThoughtChain.mjs +17 -18
  25. package/es/thought-chain/index.mjs +6 -3
  26. package/es/welcome/Welcome.mjs +5 -5
  27. package/es/welcome/index.mjs +6 -3
  28. package/es/x-provider/index.mjs +9 -6
  29. package/es/x-provider/index2.mjs +5 -5
  30. package/lib/_util/motion.js +1 -1
  31. package/lib/attachments/Attachments2.js +2 -2
  32. package/lib/attachments/FileList/FileList2.js +1 -1
  33. package/lib/attachments/FileList/FileListCard.js +1 -1
  34. package/lib/attachments/index.js +1 -1
  35. package/lib/bubble/Bubble.js +1 -1
  36. package/lib/bubble/BubbleList.js +1 -1
  37. package/lib/bubble/index.js +1 -1
  38. package/lib/components.js +1 -0
  39. package/lib/components.ts2.js +1 -0
  40. package/lib/conversations/Conversations.js +1 -1
  41. package/lib/conversations/index.js +1 -1
  42. package/lib/hooks.js +1 -0
  43. package/lib/index.js +1 -1
  44. package/lib/prompts/Prompts.js +1 -1
  45. package/lib/prompts/index.js +1 -1
  46. package/lib/sender/Sender.js +1 -1
  47. package/lib/sender/index.js +1 -1
  48. package/lib/suggestion/Suggestion.js +1 -1
  49. package/lib/suggestion/index.js +1 -1
  50. package/lib/theme/genStyleUtils.js +1 -1
  51. package/lib/thought-chain/ThoughtChain.js +1 -1
  52. package/lib/thought-chain/index.js +1 -1
  53. package/lib/welcome/Welcome.js +1 -1
  54. package/lib/welcome/index.js +1 -1
  55. package/lib/x-provider/index.js +1 -1
  56. package/lib/x-provider/index2.js +1 -1
  57. package/package.json +5 -4
  58. package/typings/attachments/index.d.ts +1 -1
  59. package/typings/bubble/Bubble.vue.d.ts +6 -6
  60. package/typings/bubble/index.d.ts +12 -12
  61. package/typings/components.d.ts +9 -0
  62. package/typings/hooks.d.ts +4 -0
  63. package/typings/index.d.ts +8 -13
  64. package/typings/prompts/interface.d.ts +1 -1
  65. package/typings/sender/Sender.vue.d.ts +4 -4
  66. package/typings/sender/SenderHeader.vue.d.ts +12 -10
  67. package/typings/sender/index.d.ts +19 -32
  68. package/typings/sender/interface.d.ts +13 -3
package/es/index.mjs CHANGED
@@ -1,38 +1,49 @@
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 o } from "./components.ts2.mjs";
2
+ import { default as l } from "./x-stream/x-stream.mjs";
3
+ import { default as d } from "./x-request/x-fetch.mjs";
4
+ import { default as p } from "./x-request/x-request.mjs";
5
+ import { XAgent as c, default as h } from "./use-x-agent/use-x-agent.mjs";
6
+ import { default as b } from "./use-x-chat/use-x-chat.mjs";
7
+ import { theme as C } from "ant-design-vue";
8
+ import { _ as v } from "./x-provider/index2.mjs";
9
+ import { defaultPrefixCls as S, default as B } from "./x-provider/hooks/use-x-provider-context.mjs";
10
+ import { default as k } from "./bubble/BubbleList.mjs";
11
+ import { default as y } from "./conversations/Conversations.mjs";
12
+ import { default as F } from "./welcome/Welcome.mjs";
13
+ import { default as O } from "./prompts/Prompts.mjs";
14
+ import { default as T } from "./suggestion/Suggestion.mjs";
15
+ import { default as _ } from "./thought-chain/ThoughtChain.mjs";
16
+ import { default as z } from "./bubble/index.mjs";
17
+ import { default as G } from "./sender/index.mjs";
18
+ import { default as I } from "./attachments/index.mjs";
19
+ const a = function(e) {
20
+ return Object.keys(o).forEach((r) => {
21
+ const t = o[r];
22
+ t.install && e.use(t);
23
+ }), e;
24
+ }, s = {
25
+ install: a
26
+ };
18
27
  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
28
+ I as Attachments,
29
+ z as Bubble,
30
+ k as BubbleList,
31
+ y as Conversations,
32
+ O as Prompts,
33
+ G as Sender,
34
+ T as Suggestion,
35
+ _ as ThoughtChain,
36
+ F as Welcome,
37
+ c as XAgent,
38
+ d as XFetch,
39
+ v as XProvider,
40
+ p as XRequest,
41
+ l as XStream,
42
+ s as default,
43
+ S as defaultPrefixCls,
44
+ a as install,
45
+ C as theme,
46
+ h as useXAgent,
47
+ b as useXChat,
48
+ B as useXProviderContext
38
49
  };
@@ -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
  };
@@ -1,125 +1,141 @@
1
- import { defineComponent as ee, toRef as te, useSlots as ne, computed as a, ref as d, watch as ae, createVNode as o, mergeProps as oe } from "vue";
2
- import { a as le, c } from "../attachments/Attachments2.mjs";
3
- import { Input as se, Flex as ie } from "ant-design-vue";
4
- import ue from "../_util/pick-attrs.mjs";
1
+ import { defineComponent as ee, mergeDefaults as te, toRef as ne, useSlots as le, computed as l, ref as d, watch as ae, createVNode as a, mergeProps as oe } from "vue";
2
+ import { a as se, c as r } from "../attachments/Attachments2.mjs";
3
+ import { Input as ie, Flex as ue } from "ant-design-vue";
4
+ import ce from "../_util/pick-attrs.mjs";
5
5
  import re from "../_util/hooks/use-x-component-config.mjs";
6
- import ce from "../x-provider/hooks/use-x-provider-context.mjs";
7
- import "../x-provider/context.mjs";
6
+ import "../x-provider/index.mjs";
8
7
  import { SenderHeaderContextProvider as fe } from "./context.mjs";
9
8
  import { ActionButtonContextProvider as de } from "./components/ActionButton/context.mjs";
10
9
  import me from "./components/ClearButton.mjs";
11
10
  import D from "./components/LoadingButton.mjs";
12
- import K from "./components/SendButton.mjs";
13
- import R from "./components/SpeechButton/index.mjs";
11
+ import B from "./components/SendButton.mjs";
12
+ import K from "./components/SpeechButton/index.mjs";
14
13
  import ve from "./style/index.mjs";
15
14
  import ye from "./useSpeech.mjs";
16
15
  import Ce from "../_util/getValue.mjs";
17
- const Ae = /* @__PURE__ */ ee({
16
+ import he from "../x-provider/hooks/use-x-provider-context.mjs";
17
+ const ze = /* @__PURE__ */ ee({
18
18
  name: "AXSender",
19
19
  __name: "Sender",
20
- props: {
21
- onKeyPress: {},
22
- onFocus: {},
23
- onBlur: {},
24
- prefixCls: {},
25
- defaultValue: {},
26
- value: {},
20
+ props: te({
21
+ onKeyPress: {
22
+ type: Function
23
+ },
24
+ onFocus: null,
25
+ onBlur: null,
26
+ prefixCls: null,
27
+ defaultValue: null,
28
+ value: null,
27
29
  loading: {
28
30
  type: Boolean
29
31
  },
30
- placeholder: {},
32
+ placeholder: null,
31
33
  readOnly: {
32
34
  type: Boolean
33
35
  },
34
36
  submitType: {
35
- type: [String, Boolean],
36
- default: "enter"
37
+ type: [String, Boolean]
37
38
  },
38
39
  disabled: {
39
- type: Boolean,
40
- default: void 0
40
+ type: Boolean
41
+ },
42
+ onSubmit: {
43
+ type: Function
41
44
  },
42
- onSubmit: {},
43
- onChange: {},
44
- onCancel: {},
45
- onKeyDown: {},
46
- onPaste: {},
47
- onPasteFile: {},
48
- components: {},
49
- styles: {
50
- default: () => ({})
45
+ onChange: {
46
+ type: Function
51
47
  },
52
- rootClassName: {},
53
- classNames: {
54
- default: () => ({})
48
+ onCancel: null,
49
+ onKeyDown: {
50
+ type: Function
55
51
  },
56
- style: {},
57
- className: {},
52
+ onPaste: {
53
+ type: Function
54
+ },
55
+ onPasteFile: {
56
+ type: Function
57
+ },
58
+ components: null,
59
+ styles: null,
60
+ rootClassName: null,
61
+ classNames: null,
62
+ style: null,
63
+ className: null,
58
64
  actions: {
59
- type: [Object, Function, Boolean],
60
- default: void 0
65
+ type: [Function, Boolean]
61
66
  },
62
- allowSpeech: {},
63
- prefix: {},
64
- footer: {},
65
- header: {},
66
- autoSize: {
67
- default: () => ({
68
- maxRows: 8
69
- })
70
- }
71
- },
67
+ allowSpeech: null,
68
+ prefix: {
69
+ type: Function
70
+ },
71
+ footer: {
72
+ type: Function
73
+ },
74
+ header: {
75
+ type: Function
76
+ },
77
+ autoSize: null
78
+ }, {
79
+ styles: () => ({}),
80
+ classNames: () => ({}),
81
+ submitType: "enter",
82
+ actions: void 0,
83
+ disabled: void 0,
84
+ autoSize: () => ({
85
+ maxRows: 8
86
+ })
87
+ }),
72
88
  emits: ["update:value"],
73
89
  setup(e, {
74
- expose: I,
75
- emit: F
90
+ expose: R,
91
+ emit: I
76
92
  }) {
77
- const V = le(e, ["prefixCls", "styles", "classNames", "className", "rootClassName", "style", "defaultValue", "value", "placeholder", "readOnly", "submitType", "onSubmit", "loading", "components", "onCancel", "onChange", "actions", "onKeyPress", "onKeyDown", "disabled", "allowSpeech", "prefix", "footer", "header", "onPaste", "onPasteFile", "autoSize"]);
78
- te(e, "prefixCls");
79
- function A(t, n, r) {
80
- return Ce(t, n) || r;
93
+ const V = se(e, ["prefixCls", "styles", "classNames", "className", "rootClassName", "style", "defaultValue", "value", "placeholder", "readOnly", "submitType", "onSubmit", "loading", "components", "onCancel", "onChange", "actions", "onKeyPress", "onKeyDown", "disabled", "allowSpeech", "prefix", "footer", "header", "onPaste", "onPasteFile", "autoSize"]);
94
+ ne(e, "prefixCls");
95
+ function T(t, n, c) {
96
+ return Ce(t, n) || c;
81
97
  }
82
98
  const m = {
83
- SendButton: K,
99
+ SendButton: B,
84
100
  ClearButton: me,
85
101
  LoadingButton: D,
86
- SpeechButton: R
87
- }, E = F, i = ne(), {
88
- direction: O,
89
- getPrefixCls: T
90
- } = ce(), l = a(() => T("sender", e.prefixCls)), v = d(null), f = d(null), s = re("sender"), g = a(() => `${l.value}-input`), [k, z, X] = ve(l.value), L = a(() => c(l.value, s.value.className, e.className, e.rootClassName, z.value, X, {
91
- [`${l.value}-rtl`]: O.value === "rtl",
92
- [`${l.value}-disabled`]: e.disabled
93
- })), M = a(() => `${l.value}-actions-btn`), S = a(() => `${l.value}-actions-list`), u = d(e.value ?? e.defaultValue ?? ""), x = (t) => {
102
+ SpeechButton: K
103
+ }, z = I, i = le(), {
104
+ direction: A,
105
+ getPrefixCls: E
106
+ } = he(), o = l(() => E("sender", e.prefixCls)), v = d(null), f = d(null), s = re("sender"), g = l(() => `${o.value}-input`), [k, O, p] = ve(o.value), X = l(() => r(o.value, s.value.className, e.className, e.rootClassName, O.value, p, {
107
+ [`${o.value}-rtl`]: A.value === "rtl",
108
+ [`${o.value}-disabled`]: e.disabled
109
+ })), L = l(() => `${o.value}-actions-btn`), S = l(() => `${o.value}-actions-list`), u = d(e.value ?? e.defaultValue ?? ""), x = (t) => {
94
110
  u.value = t;
95
111
  };
96
112
  ae(() => e.value, () => {
97
113
  x(e.value);
98
114
  });
99
115
  const y = (t, n) => {
100
- x(t), E("update:value", t), e.onChange && e.onChange(t, n);
116
+ x(t), z("update:value", t), e.onChange && e.onChange(t, n);
101
117
  }, {
102
- speechPermission: j,
118
+ speechPermission: M,
103
119
  triggerSpeech: b,
104
120
  recording: q
105
121
  } = ye((t) => {
106
122
  y(`${u.value} ${t}`);
107
- }, () => e.allowSpeech), H = A(e.components, ["input"], se.TextArea), G = a(() => ue(V, {
123
+ }, () => e.allowSpeech), H = T(e.components, ["input"], ie.TextArea), j = l(() => ce(V, {
108
124
  attr: !0,
109
125
  aria: !0,
110
126
  data: !0
111
- })), J = a(() => ({
112
- ...G.value,
127
+ })), G = l(() => ({
128
+ ...j.value,
113
129
  ref: f
114
130
  })), C = () => {
115
131
  u.value && e.onSubmit && !e.loading && e.onSubmit(u.value);
116
- }, Q = () => {
132
+ }, J = () => {
117
133
  y("");
118
- }, h = d(!1), U = () => {
134
+ }, h = d(!1), Q = () => {
119
135
  h.value = !0;
120
- }, W = () => {
136
+ }, U = () => {
121
137
  h.value = !1;
122
- }, Y = (t) => {
138
+ }, W = (t) => {
123
139
  const n = t.key === "Enter" && !h.value;
124
140
  switch (e.submitType) {
125
141
  case "enter":
@@ -130,18 +146,18 @@ const Ae = /* @__PURE__ */ ee({
130
146
  break;
131
147
  }
132
148
  e.onKeyPress && e.onKeyPress(t);
149
+ }, Y = (t) => {
150
+ var c, w;
151
+ const n = (c = t.clipboardData) == null ? void 0 : c.files;
152
+ n != null && n.length && e.onPasteFile && (e.onPasteFile(n[0], n), t.preventDefault()), (w = e.onPaste) == null || w.call(e, t);
133
153
  }, Z = (t) => {
134
- var r, B;
135
- const n = (r = t.clipboardData) == null ? void 0 : r.files;
136
- n != null && n.length && e.onPasteFile && (e.onPasteFile(n[0], n), t.preventDefault()), (B = e.onPaste) == null || B.call(e, t);
137
- }, p = (t) => {
138
- var n, r;
139
- t.target !== ((n = v.value) == null ? void 0 : n.querySelector(`.${g.value}`)) && t.preventDefault(), (r = f.value) == null || r.focus();
140
- }, P = a(() => {
141
- let t = o(ie, {
154
+ var n, c;
155
+ t.target !== ((n = v.value) == null ? void 0 : n.querySelector(`.${g.value}`)) && t.preventDefault(), (c = f.value) == null || c.focus();
156
+ }, P = l(() => {
157
+ let t = a(ue, {
142
158
  class: `${S.value}-presets`
143
159
  }, {
144
- default: () => [e.allowSpeech && o(R, null, null), e.loading ? o(D, null, null) : o(K, null, null)]
160
+ default: () => [e.allowSpeech && a(K, null, null), e.loading ? a(D, null, null) : a(B, null, null)]
145
161
  });
146
162
  const n = {
147
163
  components: m
@@ -150,19 +166,19 @@ const Ae = /* @__PURE__ */ ee({
150
166
  ori: t,
151
167
  info: n
152
168
  }) : typeof e.actions == "function" ? t = e.actions(t, n) : (e.actions || e.actions === !1) && (t = e.actions), t;
153
- }), _ = a(() => ({
154
- prefixCls: M.value,
169
+ }), _ = l(() => ({
170
+ prefixCls: L.value,
155
171
  onSend: C,
156
172
  onSendDisabled: !u.value,
157
- onClear: Q,
173
+ onClear: J,
158
174
  onClearDisabled: !u.value,
159
175
  onCancel: e.onCancel,
160
176
  onCancelDisabled: !e.loading,
161
177
  onSpeech: () => b(!1),
162
- onSpeechDisabled: !j.value,
178
+ onSpeechDisabled: !M.value,
163
179
  speechRecording: q.value,
164
180
  disabled: e.disabled
165
- })), N = a(() => {
181
+ })), N = l(() => {
166
182
  let t = null;
167
183
  const n = {
168
184
  components: m
@@ -172,8 +188,8 @@ const Ae = /* @__PURE__ */ ee({
172
188
  }) : typeof e.footer == "function" ? t = e.footer({
173
189
  components: m
174
190
  }) : e.footer && (t = e.footer), t;
175
- }), $ = a(() => i.header ? i.header() : typeof e.header == "function" ? e.header() : e.header), w = a(() => i.prefix ? i.prefix() : typeof e.prefix == "function" ? e.prefix() : e.prefix);
176
- return I({
191
+ }), F = l(() => i.header ? i.header() : typeof e.header == "function" ? e.header() : e.header), $ = l(() => i.prefix ? i.prefix() : typeof e.prefix == "function" ? e.prefix() : e.prefix);
192
+ return R({
177
193
  nativeElement: v.value,
178
194
  // @ts-expect-error
179
195
  focus: (t) => {
@@ -185,59 +201,59 @@ const Ae = /* @__PURE__ */ ee({
185
201
  var t;
186
202
  return (t = f.value) == null ? void 0 : t.blur();
187
203
  }
188
- }), () => k(o("div", {
204
+ }), () => k(a("div", {
189
205
  ref: v,
190
- class: L.value,
206
+ class: X.value,
191
207
  style: {
192
208
  ...s.value.style,
193
209
  ...e.style
194
210
  }
195
- }, [$.value && o(fe, {
211
+ }, [F.value && a(fe, {
196
212
  value: {
197
- prefixCls: l.value
213
+ prefixCls: o.value
198
214
  }
199
215
  }, {
200
- default: () => [$.value]
201
- }), o(de, {
216
+ default: () => [F.value]
217
+ }), a(de, {
202
218
  value: _.value
203
219
  }, {
204
- default: () => [o("div", {
205
- class: `${l.value}-content`,
206
- onMousedown: p
207
- }, [w.value && o("div", {
208
- class: c(`${l.value}-prefix`, s.value.classNames.prefix, e.classNames.prefix),
220
+ default: () => [a("div", {
221
+ class: `${o.value}-content`,
222
+ onMousedown: Z
223
+ }, [$.value && a("div", {
224
+ class: r(`${o.value}-prefix`, s.value.classNames.prefix, e.classNames.prefix),
209
225
  style: {
210
226
  ...s.value.styles.prefix,
211
227
  ...e.styles.prefix
212
228
  }
213
- }, [w.value]), o(H, oe(J.value, {
229
+ }, [$.value]), a(H, oe(G.value, {
214
230
  disabled: e.disabled,
215
231
  style: {
216
232
  ...s.value.styles.input,
217
233
  ...e.styles.input
218
234
  },
219
- class: c(g.value, s.value.classNames.input, e.classNames.input),
235
+ class: r(g.value, s.value.classNames.input, e.classNames.input),
220
236
  autoSize: e.autoSize,
221
237
  value: u.value,
222
238
  onChange: (t) => {
223
239
  y(t.target.value, t), b(!0);
224
240
  },
225
- onPressEnter: Y,
226
- onCompositionstart: U,
227
- onCompositionend: W,
241
+ onPressEnter: W,
242
+ onCompositionstart: Q,
243
+ onCompositionend: U,
228
244
  onKeydown: e.onKeyDown,
229
245
  placeholder: e.placeholder,
230
- onPaste: Z,
246
+ onPaste: Y,
231
247
  bordered: !1,
232
248
  readOnly: e.readOnly
233
- }), null), P.value && o("div", {
234
- class: c(S.value, s.value.classNames.actions, e.classNames.actions),
249
+ }), null), P.value && a("div", {
250
+ class: r(S.value, s.value.classNames.actions, e.classNames.actions),
235
251
  style: {
236
252
  ...s.value.styles.actions,
237
253
  ...e.styles.actions
238
254
  }
239
- }, [P.value])]), N.value && o("div", {
240
- class: c(`${l.value}-footer`, s.value.classNames.footer, e.classNames.footer),
255
+ }, [P.value])]), N.value && a("div", {
256
+ class: r(`${o.value}-footer`, s.value.classNames.footer, e.classNames.footer),
241
257
  style: {
242
258
  ...s.value.styles.footer,
243
259
  ...e.styles.footer
@@ -247,5 +263,5 @@ const Ae = /* @__PURE__ */ ee({
247
263
  }
248
264
  });
249
265
  export {
250
- Ae as default
266
+ ze as default
251
267
  };
@@ -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,12 +1,12 @@
1
1
  import { defineComponent as D, mergeDefaults as L, toRef as R, useSlots as X, computed as o, createVNode as h } from "vue";
2
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";
3
+ import "../x-provider/index.mjs";
4
+ import $ from "../_util/hooks/use-x-component-config.mjs";
5
+ import A from "./style/index.mjs";
8
6
  import S from "../_util/hooks/use-state.mjs";
9
- import P from "./useActive.mjs";
7
+ import { Cascader as B } from "ant-design-vue";
8
+ import I from "./useActive.mjs";
9
+ import P from "../x-provider/hooks/use-x-provider-context.mjs";
10
10
  const H = /* @__PURE__ */ D({
11
11
  name: "AXSuggestion",
12
12
  __name: "Suggestion",
@@ -43,9 +43,9 @@ const H = /* @__PURE__ */ D({
43
43
  const s = X(), {
44
44
  direction: N,
45
45
  getPrefixCls: x
46
- } = $(), n = o(() => x("suggestion", e.prefixCls));
46
+ } = P(), n = o(() => x("suggestion", e.prefixCls));
47
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) => {
48
+ const a = o(() => N.value === "rtl"), i = $("suggestion"), [b, c, u] = A(n), [m, w] = S(e.open), [k, F] = S(), l = (t) => {
49
49
  var v;
50
50
  w(t), (v = e.onOpenChange) == null || v.call(e, t);
51
51
  }, r = (t) => {
@@ -54,7 +54,7 @@ const H = /* @__PURE__ */ D({
54
54
  l(!1);
55
55
  }, g = o(() => typeof e.items == "function" ? e.items(k.value) : e.items), C = (t) => {
56
56
  e.onSelect && e.onSelect(t[t.length - 1]), l(!1);
57
- }, [O, d] = P(g, m, a, C, f), V = o(() => {
57
+ }, [O, d] = I(g, m, a, C, f), V = o(() => {
58
58
  var t;
59
59
  return s.default ? s.default({
60
60
  onTrigger: r,
@@ -64,7 +64,7 @@ const H = /* @__PURE__ */ D({
64
64
  onKeyDown: d
65
65
  });
66
66
  });
67
- return () => b(h(A, {
67
+ return () => b(h(B, {
68
68
  options: g.value,
69
69
  open: m.value,
70
70
  value: O.value,
@@ -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
  };