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 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ThoughtChain.js");exports.ThoughtChain=e.default;exports.default=e.default;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ThoughtChain.js");e.default.install=function(t){return t.component(e.default.name,e.default),t};exports.ThoughtChain=e.default;exports.default=e.default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),c=require("../attachments/Attachments2.js"),C=require("../x-provider/hooks/use-x-provider-context.js");require("../x-provider/context.js");const i=require("ant-design-vue"),g=require("../_util/hooks/use-x-component-config.js"),V=require("./style/index.js");function h(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}const $=t.defineComponent({name:"AXWelcome",__name:"Welcome",props:t.mergeDefaults({prefixCls:null,rootClassName:null,className:null,style:null,variant:null,classNames:null,styles:null,icon:null,title:null,description:null,extra:null},{variant:"filled",classNames:()=>({}),styles:()=>({})}),setup(e){t.toRef(e,"prefixCls");const a=t.useSlots(),{direction:d,getPrefixCls:m}=C.default(),s=m("welcome",e.prefixCls),n=g.default("welcome"),[f,N,x]=V.default(s),v=t.computed(()=>{const l=a.icon?a.icon():e.icon;if(!l)return null;let u=l;return typeof l=="string"&&l.startsWith("http")&&(u=t.createVNode("img",{src:l,alt:"icon"},null)),t.createVNode("div",{class:c.classnames(`${s}-icon`,n.value.classNames.icon,e.classNames.icon),style:e.styles.icon},[u])}),r=t.computed(()=>{const l=a.title?a.title():e.title;return l?t.createVNode(i.Typography.Title,{level:4,class:c.classnames(`${s}-title`,n.value.classNames.title,e.classNames.title),style:e.styles.title},h(l)?l:{default:()=>[l]}):null}),o=t.computed(()=>a.description?a.description():e.description),y=t.computed(()=>{const l=a.extra?a.extra():e.extra;return l?t.createVNode("div",{class:c.classnames(`${s}-extra`,n.value.classNames.extra,e.classNames.extra),style:e.styles.extra},[l]):null});return()=>f(t.createVNode(i.Flex,{class:c.classnames(s,n.value.className,e.className,e.rootClassName,N.value,x,`${s}-${e.variant}`,{[`${s}-rtl`]:d.value==="rtl"}),style:e.style},{default:()=>[v.value,t.createVNode(i.Flex,{vertical:!0,class:`${s}-content-wrapper`},{default:()=>[a.extra||e.extra?t.createVNode(i.Flex,{align:"flex-start",class:`${s}-title-wrapper`},{default:()=>[r.value,y.value]}):r.value,o.value&&t.createVNode(i.Typography.Text,{class:c.classnames(`${s}-description`,n.value.classNames.description,e.classNames.description),style:e.styles.description},{default:()=>[o.value]})]})]}))}});exports.default=$;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),c=require("../attachments/Attachments2.js");require("../x-provider/index.js");const C=require("../_util/hooks/use-x-component-config.js"),g=require("./style/index.js"),i=require("ant-design-vue"),V=require("../x-provider/hooks/use-x-provider-context.js");function h(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}const $=t.defineComponent({name:"AXWelcome",__name:"Welcome",props:t.mergeDefaults({prefixCls:null,rootClassName:null,className:null,style:null,variant:null,classNames:null,styles:null,icon:{type:Function},title:{type:Function},description:{type:Function},extra:{type:Function}},{variant:"filled",classNames:()=>({}),styles:()=>({})}),setup(e){t.toRef(e,"prefixCls");const a=t.useSlots(),{direction:d,getPrefixCls:f}=V.default(),s=f("welcome",e.prefixCls),n=C.default("welcome"),[m,y,x]=g.default(s),N=t.computed(()=>{const l=a.icon?a.icon():typeof e.icon=="function"?e.icon():e.icon;if(!l)return null;let u=l;return typeof l=="string"&&l.startsWith("http")&&(u=t.createVNode("img",{src:l,alt:"icon"},null)),t.createVNode("div",{class:c.classnames(`${s}-icon`,n.value.classNames.icon,e.classNames.icon),style:e.styles.icon},[u])}),o=t.computed(()=>{const l=a.title?a.title():typeof e.title=="function"?e.title():e.title;return l?t.createVNode(i.Typography.Title,{level:4,class:c.classnames(`${s}-title`,n.value.classNames.title,e.classNames.title),style:e.styles.title},h(l)?l:{default:()=>[l]}):null}),r=t.computed(()=>a.description?a.description():typeof e.description=="function"?e.description():e.description),v=t.computed(()=>{const l=a.extra?a.extra():typeof e.extra=="function"?e.extra():e.extra;return l?t.createVNode("div",{class:c.classnames(`${s}-extra`,n.value.classNames.extra,e.classNames.extra),style:e.styles.extra},[l]):null});return()=>m(t.createVNode(i.Flex,{class:c.classnames(s,n.value.className,e.className,e.rootClassName,y.value,x,`${s}-${e.variant}`,{[`${s}-rtl`]:d.value==="rtl"}),style:e.style},{default:()=>[N.value,t.createVNode(i.Flex,{vertical:!0,class:`${s}-content-wrapper`},{default:()=>[a.extra||e.extra?t.createVNode(i.Flex,{align:"flex-start",class:`${s}-title-wrapper`},{default:()=>[o.value,v.value]}):o.value,r.value&&t.createVNode(i.Typography.Text,{class:c.classnames(`${s}-description`,n.value.classNames.description,e.classNames.description),style:e.styles.description},{default:()=>[r.value]})]})]}))}});exports.default=$;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Welcome.js");exports.Welcome=e.default;exports.default=e.default;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Welcome.js");e.default.install=function(t){return t.component(e.default.name,e.default),t};exports.Welcome=e.default;exports.default=e.default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./hooks/use-x-provider-context.js"),r=require("./index2.js");exports.defaultPrefixCls=e.defaultPrefixCls;exports.useXProviderContext=e.default;exports.XProvider=r._sfc_main;exports.default=r._sfc_main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./hooks/use-x-provider-context.js"),e=require("./index2.js");e._sfc_main.install=function(r){return r.component(e._sfc_main.name,e._sfc_main),r.component("AXConfigProvider",e._sfc_main),r};exports.defaultPrefixCls=i.defaultPrefixCls;exports.useXProviderContext=i.default;exports.XProvider=e._sfc_main;exports.default=e._sfc_main;
@@ -1 +1 @@
1
- "use strict";const t=require("vue"),u=require("../attachments/Attachments2.js"),d=require("./context.js"),l=require("./hooks/use-x-provider-context.js"),m=require("ant-design-vue"),h=t.defineComponent({name:"AXConfigProvider",inheritAttrs:!1,__name:"index",props:{bubble:{},conversations:{},prompts:{},sender:{},suggestion:{},thoughtChain:{},attachments:{},welcome:{},iconPrefixCls:{},getTargetContainer:{},getPopupContainer:{},prefixCls:{},getPrefixCls:{},renderEmpty:{},transformCellText:{},csp:{},input:{},autoInsertSpaceInButton:{type:Boolean},locale:{},pageHeader:{},componentSize:{},componentDisabled:{type:Boolean},direction:{},space:{},virtual:{type:Boolean},dropdownMatchSelectWidth:{},form:{},pagination:{},theme:{},select:{},wave:{}},setup(e){const r=u.createPropsRestProxy(e,["attachments","bubble","conversations","prompts","sender","suggestion","thoughtChain","welcome"]),o=t.useSlots(),a=t.computed(()=>({attachments:e.attachments,bubble:e.bubble,conversations:e.conversations,prompts:e.prompts,sender:e.sender,suggestion:e.suggestion,thoughtChain:e.thoughtChain,welcome:e.welcome})),{theme:n}=l.default(),i=t.computed(()=>({...(n==null?void 0:n.value)||{},...r.theme})),c=t.computed(()=>{var s;return(s=o.default)==null?void 0:s.call(o)});return()=>t.createVNode(d.XProviderContextProvider,{value:a.value},{default:()=>[t.createVNode(m.ConfigProvider,t.mergeProps(r,{theme:i.value}),{default:()=>[c.value]})]})}});exports._sfc_main=h;
1
+ "use strict";const t=require("vue"),u=require("../attachments/Attachments2.js"),d=require("./context.js"),l=require("./hooks/use-x-provider-context.js"),m=require("ant-design-vue"),h=t.defineComponent({name:"AXProvider",inheritAttrs:!1,__name:"index",props:{bubble:{},conversations:{},prompts:{},sender:{},suggestion:{},thoughtChain:{},attachments:{},welcome:{},iconPrefixCls:{},getTargetContainer:{},getPopupContainer:{},prefixCls:{},getPrefixCls:{},renderEmpty:{},transformCellText:{},csp:{},input:{},autoInsertSpaceInButton:{type:Boolean},locale:{},pageHeader:{},componentSize:{},componentDisabled:{type:Boolean},direction:{},space:{},virtual:{type:Boolean},dropdownMatchSelectWidth:{},form:{},pagination:{},theme:{},select:{},wave:{}},setup(e){const r=u.createPropsRestProxy(e,["attachments","bubble","conversations","prompts","sender","suggestion","thoughtChain","welcome"]),o=t.useSlots(),a=t.computed(()=>({attachments:e.attachments,bubble:e.bubble,conversations:e.conversations,prompts:e.prompts,sender:e.sender,suggestion:e.suggestion,thoughtChain:e.thoughtChain,welcome:e.welcome})),{theme:n}=l.default(),i=t.computed(()=>({...(n==null?void 0:n.value)||{},...r.theme})),c=t.computed(()=>{var s;return(s=o.default)==null?void 0:s.call(o)});return()=>t.createVNode(d.XProviderContextProvider,{value:a.value},{default:()=>[t.createVNode(m.ConfigProvider,t.mergeProps(r,{theme:i.value}),{default:()=>[c.value]})]})}});exports._sfc_main=h;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ant-design-x-vue",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "description": "Craft AI-driven interfaces effortlessly",
5
5
  "keywords": [
6
6
  "AI",
@@ -13,9 +13,9 @@
13
13
  "vue"
14
14
  ],
