ant-design-x-vue 1.2.2 → 1.2.4
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 +5 -5
- package/es/attachments/Attachments2.mjs +66 -67
- package/es/theme/useToken.mjs +1 -1
- package/es/x-provider/hooks/use-x-provider-context.mjs +1 -1
- package/lib/attachments/Attachments2.js +2 -2
- package/lib/theme/useToken.js +1 -1
- package/lib/x-provider/hooks/use-x-provider-context.js +1 -1
- package/package.json +3 -2
- package/typings/components.d.ts +9 -0
- package/typings/hooks.d.ts +4 -0
- package/typings/sender/useSpeech.d.ts +5 -4
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as $, mergeDefaults as q, toRef as T, useSlots as V, computed as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as $, mergeDefaults as q, toRef as T, useSlots as V, computed as f, useTemplateRef as F, watch as X, createVNode as i, Fragment as B } from "vue";
|
|
2
|
+
import M from "../_util/hooks/use-x-component-config.mjs";
|
|
3
|
+
import k from "../x-provider/hooks/use-x-provider-context.mjs";
|
|
4
4
|
import "../x-provider/context.mjs";
|
|
5
5
|
import "ant-design-vue";
|
|
6
|
-
import
|
|
6
|
+
import z from "./PlaceholderUploader.mjs";
|
|
7
7
|
import L from "./DropArea.mjs";
|
|
8
|
-
import
|
|
9
|
-
import { _ as
|
|
10
|
-
import { AttachmentContextProvider as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
function
|
|
8
|
+
import G from "./SilentUploader.mjs";
|
|
9
|
+
import { _ as H } from "./FileList/FileList2.mjs";
|
|
10
|
+
import { AttachmentContextProvider as J } from "./context.mjs";
|
|
11
|
+
import K from "./style/index.mjs";
|
|
12
|
+
import Q from "../_util/hooks/use-state.mjs";
|
|
13
|
+
function W(e, m) {
|
|
14
14
|
const s = /* @__PURE__ */ Object.create(null);
|
|
15
15
|
for (const r in e)
|
|
16
|
-
|
|
16
|
+
m.includes(r) || Object.defineProperty(s, r, { enumerable: !0, get: () => e[r] });
|
|
17
17
|
return s;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Y(e) {
|
|
20
20
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
21
21
|
}
|
|
22
22
|
var x = { exports: {} };
|
|
@@ -26,14 +26,14 @@ var x = { exports: {} };
|
|
|
26
26
|
http://jedwatson.github.io/classnames
|
|
27
27
|
*/
|
|
28
28
|
var j;
|
|
29
|
-
function
|
|
29
|
+
function Z() {
|
|
30
30
|
return j || (j = 1, function(e) {
|
|
31
31
|
(function() {
|
|
32
|
-
var
|
|
32
|
+
var m = {}.hasOwnProperty;
|
|
33
33
|
function s() {
|
|
34
34
|
for (var l = "", t = 0; t < arguments.length; t++) {
|
|
35
35
|
var o = arguments[t];
|
|
36
|
-
o && (l =
|
|
36
|
+
o && (l = d(l, r(o)));
|
|
37
37
|
}
|
|
38
38
|
return l;
|
|
39
39
|
}
|
|
@@ -48,18 +48,18 @@ function _() {
|
|
|
48
48
|
return l.toString();
|
|
49
49
|
var t = "";
|
|
50
50
|
for (var o in l)
|
|
51
|
-
|
|
51
|
+
m.call(l, o) && l[o] && (t = d(t, o));
|
|
52
52
|
return t;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function d(l, t) {
|
|
55
55
|
return t ? l ? l + " " + t : l + t : l;
|
|
56
56
|
}
|
|
57
57
|
e.exports ? (s.default = s, e.exports = s) : window.classNames = s;
|
|
58
58
|
})();
|
|
59
59
|
}(x)), x.exports;
|
|
60
60
|
}
|
|
61
|
-
var
|
|
62
|
-
const
|
|
61
|
+
var _ = Z();
|
|
62
|
+
const c = /* @__PURE__ */ Y(_), fe = /* @__PURE__ */ $({
|
|
63
63
|
name: "AXAttachments",
|
|
64
64
|
__name: "Attachments",
|
|
65
65
|
props: q({
|
|
@@ -130,71 +130,70 @@ const m = /* @__PURE__ */ Z(ee), de = /* @__PURE__ */ $({
|
|
|
130
130
|
styles: () => ({})
|
|
131
131
|
}),
|
|
132
132
|
setup(e, {
|
|
133
|
-
expose:
|
|
133
|
+
expose: m
|
|
134
134
|
}) {
|
|
135
|
-
const s =
|
|
135
|
+
const s = W(e, ["prefixCls", "rootClassName", "rootStyle", "className", "style", "items", "children", "getDropContainer", "placeholder", "onChange", "onRemove", "overflow", "imageProps", "disabled", "classNames", "styles"]);
|
|
136
136
|
T(e, "prefixCls");
|
|
137
137
|
const r = V(), {
|
|
138
|
-
getPrefixCls:
|
|
138
|
+
getPrefixCls: d,
|
|
139
139
|
direction: l
|
|
140
|
-
} =
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
} = k(), t = d("attachment", e.prefixCls), o = M("attachments"), C = f(() => o.value.classNames), y = f(() => o.value.styles), w = F("attachments-container"), O = F("placeholder-uploader"), [I, A, E] = K(t), p = f(() => c(A.value, E)), [v, R] = Q(e.items);
|
|
141
|
+
X(() => e.items, () => {
|
|
142
|
+
R(e.items);
|
|
143
143
|
});
|
|
144
|
-
const
|
|
145
|
-
var
|
|
146
|
-
|
|
147
|
-
}, g =
|
|
144
|
+
const S = (n) => {
|
|
145
|
+
var a;
|
|
146
|
+
R(n.fileList), (a = e.onChange) == null || a.call(e, n);
|
|
147
|
+
}, g = f(() => ({
|
|
148
148
|
...s,
|
|
149
|
-
fileList:
|
|
150
|
-
onChange:
|
|
151
|
-
})), U = (
|
|
152
|
-
if (
|
|
149
|
+
fileList: v.value,
|
|
150
|
+
onChange: S
|
|
151
|
+
})), U = (n) => Promise.resolve(typeof e.onRemove == "function" ? e.onRemove(n) : e.onRemove).then((a) => {
|
|
152
|
+
if (a === !1)
|
|
153
153
|
return;
|
|
154
|
-
const u =
|
|
155
|
-
|
|
154
|
+
const u = v.value.filter((h) => h.uid !== n.uid);
|
|
155
|
+
S({
|
|
156
156
|
file: {
|
|
157
|
-
...
|
|
157
|
+
...n,
|
|
158
158
|
status: "removed"
|
|
159
159
|
},
|
|
160
160
|
fileList: u
|
|
161
161
|
});
|
|
162
|
-
}), N = (
|
|
163
|
-
u
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
placeholder: c,
|
|
162
|
+
}), N = (n, a) => {
|
|
163
|
+
const u = r.placeholder ? r.placeholder({
|
|
164
|
+
type: n
|
|
165
|
+
}) : typeof e.placeholder == "function" ? e.placeholder(n) : e.placeholder;
|
|
166
|
+
return i(z, {
|
|
167
|
+
placeholder: u,
|
|
169
168
|
upload: g.value,
|
|
170
169
|
prefixCls: t,
|
|
171
|
-
className:
|
|
170
|
+
className: c(C.value.placeholder, e.classNames.placeholder),
|
|
172
171
|
style: {
|
|
173
172
|
...y.value.placeholder,
|
|
174
173
|
...e.styles.placeholder,
|
|
175
|
-
...
|
|
174
|
+
...a == null ? void 0 : a.style
|
|
176
175
|
},
|
|
177
|
-
ref: "placeholder-uploader"
|
|
176
|
+
ref: n === "inline" ? "placeholder-uploader" : void 0
|
|
178
177
|
}, null);
|
|
179
|
-
},
|
|
180
|
-
return
|
|
178
|
+
}, P = f(() => v.value.length > 0);
|
|
179
|
+
return m({
|
|
181
180
|
nativeElement: w.value,
|
|
182
|
-
upload: (
|
|
183
|
-
var u,
|
|
184
|
-
const
|
|
185
|
-
if (
|
|
181
|
+
upload: (n) => {
|
|
182
|
+
var u, h, b;
|
|
183
|
+
const a = (b = (u = O.value) == null ? void 0 : (h = u.nativeElement).querySelector) == null ? void 0 : b.call(h, 'input[type="file"]');
|
|
184
|
+
if (a) {
|
|
186
185
|
const D = new DataTransfer();
|
|
187
|
-
D.items.add(
|
|
186
|
+
D.items.add(n), a.files = D.files, a.dispatchEvent(new Event("change", {
|
|
188
187
|
bubbles: !0
|
|
189
188
|
}));
|
|
190
189
|
}
|
|
191
190
|
}
|
|
192
|
-
}), () => I(i(
|
|
191
|
+
}), () => I(i(J, {
|
|
193
192
|
value: {
|
|
194
193
|
disabled: e.disabled
|
|
195
194
|
}
|
|
196
195
|
}, {
|
|
197
|
-
default: () => [e.children ? i(
|
|
196
|
+
default: () => [e.children ? i(B, null, [i(G, {
|
|
198
197
|
upload: g.value,
|
|
199
198
|
rootClassName: e.rootClassName,
|
|
200
199
|
ref: "attachments-upload",
|
|
@@ -202,10 +201,10 @@ const m = /* @__PURE__ */ Z(ee), de = /* @__PURE__ */ $({
|
|
|
202
201
|
}, null), i(L, {
|
|
203
202
|
getDropContainer: e.getDropContainer,
|
|
204
203
|
prefixCls: t,
|
|
205
|
-
className:
|
|
204
|
+
className: c(p.value, e.rootClassName),
|
|
206
205
|
children: N("drop")
|
|
207
206
|
}, null)]) : i("div", {
|
|
208
|
-
class:
|
|
207
|
+
class: c(t, p.value, {
|
|
209
208
|
[`${t}-rtl`]: l.value === "rtl"
|
|
210
209
|
}, e.className, e.rootClassName),
|
|
211
210
|
style: {
|
|
@@ -214,31 +213,31 @@ const m = /* @__PURE__ */ Z(ee), de = /* @__PURE__ */ $({
|
|
|
214
213
|
},
|
|
215
214
|
dir: l.value || "ltr",
|
|
216
215
|
ref: "attachments-container"
|
|
217
|
-
}, [i(
|
|
216
|
+
}, [i(H, {
|
|
218
217
|
prefixCls: t,
|
|
219
|
-
items:
|
|
218
|
+
items: v.value,
|
|
220
219
|
onRemove: U,
|
|
221
220
|
overflow: e.overflow,
|
|
222
221
|
upload: g.value,
|
|
223
|
-
listClassName:
|
|
222
|
+
listClassName: c(C.value.list, e.classNames.list),
|
|
224
223
|
listStyle: {
|
|
225
224
|
...y.value.list,
|
|
226
225
|
...e.styles.list,
|
|
227
|
-
...!
|
|
226
|
+
...!P.value && {
|
|
228
227
|
display: "none"
|
|
229
228
|
}
|
|
230
229
|
},
|
|
231
|
-
itemClassName:
|
|
230
|
+
itemClassName: c(C.value.item, e.classNames.item),
|
|
232
231
|
itemStyle: {
|
|
233
232
|
...y.value.item,
|
|
234
233
|
...e.styles.item
|
|
235
234
|
},
|
|
236
235
|
imageProps: e.imageProps
|
|
237
|
-
}, null), N("inline",
|
|
236
|
+
}, null), N("inline", P.value ? {
|
|
238
237
|
style: {
|
|
239
238
|
display: "none"
|
|
240
239
|
}
|
|
241
|
-
} : {}
|
|
240
|
+
} : {}), i(L, {
|
|
242
241
|
getDropContainer: e.getDropContainer || (() => w.value),
|
|
243
242
|
prefixCls: t,
|
|
244
243
|
className: p.value,
|
|
@@ -248,7 +247,7 @@ const m = /* @__PURE__ */ Z(ee), de = /* @__PURE__ */ $({
|
|
|
248
247
|
}
|
|
249
248
|
});
|
|
250
249
|
export {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
250
|
+
fe as _,
|
|
251
|
+
W as a,
|
|
252
|
+
c
|
|
254
253
|
};
|
package/es/theme/useToken.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { computed as e, unref as v } from "vue";
|
|
|
7
7
|
import "../_util/cssinjs/transformers/legacyLogicalProperties.mjs";
|
|
8
8
|
import { theme as l } from "ant-design-vue";
|
|
9
9
|
import { ignore as g, unitless as x } from "./patch-antd.mjs";
|
|
10
|
-
import L from "ant-design-vue/es/theme/util/alias";
|
|
10
|
+
import L from "ant-design-vue/es/theme/util/alias.js";
|
|
11
11
|
import S from "../version/version.mjs";
|
|
12
12
|
const D = X(l.defaultAlgorithm), y = {
|
|
13
13
|
screenXS: !0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useConfigContextInject as i } from "ant-design-vue/es/config-provider/context";
|
|
1
|
+
import { useConfigContextInject as i } from "ant-design-vue/es/config-provider/context.js";
|
|
2
2
|
const f = "ant";
|
|
3
3
|
function c() {
|
|
4
4
|
const { getPrefixCls: e, direction: t, csp: n, iconPrefixCls: o, theme: r } = i();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),A=require("../_util/hooks/use-x-component-config.js"),I=require("../x-provider/hooks/use-x-provider-context.js");require("../x-provider/context.js");require("ant-design-vue");const E=require("./PlaceholderUploader.js"),b=require("./DropArea.js"),T=require("./SilentUploader.js"),k=require("./FileList/FileList2.js"),X=require("./context.js"),$=require("./style/index.js"),B=require("../_util/hooks/use-state.js");function D(e,
|
|
1
|
+
"use strict";const t=require("vue"),A=require("../_util/hooks/use-x-component-config.js"),I=require("../x-provider/hooks/use-x-provider-context.js");require("../x-provider/context.js");require("ant-design-vue");const E=require("./PlaceholderUploader.js"),b=require("./DropArea.js"),T=require("./SilentUploader.js"),k=require("./FileList/FileList2.js"),X=require("./context.js"),$=require("./style/index.js"),B=require("../_util/hooks/use-state.js");function D(e,d){const o=Object.create(null);for(const u in e)d.includes(u)||Object.defineProperty(o,u,{enumerable:!0,get:()=>e[u]});return o}function M(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var g={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var F;function z(){return F||(F=1,function(e){(function(){var
|
|
5
|
+
*/var F;function z(){return F||(F=1,function(e){(function(){var d={}.hasOwnProperty;function o(){for(var l="",n=0;n<arguments.length;n++){var r=arguments[n];r&&(l=m(l,u(r)))}return l}function u(l){if(typeof l=="string"||typeof l=="number")return l;if(typeof l!="object")return"";if(Array.isArray(l))return o.apply(null,l);if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]"))return l.toString();var n="";for(var r in l)d.call(l,r)&&l[r]&&(n=m(n,r));return n}function m(l,n){return n?l?l+" "+n:l+n:l}e.exports?(o.default=o,e.exports=o):window.classNames=o})()}(g)),g.exports}var G=z();const i=M(G),H=t.defineComponent({name:"AXAttachments",__name:"Attachments",props:t.mergeDefaults({capture:null,type:null,name:null,defaultFileList:null,action:null,directory:null,data:null,method:null,headers:null,showUploadList:null,multiple:null,accept:null,beforeUpload:null,onChange:{type:Function},"onUpdate:fileList":null,onDrop:null,listType:null,onPreview:null,onDownload:null,onReject:null,onRemove:null,remove:null,supportServerRender:null,disabled:{type:Boolean},prefixCls:null,customRequest:null,withCredentials:null,openFileDialogOnClick:null,locale:null,id:null,previewFile:null,transformFile:null,iconRender:null,isImageUrl:null,progress:null,itemRender:null,maxCount:null,height:null,removeIcon:null,downloadIcon:null,previewIcon:null,rootClassName:null,rootStyle:null,style:null,className:null,classNames:null,styles:null,children:null,placeholder:{type:Function},getDropContainer:{type:Function},items:null,overflow:null,imageProps:null},{items:()=>[],classNames:()=>({}),styles:()=>({})}),setup(e,{expose:d}){const o=D(e,["prefixCls","rootClassName","rootStyle","className","style","items","children","getDropContainer","placeholder","onChange","onRemove","overflow","imageProps","disabled","classNames","styles"]);t.toRef(e,"prefixCls");const u=t.useSlots(),{getPrefixCls:m,direction:l}=I.default(),n=m("attachment",e.prefixCls),r=A.default("attachments"),v=t.computed(()=>r.value.classNames),C=t.computed(()=>r.value.styles),x=t.useTemplateRef("attachments-container"),L=t.useTemplateRef("placeholder-uploader"),[V,j,O]=$.default(n),y=t.computed(()=>i(j.value,O)),[f,P]=B.default(e.items);t.watch(()=>e.items,()=>{P(e.items)});const R=a=>{var s;P(a.fileList),(s=e.onChange)==null||s.call(e,a)},p=t.computed(()=>({...o,fileList:f.value,onChange:R})),U=a=>Promise.resolve(typeof e.onRemove=="function"?e.onRemove(a):e.onRemove).then(s=>{if(s===!1)return;const c=f.value.filter(h=>h.uid!==a.uid);R({file:{...a,status:"removed"},fileList:c})}),N=(a,s)=>{const c=u.placeholder?u.placeholder({type:a}):typeof e.placeholder=="function"?e.placeholder(a):e.placeholder;return t.createVNode(E.default,{placeholder:c,upload:p.value,prefixCls:n,className:i(v.value.placeholder,e.classNames.placeholder),style:{...C.value.placeholder,...e.styles.placeholder,...s==null?void 0:s.style},ref:a==="inline"?"placeholder-uploader":void 0},null)},w=t.computed(()=>f.value.length>0);return d({nativeElement:x.value,upload:a=>{var c,h,S;const s=(S=(c=L.value)==null?void 0:(h=c.nativeElement).querySelector)==null?void 0:S.call(h,'input[type="file"]');if(s){const q=new DataTransfer;q.items.add(a),s.files=q.files,s.dispatchEvent(new Event("change",{bubbles:!0}))}}}),()=>V(t.createVNode(X.AttachmentContextProvider,{value:{disabled:e.disabled}},{default:()=>[e.children?t.createVNode(t.Fragment,null,[t.createVNode(T.default,{upload:p.value,rootClassName:e.rootClassName,ref:"attachments-upload",children:e.children},null),t.createVNode(b.default,{getDropContainer:e.getDropContainer,prefixCls:n,className:i(y.value,e.rootClassName),children:N("drop")},null)]):t.createVNode("div",{class:i(n,y.value,{[`${n}-rtl`]:l.value==="rtl"},e.className,e.rootClassName),style:{...e.rootStyle,...e.style},dir:l.value||"ltr",ref:"attachments-container"},[t.createVNode(k._sfc_main,{prefixCls:n,items:f.value,onRemove:U,overflow:e.overflow,upload:p.value,listClassName:i(v.value.list,e.classNames.list),listStyle:{...C.value.list,...e.styles.list,...!w.value&&{display:"none"}},itemClassName:i(v.value.item,e.classNames.item),itemStyle:{...C.value.item,...e.styles.item},imageProps:e.imageProps},null),N("inline",w.value?{style:{display:"none"}}:{}),t.createVNode(b.default,{getDropContainer:e.getDropContainer||(()=>x.value),prefixCls:n,className:y.value,children:N("drop")},null)])]}))}});exports._sfc_main=H;exports.classnames=i;exports.createPropsRestProxy=D;
|
package/lib/theme/useToken.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../_util/cssinjs/hooks/useCacheToken.tsx2.js");require("../_util/cssinjs/StyleContext.js");const g=require("../_util/cssinjs/theme/createTheme.js");require("../_util/warning.js");require("../_util/cssinjs/theme/ThemeCache.js");const e=require("vue");require("../_util/cssinjs/transformers/legacyLogicalProperties.js");const l=require("ant-design-vue"),v=require("./patch-antd.js"),q=require("ant-design-vue/es/theme/util/alias"),X=require("../version/version.js"),S=g.default(l.theme.defaultAlgorithm),x={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},k=(s,u,c)=>{const r=c.getDerivativeToken(s),{override:d,...t}=u;let n={...r,override:d};return n=q(n),t&&Object.entries(t).forEach(([i,a])=>{const{theme:o,...m}=a;let h=m;o&&(h=k({...n,...m},{override:m},o)),n[i]=h}),n};function T(){const{token:s,hashId:u,theme:c}=l.theme.useToken(),r=e.computed(()=>({token:s.value,hashed:u.value,theme:c.value})),{override:d,cssVar:t}=e.unref(r),n=e.computed(()=>r.value.token),i=e.computed(()=>r.value.hashed),a=e.computed(()=>r.value.theme??S),o=f.useCacheToken(e.computed(()=>a.value),e.computed(()=>[l.theme.defaultSeed,n.value]),e.computed(()=>({salt:`${X.default}-${i.value||""}`,override:d,getComputedToken:k,cssVar:t&&{prefix:t.prefix,key:t.key,unitless:v.unitless,ignore:v.ignore,preserve:x}}))),[m,h,p]=e.unref(o),M=e.computed(()=>o.value[0]),_=e.computed(()=>i.value?o.value[1]:"");return[a,p,_,M,t]}function L(){const[s,u,c]=T();return{theme:s,token:u,hashId:c}}exports.default=L;exports.getComputedToken=k;exports.useInternalToken=T;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../_util/cssinjs/hooks/useCacheToken.tsx2.js");require("../_util/cssinjs/StyleContext.js");const g=require("../_util/cssinjs/theme/createTheme.js");require("../_util/warning.js");require("../_util/cssinjs/theme/ThemeCache.js");const e=require("vue");require("../_util/cssinjs/transformers/legacyLogicalProperties.js");const l=require("ant-design-vue"),v=require("./patch-antd.js"),q=require("ant-design-vue/es/theme/util/alias.js"),X=require("../version/version.js"),S=g.default(l.theme.defaultAlgorithm),x={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},k=(s,u,c)=>{const r=c.getDerivativeToken(s),{override:d,...t}=u;let n={...r,override:d};return n=q(n),t&&Object.entries(t).forEach(([i,a])=>{const{theme:o,...m}=a;let h=m;o&&(h=k({...n,...m},{override:m},o)),n[i]=h}),n};function T(){const{token:s,hashId:u,theme:c}=l.theme.useToken(),r=e.computed(()=>({token:s.value,hashed:u.value,theme:c.value})),{override:d,cssVar:t}=e.unref(r),n=e.computed(()=>r.value.token),i=e.computed(()=>r.value.hashed),a=e.computed(()=>r.value.theme??S),o=f.useCacheToken(e.computed(()=>a.value),e.computed(()=>[l.theme.defaultSeed,n.value]),e.computed(()=>({salt:`${X.default}-${i.value||""}`,override:d,getComputedToken:k,cssVar:t&&{prefix:t.prefix,key:t.key,unitless:v.unitless,ignore:v.ignore,preserve:x}}))),[m,h,p]=e.unref(o),M=e.computed(()=>o.value[0]),_=e.computed(()=>i.value?o.value[1]:"");return[a,p,_,M,t]}function L(){const[s,u,c]=T();return{theme:s,token:u,hashId:c}}exports.default=L;exports.getComputedToken=k;exports.useInternalToken=T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("ant-design-vue/es/config-provider/context"),s="ant";function u(){const{getPrefixCls:e,direction:t,csp:n,iconPrefixCls:o,theme:r}=i.useConfigContextInject();return{theme:r,getPrefixCls:e,direction:t,csp:n,iconPrefixCls:o}}exports.default=u;exports.defaultPrefixCls=s;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("ant-design-vue/es/config-provider/context.js"),s="ant";function u(){const{getPrefixCls:e,direction:t,csp:n,iconPrefixCls:o,theme:r}=i.useConfigContextInject();return{theme:r,getPrefixCls:e,direction:t,csp:n,iconPrefixCls:o}}exports.default=u;exports.defaultPrefixCls=s;
|
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.4",
|
|
4
4
|
"description": "Craft AI-driven interfaces effortlessly",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"AI",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"vue"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "
|
|
16
|
+
"build": "run-p build:es build:umd build:resolver",
|
|
17
17
|
"build:es": "vite build && vue-tsc --project ./tsconfig.build.json",
|
|
18
18
|
"build:umd": "vite build --config ./vite.config.umd.mts && vue-tsc --project ./tsconfig.build.json",
|
|
19
19
|
"build:resolver": "tsc resolver/index.ts --outDir resolver-dist --declaration",
|
|
@@ -120,6 +120,7 @@
|
|
|
120
120
|
"lint-staged": "^13.0.3",
|
|
121
121
|
"markdown-it": "^14.1.0",
|
|
122
122
|
"markdown-it-container": "^4.0.0",
|
|
123
|
+
"npm-run-all2": "^8.0.3",
|
|
123
124
|
"prettier": "^2.7.1",
|
|
124
125
|
"prettier-plugin-organize-imports": "^3.0.0",
|
|
125
126
|
"prettier-plugin-packagejson": "^2.2.18",
|
|
@@ -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';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { type MaybeRefOrGetter } from 'vue';
|
|
1
|
+
import { type MaybeRefOrGetter, type ComputedRef, type Ref } from 'vue';
|
|
2
2
|
export type ControlledSpeechConfig = {
|
|
3
3
|
recording?: boolean;
|
|
4
4
|
onRecordingChange: (recording: boolean) => void;
|
|
5
5
|
};
|
|
6
6
|
export type AllowSpeech = boolean | ControlledSpeechConfig;
|
|
7
|
-
export
|
|
8
|
-
speechPermission:
|
|
7
|
+
export type UseSpeechReturn = {
|
|
8
|
+
speechPermission: ComputedRef<boolean>;
|
|
9
9
|
triggerSpeech: (forceBreak: boolean) => void;
|
|
10
|
-
recording:
|
|
10
|
+
recording: Ref<boolean>;
|
|
11
11
|
};
|
|
12
|
+
export default function useSpeech(onSpeech: (transcript: string) => void, allowSpeech?: MaybeRefOrGetter<AllowSpeech>): UseSpeechReturn;
|