ant-design-x-vue 1.2.7 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +8533 -8065
- package/dist/index.esm.min.js +6 -0
- package/dist/index.umd.js +66 -66
- package/es/_util/cssinjs/StyleContext.mjs +48 -42
- package/es/bubble/Bubble.mjs +40 -38
- package/es/bubble/BubbleList.mjs +123 -87
- package/es/bubble/style/list.mjs +18 -5
- package/es/index.mjs +79 -45
- package/es/sender/Sender.mjs +82 -78
- package/es/sender/components/ActionButton/index.mjs +15 -12
- package/es/sender/components/ClearButton.mjs +15 -12
- package/es/sender/components/LoadingButton.mjs +16 -13
- package/es/sender/components/SendButton.mjs +17 -14
- package/es/sender/components/SpeechButton/RecordingIcon.mjs +21 -18
- package/es/sender/components/SpeechButton/index.mjs +31 -25
- package/es/suggestion/Suggestion.mjs +153 -48
- package/es/welcome/Welcome.mjs +44 -36
- package/lib/_util/cssinjs/StyleContext.js +1 -1
- package/lib/bubble/Bubble.js +1 -1
- package/lib/bubble/BubbleList.js +1 -1
- package/lib/bubble/style/list.js +1 -1
- package/lib/index.js +1 -1
- package/lib/sender/Sender.js +1 -1
- package/lib/sender/components/ActionButton/index.js +1 -1
- package/lib/sender/components/ClearButton.js +1 -1
- package/lib/sender/components/LoadingButton.js +1 -1
- package/lib/sender/components/SendButton.js +1 -1
- package/lib/sender/components/SpeechButton/RecordingIcon.js +1 -1
- package/lib/sender/components/SpeechButton/index.js +1 -1
- package/lib/suggestion/Suggestion.js +1 -1
- package/lib/welcome/Welcome.js +1 -1
- package/package.json +3 -2
- package/typings/_util/cssinjs/StyleContext.d.ts +6 -6
- package/typings/_util/cssinjs/index.d.ts +3 -3
- package/typings/bubble/BubbleList.vue.d.ts +47 -1
- package/typings/bubble/hooks/useTypingConfig.d.ts +1 -1
- package/typings/bubble/index.d.ts +65 -3
- package/typings/bubble/interface.d.ts +2 -2
- package/typings/index.d.ts +1 -0
- package/typings/sender/interface.d.ts +6 -0
- package/typings/sender/useSpeech.d.ts +5 -1
- package/typings/welcome/interface.d.ts +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),c=require("../../../attachments/Attachments2.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),c=require("../../../attachments/Attachments2.js"),r=require("ant-design-vue"),b=require("./context.js"),f=t.defineComponent({name:"AXSenderActionButton",__name:"index",props:{action:{},prefixCls:{},type:{default:"text"},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object]},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{},onMousedown:{},audioIcon:{},audioDisabledIcon:{},audioRecordingIcon:{}},setup(e){const u=c.createPropsRestProxy(e,["action","type","disabled","onClick"]);t.toRef(e,"disabled");const d=t.useSlots(),a=b.useActionButtonContextInject(),s=t.computed(()=>{var o;const i=a.value.disabled,n=(o=a.value)==null?void 0:o[`${e.action}Disabled`];return e.disabled??i??n}),l=t.computed(()=>a.value.prefixCls);return()=>t.createVNode(r.Button,t.mergeProps({type:e.type},u,{onClick:i=>{var n,o;s.value||((o=(n=a.value)==null?void 0:n[e.action])==null||o.call(n),e.onClick&&!Array.isArray(e.onClick)&&e.onClick(i))},class:c.classnames(l.value,{[`${l.value}-disabled`]:s.value})}),{icon:()=>d.default()})}});exports.default=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../attachments/Attachments2.js"),u=require("./ActionButton/index.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../attachments/Attachments2.js"),u=require("./ActionButton/index.js"),o=require("../../attachments/FileList/FileList2.js"),r=e.defineComponent({name:"AXSenderClearButton",__name:"ClearButton",props:e.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null,audioIcon:null,audioDisabledIcon:null,audioRecordingIcon:null},{disabled:void 0}),setup(l){const n=t.createPropsRestProxy(l,["disabled"]);return()=>e.createVNode(u.default,e.mergeProps({disabled:l.disabled},n,{action:"onClear"}),{default:()=>[e.createVNode(o.ClearOutlined,null,null)]})}});exports.default=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),l=require("../../attachments/Attachments2.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),l=require("../../attachments/Attachments2.js"),s=require("./ActionButton/index.js"),a=require("../StopLoading.js"),i=require("./ActionButton/context.js"),r=require("ant-design-vue"),c=n.defineComponent({name:"AXSenderLoadingButton",__name:"LoadingButton",props:n.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null,audioIcon:null,audioDisabledIcon:null,audioRecordingIcon:null},{type:"primary",shape:"circle",icon:void 0,disabled:void 0}),setup(e){const o=l.createPropsRestProxy(e,["type","shape","icon","disabled"]),t=i.useActionButtonContextInject(),{token:u}=r.theme.useToken();return()=>n.createVNode(s.default,n.mergeProps({type:e.type,disabled:e.disabled,shape:e.shape,icon:e.icon},o,{style:{backgroundColor:"transparent",color:u.value.colorPrimary},class:l.classnames(`${t.value.prefixCls}-loading-button`),action:"onCancel"}),{default:()=>[n.createVNode(a.default,{className:`${t.value.prefixCls}-loading-icon`},null)]})}});exports.default=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../attachments/Attachments2.js"),u=require("./ActionButton/index.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../attachments/Attachments2.js"),u=require("./ActionButton/index.js"),o=require("../../attachments/FileList/FileList2.js"),a=e.defineComponent({name:"AXSenderLoadingButton",__name:"SendButton",props:e.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null,audioIcon:null,audioDisabledIcon:null,audioRecordingIcon:null},{type:"primary",shape:"circle",disabled:void 0}),setup(l){const n=t.createPropsRestProxy(l,["type","shape","disabled"]);return()=>e.createVNode(u.default,e.mergeProps({type:l.type,shape:l.shape,disabled:l.disabled},n,{action:"onSend"}),{default:()=>[e.createVNode(o.ArrowUpOutlined,null,null)]})}});exports.default=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=1e3,n=4,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=1e3,n=4,r=140,s=250,i=500,c=.8,N=e.defineComponent({name:"AXSenderRecordingIcon",__name:"RecordingIcon",props:{className:null,audioIcon:null,audioDisabledIcon:null,audioRecordingIcon:null},setup(u){const l=r/2;return()=>e.createVNode("svg",{color:"currentColor",viewBox:`0 0 ${t} ${t}`,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",class:u.className},[e.createVNode("title",null,[e.createTextVNode("Speech Recording")]),Array.from({length:n}).map((T,o)=>{const d=(t-r*n)/(n-1),m=o*(d+r),a=t/2-s/2,g=t/2-i/2;return e.createVNode("rect",{fill:"currentColor",rx:l,ry:l,height:s,width:r,x:m,y:a,key:o},[e.createVNode("animate",{attributeName:"height",values:`${s}; ${i}; ${s}`,keyTimes:"0; 0.5; 1",dur:`${c}s`,begin:`${c/n*o}s`,repeatCount:"indefinite"},null),e.createVNode("animate",{attributeName:"y",values:`${a}; ${g}; ${a}`,keyTimes:"0; 0.5; 1",dur:`${c}s`,begin:`${c/n*o}s`,repeatCount:"indefinite"},null)])})])}});exports.default=N;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("../../../attachments/Attachments2.js"),r=require("ant-design-vue"),m=require("../ActionButton/index.js"),g=require("../ActionButton/context.js"),p=require("./RecordingIcon.js"),l=require("../../../attachments/FileList/FileList2.js"),f=e.defineComponent({name:"AXSenderSpeechButton",__name:"index",props:e.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null,audioIcon:null,audioDisabledIcon:null,audioRecordingIcon:null},{type:"text",disabled:void 0,audioIcon:()=>e.createVNode(l.AudioOutlined,null,null),audioDisabledIcon:()=>e.createVNode(l.AudioMutedOutlined,null,null),audioRecordingIcon:void 0}),setup(n){const u=a.createPropsRestProxy(n,["type","disabled","audioIcon","audioDisabledIcon","audioRecordingIcon"]),o=g.useActionButtonContextInject(),{token:c}=r.theme.useToken(),i=e.computed(()=>o.value.speechRecording),d=e.computed(()=>o.value.prefixCls),s=e.computed(()=>{let t;return i.value?t=n.audioRecordingIcon?n.audioRecordingIcon:e.createVNode(p.default,{className:`${d.value}-recording-icon`},null):o.value.onSpeechDisabled?t=n.audioDisabledIcon:t=n.audioIcon,t});return()=>e.createVNode(m.default,e.mergeProps({type:n.type,disabled:n.disabled},u,{style:{display:"flex",justifyContent:"center",alignItems:"center",color:c.value.colorPrimary},action:"onSpeech"}),{default:()=>[s.value]})}});exports.default=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),O=require("../attachments/Attachments2.js");require("../x-provider/index.js");const M=require("../_util/hooks/use-x-component-config.js"),W=require("./style/index.js"),k=require("../_util/hooks/use-state.js"),D=require("ant-design-vue"),T=require("./useActive.js"),$=require("../x-provider/hooks/use-x-provider-context.js");function I(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}const P=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function z(e){return Array.isArray(e)?e:[e]}function F(e){return t.getCurrentInstance()}function L(e,o=!0,u){F()?t.onMounted(e,u):o?e():t.nextTick(e)}const q=P?window:void 0;function m(e){var o;const u=t.toValue(e);return(o=u==null?void 0:u.$el)!=null?o:u}function G(){const e=t.shallowRef(!1),o=t.getCurrentInstance();return o&&t.onMounted(()=>{e.value=!0},o),e}function X(e){const o=G();return t.computed(()=>(o.value,!!e()))}function E(e,o,u={}){const{window:d=q,...a}=u;let r;const l=X(()=>d&&"ResizeObserver"in d),i=()=>{r&&(r.disconnect(),r=void 0)},w=t.computed(()=>{const n=t.toValue(e);return Array.isArray(n)?n.map(c=>m(c)):[m(n)]}),g=t.watch(w,n=>{if(i(),l.value&&d){r=new ResizeObserver(o);for(const c of n)c&&r.observe(c,a)}},{immediate:!0,flush:"post"}),h=()=>{i(),g()};return I(h),{isSupported:l,stop:h}}function H(e,o={width:0,height:0},u={}){const{window:d=q,box:a="content-box"}=u,r=t.computed(()=>{var n,c;return(c=(n=m(e))==null?void 0:n.namespaceURI)==null?void 0:c.includes("svg")}),l=t.shallowRef(o.width),i=t.shallowRef(o.height),{stop:w}=E(e,([n])=>{const c=a==="border-box"?n.borderBoxSize:a==="content-box"?n.contentBoxSize:n.devicePixelContentBoxSize;if(d&&r.value){const f=m(e);if(f){const v=f.getBoundingClientRect();l.value=v.width,i.value=v.height}}else if(c){const f=z(c);l.value=f.reduce((v,{inlineSize:C})=>v+C,0),i.value=f.reduce((v,{blockSize:C})=>v+C,0)}else l.value=n.contentRect.width,i.value=n.contentRect.height},u);L(()=>{const n=m(e);n&&(l.value="offsetWidth"in n?n.offsetWidth:o.width,i.value="offsetHeight"in n?n.offsetHeight:o.height)});const g=t.watch(()=>m(e),n=>{l.value=n?o.width:0,i.value=n?o.height:0});function h(){w(),g()}return{width:l,height:i,stop:h}}const j=t.defineComponent({name:"AXSuggestion",__name:"Suggestion",props:t.mergeDefaults({prefixCls:null,className:null,rootClassName:null,style:null,children:{type:Function},open:{type:Boolean},onOpenChange:{type:Function},items:{type:Function},onSelect:{type:Function},block:{type:Boolean},styles:null,classNames:null},{open:!1}),setup(e){t.toRef(e,"prefixCls");const o=t.useSlots(),{direction:u,getPrefixCls:d}=$.default(),a=t.computed(()=>d("suggestion",e.prefixCls));`${a.value}`;const r=t.computed(()=>u.value==="rtl"),l=M.default("suggestion"),i=t.ref(),[w,g,h]=W.default(a),{width:n}=H(i),c=t.computed(()=>{if(e.block&&n.value)return{width:`${n.value}px`}}),[f,v]=k.default(e.open),[C,A]=k.default(),p=s=>{var N;v(s),(N=e.onOpenChange)==null||N.call(e,s)},b=s=>{s===!1?p(!1):(A(s),p(!0))},y=()=>{p(!1)},S=t.computed(()=>typeof e.items=="function"?e.items(C.value):e.items),x=s=>{e.onSelect&&e.onSelect(s[s.length-1]),p(!1)},[V,R]=T.default(S,f,r,x,y),B=t.computed(()=>{var s;return o.default?o.default({onTrigger:b,onKeyDown:R}):(s=e.children)==null?void 0:s.call(e,{onTrigger:b,onKeyDown:R})});return()=>w(t.createVNode(D.Cascader,{options:S.value,open:f.value,value:V.value,placement:r.value?"topRight":"topLeft",onDropdownVisibleChange:s=>{s||y()},popupClassName:O.classnames(e.rootClassName,a.value,g.value,h,{[`${a.value}-block`]:e.block}),onChange:x,dropdownStyle:c.value},{default:()=>t.createVNode("div",{ref:i,class:O.classnames(a.value,l.value.className,e.rootClassName,e.className,`${a.value}-wrapper`,g.value,h),style:{...l.value.style,...e.style}},[B.value])}))}});exports.default=j;
|
package/lib/welcome/Welcome.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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:
|
|
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=$;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ant-design-x-vue",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.9",
|
|
4
4
|
"description": "Craft AI-driven interfaces effortlessly",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"AI",
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"@commitlint/cli": "^17.1.2",
|
|
98
98
|
"@commitlint/config-conventional": "^17.1.0",
|
|
99
99
|
"@eslint/js": "^9.11.1",
|
|
100
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
100
101
|
"@stackblitz/sdk": "^1.11.0",
|
|
101
102
|
"@types/markdown-it": "^14.1.2",
|
|
102
103
|
"@types/node": "^22.10.2",
|
|
@@ -108,7 +109,6 @@
|
|
|
108
109
|
"@vitest/coverage-v8": "^2.1.1",
|
|
109
110
|
"@vue/shared": "^3.5.13",
|
|
110
111
|
"@vue/test-utils": "^2.4.6",
|
|
111
|
-
"@vueuse/core": "^12.2.0",
|
|
112
112
|
"ant-design-vue": "^4.2.6",
|
|
113
113
|
"changelogen": "^0.5.7",
|
|
114
114
|
"eslint": "^8.57.1",
|
|
@@ -139,6 +139,7 @@
|
|
|
139
139
|
"@ant-design/fast-color": "^2.0.6",
|
|
140
140
|
"@emotion/hash": "^0.9.2",
|
|
141
141
|
"@emotion/unitless": "^0.10.0",
|
|
142
|
+
"@vueuse/core": "^13.4.0",
|
|
142
143
|
"classnames": "^2.5.1",
|
|
143
144
|
"csstype": "^3.1.3",
|
|
144
145
|
"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
|
-
}
|
|
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
|
-
}
|
|
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
|
-
}
|
|
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
|
-
}
|
|
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
|
-
}
|
|
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
|
-
}
|
|
180
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
181
181
|
container: Element | ShadowRoot;
|
|
182
182
|
autoClear: boolean;
|
|
183
183
|
mock: "server" | "client";
|
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
import type { BubbleListProps } from './interface';
|
|
2
|
-
|
|
2
|
+
import { type VNode } from 'vue';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: Readonly<{
|
|
6
|
+
avatar?(props: {
|
|
7
|
+
item: BubbleListProps["items"][number];
|
|
8
|
+
}): VNode;
|
|
9
|
+
header?(props: {
|
|
10
|
+
item: BubbleListProps["items"][number];
|
|
11
|
+
}): VNode | string;
|
|
12
|
+
footer?(props: {
|
|
13
|
+
item: BubbleListProps["items"][number];
|
|
14
|
+
}): VNode | string;
|
|
15
|
+
loading?(props: {
|
|
16
|
+
item: BubbleListProps["items"][number];
|
|
17
|
+
}): VNode;
|
|
18
|
+
message?(props: {
|
|
19
|
+
item: BubbleListProps["items"][number];
|
|
20
|
+
}): VNode | string;
|
|
21
|
+
}> & {
|
|
22
|
+
avatar?(props: {
|
|
23
|
+
item: BubbleListProps["items"][number];
|
|
24
|
+
}): VNode;
|
|
25
|
+
header?(props: {
|
|
26
|
+
item: BubbleListProps["items"][number];
|
|
27
|
+
}): VNode | string;
|
|
28
|
+
footer?(props: {
|
|
29
|
+
item: BubbleListProps["items"][number];
|
|
30
|
+
}): VNode | string;
|
|
31
|
+
loading?(props: {
|
|
32
|
+
item: BubbleListProps["items"][number];
|
|
33
|
+
}): VNode;
|
|
34
|
+
message?(props: {
|
|
35
|
+
item: BubbleListProps["items"][number];
|
|
36
|
+
}): VNode | string;
|
|
37
|
+
};
|
|
38
|
+
refs: {};
|
|
39
|
+
rootEl: any;
|
|
40
|
+
};
|
|
41
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
42
|
+
declare const __VLS_component: import("vue").DefineComponent<BubbleListProps, {
|
|
3
43
|
nativeElement: import("vue").Ref<HTMLDivElement, HTMLDivElement>;
|
|
4
44
|
scrollTo: ({ key, offset, behavior, block }: {
|
|
5
45
|
offset?: number;
|
|
@@ -8,4 +48,10 @@ declare const _default: import("vue").DefineComponent<BubbleListProps, {
|
|
|
8
48
|
block?: ScrollLogicalPosition;
|
|
9
49
|
}) => void;
|
|
10
50
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BubbleListProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
51
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
11
52
|
export default _default;
|
|
53
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -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;
|
|
@@ -34,7 +34,7 @@ declare const Bubble: (<T extends import("./interface").BubbleContentType = stri
|
|
|
34
34
|
rootClassName?: string;
|
|
35
35
|
styles?: Partial<Record<import("./interface").SemanticType, import("vue").CSSProperties>>;
|
|
36
36
|
classNames?: Partial<Record<import("./interface").SemanticType, string>>;
|
|
37
|
-
avatar?: Partial<import("./interface")._AvatarProps> | import("vue").VNode;
|
|
37
|
+
avatar?: Partial<import("./interface")._AvatarProps> | import("vue").VNode | (() => import("vue").VNode);
|
|
38
38
|
placement?: "start" | "end";
|
|
39
39
|
loading?: boolean;
|
|
40
40
|
typing?: import("../type-utility.js").AvoidValidation<import("./interface").TypingOption | boolean>;
|
|
@@ -252,7 +252,35 @@ declare const Bubble: (<T extends import("./interface").BubbleContentType = stri
|
|
|
252
252
|
}>) => import("vue").VNode & {
|
|
253
253
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
254
254
|
}) & {
|
|
255
|
-
List:
|
|
255
|
+
List: {
|
|
256
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./interface").BubbleListProps> & Readonly<{}>, {
|
|
257
|
+
nativeElement: import("vue").Ref<HTMLDivElement, HTMLDivElement>;
|
|
258
|
+
scrollTo: ({ key, offset, behavior, block }: {
|
|
259
|
+
offset?: number;
|
|
260
|
+
key?: string | number;
|
|
261
|
+
behavior?: ScrollBehavior;
|
|
262
|
+
block?: ScrollLogicalPosition;
|
|
263
|
+
}) => void;
|
|
264
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
265
|
+
P: {};
|
|
266
|
+
B: {};
|
|
267
|
+
D: {};
|
|
268
|
+
C: {};
|
|
269
|
+
M: {};
|
|
270
|
+
Defaults: {};
|
|
271
|
+
}, Readonly<import("./interface").BubbleListProps> & Readonly<{}>, {
|
|
272
|
+
nativeElement: import("vue").Ref<HTMLDivElement, HTMLDivElement>;
|
|
273
|
+
scrollTo: ({ key, offset, behavior, block }: {
|
|
274
|
+
offset?: number;
|
|
275
|
+
key?: string | number;
|
|
276
|
+
behavior?: ScrollBehavior;
|
|
277
|
+
block?: ScrollLogicalPosition;
|
|
278
|
+
}) => void;
|
|
279
|
+
}, {}, {}, {}, {}>;
|
|
280
|
+
__isFragment?: never;
|
|
281
|
+
__isTeleport?: never;
|
|
282
|
+
__isSuspense?: never;
|
|
283
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("./interface").BubbleListProps> & Readonly<{}>, {
|
|
256
284
|
nativeElement: import("vue").Ref<HTMLDivElement, HTMLDivElement>;
|
|
257
285
|
scrollTo: ({ key, offset, behavior, block }: {
|
|
258
286
|
offset?: number;
|
|
@@ -260,7 +288,41 @@ declare const Bubble: (<T extends import("./interface").BubbleContentType = stri
|
|
|
260
288
|
behavior?: ScrollBehavior;
|
|
261
289
|
block?: ScrollLogicalPosition;
|
|
262
290
|
}) => void;
|
|
263
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
291
|
+
}, {}, {}, {}, 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 () => {
|
|
292
|
+
$slots: Readonly<{
|
|
293
|
+
avatar?(props: {
|
|
294
|
+
item: import("./interface").BubbleListProps["items"][number];
|
|
295
|
+
}): import("vue").VNode;
|
|
296
|
+
header?(props: {
|
|
297
|
+
item: import("./interface").BubbleListProps["items"][number];
|
|
298
|
+
}): import("vue").VNode | string;
|
|
299
|
+
footer?(props: {
|
|
300
|
+
item: import("./interface").BubbleListProps["items"][number];
|
|
301
|
+
}): import("vue").VNode | string;
|
|
302
|
+
loading?(props: {
|
|
303
|
+
item: import("./interface").BubbleListProps["items"][number];
|
|
304
|
+
}): import("vue").VNode;
|
|
305
|
+
message?(props: {
|
|
306
|
+
item: import("./interface").BubbleListProps["items"][number];
|
|
307
|
+
}): import("vue").VNode | string;
|
|
308
|
+
}> & {
|
|
309
|
+
avatar?(props: {
|
|
310
|
+
item: import("./interface").BubbleListProps["items"][number];
|
|
311
|
+
}): import("vue").VNode;
|
|
312
|
+
header?(props: {
|
|
313
|
+
item: import("./interface").BubbleListProps["items"][number];
|
|
314
|
+
}): import("vue").VNode | string;
|
|
315
|
+
footer?(props: {
|
|
316
|
+
item: import("./interface").BubbleListProps["items"][number];
|
|
317
|
+
}): import("vue").VNode | string;
|
|
318
|
+
loading?(props: {
|
|
319
|
+
item: import("./interface").BubbleListProps["items"][number];
|
|
320
|
+
}): import("vue").VNode;
|
|
321
|
+
message?(props: {
|
|
322
|
+
item: import("./interface").BubbleListProps["items"][number];
|
|
323
|
+
}): import("vue").VNode | string;
|
|
324
|
+
};
|
|
325
|
+
});
|
|
264
326
|
};
|
|
265
327
|
export default Bubble;
|
|
266
328
|
export { Bubble, BubbleList };
|
|
@@ -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;
|
|
@@ -27,7 +27,7 @@ export interface BubbleProps<ContentType extends BubbleContentType = string> ext
|
|
|
27
27
|
rootClassName?: string;
|
|
28
28
|
styles?: Partial<Record<SemanticType, CSSProperties>>;
|
|
29
29
|
classNames?: Partial<Record<SemanticType, string>>;
|
|
30
|
-
avatar?: Partial<_AvatarProps> | VNode;
|
|
30
|
+
avatar?: Partial<_AvatarProps> | VNode | (() => VNode);
|
|
31
31
|
placement?: 'start' | 'end';
|
|
32
32
|
loading?: boolean;
|
|
33
33
|
typing?: AvoidValidation<TypingOption | boolean>;
|
package/typings/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { App } from 'vue';
|
|
|
2
2
|
export * from './components';
|
|
3
3
|
export * from './hooks';
|
|
4
4
|
export * from './theme';
|
|
5
|
+
export * from './_util/cssinjs';
|
|
5
6
|
export declare const install: (app: App) => App<any>;
|
|
6
7
|
declare const _default: {
|
|
7
8
|
install: (app: App) => App<any>;
|
|
@@ -101,6 +101,9 @@ export interface SenderHeaderProps {
|
|
|
101
101
|
}
|
|
102
102
|
export interface RecordingIconProps {
|
|
103
103
|
className?: string;
|
|
104
|
+
audioIcon?: ButtonProps['icon'];
|
|
105
|
+
audioDisabledIcon?: ButtonProps['icon'];
|
|
106
|
+
audioRecordingIcon?: ButtonProps['icon'];
|
|
104
107
|
}
|
|
105
108
|
export interface ActionButtonContextProps {
|
|
106
109
|
prefixCls?: ConfigProviderProps['prefixCls'];
|
|
@@ -132,6 +135,9 @@ export interface AntdButtonProps {
|
|
|
132
135
|
title?: ButtonProps['title'];
|
|
133
136
|
onClick?: ButtonProps['onClick'];
|
|
134
137
|
onMousedown?: ButtonProps['onMousedown'];
|
|
138
|
+
audioIcon?: ButtonProps['icon'] | VNode;
|
|
139
|
+
audioDisabledIcon?: ButtonProps['icon'] | VNode;
|
|
140
|
+
audioRecordingIcon?: ButtonProps['icon'] | VNode;
|
|
135
141
|
}
|
|
136
142
|
export interface ActionButtonProps extends AntdButtonProps {
|
|
137
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
|
|
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
|
}
|