15
15
  "scripts": {
16
- "build": "run-p build:es build:umd build:resolver",
16
+ "build": "run-p build:es build:dist build:resolver",
17
17
  "build:es": "vite build && vue-tsc --project ./tsconfig.build.json",
18
- "build:umd": "vite build --config ./vite.config.umd.mts && vue-tsc --project ./tsconfig.build.json",
18
+ "build:dist": "vite build --config ./vite.config.dist.mts && vue-tsc --project ./tsconfig.build.json",
19
19
  "build:resolver": "tsc resolver/index.ts --outDir resolver-dist --declaration",
20
20
  "build:watch": "vite build --watch",
21
21
  "docs:dev": "vitepress dev docs",
@@ -48,7 +48,8 @@
48
48
  "./dist/style.css": "./dist/style.css",
49
49
  "./resolver": {
50
50
  "types": "./resolver-dist/index.d.ts",
51
- "import": "./resolver-dist/index.js"
51
+ "import": "./resolver-dist/index.js",
52
+ "require": "./resolver-dist/index.js"
52
53
  }
53
54
  },
54
55
  "main": "./lib/index.js",
@@ -107,7 +108,6 @@
107
108
  "@vitest/coverage-v8": "^2.1.1",
108
109
  "@vue/shared": "^3.5.13",
