ant-design-x-vue 1.2.4 → 1.2.6
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.umd.js +7 -7
- package/es/bubble/Bubble.mjs +17 -17
- package/es/bubble/hooks/useDisplayData.mjs +9 -9
- package/es/conversations/ConversationsItem.mjs +32 -28
- package/es/sender/Sender.mjs +13 -13
- package/es/thought-chain/item.mjs +83 -70
- package/es/thought-chain/style/index.mjs +20 -14
- package/lib/bubble/Bubble.js +1 -1
- package/lib/bubble/hooks/useDisplayData.js +1 -1
- package/lib/conversations/ConversationsItem.js +1 -1
- package/lib/sender/Sender.js +1 -1
- package/lib/thought-chain/item.js +1 -1
- package/lib/thought-chain/style/index.js +1 -1
- package/package.json +1 -1
- package/typings/attachments/index.d.ts +1 -1
- package/typings/bubble/Bubble.vue.d.ts +6 -2
- package/typings/bubble/index.d.ts +14 -6
- package/typings/bubble/interface.d.ts +2 -2
- package/typings/conversations/index.d.ts +1 -1
- package/typings/conversations/interface.d.ts +1 -0
- package/typings/sender/interface.d.ts +2 -2
- package/typings/thought-chain/interface.d.ts +14 -1
- package/typings/components.d.ts +0 -9
- package/typings/hooks.d.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),r=require("../attachments/Attachments2.js"),N=require("../_util/pick-attrs.js"),a=require("ant-design-vue"),s=require("../_util/hooks/use-state.js"),p=require("../attachments/FileList/FileList2.js"),y=t.defineComponent({name:"AXConversationsItem",__name:"ConversationsItem",props:{info:null,prefixCls:null,direction:null,menu:null,active:{type:Boolean},onClick:{type:Function}},setup(e){const d=r.createPropsRestProxy(e,["prefixCls","info","class","direction","onClick","active","menu"]);t.toRef(e,"class");const f=t.computed(()=>N.default(d,{aria:!0,data:!0,attr:!0})),m=n=>{n.stopPropagation()},i=t.computed(()=>e.info.disabled),[g,v]=s.default(!1),[C,u]=s.default(!1),b=t.computed(()=>r.classnames(e.class,`${e.prefixCls}-item`,{[`${e.prefixCls}-item-active`]:e.active&&!i.value},{[`${e.prefixCls}-item-disabled`]:i.value})),P=()=>{!i.value&&e.onClick&&e.onClick(e.info)},h=n=>{n&&u(!n)},l=t.computed(()=>{var n;return(n=e.menu)==null?void 0:n.trigger}),c=t.computed(()=>{const{trigger:n,...o}=e.menu||{};return o}),k=t.computed(()=>{var n;return(n=c.value)==null?void 0:n.getPopupContainer}),x=n=>{const o=t.createVNode(p.EllipsisOutlined,{onClick:m,class:`${e.prefixCls}-menu-icon`},null);return l.value?typeof l.value=="function"?l.value(n,{originNode:o}):l.value:o};return()=>t.createVNode(a.Tooltip,{title:e.info.label,open:g.value&&C.value,onOpenChange:u,placement:e.direction==="rtl"?"left":"right"},{default:()=>[t.createVNode("li",t.mergeProps(f.value,{class:b.value,onClick:P}),[e.info.icon&&t.createVNode("div",{class:`${e.prefixCls}-icon`},[e.info.icon]),t.createVNode(a.Typography.Text,{class:`${e.prefixCls}-label`,ellipsis:{onEllipsis:v}},{default:()=>[e.info.label]}),!i.value&&e.menu&&t.createVNode(a.Dropdown,{placement:e.direction==="rtl"?"bottomLeft":"bottomRight",trigger:["click"],disabled:i.value,onOpenChange:h,getPopupContainer:k.value},{default:()=>x(e.info),overlay:()=>t.createVNode(a.Menu,c.value,null)})])]})}});exports.default=y;
|
package/lib/sender/Sender.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),i=require("../attachments/Attachments2.js"),B=require("ant-design-vue"),_=require("../_util/pick-attrs.js"),ee=require("../_util/hooks/use-x-component-config.js"),te=require("../x-provider/hooks/use-x-provider-context.js");require("../x-provider/context.js");const ne=require("./context.js"),ae=require("./components/ActionButton/context.js"),oe=require("./components/ClearButton.js"),q=require("./components/LoadingButton.js"),w=require("./components/SendButton.js"),D=require("./components/SpeechButton/index.js"),le=require("./style/index.js"),se=require("./useSpeech.js"),ue=require("../_util/getValue.js"),ce=n.defineComponent({name:"AXSender",__name:"Sender",props:{onKeyPress:{},onFocus:{},onBlur:{},prefixCls:{},defaultValue:{},value:{},loading:{type:Boolean},placeholder:{},readOnly:{type:Boolean},submitType:{type:[String,Boolean],default:"enter"},disabled:{type:Boolean,default:void 0},onSubmit:{},onChange:{},onCancel:{},onKeyDown:{},onPaste:{},onPasteFile:{},components:{},styles:{default:()=>({})},rootClassName:{},classNames:{default:()=>({})},style:{},className:{},actions:{type:[Object,Function,Boolean],default:void 0},allowSpeech:{},prefix:{},footer:{},header:{},autoSize:{default:()=>({maxRows:8})}},emits:["update:value"],setup(e,{expose:$,emit:K}){const R=i.createPropsRestProxy(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"]);n.toRef(e,"prefixCls");function I(t,a,c){return ue.default(t,a)||c}const d={SendButton:w.default,ClearButton:oe.default,LoadingButton:q.default,SpeechButton:D.default},A=K,s=n.useSlots(),{direction:F,getPrefixCls:k}=te.default(),o=n.computed(()=>k("sender",e.prefixCls)),f=n.ref(null),r=n.ref(null),l=ee.default("sender"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),i=require("../attachments/Attachments2.js"),B=require("ant-design-vue"),_=require("../_util/pick-attrs.js"),ee=require("../_util/hooks/use-x-component-config.js"),te=require("../x-provider/hooks/use-x-provider-context.js");require("../x-provider/context.js");const ne=require("./context.js"),ae=require("./components/ActionButton/context.js"),oe=require("./components/ClearButton.js"),q=require("./components/LoadingButton.js"),w=require("./components/SendButton.js"),D=require("./components/SpeechButton/index.js"),le=require("./style/index.js"),se=require("./useSpeech.js"),ue=require("../_util/getValue.js"),ce=n.defineComponent({name:"AXSender",__name:"Sender",props:{onKeyPress:{},onFocus:{},onBlur:{},prefixCls:{},defaultValue:{},value:{},loading:{type:Boolean},placeholder:{},readOnly:{type:Boolean},submitType:{type:[String,Boolean],default:"enter"},disabled:{type:Boolean,default:void 0},onSubmit:{},onChange:{},onCancel:{},onKeyDown:{},onPaste:{},onPasteFile:{},components:{},styles:{default:()=>({})},rootClassName:{},classNames:{default:()=>({})},style:{},className:{},actions:{type:[Object,Function,Boolean],default:void 0},allowSpeech:{},prefix:{},footer:{},header:{},autoSize:{default:()=>({maxRows:8})}},emits:["update:value"],setup(e,{expose:$,emit:K}){const R=i.createPropsRestProxy(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"]);n.toRef(e,"prefixCls");function I(t,a,c){return ue.default(t,a)||c}const d={SendButton:w.default,ClearButton:oe.default,LoadingButton:q.default,SpeechButton:D.default},A=K,s=n.useSlots(),{direction:F,getPrefixCls:k}=te.default(),o=n.computed(()=>k("sender",e.prefixCls)),f=n.ref(null),r=n.ref(null),l=ee.default("sender"),C=n.computed(()=>`${o.value}-input`),[O,T,E]=le.default(o.value),z=n.computed(()=>i.classnames(o.value,l.value.className,e.className,e.rootClassName,T.value,E,{[`${o.value}-rtl`]:F.value==="rtl",[`${o.value}-disabled`]:e.disabled})),M=n.computed(()=>`${o.value}-actions-btn`),h=n.computed(()=>`${o.value}-actions-list`),u=n.ref(e.value??e.defaultValue??""),g=t=>{u.value=t};n.watch(()=>e.value,()=>{g(e.value)});const v=(t,a)=>{g(t),A("update:value",t),e.onChange&&e.onChange(t,a)},{speechPermission:L,triggerSpeech:x,recording:X}=se.default(t=>{v(`${u.value} ${t}`)},()=>e.allowSpeech),j=I(e.components,["input"],B.Input.TextArea),H=n.computed(()=>_.default(R,{attr:!0,aria:!0,data:!0})),G=n.computed(()=>({...H.value,ref:r})),m=()=>{u.value&&e.onSubmit&&!e.loading&&e.onSubmit(u.value)},J=()=>{v("")},y=n.ref(!1),Q=()=>{y.value=!0},U=()=>{y.value=!1},W=t=>{const a=t.key==="Enter"&&!y.value;switch(e.submitType){case"enter":a&&!t.shiftKey&&(t.preventDefault(),m());break;case"shiftEnter":a&&t.shiftKey&&(t.preventDefault(),m());break}e.onKeyPress&&e.onKeyPress(t)},Y=t=>{var c,V;const a=(c=t.clipboardData)==null?void 0:c.files;a!=null&&a.length&&e.onPasteFile&&(e.onPasteFile(a[0],a),t.preventDefault()),(V=e.onPaste)==null||V.call(e,t)},Z=t=>{var a,c;t.target!==((a=f.value)==null?void 0:a.querySelector(`.${C.value}`))&&t.preventDefault(),(c=r.value)==null||c.focus()},S=n.computed(()=>{let t=n.createVNode(B.Flex,{class:`${h.value}-presets`},{default:()=>[e.allowSpeech&&n.createVNode(D.default,null,null),e.loading?n.createVNode(q.default,null,null):n.createVNode(w.default,null,null)]});const a={components:d};return s.actions?t=s.actions({ori:t,info:a}):typeof e.actions=="function"?t=e.actions(t,a):(e.actions||e.actions===!1)&&(t=e.actions),t}),p=n.computed(()=>({prefixCls:M.value,onSend:m,onSendDisabled:!u.value,onClear:J,onClearDisabled:!u.value,onCancel:e.onCancel,onCancelDisabled:!e.loading,onSpeech:()=>x(!1),onSpeechDisabled:!L.value,speechRecording:X.value,disabled:e.disabled})),N=n.computed(()=>{let t=null;const a={components:d};return s.footer?t=s.footer({info:a}):typeof e.footer=="function"?t=e.footer({components:d}):e.footer&&(t=e.footer),t}),b=n.computed(()=>s.header?s.header():typeof e.header=="function"?e.header():e.header),P=n.computed(()=>s.prefix?s.prefix():typeof e.prefix=="function"?e.prefix():e.prefix);return $({nativeElement:f.value,focus:t=>{var a;return(a=r.value)==null?void 0:a.focus(t)},blur:()=>{var t;return(t=r.value)==null?void 0:t.blur()}}),()=>O(n.createVNode("div",{ref:f,class:z.value,style:{...l.value.style,...e.style}},[b.value&&n.createVNode(ne.SenderHeaderContextProvider,{value:{prefixCls:o.value}},{default:()=>[b.value]}),n.createVNode(ae.ActionButtonContextProvider,{value:p.value},{default:()=>[n.createVNode("div",{class:`${o.value}-content`,onMousedown:Z},[P.value&&n.createVNode("div",{class:i.classnames(`${o.value}-prefix`,l.value.classNames.prefix,e.classNames.prefix),style:{...l.value.styles.prefix,...e.styles.prefix}},[P.value]),n.createVNode(j,n.mergeProps(G.value,{disabled:e.disabled,style:{...l.value.styles.input,...e.styles.input},class:i.classnames(C.value,l.value.classNames.input,e.classNames.input),autoSize:e.autoSize,value:u.value,onChange:t=>{v(t.target.value,t),x(!0)},onPressEnter:W,onCompositionstart:Q,onCompositionend:U,onKeydown:e.onKeyDown,placeholder:e.placeholder,onPaste:Y,bordered:!1,readOnly:e.readOnly}),null),S.value&&n.createVNode("div",{class:i.classnames(h.value,l.value.classNames.actions,e.classNames.actions),style:{...l.value.styles.actions,...e.styles.actions}},[S.value])]),N.value&&n.createVNode("div",{class:i.classnames(`${o.value}-footer`,l.value.classNames.footer,e.classNames.footer),style:{...l.value.styles.footer,...e.styles.footer}},[N.value])]})]))}});exports.default=ce;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../attachments/Attachments2.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../attachments/Attachments2.js"),O=require("../_util/pick-attrs.js"),D=require("./context.js"),u=require("ant-design-vue");require("../transition-collapse/index.js");const k=require("../attachments/FileList/FileList2.js"),R=require("../transition-collapse/TransitionCollapse.js"),j=e.defineComponent({name:"AXThoughtChainNode",__name:"item",props:e.mergeDefaults({info:null,nextStatus:null,onClick:{type:Function}},{info:()=>({})}),setup(t){const i=l.createPropsRestProxy(t,["info","nextStatus","onClick"]),q=e.computed(()=>O.default(i,{attr:!0,aria:!0,data:!0})),n=D.useThoughtChainNodeContextInject(),C=e.computed(()=>n.value.prefixCls),d=e.computed(()=>n.value.enableCollapse),S=e.computed(()=>n.value.expandedKeys),p=e.computed(()=>n.value.direction),r=e.computed(()=>n.value.classNames),v=e.computed(()=>n.value.styles),P=e.useId(),h=e.computed(()=>t.info.key??P),F=e.computed(()=>t.info.icon),m=e.computed(()=>t.info.title),g=e.computed(()=>t.info.extra),s=e.computed(()=>t.info.content),y=e.computed(()=>t.info.footer),N=e.computed(()=>t.info.status),c=e.computed(()=>t.info.description),x=e.computed(()=>{const a=t.info.tooltip??!0,$=p.value==="rtl"?"topRight":"topLeft",T={title:m.value,placement:$},b={title:c.value,placement:$};return typeof a=="boolean"?{titleConfig:T,descriptionConfig:b}:{titleConfig:{...T,...a.titleConfig?a.titleConfig:{}},descriptionConfig:{...b,...a.descriptionConfig?a.descriptionConfig:{}}}}),V=e.computed(()=>!t.info.tooltip),o=e.computed(()=>`${C.value}-item`),A=()=>{var a;return(a=t.onClick)==null?void 0:a.call(t,h.value)},f=e.computed(()=>{var a;return(a=S.value)==null?void 0:a.includes(h.value)}),L=e.computed(()=>d.value?f.value:!0);return()=>e.createVNode("div",e.mergeProps(q.value,{class:l.classnames(o.value,{[`${o.value}-${N.value}${t.nextStatus?`-${t.nextStatus}`:""}`]:N.value},i.class),style:i.style}),[e.createVNode("div",{class:l.classnames(`${o.value}-header`,r.value.itemHeader),style:v.value.itemHeader,onClick:A},[e.createVNode(u.Avatar,{icon:F.value,class:`${o.value}-icon`},null),e.createVNode("div",{class:l.classnames(`${o.value}-header-box`,{[`${o.value}-collapsible`]:d.value&&s.value})},[e.createVNode(u.Typography.Text,{strong:!0,class:`${o.value}-title`},{default:()=>[d.value&&s.value&&(p.value==="rtl"?e.createVNode(k.LeftOutlined,{class:`${o.value}-collapse-icon`,rotate:f.value?-90:0},null):e.createVNode(k.RightOutlined,{class:`${o.value}-collapse-icon`,rotate:f.value?90:0},null)),V.value?m.value:e.createVNode(u.Tooltip,x.value.titleConfig,{default:()=>[m.value]})]}),c.value&&e.createVNode(u.Typography.Text,{class:`${o.value}-desc`,type:"secondary"},{default:()=>[V.value?c.value:e.createVNode(u.Tooltip,x.value.descriptionConfig,{default:()=>[c.value]})]})]),g.value&&e.createVNode("div",{class:`${o.value}-extra`},[g.value])]),e.createVNode(R.default,{prefixCls:C.value},{default:()=>[s.value&&e.withDirectives(e.createVNode("div",{class:l.classnames(`${o.value}-content`)},[e.createVNode("div",{class:l.classnames(`${o.value}-content-box`,r.value.itemContent),style:v.value.itemContent},[s.value])]),[[e.vShow,L.value]])]}),y.value&&e.createVNode("div",{class:l.classnames(`${o.value}-footer`,r.value.itemFooter),style:v.value.itemFooter},[y.value])])}});exports.default=j;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("../../_util/cssinjs/StyleContext.js");require("vue");const S=require("../../_util/cssinjs/util.js");require("../../_util/cssinjs/theme/ThemeCache.js");require("../../_util/warning.js");require("../../_util/cssinjs/transformers/legacyLogicalProperties.js");const h=require("../../_util/cssinjs-utils/util/statistic.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("../../_util/cssinjs/StyleContext.js");require("vue");const S=require("../../_util/cssinjs/util.js");require("../../_util/cssinjs/theme/ThemeCache.js");require("../../_util/warning.js");require("../../_util/cssinjs/transformers/legacyLogicalProperties.js");const h=require("../../_util/cssinjs-utils/util/statistic.js"),p=require("../../theme/genStyleUtils.js");require("../../transition-collapse/index.js");const a=require("../interface.js"),g=require("../../transition-collapse/style/index.js"),f=e=>{const{componentCls:t}=e,i=`${t}-item`,l={[a.THOUGHT_CHAIN_ITEM_STATUS.PENDING]:e.colorPrimaryText,[a.THOUGHT_CHAIN_ITEM_STATUS.SUCCESS]:e.colorSuccessText,[a.THOUGHT_CHAIN_ITEM_STATUS.ERROR]:e.colorErrorText},r=Object.keys(l);return r.reduce((c,o)=>{const m=l[o];return r.forEach(n=>{const d=`& ${i}-${o}-${n}`,u=o===n?{}:{backgroundColor:"none !important",backgroundImage:`linear-gradient(${m}, ${l[n]})`};c[d]={[`& ${i}-icon, & > *::before`]:{backgroundColor:`${m} !important`},"& > :last-child::before":u}}),c},{})},z=e=>{const{calc:t,componentCls:i}=e,l=`${i}-item`,r={content:'""',width:t(e.lineWidth).mul(2).equal(),display:"block",position:"absolute",insetInlineEnd:"none",backgroundColor:e.colorTextPlaceholder};return{"& > :last-child > :last-child":{"&::before":{display:"none !important"},[`&${l}-footer`]:{"&::before":{display:"block !important",bottom:0}}},[`& > ${l}`]:{[`& ${l}-header, & ${l}-content, & ${l}-footer`]:{position:"relative","&::before":{bottom:t(e.itemGap).mul(-1).equal()}},[`& ${l}-header, & ${l}-content`]:{marginInlineStart:t(e.itemSize).mul(-1).equal(),"&::before":{...r,insetInlineStart:t(e.itemSize).div(2).sub(e.lineWidth).equal()}},[`& ${l}-header::before`]:{top:e.itemSize,bottom:t(e.itemGap).mul(-2).equal()},[`& ${l}-content::before`]:{top:"100%"},[`& ${l}-footer::before`]:{...r,top:0,insetInlineStart:t(e.itemSize).div(-2).sub(e.lineWidth).equal()}}}},$=e=>{const{componentCls:t}=e,i=`${t}-item`;return{[i]:{display:"flex",flexDirection:"column",[`& ${i}-collapsible`]:{cursor:"pointer"},[`& ${i}-header`]:{display:"flex",marginBottom:e.itemGap,gap:e.itemGap,alignItems:"flex-start",[`& ${i}-icon`]:{height:e.itemSize,width:e.itemSize,fontSize:e.itemFontSize,display:"flex",justifyContent:"center",alignItems:"center"},[`& ${i}-extra`]:{height:e.itemSize,maxHeight:e.itemSize},[`& ${i}-header-box`]:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden",[`& ${i}-title`]:{height:e.itemSize,lineHeight:`${S.unit(e.itemSize)}`,maxHeight:e.itemSize,fontSize:e.itemFontSize,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",[`& ${i}-collapse-icon`]:{marginInlineEnd:e.marginXS}},[`& ${i}-desc`]:{fontSize:e.itemFontSize,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},[`& ${i}-content`]:{[`& ${i}-content-hidden`]:{display:"none"},[`& ${i}-content-box`]:{padding:e.itemGap,display:"inline-block",maxWidth:`calc(100% - ${e.itemSize})`,borderRadius:e.borderRadiusLG,backgroundColor:e.colorBgContainer,border:`${S.unit(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}},[`& ${i}-footer`]:{marginTop:e.itemGap,display:"inline-flex"}}}},s=(e,t="middle")=>{const{componentCls:i}=e,l={large:{itemSize:e.itemSizeLG,itemGap:e.itemGapLG,itemFontSize:e.itemFontSizeLG},middle:{itemSize:e.itemSize,itemGap:e.itemGap,itemFontSize:e.itemFontSize},small:{itemSize:e.itemSizeSM,itemGap:e.itemGapSM,itemFontSize:e.itemFontSizeSM}}[t];return{[`&${i}-${t}`]:{paddingInlineStart:l.itemSize,gap:l.itemGap,...$({...e,...l}),...z({...e,...l})}}},b=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexDirection:"column",...f(e),...s(e),...s(e,"large"),...s(e,"small"),[`&${t}-rtl`]:{direction:"rtl"}}}},T=p.genStyleHooks("ThoughtChain",e=>{const t=h.merge(e,{itemFontSizeSM:e.fontSizeSM,itemSizeSM:e.calc(e.controlHeightXS).add(e.controlHeightSM).div(2).equal(),itemGapSM:e.marginSM,itemFontSize:e.fontSize,itemSize:e.calc(e.controlHeightSM).add(e.controlHeight).div(2).equal(),itemGap:e.margin,itemFontSizeLG:e.fontSizeLG,itemSizeLG:e.calc(e.controlHeight).add(e.controlHeightLG).div(2).equal(),itemGapLG:e.marginLG});return[b(t),g.genTransitionCollapseStyle(t)]});exports.default=T;
|
package/package.json
CHANGED
|
@@ -34,6 +34,6 @@ declare const Attachments: {
|
|
|
34
34
|
nativeElement: Readonly<import("vue").ShallowRef<HTMLDivElement>>;
|
|
35
35
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("./interface").FileListCardProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
};
|
|
37
|
-
export type { AttachmentsProps } from './interface';
|
|
37
|
+
export type { Attachment, AttachmentsProps } from './interface';
|
|
38
38
|
export default Attachments;
|
|
39
39
|
export { Attachments, };
|
|
@@ -8,7 +8,9 @@ declare const _default: <T extends BubbleContentType = string>(__VLS_props: NonN
|
|
|
8
8
|
attrs: any;
|
|
9
9
|
slots: Readonly<{
|
|
10
10
|
avatar?(): VNode;
|
|
11
|
-
header?(
|
|
11
|
+
header?(props?: {
|
|
12
|
+
content: BubbleContentType;
|
|
13
|
+
}): VNode | string;
|
|
12
14
|
footer?(props?: {
|
|
13
15
|
content: BubbleContentType;
|
|
14
16
|
}): VNode | string;
|
|
@@ -18,7 +20,9 @@ declare const _default: <T extends BubbleContentType = string>(__VLS_props: NonN
|
|
|
18
20
|
}): VNode | string;
|
|
19
21
|
}> & {
|
|
20
22
|
avatar?(): VNode;
|
|
21
|
-
header?(
|
|
23
|
+
header?(props?: {
|
|
24
|
+
content: BubbleContentType;
|
|
25
|
+
}): VNode | string;
|
|
22
26
|
footer?(props?: {
|
|
23
27
|
content: BubbleContentType;
|
|
24
28
|
}): VNode | string;
|
|
@@ -3,7 +3,9 @@ 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?(
|
|
6
|
+
header?(props?: {
|
|
7
|
+
content: import("./interface").BubbleContentType;
|
|
8
|
+
}): import("vue").VNode | string;
|
|
7
9
|
footer?(props?: {
|
|
8
10
|
content: import("./interface").BubbleContentType;
|
|
9
11
|
}): import("vue").VNode | string;
|
|
@@ -13,7 +15,9 @@ declare const Bubble: (<T extends import("./interface").BubbleContentType = stri
|
|
|
13
15
|
}): import("vue").VNode | string;
|
|
14
16
|
}> & {
|
|
15
17
|
avatar?(): import("vue").VNode;
|
|
16
|
-
header?(
|
|
18
|
+
header?(props?: {
|
|
19
|
+
content: import("./interface").BubbleContentType;
|
|
20
|
+
}): import("vue").VNode | string;
|
|
17
21
|
footer?(props?: {
|
|
18
22
|
content: import("./interface").BubbleContentType;
|
|
19
23
|
}): import("vue").VNode | string;
|
|
@@ -40,8 +44,8 @@ declare const Bubble: (<T extends import("./interface").BubbleContentType = stri
|
|
|
40
44
|
variant?: "filled" | "borderless" | "outlined" | "shadow";
|
|
41
45
|
shape?: "round" | "corner";
|
|
42
46
|
onTypingComplete?: VoidFunction;
|
|
43
|
-
header?: import("vue").VNode | string
|
|
44
|
-
footer?: import("vue").VNode | string | ((content: import("./interface").BubbleContentType) => import("vue").VNode | string)
|
|
47
|
+
header?: import("../type-utility.js").AvoidValidation<import("vue").VNode | string | ((content: import("./interface").BubbleContentType) => import("vue").VNode | string)>;
|
|
48
|
+
footer?: import("../type-utility.js").AvoidValidation<import("vue").VNode | string | ((content: import("./interface").BubbleContentType) => import("vue").VNode | string)>;
|
|
45
49
|
style?: import("vue").StyleValue;
|
|
46
50
|
onCopy?: (payload: ClipboardEvent) => void;
|
|
47
51
|
onCut?: (payload: ClipboardEvent) => void;
|
|
@@ -221,7 +225,9 @@ declare const Bubble: (<T extends import("./interface").BubbleContentType = stri
|
|
|
221
225
|
attrs: any;
|
|
222
226
|
slots: Readonly<{
|
|
223
227
|
avatar?(): import("vue").VNode;
|
|
224
|
-
header?(
|
|
228
|
+
header?(props?: {
|
|
229
|
+
content: import("./interface").BubbleContentType;
|
|
230
|
+
}): import("vue").VNode | string;
|
|
225
231
|
footer?(props?: {
|
|
226
232
|
content: import("./interface").BubbleContentType;
|
|
227
233
|
}): import("vue").VNode | string;
|
|
@@ -231,7 +237,9 @@ declare const Bubble: (<T extends import("./interface").BubbleContentType = stri
|
|
|
231
237
|
}): import("vue").VNode | string;
|
|
232
238
|
}> & {
|
|
233
239
|
avatar?(): import("vue").VNode;
|
|
234
|
-
header?(
|
|
240
|
+
header?(props?: {
|
|
241
|
+
content: import("./interface").BubbleContentType;
|
|
242
|
+
}): import("vue").VNode | string;
|
|
235
243
|
footer?(props?: {
|
|
236
244
|
content: import("./interface").BubbleContentType;
|
|
237
245
|
}): import("vue").VNode | string;
|
|
@@ -37,8 +37,8 @@ export interface BubbleProps<ContentType extends BubbleContentType = string> ext
|
|
|
37
37
|
variant?: 'filled' | 'borderless' | 'outlined' | 'shadow';
|
|
38
38
|
shape?: 'round' | 'corner';
|
|
39
39
|
onTypingComplete?: VoidFunction;
|
|
40
|
-
header?: VNode | string
|
|
41
|
-
footer?: VNode | string | ((content: BubbleContentType) => VNode | string)
|
|
40
|
+
header?: AvoidValidation<VNode | string | ((content: BubbleContentType) => VNode | string)>;
|
|
41
|
+
footer?: AvoidValidation<VNode | string | ((content: BubbleContentType) => VNode | string)>;
|
|
42
42
|
}
|
|
43
43
|
export interface BubbleRef {
|
|
44
44
|
nativeElement: HTMLElement;
|
|
@@ -105,6 +105,7 @@ export interface ConversationsItemProps extends Omit<HTMLAttributes, 'onClick'>
|
|
|
105
105
|
trigger?: VNode | ((conversation: Conversation, info: {
|
|
106
106
|
originNode: VNode;
|
|
107
107
|
}) => VNode);
|
|
108
|
+
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
108
109
|
};
|
|
109
110
|
active?: boolean;
|
|
110
111
|
onClick?: (info: Conversation) => void;
|
|
@@ -62,9 +62,9 @@ export interface SenderProps {
|
|
|
62
62
|
className?: string;
|
|
63
63
|
actions?: VNode | ActionsRender | false;
|
|
64
64
|
allowSpeech?: AvoidValidation<AllowSpeech>;
|
|
65
|
-
prefix?: VNode;
|
|
65
|
+
prefix?: VNode | (() => VNode);
|
|
66
66
|
footer?: VNode | FooterRender;
|
|
67
|
-
header?: VNode;
|
|
67
|
+
header?: VNode | (() => VNode);
|
|
68
68
|
autoSize?: AvoidValidation<boolean | {
|
|
69
69
|
minRows?: number;
|
|
70
70
|
maxRows?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, HTMLAttributes, VNode } from "vue";
|
|
2
2
|
import type { Collapsible } from "./hooks/useCollapsible";
|
|
3
|
-
import type { ConfigProviderProps } from "ant-design-vue";
|
|
3
|
+
import type { ConfigProviderProps, TooltipProps } from "ant-design-vue";
|
|
4
4
|
export declare enum THOUGHT_CHAIN_ITEM_STATUS {
|
|
5
5
|
/**
|
|
6
6
|
* @desc 等待状态
|
|
@@ -15,6 +15,18 @@ export declare enum THOUGHT_CHAIN_ITEM_STATUS {
|
|
|
15
15
|
*/
|
|
16
16
|
ERROR = "error"
|
|
17
17
|
}
|
|
18
|
+
export interface TooltipConfig {
|
|
19
|
+
/**
|
|
20
|
+
* @desc Title tooltip 配置
|
|
21
|
+
* @descEN Title tooltip configuration
|
|
22
|
+
*/
|
|
23
|
+
titleConfig?: TooltipProps;
|
|
24
|
+
/**
|
|
25
|
+
* @desc Description tooltip 配置
|
|
26
|
+
* @descEN Description tooltip configuration
|
|
27
|
+
*/
|
|
28
|
+
descriptionConfig?: TooltipProps;
|
|
29
|
+
}
|
|
18
30
|
export interface ThoughtChainItem {
|
|
19
31
|
/**
|
|
20
32
|
* @desc 思维节点唯一标识符
|
|
@@ -56,6 +68,7 @@ export interface ThoughtChainItem {
|
|
|
56
68
|
* @descEN Thought chain item status
|
|
57
69
|
*/
|
|
58
70
|
status?: `${THOUGHT_CHAIN_ITEM_STATUS}`;
|
|
71
|
+
tooltip?: boolean | TooltipConfig;
|
|
59
72
|
}
|
|
60
73
|
export type SemanticType = 'item' | 'itemHeader' | 'itemContent' | 'itemFooter';
|
|
61
74
|
export interface ThoughtChainProps extends Omit<HTMLAttributes, 'title'> {
|
package/typings/components.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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';
|
package/typings/hooks.d.ts
DELETED