109
110
  "@vue/test-utils": "^2.4.6",
110
- "@vueuse/core": "^12.2.0",
111
111
  "ant-design-vue": "^4.2.6",
112
112
  "changelogen": "^0.5.7",
113
113
  "eslint": "^8.57.1",
@@ -138,6 +138,7 @@
138
138
  "@ant-design/fast-color": "^2.0.6",
139
139
  "@emotion/hash": "^0.9.2",
140
140
  "@emotion/unitless": "^0.10.0",
141
+ "@vueuse/core": "^13.4.0",
141
142
  "classnames": "^2.5.1",
142
143
  "csstype": "^3.1.3",
143
144
  "stylis": "^4.3.4"
@@ -146,7 +146,7 @@ export declare const StyleProvider: {
146
146
  };
147
147
  }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
148
148
  [key: string]: any;
149
- }>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
149
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
150
150
  container: Element | ShadowRoot;
151
151
  autoClear: boolean;
152
152
  mock: "server" | "client";
@@ -217,7 +217,7 @@ export declare const StyleProvider: {
217
217
  };
218
218
  }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
219
219
  [key: string]: any;
220
- }>[], {}, {}, {}, {
220
+ }>, {}, {}, {}, {
221
221
  container: Element | ShadowRoot;
222
222
  autoClear: boolean;
223
223
  mock: "server" | "client";
@@ -285,7 +285,7 @@ export declare const StyleProvider: {
285
285
  };
286
286
  }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
287
287
  [key: string]: any;
288
- }>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
288
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
289
289
  container: Element | ShadowRoot;
290
290
  autoClear: boolean;
291
291
  mock: "server" | "client";
@@ -354,7 +354,7 @@ declare const _default: {
354
354
  };
355
355
  }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
356
356
  [key: string]: any;
357
- }>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
357
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
358
358
  container: Element | ShadowRoot;
359
359
  autoClear: boolean;
360
360
  mock: "server" | "client";
@@ -425,7 +425,7 @@ declare const _default: {
425
425
  };
426
426
  }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
427
427
  [key: string]: any;
428
- }>[], {}, {}, {}, {
428
+ }>, {}, {}, {}, {
429
429
  container: Element | ShadowRoot;
430
430
  autoClear: boolean;
431
431
  mock: "server" | "client";
@@ -493,7 +493,7 @@ declare const _default: {
493
493
  };
494
494
  }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
495
495
  [key: string]: any;
496
- }>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
496
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
497
497
  container: Element | ShadowRoot;
498
498
  autoClear: boolean;
499
499
  mock: "server" | "client";
@@ -68,7 +68,7 @@ declare const cssinjs: {
68
68
  };
69
69
  }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
70
70
  [key: string]: any;
71
- }>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
71
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
72
72
  container: Element | ShadowRoot;
73
73
  autoClear: boolean;
74
74
  mock: "server" | "client";
@@ -124,7 +124,7 @@ declare const cssinjs: {
124
124
  };
125
125
  }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
126
126
  [key: string]: any;
127
- }>[], {}, {}, {}, {
127
+ }>, {}, {}, {}, {
128
128
  container: Element | ShadowRoot;
129
129
  autoClear: boolean;
130
130
  mock: "server" | "client";
@@ -177,7 +177,7 @@ declare const cssinjs: {
177
177
  };
178
178
  }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
179
179
  [key: string]: any;
180
- }>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
180
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
181
181
  container: Element | ShadowRoot;
182
182
  autoClear: boolean;
183
183
  mock: "server" | "client";
@@ -1,3 +1,4 @@
1
+ export type { Attachment, AttachmentsProps } from './interface';
1
2
  declare const Attachments: {
2
3
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./interface").AttachmentsProps> & Readonly<{}>, {
3
4
  nativeElement: HTMLDivElement | null;
@@ -34,6 +35,5 @@ declare const Attachments: {
34
35
  nativeElement: Readonly<import("vue").ShallowRef<HTMLDivElement>>;
35
36
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("./interface").FileListCardProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
36
37
  };
37
- export type { Attachment, AttachmentsProps } from './interface';
38
38
  export default Attachments;
39
39
  export { Attachments, };
@@ -8,26 +8,26 @@ declare const _default: <T extends BubbleContentType = string>(__VLS_props: NonN
8
8
  attrs: any;
9
9
  slots: Readonly<{
10
10
  avatar?(): VNode;
11
- header?(props?: {
11
+ header?(props: {
12
12
  content: BubbleContentType;
13
13
  }): VNode | string;
14
- footer?(props?: {
14
+ footer?(props: {
15
15
  content: BubbleContentType;
16
16
  }): VNode | string;
17
17
  loading?(): VNode;
18
- message?(props?: {
18
+ message?(props: {
19
19
  content: BubbleContentType;
20
20
  }): VNode | string;
21
21
  }> & {
22
22
  avatar?(): VNode;
23
- header?(props?: {
23
+ header?(props: {
24
24
  content: BubbleContentType;
25
25
  }): VNode | string;
26
- footer?(props?: {
26
+ footer?(props: {
27
27
  content: BubbleContentType;
28
28
  }): VNode | string;
29
29
  loading?(): VNode;
30
- message?(props?: {
30
+ message?(props: {
31
31
  content: BubbleContentType;
32
32
  }): VNode | string;
33
33
  };
@@ -1,6 +1,6 @@
1
1
  import { type MaybeRefOrGetter } from 'vue';
2
2
  import type { BubbleProps } from '../interface';
3
- declare function useTypingConfig(typing: MaybeRefOrGetter<BubbleProps['typing']>): readonly [import("vue").ComputedRef<boolean>, import("vue").ComputedRef<number>, import("vue").ComputedRef<number>, import("vue").ComputedRef<import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
3
+ declare function useTypingConfig(typing: MaybeRefOrGetter<BubbleProps['typing']>): readonly [import("vue").ComputedRef<boolean>, import("vue").ComputedRef<number>, import("vue").ComputedRef<number>, import("vue").ComputedRef<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
4
4
  [key: string]: any;
5
5
  }>>];
6
6
  export default useTypingConfig;
@@ -3,26 +3,26 @@ export type { BubbleProps, BubbleListProps } from './interface';
3
3
  declare const Bubble: (<T extends import("./interface").BubbleContentType = string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
4
  slots: Readonly<{
5
5
  avatar?(): import("vue").VNode;
6
- header?(props?: {
6
+ header?(props: {
7
7
  content: import("./interface").BubbleContentType;
8
8
  }): import("vue").VNode | string;
9
- footer?(props?: {
9
+ footer?(props: {
10
10
  content: import("./interface").BubbleContentType;
11
11
  }): import("vue").VNode | string;
12
12
  loading?(): import("vue").VNode;
13
- message?(props?: {
13
+ message?(props: {
14
14
  content: import("./interface").BubbleContentType;
15
15
  }): import("vue").VNode | string;
16
16
  }> & {
17
17
  avatar?(): import("vue").VNode;
18
- header?(props?: {
18
+ header?(props: {
19
19
  content: import("./interface").BubbleContentType;
20
20
  }): import("vue").VNode | string;
21
- footer?(props?: {
21
+ footer?(props: {
22
22
  content: import("./interface").BubbleContentType;
23
23
  }): import("vue").VNode | string;
24
24
  loading?(): import("vue").VNode;
25
- message?(props?: {
25
+ message?(props: {
26
26
  content: import("./interface").BubbleContentType;
27
27
  }): import("vue").VNode | string;
28
28
  };
@@ -225,26 +225,26 @@ declare const Bubble: (<T extends import("./interface").BubbleContentType = stri
225
225
  attrs: any;
226
226
  slots: Readonly<{
227
227
  avatar?(): import("vue").VNode;
228
- header?(props?: {
228
+ header?(props: {
229
229
  content: import("./interface").BubbleContentType;
230
230
  }): import("vue").VNode | string;
231
- footer?(props?: {
231
+ footer?(props: {
232
232
  content: import("./interface").BubbleContentType;
233
233
  }): import("vue").VNode | string;
234
234
  loading?(): import("vue").VNode;
235
- message?(props?: {
235
+ message?(props: {
236
236
  content: import("./interface").BubbleContentType;
237
237
  }): import("vue").VNode | string;
238
238
  }> & {
239
239
  avatar?(): import("vue").VNode;
240
- header?(props?: {
240
+ header?(props: {
241
241
  content: import("./interface").BubbleContentType;
242
242
  }): import("vue").VNode | string;
243
- footer?(props?: {
243
+ footer?(props: {
244
244
  content: import("./interface").BubbleContentType;
245
245
  }): import("vue").VNode | string;
246
246
  loading?(): import("vue").VNode;
247
- message?(props?: {
247
+ message?(props: {
248
248
  content: import("./interface").BubbleContentType;
249
249
  }): import("vue").VNode | string;
250
250
  };
@@ -14,7 +14,7 @@ export interface TypingOption {
14
14
  /**
15
15
  * @default null
16
16
  */
17
- suffix?: VNode;
17
+ suffix?: VNode | string;
18
18
  }
19
19
  export type SemanticType = 'avatar' | 'content' | 'header' | 'footer';
20
20
  export type BubbleContentType = VNode | string | AnyObject;
@@ -0,0 +1,9 @@
1
+ export * from './x-provider';
2
+ export * from './bubble';
3
+ export * from './conversations';
4
+ export * from './welcome';
5
+ export * from './prompts';
6
+ export * from './suggestion';
7
+ export * from './sender';
8
+ export * from './attachments';
9
+ export * from './thought-chain';
@@ -0,0 +1,4 @@
1
+ export * from './x-stream';
2
+ export * from './x-request';
3
+ export * from './use-x-agent';
4
+ export * from './use-x-chat';
@@ -1,14 +1,10 @@
1
- export * from './x-provider';
2
- export * from './bubble';
3
- export * from './conversations';
4
- export * from './welcome';
5
- export * from './prompts';
6
- export * from './suggestion';
7
- export * from './sender';
8
- export * from './attachments';
9
- export * from './thought-chain';
10
- export * from './x-stream';
11
- export * from './x-request';
12
- export * from './use-x-agent';
13
- export * from './use-x-chat';
1
+ import type { App } from 'vue';
2
+ export * from './components';
3
+ export * from './hooks';
14
4
  export * from './theme';
5
+ export * from './_util/cssinjs';
6
+ export declare const install: (app: App) => App<any>;
7
+ declare const _default: {
8
+ install: (app: App) => App<any>;
9
+ };
10
+ export default _default;
@@ -40,7 +40,7 @@ export interface PromptsProps extends Omit<HTMLAttributes, 'onClick' | 'title'>
40
40
  * @desc 显示在提示列表顶部的标题。
41
41
  * @descEN Title displayed at the top of the prompt list.
42
42
  */
43
- title?: VNode | string;
43
+ title?: VNode | string | (() => VNode | string);
44
44
  /**
45
45
  * @desc Item 提示项被点击时的回调函数。
46
46
  * @descEN Callback function when a prompt item is clicked.
@@ -9,7 +9,7 @@ declare function __VLS_template(): {
9
9
  slots: Readonly<{
10
10
  header?(): VNode;
11
11
  prefix?(): VNode;
12
- actions?(props?: {
12
+ actions?(props: {
13
13
  ori: VNode;
14
14
  info: {
15
15
  components: {
@@ -20,7 +20,7 @@ declare function __VLS_template(): {
20
20
  };
21
21
  };
22
22
  }): VNode;
23
- footer?(props?: {
23
+ footer?(props: {
24
24
  info: {
25
25
  components: {
26
26
  SendButton: typeof SendButton;
@@ -33,7 +33,7 @@ declare function __VLS_template(): {
33
33
  }> & {
34
34
  header?(): VNode;
35
35
  prefix?(): VNode;
36
- actions?(props?: {
36
+ actions?(props: {
37
37
  ori: VNode;
38
38
  info: {
39
39
  components: {
@@ -44,7 +44,7 @@ declare function __VLS_template(): {
44
44
  };
45
45
  };
46
46
  }): VNode;
47
- footer?(props?: {
47
+ footer?(props: {
48
48
  info: {
49
49
  components: {
50
50
  SendButton: typeof SendButton;
@@ -1,18 +1,20 @@
1
1
  import type { SenderHeaderProps } from './interface';
2
- declare const _default: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Partial<{}> & SenderHeaderProps> & import("vue").PublicProps;
4
- expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
5
- attrs: any;
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
6
4
  slots: Readonly<{
7
5
  default(props?: any): any;
8
6
  }> & {
9
7
  default(props?: any): any;
10
8
  };
11
- emit: {};
12
- }>) => import("vue").VNode & {
13
- __ctx?: Awaited<typeof __VLS_setup>;
9
+ refs: {};
10
+ rootEl: any;
14
11
  };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import("vue").DefineComponent<SenderHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SenderHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
14
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
15
  export default _default;
16
- type __VLS_PrettifyLocal<T> = {
17
- [K in keyof T]: T[K];
18
- } & {};
16
+ type __VLS_WithTemplateSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -37,7 +37,7 @@ declare const Sender: {
37
37
  $slots: Readonly<{
38
38
  header?(): import("vue").VNode;
39
39
  prefix?(): import("vue").VNode;
40
- actions?(props?: {
40
+ actions?(props: {
41
41
  ori: import("vue").VNode;
42
42
  info: {
43
43
  components: {
@@ -48,7 +48,7 @@ declare const Sender: {
48
48
  };
49
49
  };
50
50
  }): import("vue").VNode;
51
- footer?(props?: {
51
+ footer?(props: {
52
52
  info: {
53
53
  components: {
54
54
  SendButton: typeof import("./components/SendButton.vue").default;
@@ -61,7 +61,7 @@ declare const Sender: {
61
61
  }> & {
62
62
  header?(): import("vue").VNode;
63
63
  prefix?(): import("vue").VNode;
64
- actions?(props?: {
64
+ actions?(props: {
65
65
  ori: import("vue").VNode;
66
66
  info: {
67
67
  components: {
@@ -72,7 +72,7 @@ declare const Sender: {
72
72
  };
73
73
  };
74
74
  }): import("vue").VNode;
75
- footer?(props?: {
75
+ footer?(props: {
76
76
  info: {
77
77
  components: {
78
78
  SendButton: typeof import("./components/SendButton.vue").default;
@@ -84,38 +84,25 @@ declare const Sender: {
84
84
  }): import("vue").VNode;
85
85
  };
86
86
  }) & {
87
- Header: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
88
- slots: Readonly<{
87
+ Header: {
88
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./interface").SenderHeaderProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
89
+ P: {};
90
+ B: {};
91
+ D: {};
92
+ C: {};
93
+ M: {};
94
+ Defaults: {};
95
+ }, Readonly<import("./interface").SenderHeaderProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
96
+ __isFragment?: never;
97
+ __isTeleport?: never;
98
+ __isSuspense?: never;
99
+ } & import("vue").ComponentOptionsBase<Readonly<import("./interface").SenderHeaderProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
100
+ $slots: Readonly<{
89
101
  default(props?: any): any;
90
102
  }> & {
91
103
  default(props?: any): any;
92
104
  };
93
- attrs: any;
94
- emit: {};
95
- }, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
96
- props: {
97
- forceRender?: boolean;
98
- open?: boolean;
99
- onOpenChange?: (open: boolean) => void;
100
- title?: import("vue").VNode | string;
101
- children?: import("vue").VNode;
102
- className?: string;
103
- style?: import("vue").CSSProperties;
104
- classNames?: Partial<Record<import("./interface").SemanticType, string>>;
105
- styles?: Partial<Record<import("./interface").SemanticType, import("vue").CSSProperties>>;
106
- closable?: boolean;
107
- } & import("vue").PublicProps;
108
- expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
109
- attrs: any;
110
- slots: Readonly<{
111
- default(props?: any): any;
112
- }> & {
113
- default(props?: any): any;
114
- };
115
- emit: {};
116
- }>) => import("vue").VNode & {
117
- __ctx?: Awaited<typeof __VLS_setup>;
118
- };
105
+ });
119
106
  };
120
107
  export default Sender;
121
108
  export { Sender, };
@@ -1,16 +1,21 @@
1
1
  import type { ButtonProps, TextAreaProps } from "ant-design-vue";
2
2
  import { Input } from "ant-design-vue";
3
- import type { ChangeEvent, ClipboardEventHandler, KeyboardEventHandler } from "ant-design-vue/es/_util/EventInterface";
4
3
  import type { ConfigProviderProps } from "ant-design-vue";
5
4
  import type { CSSProperties, VNode } from "vue";
6
5
  import type { AllowSpeech } from "./useSpeech";
7
- import type { InputRef } from "ant-design-vue/es/vc-input/inputProps";
8
6
  import type { AvoidValidation } from '../type-utility';
9
7
  import SendButton from "./components/SendButton.vue";
10
8
  import ClearButton from "./components/ClearButton.vue";
11
9
  import LoadingButton from "./components/LoadingButton.vue";
12
10
  import SpeechButton from "./components/SpeechButton/index.vue";
13
11
  export type SubmitType = 'enter' | 'shiftEnter' | false;
12
+ export type KeyboardEventHandler = (e: KeyboardEvent) => void;
13
+ export type ClipboardEventHandler = (e: ClipboardEvent) => void;
14
+ export type ChangeEvent = Event & {
15
+ target: {
16
+ value?: string | undefined;
17
+ };
18
+ };
14
19
  export interface SenderComponents {
15
20
  input?: typeof Input.TextArea;
16
21
  }
@@ -70,9 +75,14 @@ export interface SenderProps {
70
75
  maxRows?: number;
71
76
  }>;
72
77
  }
78
+ export interface InputFocusOptions extends FocusOptions {
79
+ cursor?: 'start' | 'end' | 'all';
80
+ }
73
81
  export type SenderRef = {
74
82
  nativeElement: HTMLDivElement;
75
- } & Pick<InputRef, 'focus' | 'blur'>;
83
+ focus: (options?: InputFocusOptions) => void;
84
+ blur: () => void;
85
+ };
76
86
  export interface SenderHeaderContextProps {
77
87
  prefixCls?: ConfigProviderProps['prefixCls'];
78
88
  }
@@ -91,6 +101,9 @@ export interface SenderHeaderProps {
91
101
  }
92
102
  export interface RecordingIconProps {
93
103
  className?: string;
104
+ audioIcon?: ButtonProps['icon'];
105
+ audioDisabledIcon?: ButtonProps['icon'];
106
+ audioRecordingIcon?: ButtonProps['icon'];
94
107
  }
95
108
  export interface ActionButtonContextProps {
96
109
  prefixCls?: ConfigProviderProps['prefixCls'];
@@ -122,6 +135,9 @@ export interface AntdButtonProps {
122
135
  title?: ButtonProps['title'];
123
136
  onClick?: ButtonProps['onClick'];
124
137
  onMousedown?: ButtonProps['onMousedown'];
138
+ audioIcon?: ButtonProps['icon'] | VNode;
139
+ audioDisabledIcon?: ButtonProps['icon'] | VNode;
140
+ audioRecordingIcon?: ButtonProps['icon'] | VNode;
125
141
  }
126
142
  export interface ActionButtonProps extends AntdButtonProps {
127
143
  action: 'onSend' | 'onClear' | 'onCancel' | 'onSpeech';
@@ -1,7 +1,11 @@
1
+ import { ButtonProps } from 'ant-design-vue';
1
2
  import { type MaybeRefOrGetter, type ComputedRef, type Ref } from 'vue';
2
3
  export type ControlledSpeechConfig = {
3
4
  recording?: boolean;
4
- onRecordingChange: (recording: boolean) => void;
5
+ onRecordingChange?: (recording: boolean) => void;
6
+ audioIcon?: ButtonProps['icon'];
7
+ audioDisabledIcon?: ButtonProps['icon'];
8
+ audioRecordingIcon?: ButtonProps['icon'];
5
9
  };
6
10
  export type AllowSpeech = boolean | ControlledSpeechConfig;
7
11
  export type UseSpeechReturn = {
@@ -8,8 +8,8 @@ export interface WelcomeProps {
8
8
  variant?: 'filled' | 'borderless';
9
9
  classNames?: Partial<Record<SemanticType, string>>;
10
10
  styles?: Partial<Record<SemanticType, CSSProperties>>;
11
- icon?: VNode | string;
12
- title?: VNode | string;
13
- description?: VNode | string;
14
- extra?: VNode;
11
+ icon?: VNode | string | (() => VNode | string);
12
+ title?: VNode | string | (() => VNode | string);
13
+ description?: VNode | string | (() => VNode | string);
14
+ extra?: VNode | string | (() => VNode | string);
15
15
  }