vue-devui 1.5.7-hotfix.2 → 1.5.7-hotfix.3
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/avatar/index.es.js +10 -2
- package/avatar/index.umd.js +9 -1
- package/code-editor/index.es.js +3 -3
- package/code-editor/index.umd.js +1 -1
- package/package.json +1 -1
- package/types/avatar/src/components/icon-body.d.ts +1 -1
- package/types/code-editor/src/code-editor-types.d.ts +1 -1
- package/types/code-editor/src/code-editor.d.ts +1 -1
- package/vue-devui.es.js +14 -6
- package/vue-devui.umd.js +11 -3
package/avatar/index.es.js
CHANGED
|
@@ -26,7 +26,9 @@ const IconBody = (props) => {
|
|
|
26
26
|
"cy": "15",
|
|
27
27
|
"r": "15"
|
|
28
28
|
}, null), createVNode("path", {
|
|
29
|
-
"d":
|
|
29
|
+
"d": `M14.9997866,16 C12.5145053,16 10.4997866,13.9852814 10.4997866, 11.5 C10.4997866,9.01471863 12.5145053,7 14.9997866,7
|
|
30
|
+
C17.485068, 7 19.4997866,9.01471863 19.4997866,11.5 C19.4997866,13.9852814 17.485068, 16 14.9997866,16 Z M23,23 L7,22.998553
|
|
31
|
+
C7,19.0122153 10.8892296, 16.5 14.9997866,16.5 C19.1103437,16.5 23,20 23,23 Z`,
|
|
30
32
|
"id": "\u5F62\u72B6\u7ED3\u5408",
|
|
31
33
|
"fill": "#FFFFFF"
|
|
32
34
|
}, null)])]);
|
|
@@ -74,7 +76,13 @@ const IconNobody = (props) => {
|
|
|
74
76
|
"fill": "none",
|
|
75
77
|
"fill-rule": "evenodd"
|
|
76
78
|
}, [createVNode("path", {
|
|
77
|
-
"d":
|
|
79
|
+
"d": `M22.31,19.2474562 L22.31,21.9974562 L20.81,21.9974562 L20.81, 19.2474562 L18.06,19.2474562 L18.06,17.7474562
|
|
80
|
+
L20.81,17.7474562 L20.81, 14.9974562 L22.31,14.9974562 L22.31,17.7474562 L25.06,17.7474562 L25.06, 19.2474562
|
|
81
|
+
L22.31,19.2474562 Z M14.9297866,14.9974562 C12.4445053, 14.9974562 10.4297866,12.9827376 10.4297866,10.4974562
|
|
82
|
+
C10.4297866, 8.01217483 12.4445053,5.9974562 14.9297866,5.9974562 C17.415068, 5.9974562 19.4297866,8.01217483
|
|
83
|
+
19.4297866,10.4974562 C19.4297866, 12.9827376 17.415068,14.9974562 14.9297866,14.9974562 Z M19.6797866, 20.2474562
|
|
84
|
+
L19.6797866,21.9971623 L6.93,21.9960092 C6.93,18.0096715 10.8192296, 15.4974562 14.9297866,15.4974562 C16.4608397,15.4974562
|
|
85
|
+
17.9612467,15.983021 19.2414296, 16.7474562 L17.06,16.7474562 L17.06,20.2474562 L19.6797866,20.2474562 Z`,
|
|
78
86
|
"id": "\u5F62\u72B6\u7ED3\u5408",
|
|
79
87
|
"fill": "#959EB2"
|
|
80
88
|
}, null), createVNode("path", {
|
package/avatar/index.umd.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
(function(u,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(u=typeof globalThis!="undefined"?globalThis:u||self,e(u.index={},u.Vue))})(this,function(u,e){"use strict";const $=a=>{const{width:s,height:l}=a;return e.createVNode("svg",{style:{width:`${s}px`,height:`${l}px`,verticalAlign:"middle"},viewBox:"0 0 30 30",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createVNode("g",{id:"\u672A\u547D\u540D",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("circle",{id:"Oval",fill:"#CACFD8",cx:"15",cy:"15",r:"15"},null),e.createVNode("path",{d
|
|
1
|
+
(function(u,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(u=typeof globalThis!="undefined"?globalThis:u||self,e(u.index={},u.Vue))})(this,function(u,e){"use strict";const $=a=>{const{width:s,height:l}=a;return e.createVNode("svg",{style:{width:`${s}px`,height:`${l}px`,verticalAlign:"middle"},viewBox:"0 0 30 30",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createVNode("g",{id:"\u672A\u547D\u540D",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("circle",{id:"Oval",fill:"#CACFD8",cx:"15",cy:"15",r:"15"},null),e.createVNode("path",{d:`M14.9997866,16 C12.5145053,16 10.4997866,13.9852814 10.4997866, 11.5 C10.4997866,9.01471863 12.5145053,7 14.9997866,7
|
|
2
|
+
C17.485068, 7 19.4997866,9.01471863 19.4997866,11.5 C19.4997866,13.9852814 17.485068, 16 14.9997866,16 Z M23,23 L7,22.998553
|
|
3
|
+
C7,19.0122153 10.8892296, 16.5 14.9997866,16.5 C19.1103437,16.5 23,20 23,23 Z`,id:"\u5F62\u72B6\u7ED3\u5408",fill:"#FFFFFF"},null)])])};var S=e.defineComponent({name:"AvatarBodyIcon",props:{width:{type:Number,default:16},height:{type:Number,default:16}},render(){const{width:a,height:s}=this;return e.createVNode($,{width:a,height:s},null)}});const B=a=>{const{width:s,height:l}=a;return e.createVNode("svg",{style:{width:`${s}px`,height:`${l}px`,verticalAlign:"middle"},viewBox:"0 0 30 30",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("path",{d:`M22.31,19.2474562 L22.31,21.9974562 L20.81,21.9974562 L20.81, 19.2474562 L18.06,19.2474562 L18.06,17.7474562
|
|
4
|
+
L20.81,17.7474562 L20.81, 14.9974562 L22.31,14.9974562 L22.31,17.7474562 L25.06,17.7474562 L25.06, 19.2474562
|
|
5
|
+
L22.31,19.2474562 Z M14.9297866,14.9974562 C12.4445053, 14.9974562 10.4297866,12.9827376 10.4297866,10.4974562
|
|
6
|
+
C10.4297866, 8.01217483 12.4445053,5.9974562 14.9297866,5.9974562 C17.415068, 5.9974562 19.4297866,8.01217483
|
|
7
|
+
19.4297866,10.4974562 C19.4297866, 12.9827376 17.415068,14.9974562 14.9297866,14.9974562 Z M19.6797866, 20.2474562
|
|
8
|
+
L19.6797866,21.9971623 L6.93,21.9960092 C6.93,18.0096715 10.8192296, 15.4974562 14.9297866,15.4974562 C16.4608397,15.4974562
|
|
9
|
+
17.9612467,15.983021 19.2414296, 16.7474562 L17.06,16.7474562 L17.06,20.2474562 L19.6797866,20.2474562 Z`,id:"\u5F62\u72B6\u7ED3\u5408",fill:"#959EB2"},null),e.createVNode("path",{d:`M0,15 L1,15 C1,15.6118966 1.03919561,16.2186526 1.11683409,
|
|
2
10
|
16.8178549 L0.125124012,16.9463505 C0.0425740367,16.309242 0,
|
|
3
11
|
15.6595925 0,15 Z M0.503241262,18.867175 L1.46961749,18.6100428 C1.62594651,
|
|
4
12
|
19.1975718 1.8203704,19.7729973 2.05141295,20.3332823 L1.12693074,
|
package/code-editor/index.es.js
CHANGED
|
@@ -5630,9 +5630,9 @@ function useCodeEditor(props, ctx) {
|
|
|
5630
5630
|
} else if (diffEditor) {
|
|
5631
5631
|
model = diffEditor.getModel().modified;
|
|
5632
5632
|
}
|
|
5633
|
-
model.onDidChangeContent(lodash.exports.throttle(() => {
|
|
5633
|
+
model == null ? void 0 : model.onDidChangeContent(lodash.exports.throttle(() => {
|
|
5634
5634
|
modifyValueFromInner = true;
|
|
5635
|
-
ctx.emit("update:
|
|
5635
|
+
ctx.emit("update:modelValue", model.getValue());
|
|
5636
5636
|
}, 100));
|
|
5637
5637
|
}
|
|
5638
5638
|
function setDiffEditorOriginValue() {
|
|
@@ -5853,7 +5853,7 @@ var codeEditor = "";
|
|
|
5853
5853
|
var CodeEditor = defineComponent({
|
|
5854
5854
|
name: "DCodeEditor",
|
|
5855
5855
|
props: codeEditorProps,
|
|
5856
|
-
emits: ["update:
|
|
5856
|
+
emits: ["update:modelValue", "afterEditorInit", "click"],
|
|
5857
5857
|
setup(props, ctx) {
|
|
5858
5858
|
const {
|
|
5859
5859
|
editorEl
|
package/code-editor/index.umd.js
CHANGED
|
@@ -24,4 +24,4 @@ __p += '`),b&&(_+=`' +
|
|
|
24
24
|
function print() { __p += __j.call(arguments, '') }
|
|
25
25
|
`:`;
|
|
26
26
|
`)+_+`return __p
|
|
27
|
-
}`;var S=So(function(){return P(f,m+"return "+_).apply(l,o)});if(S.source=_,$i(S))throw S;return S}function yd(n){return B(n).toLowerCase()}function Ed(n){return B(n).toUpperCase()}function Id(n,e,t){if(n=B(n),n&&(t||e===l))return Pu(n);if(!n||!(e=In(e)))return n;var r=Gn(n),i=Gn(e),f=Bu(r,i),o=Nu(r,i)+1;return we(r,f,o).join("")}function Td(n,e,t){if(n=B(n),n&&(t||e===l))return n.slice(0,Uu(n)+1);if(!n||!(e=In(e)))return n;var r=Gn(n),i=Nu(r,Gn(e))+1;return we(r,0,i).join("")}function Cd(n,e,t){if(n=B(n),n&&(t||e===l))return n.replace($r,"");if(!n||!(e=In(e)))return n;var r=Gn(n),i=Bu(r,Gn(e));return we(r,i).join("")}function Ld(n,e){var t=ft,r=yr;if(Z(e)){var i="separator"in e?e.separator:i;t="length"in e?L(e.length):t,r="omission"in e?In(e.omission):r}n=B(n);var f=n.length;if(ze(n)){var o=Gn(n);f=o.length}if(t>=f)return n;var a=t-Ye(r);if(a<1)return r;var c=o?we(o,0,a).join(""):n.slice(0,a);if(i===l)return c+r;if(o&&(a+=c.length-a),qi(i)){if(n.slice(a).search(i)){var d,p=c;for(i.global||(i=ui(i.source,B(ru.exec(i))+"g")),i.lastIndex=0;d=i.exec(p);)var _=d.index;c=c.slice(0,_===l?a:_)}}else if(n.indexOf(In(i),a)!=a){var v=c.lastIndexOf(i);v>-1&&(c=c.slice(0,v))}return c+r}function Sd(n){return n=B(n),n&&Uo.test(n)?n.replace(nu,ra):n}var Rd=nt(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),zi=Sf("toUpperCase");function Lo(n,e,t){return n=B(n),e=t?l:e,e===l?kl(n)?fa(n):ql(n):n.match(e)||[]}var So=R(function(n,e){try{return yn(n,l,e)}catch(t){return $i(t)?t:new I(t)}}),Od=te(function(n,e){return On(e,function(t){t=Vn(t),ne(n,t,Hi(n[t],n))}),n});function Md(n){var e=n==null?0:n.length,t=A();return n=e?K(n,function(r){if(typeof r[1]!="function")throw new Mn(q);return[t(r[0]),r[1]]}):[],R(function(r){for(var i=-1;++i<e;){var f=n[i];if(yn(f[0],this,r))return yn(f[1],this,r)}})}function bd(n){return rs(Wn(n,zn))}function Yi(n){return function(){return n}}function Wd(n,e){return n==null||n!==n?e:n}var Dd=Of(),Pd=Of(!0);function wn(n){return n}function Xi(n){return ff(typeof n=="function"?n:Wn(n,zn))}function Bd(n){return lf(Wn(n,zn))}function Nd(n,e){return af(n,Wn(e,zn))}var Fd=R(function(n,e){return function(t){return vt(t,n,e)}}),Ud=R(function(n,e){return function(t){return vt(n,t,e)}});function Ji(n,e,t){var r=rn(e),i=kt(e,r);t==null&&!(Z(e)&&(i.length||!r.length))&&(t=e,e=n,n=this,i=kt(e,rn(e)));var f=!(Z(t)&&"chain"in t)||!!t.chain,o=ie(n);return On(i,function(a){var c=e[a];n[a]=c,o&&(n.prototype[a]=function(){var d=this.__chain__;if(f||d){var p=n(this.__wrapped__),_=p.__actions__=pn(this.__actions__);return _.push({func:c,args:arguments,thisArg:n}),p.__chain__=d,p}return c.apply(n,he([this.value()],arguments))})}),n}function Hd(){return fn._===this&&(fn._=ha),this}function Qi(){}function Gd(n){return n=L(n),R(function(e){return sf(e,n)})}var $d=Li(K),qd=Li(Ou),Kd=Li(kr);function Ro(n){return Di(n)?jr(Vn(n)):ms(n)}function Zd(n){return function(e){return n==null?l:be(n,e)}}var zd=bf(),Yd=bf(!0);function Vi(){return[]}function ki(){return!1}function Xd(){return{}}function Jd(){return""}function Qd(){return!0}function Vd(n,e){if(n=L(n),n<1||n>Xn)return[];var t=Sn,r=ln(n,Sn);e=A(e),n-=Sn;for(var i=ti(r,e);++t<n;)e(t);return i}function kd(n){return C(n)?K(n,Vn):Tn(n)?[n]:pn(Xf(B(n)))}function jd(n){var e=++sa;return B(n)+e}var np=ir(function(n,e){return n+e},0),ep=Si("ceil"),tp=ir(function(n,e){return n/e},1),rp=Si("floor");function ip(n){return n&&n.length?Vt(n,wn,gi):l}function up(n,e){return n&&n.length?Vt(n,A(e,2),gi):l}function fp(n){return Wu(n,wn)}function op(n,e){return Wu(n,A(e,2))}function lp(n){return n&&n.length?Vt(n,wn,vi):l}function ap(n,e){return n&&n.length?Vt(n,A(e,2),vi):l}var sp=ir(function(n,e){return n*e},1),cp=Si("round"),hp=ir(function(n,e){return n-e},0);function gp(n){return n&&n.length?ei(n,wn):0}function dp(n,e){return n&&n.length?ei(n,A(e,2)):0}return u.after=Bh,u.ary=uo,u.assign=Eg,u.assignIn=mo,u.assignInWith=vr,u.assignWith=Ig,u.at=Tg,u.before=fo,u.bind=Hi,u.bindAll=Od,u.bindKey=oo,u.castArray=Xh,u.chain=to,u.chunk=rc,u.compact=ic,u.concat=uc,u.cond=Md,u.conforms=bd,u.constant=Yi,u.countBy=gh,u.create=Cg,u.curry=lo,u.curryRight=ao,u.debounce=so,u.defaults=Lg,u.defaultsDeep=Sg,u.defer=Nh,u.delay=Fh,u.difference=fc,u.differenceBy=oc,u.differenceWith=lc,u.drop=ac,u.dropRight=sc,u.dropRightWhile=cc,u.dropWhile=hc,u.fill=gc,u.filter=ph,u.flatMap=wh,u.flatMapDeep=xh,u.flatMapDepth=mh,u.flatten=kf,u.flattenDeep=dc,u.flattenDepth=pc,u.flip=Uh,u.flow=Dd,u.flowRight=Pd,u.fromPairs=_c,u.functions=Pg,u.functionsIn=Bg,u.groupBy=Ah,u.initial=wc,u.intersection=xc,u.intersectionBy=mc,u.intersectionWith=Ac,u.invert=Fg,u.invertBy=Ug,u.invokeMap=Eh,u.iteratee=Xi,u.keyBy=Ih,u.keys=rn,u.keysIn=vn,u.map=cr,u.mapKeys=Gg,u.mapValues=$g,u.matches=Bd,u.matchesProperty=Nd,u.memoize=gr,u.merge=qg,u.mergeWith=Ao,u.method=Fd,u.methodOf=Ud,u.mixin=Ji,u.negate=dr,u.nthArg=Gd,u.omit=Kg,u.omitBy=Zg,u.once=Hh,u.orderBy=Th,u.over=$d,u.overArgs=Gh,u.overEvery=qd,u.overSome=Kd,u.partial=Gi,u.partialRight=co,u.partition=Ch,u.pick=zg,u.pickBy=yo,u.property=Ro,u.propertyOf=Zd,u.pull=Tc,u.pullAll=no,u.pullAllBy=Cc,u.pullAllWith=Lc,u.pullAt=Sc,u.range=zd,u.rangeRight=Yd,u.rearg=$h,u.reject=Rh,u.remove=Rc,u.rest=qh,u.reverse=Fi,u.sampleSize=Mh,u.set=Xg,u.setWith=Jg,u.shuffle=bh,u.slice=Oc,u.sortBy=Ph,u.sortedUniq=Nc,u.sortedUniqBy=Fc,u.split=wd,u.spread=Kh,u.tail=Uc,u.take=Hc,u.takeRight=Gc,u.takeRightWhile=$c,u.takeWhile=qc,u.tap=ih,u.throttle=Zh,u.thru=sr,u.toArray=vo,u.toPairs=Eo,u.toPairsIn=Io,u.toPath=kd,u.toPlainObject=xo,u.transform=Qg,u.unary=zh,u.union=Kc,u.unionBy=Zc,u.unionWith=zc,u.uniq=Yc,u.uniqBy=Xc,u.uniqWith=Jc,u.unset=Vg,u.unzip=Ui,u.unzipWith=eo,u.update=kg,u.updateWith=jg,u.values=rt,u.valuesIn=nd,u.without=Qc,u.words=Lo,u.wrap=Yh,u.xor=Vc,u.xorBy=kc,u.xorWith=jc,u.zip=nh,u.zipObject=eh,u.zipObjectDeep=th,u.zipWith=rh,u.entries=Eo,u.entriesIn=Io,u.extend=mo,u.extendWith=vr,Ji(u,u),u.add=np,u.attempt=So,u.camelCase=id,u.capitalize=To,u.ceil=ep,u.clamp=ed,u.clone=Jh,u.cloneDeep=Vh,u.cloneDeepWith=kh,u.cloneWith=Qh,u.conformsTo=jh,u.deburr=Co,u.defaultTo=Wd,u.divide=tp,u.endsWith=ud,u.eq=qn,u.escape=fd,u.escapeRegExp=od,u.every=dh,u.find=_h,u.findIndex=Qf,u.findKey=Rg,u.findLast=vh,u.findLastIndex=Vf,u.findLastKey=Og,u.floor=rp,u.forEach=ro,u.forEachRight=io,u.forIn=Mg,u.forInRight=bg,u.forOwn=Wg,u.forOwnRight=Dg,u.get=Ki,u.gt=ng,u.gte=eg,u.has=Ng,u.hasIn=Zi,u.head=jf,u.identity=wn,u.includes=yh,u.indexOf=vc,u.inRange=td,u.invoke=Hg,u.isArguments=Pe,u.isArray=C,u.isArrayBuffer=tg,u.isArrayLike=_n,u.isArrayLikeObject=Y,u.isBoolean=rg,u.isBuffer=xe,u.isDate=ig,u.isElement=ug,u.isEmpty=fg,u.isEqual=og,u.isEqualWith=lg,u.isError=$i,u.isFinite=ag,u.isFunction=ie,u.isInteger=ho,u.isLength=pr,u.isMap=go,u.isMatch=sg,u.isMatchWith=cg,u.isNaN=hg,u.isNative=gg,u.isNil=pg,u.isNull=dg,u.isNumber=po,u.isObject=Z,u.isObjectLike=z,u.isPlainObject=Et,u.isRegExp=qi,u.isSafeInteger=_g,u.isSet=_o,u.isString=_r,u.isSymbol=Tn,u.isTypedArray=tt,u.isUndefined=vg,u.isWeakMap=wg,u.isWeakSet=xg,u.join=yc,u.kebabCase=ld,u.last=Pn,u.lastIndexOf=Ec,u.lowerCase=ad,u.lowerFirst=sd,u.lt=mg,u.lte=Ag,u.max=ip,u.maxBy=up,u.mean=fp,u.meanBy=op,u.min=lp,u.minBy=ap,u.stubArray=Vi,u.stubFalse=ki,u.stubObject=Xd,u.stubString=Jd,u.stubTrue=Qd,u.multiply=sp,u.nth=Ic,u.noConflict=Hd,u.noop=Qi,u.now=hr,u.pad=cd,u.padEnd=hd,u.padStart=gd,u.parseInt=dd,u.random=rd,u.reduce=Lh,u.reduceRight=Sh,u.repeat=pd,u.replace=_d,u.result=Yg,u.round=cp,u.runInContext=s,u.sample=Oh,u.size=Wh,u.snakeCase=vd,u.some=Dh,u.sortedIndex=Mc,u.sortedIndexBy=bc,u.sortedIndexOf=Wc,u.sortedLastIndex=Dc,u.sortedLastIndexBy=Pc,u.sortedLastIndexOf=Bc,u.startCase=xd,u.startsWith=md,u.subtract=hp,u.sum=gp,u.sumBy=dp,u.template=Ad,u.times=Vd,u.toFinite=ue,u.toInteger=L,u.toLength=wo,u.toLower=yd,u.toNumber=Bn,u.toSafeInteger=yg,u.toString=B,u.toUpper=Ed,u.trim=Id,u.trimEnd=Td,u.trimStart=Cd,u.truncate=Ld,u.unescape=Sd,u.uniqueId=jd,u.upperCase=Rd,u.upperFirst=zi,u.each=ro,u.eachRight=io,u.first=jf,Ji(u,function(){var n={};return Jn(u,function(e,t){N.call(u.prototype,t)||(n[t]=e)}),n}(),{chain:!1}),u.VERSION=me,On(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){u[n].placeholder=u}),On(["drop","take"],function(n,e){M.prototype[n]=function(t){t=t===l?1:k(L(t),0);var r=this.__filtered__&&!e?new M(this):this.clone();return r.__filtered__?r.__takeCount__=ln(t,r.__takeCount__):r.__views__.push({size:ln(t,Sn),type:n+(r.__dir__<0?"Right":"")}),r},M.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),On(["filter","map","takeWhile"],function(n,e){var t=e+1,r=t==It||t==Cr;M.prototype[n]=function(i){var f=this.clone();return f.__iteratees__.push({iteratee:A(i,3),type:t}),f.__filtered__=f.__filtered__||r,f}}),On(["head","last"],function(n,e){var t="take"+(e?"Right":"");M.prototype[n]=function(){return this[t](1).value()[0]}}),On(["initial","tail"],function(n,e){var t="drop"+(e?"":"Right");M.prototype[n]=function(){return this.__filtered__?new M(this):this[t](1)}}),M.prototype.compact=function(){return this.filter(wn)},M.prototype.find=function(n){return this.filter(n).head()},M.prototype.findLast=function(n){return this.reverse().find(n)},M.prototype.invokeMap=R(function(n,e){return typeof n=="function"?new M(this):this.map(function(t){return vt(t,n,e)})}),M.prototype.reject=function(n){return this.filter(dr(A(n)))},M.prototype.slice=function(n,e){n=L(n);var t=this;return t.__filtered__&&(n>0||e<0)?new M(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==l&&(e=L(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},M.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},M.prototype.toArray=function(){return this.take(Sn)},Jn(M.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],f=r||/^find/.test(e);!i||(u.prototype[e]=function(){var o=this.__wrapped__,a=r?[1]:arguments,c=o instanceof M,d=a[0],p=c||C(o),_=function(O){var b=i.apply(u,he([O],a));return r&&v?b[0]:b};p&&t&&typeof d=="function"&&d.length!=1&&(c=p=!1);var v=this.__chain__,m=!!this.__actions__.length,y=f&&!v,S=c&&!m;if(!f&&p){o=S?o:new M(this);var E=n.apply(o,a);return E.__actions__.push({func:sr,args:[_],thisArg:l}),new bn(E,v)}return y&&S?n.apply(this,a):(E=this.thru(_),y?r?E.value()[0]:E.value():E)})}),On(["pop","push","shift","sort","splice","unshift"],function(n){var e=Bt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var f=this.value();return e.apply(C(f)?f:[],i)}return this[t](function(o){return e.apply(C(o)?o:[],i)})}}),Jn(M.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";N.call(Ve,r)||(Ve[r]=[]),Ve[r].push({name:e,func:t})}}),Ve[rr(l,T).name]=[{name:"wrapper",func:l}],M.prototype.clone=Sa,M.prototype.reverse=Ra,M.prototype.value=Oa,u.prototype.at=uh,u.prototype.chain=fh,u.prototype.commit=oh,u.prototype.next=lh,u.prototype.plant=sh,u.prototype.reverse=ch,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=hh,u.prototype.first=u.prototype.head,st&&(u.prototype[st]=ah),u},Xe=oa();Le?((Le.exports=Xe)._=Xe,Xr._=Xe):fn._=Xe}).call(it)})(xr,xr.exports);function Wo(dn,Zn){const l=F.ref(),{modelValue:me,originalText:Ae,options:mn,mode:q,theme:ut,autoHeight:Be,offsetLeft:oe,refreshAll:Ne,mouseTargetTypes:zn,editorDecorations:ye,comments:J,addCommentIcon:le,expandCommentIcon:Fe}=F.toRefs(dn);let U,T,nn,en,Nn,sn=[],Yn=new Map,un=[],ae=[],Fn=[],ft=!1;F.watch(ye,Ct,{deep:!0}),F.watch(J,()=>{Lt(),St()},{deep:!0}),F.watch(mn,()=>{Sn(),Sr()},{deep:!0}),F.watch(Ae,Ue),F.watch(ut,Un),F.watch(me,()=>{ft?ft=!1:It()}),F.onBeforeMount(()=>{window.devuiThemeService&&(en=window.devuiThemeService,en.eventBus&&en.eventBus.add("themeChanged",Un))}),F.onMounted(async()=>{wr&&(U=await import("monaco-editor"),Un(),yr(),q.value==="review"&&F.nextTick(()=>{Ct(),Lt(),St()}))});function yr(){q.value==="normal"||q.value==="review"?Er():q.value.includes("diff")&&Ir(),mn.value.theme||U.editor.setTheme(Nn),Xn(),Lr()}function Er(){T||(T=U.editor.create(l.value,mn.value),T.setModel(U.editor.createModel(me.value,mn.value.language)),Zn.emit("afterEditorInit",T),q.value==="review"&&(T.onMouseMove(Rr),T.onMouseLeave(se),T.onMouseDown(He)))}function Ir(){nn||(nn=U.editor.createDiffEditor(l.value,mn.value),nn.setModel({original:U.editor.createModel(Ae.value,mn.value.language),modified:U.editor.createModel(me.value,mn.value.language)}),Zn.emit("afterEditorInit",nn))}function It(){q.value==="normal"||q.value==="review"?Tr():q.value==="diff"&&Cr()}function Tr(){!T||!T.getModel()||T.getModel().setValue(me.value)}function Cr(){var w;!nn||!nn.getModel()||(w=nn.getModel().modified)==null||w.setValue(me.value)}function Un(){mn.value.theme||(ut.value==="light"?Nn=en&&en.currentTheme.isDark?"vs-dark":"vs":ut.value==="dark"&&(Nn=en&&en.currentTheme.isDark?"vs":"vs-dark"),T&&U.editor.setTheme(Nn))}function Xn(){Be.value&&T.onDidChangeModelDecorations(()=>{setTimeout(Tt)})}function Lr(){let w;T?w=T.getModel():nn&&(w=nn.getModel().modified),w.onDidChangeContent(xr.exports.throttle(()=>{ft=!0,Zn.emit("update: modelValue",w.getValue())},100))}function Ue(){var w;!nn||!nn.getModel()||(w=nn.getModel().original)==null||w.setValue(Ae.value)}function Sn(){const w=mn.value.language;if(T){if(q.value==="normal"||q.value==="review")U.editor.setModelLanguage(T.getModel(),w);else if(q.value==="diff"){const W=nn.getModel();U.editor.setModelLanguage(W.modified,w),U.editor.setModelLanguage(W.original,w)}}}function Sr(){T&&T.updateOptions(ji({},mn.value)),nn&&nn.updateOptions(ji({},mn.value))}function Tt(){var tn;const w=T.getOption(U.editor.EditorOption.lineHeight),W=((tn=T.getModel())==null?void 0:tn.getLineCount())||1,D=T.getTopForLineNumber(W+1)+w;l.value&&(l.value.style.height=`${D}px`),T.layout()}function Rr(w){if(w.target&&w.target.position){const W=w.target.position.lineNumber;if(Ie(W))Fn=T.deltaDecorations(Fn,[]);else{const D=[{range:new U.Range(W,0,W,0),options:{isWholeLine:!0,glyphMarginClassName:`icon-pointer ${le.value}`}}];Fn=T.deltaDecorations(Fn,D)}}}function se(){T.deltaDecorations(Fn,[])}function He(w){zn.value.includes(w.target.type)&&Zn.emit("click",w)}function Ct(){if(ye.value.length>=0&&T){const w=ye.value.map(Ee);setTimeout(()=>{ae=T.deltaDecorations(ae,w)}),Fn=T.deltaDecorations(Fn,[])}}function Ee(w){return{range:new U.Range(w.lineNumber,1,w.lineNumber,1),options:{isWholeLine:!0,className:w.customClasses||"",glyphMarginClassName:`icon-pointer ${w.icon||Fe.value} ${w.glyphClassName||""}`}}}function Ie(w){return ye.value.some(W=>W.lineNumber===w)}function Lt(){T&&T.changeViewZones(w=>{Ge(w),$e(w),Be.value&&Tt()})}function Ge(w){sn.length>0&&(sn.forEach(W=>{w.removeZone(W.id)}),sn=[],Yn=new Map)}function $e(w){J.value&&J.value.length&&J.value.filter(D=>D.isExpanded).forEach(D=>{const tn=w.addZone({afterLineNumber:D.lineNumber,heightInPx:D.heightInPx?D.heightInPx:0,afterColumn:1,domNode:document.createElement("div"),onDomNodeTop:Q=>{ot(D.lineNumber,{top:Q})},onComputedHeight:Q=>{ot(D.lineNumber,{height:Q})}});sn.push({lineNumber:D.lineNumber,id:tn})})}function ot(w,...W){const D=J.value.findIndex(Mr=>Mr.lineNumber===w),tn=T.getLayoutInfo(),Q=An(W,tn,D);Q.height&&Yn.set(D,Q.height),J.value[D].domNode.style.width=`${tn.width-Q.minimapWidth-Q.offsetLeft}px`,Te(Q.top,Q.height,D)}function An(w,W,D){let tn=0;const Q=J.value[D].offsetLeft;return Q?tn=Q:tn=(oe==null?void 0:oe.value)?oe==null?void 0:oe.value:0,{top:w[0].top,height:w[0].height,minimapWidth:W.minimap.minimapWidth,offsetLeft:tn}}function Te(w,W,D){J.value[D].domNode.style.height=`${W}px`,Yn.get(D)===0?J.value[D].domNode.style.top=`-${1e4+w}px`:J.value[D].domNode.style.top=`${w}px`}function St(){T&&Hn()}function Hn(){Ne.value?Or():Rt();const w=J.value.filter(W=>W.isExpanded);w==null||w.forEach(W=>{if(un.findIndex(tn=>tn.lineNumber===W.lineNumber)===-1){const tn=Ce(W);un.push({lineNumber:W.lineNumber,widget:tn}),T.addOverlayWidget(tn)}})}function Rt(){J.value.forEach(w=>{if(!w.isExpanded){const W=un.findIndex(D=>D.lineNumber===w.lineNumber);if(W!==-1){const D=un.splice(W,1)[0];T.removeOverlayWidget(D.widget)}}})}function Or(){un.length>0&&(un.forEach(w=>{T.removeOverlayWidget(w.widget)}),un=[])}function Ce(w){return{getId:()=>`widget-lineNumber${w.lineNumber}`,getDomNode:()=>w.domNode,getPosition:()=>null}}return{editorEl:l}}var wp="",mr=F.defineComponent({name:"DCodeEditor",props:xn,emits:["update: modelValue","afterEditorInit","click"],setup(dn,Zn){const{editorEl:l}=Wo(dn,Zn);return()=>F.createVNode("div",{ref:l,class:"devui-code-editor"},null)}});let Ar;const Do={async mounted(dn){wr&&(Ar=await import("monaco-editor"),Ar.editor.colorizeElement(dn))},updated(dn){wr&&Ar.editor.colorizeElement(dn)}};var Po={title:"Code Editor \u4EE3\u7801\u7F16\u8F91\u5668",category:"\u6F14\u8FDB\u4E2D",status:"100%",install(dn){dn.directive("d-code-highlight",Do),dn.component(mr.name,mr)}};j.CodeEditor=mr,j.codeEditorProps=xn,j.default=Po,Object.defineProperty(j,"__esModule",{value:!0}),j[Symbol.toStringTag]="Module"});
|
|
27
|
+
}`;var S=So(function(){return P(f,m+"return "+_).apply(l,o)});if(S.source=_,$i(S))throw S;return S}function yd(n){return B(n).toLowerCase()}function Ed(n){return B(n).toUpperCase()}function Id(n,e,t){if(n=B(n),n&&(t||e===l))return Pu(n);if(!n||!(e=In(e)))return n;var r=Gn(n),i=Gn(e),f=Bu(r,i),o=Nu(r,i)+1;return we(r,f,o).join("")}function Td(n,e,t){if(n=B(n),n&&(t||e===l))return n.slice(0,Uu(n)+1);if(!n||!(e=In(e)))return n;var r=Gn(n),i=Nu(r,Gn(e))+1;return we(r,0,i).join("")}function Cd(n,e,t){if(n=B(n),n&&(t||e===l))return n.replace($r,"");if(!n||!(e=In(e)))return n;var r=Gn(n),i=Bu(r,Gn(e));return we(r,i).join("")}function Ld(n,e){var t=ft,r=yr;if(Z(e)){var i="separator"in e?e.separator:i;t="length"in e?L(e.length):t,r="omission"in e?In(e.omission):r}n=B(n);var f=n.length;if(ze(n)){var o=Gn(n);f=o.length}if(t>=f)return n;var a=t-Ye(r);if(a<1)return r;var c=o?we(o,0,a).join(""):n.slice(0,a);if(i===l)return c+r;if(o&&(a+=c.length-a),qi(i)){if(n.slice(a).search(i)){var d,p=c;for(i.global||(i=ui(i.source,B(ru.exec(i))+"g")),i.lastIndex=0;d=i.exec(p);)var _=d.index;c=c.slice(0,_===l?a:_)}}else if(n.indexOf(In(i),a)!=a){var v=c.lastIndexOf(i);v>-1&&(c=c.slice(0,v))}return c+r}function Sd(n){return n=B(n),n&&Uo.test(n)?n.replace(nu,ra):n}var Rd=nt(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),zi=Sf("toUpperCase");function Lo(n,e,t){return n=B(n),e=t?l:e,e===l?kl(n)?fa(n):ql(n):n.match(e)||[]}var So=R(function(n,e){try{return yn(n,l,e)}catch(t){return $i(t)?t:new I(t)}}),Od=te(function(n,e){return On(e,function(t){t=Vn(t),ne(n,t,Hi(n[t],n))}),n});function Md(n){var e=n==null?0:n.length,t=A();return n=e?K(n,function(r){if(typeof r[1]!="function")throw new Mn(q);return[t(r[0]),r[1]]}):[],R(function(r){for(var i=-1;++i<e;){var f=n[i];if(yn(f[0],this,r))return yn(f[1],this,r)}})}function bd(n){return rs(Wn(n,zn))}function Yi(n){return function(){return n}}function Wd(n,e){return n==null||n!==n?e:n}var Dd=Of(),Pd=Of(!0);function wn(n){return n}function Xi(n){return ff(typeof n=="function"?n:Wn(n,zn))}function Bd(n){return lf(Wn(n,zn))}function Nd(n,e){return af(n,Wn(e,zn))}var Fd=R(function(n,e){return function(t){return vt(t,n,e)}}),Ud=R(function(n,e){return function(t){return vt(n,t,e)}});function Ji(n,e,t){var r=rn(e),i=kt(e,r);t==null&&!(Z(e)&&(i.length||!r.length))&&(t=e,e=n,n=this,i=kt(e,rn(e)));var f=!(Z(t)&&"chain"in t)||!!t.chain,o=ie(n);return On(i,function(a){var c=e[a];n[a]=c,o&&(n.prototype[a]=function(){var d=this.__chain__;if(f||d){var p=n(this.__wrapped__),_=p.__actions__=pn(this.__actions__);return _.push({func:c,args:arguments,thisArg:n}),p.__chain__=d,p}return c.apply(n,he([this.value()],arguments))})}),n}function Hd(){return fn._===this&&(fn._=ha),this}function Qi(){}function Gd(n){return n=L(n),R(function(e){return sf(e,n)})}var $d=Li(K),qd=Li(Ou),Kd=Li(kr);function Ro(n){return Di(n)?jr(Vn(n)):ms(n)}function Zd(n){return function(e){return n==null?l:be(n,e)}}var zd=bf(),Yd=bf(!0);function Vi(){return[]}function ki(){return!1}function Xd(){return{}}function Jd(){return""}function Qd(){return!0}function Vd(n,e){if(n=L(n),n<1||n>Xn)return[];var t=Sn,r=ln(n,Sn);e=A(e),n-=Sn;for(var i=ti(r,e);++t<n;)e(t);return i}function kd(n){return C(n)?K(n,Vn):Tn(n)?[n]:pn(Xf(B(n)))}function jd(n){var e=++sa;return B(n)+e}var np=ir(function(n,e){return n+e},0),ep=Si("ceil"),tp=ir(function(n,e){return n/e},1),rp=Si("floor");function ip(n){return n&&n.length?Vt(n,wn,gi):l}function up(n,e){return n&&n.length?Vt(n,A(e,2),gi):l}function fp(n){return Wu(n,wn)}function op(n,e){return Wu(n,A(e,2))}function lp(n){return n&&n.length?Vt(n,wn,vi):l}function ap(n,e){return n&&n.length?Vt(n,A(e,2),vi):l}var sp=ir(function(n,e){return n*e},1),cp=Si("round"),hp=ir(function(n,e){return n-e},0);function gp(n){return n&&n.length?ei(n,wn):0}function dp(n,e){return n&&n.length?ei(n,A(e,2)):0}return u.after=Bh,u.ary=uo,u.assign=Eg,u.assignIn=mo,u.assignInWith=vr,u.assignWith=Ig,u.at=Tg,u.before=fo,u.bind=Hi,u.bindAll=Od,u.bindKey=oo,u.castArray=Xh,u.chain=to,u.chunk=rc,u.compact=ic,u.concat=uc,u.cond=Md,u.conforms=bd,u.constant=Yi,u.countBy=gh,u.create=Cg,u.curry=lo,u.curryRight=ao,u.debounce=so,u.defaults=Lg,u.defaultsDeep=Sg,u.defer=Nh,u.delay=Fh,u.difference=fc,u.differenceBy=oc,u.differenceWith=lc,u.drop=ac,u.dropRight=sc,u.dropRightWhile=cc,u.dropWhile=hc,u.fill=gc,u.filter=ph,u.flatMap=wh,u.flatMapDeep=xh,u.flatMapDepth=mh,u.flatten=kf,u.flattenDeep=dc,u.flattenDepth=pc,u.flip=Uh,u.flow=Dd,u.flowRight=Pd,u.fromPairs=_c,u.functions=Pg,u.functionsIn=Bg,u.groupBy=Ah,u.initial=wc,u.intersection=xc,u.intersectionBy=mc,u.intersectionWith=Ac,u.invert=Fg,u.invertBy=Ug,u.invokeMap=Eh,u.iteratee=Xi,u.keyBy=Ih,u.keys=rn,u.keysIn=vn,u.map=cr,u.mapKeys=Gg,u.mapValues=$g,u.matches=Bd,u.matchesProperty=Nd,u.memoize=gr,u.merge=qg,u.mergeWith=Ao,u.method=Fd,u.methodOf=Ud,u.mixin=Ji,u.negate=dr,u.nthArg=Gd,u.omit=Kg,u.omitBy=Zg,u.once=Hh,u.orderBy=Th,u.over=$d,u.overArgs=Gh,u.overEvery=qd,u.overSome=Kd,u.partial=Gi,u.partialRight=co,u.partition=Ch,u.pick=zg,u.pickBy=yo,u.property=Ro,u.propertyOf=Zd,u.pull=Tc,u.pullAll=no,u.pullAllBy=Cc,u.pullAllWith=Lc,u.pullAt=Sc,u.range=zd,u.rangeRight=Yd,u.rearg=$h,u.reject=Rh,u.remove=Rc,u.rest=qh,u.reverse=Fi,u.sampleSize=Mh,u.set=Xg,u.setWith=Jg,u.shuffle=bh,u.slice=Oc,u.sortBy=Ph,u.sortedUniq=Nc,u.sortedUniqBy=Fc,u.split=wd,u.spread=Kh,u.tail=Uc,u.take=Hc,u.takeRight=Gc,u.takeRightWhile=$c,u.takeWhile=qc,u.tap=ih,u.throttle=Zh,u.thru=sr,u.toArray=vo,u.toPairs=Eo,u.toPairsIn=Io,u.toPath=kd,u.toPlainObject=xo,u.transform=Qg,u.unary=zh,u.union=Kc,u.unionBy=Zc,u.unionWith=zc,u.uniq=Yc,u.uniqBy=Xc,u.uniqWith=Jc,u.unset=Vg,u.unzip=Ui,u.unzipWith=eo,u.update=kg,u.updateWith=jg,u.values=rt,u.valuesIn=nd,u.without=Qc,u.words=Lo,u.wrap=Yh,u.xor=Vc,u.xorBy=kc,u.xorWith=jc,u.zip=nh,u.zipObject=eh,u.zipObjectDeep=th,u.zipWith=rh,u.entries=Eo,u.entriesIn=Io,u.extend=mo,u.extendWith=vr,Ji(u,u),u.add=np,u.attempt=So,u.camelCase=id,u.capitalize=To,u.ceil=ep,u.clamp=ed,u.clone=Jh,u.cloneDeep=Vh,u.cloneDeepWith=kh,u.cloneWith=Qh,u.conformsTo=jh,u.deburr=Co,u.defaultTo=Wd,u.divide=tp,u.endsWith=ud,u.eq=qn,u.escape=fd,u.escapeRegExp=od,u.every=dh,u.find=_h,u.findIndex=Qf,u.findKey=Rg,u.findLast=vh,u.findLastIndex=Vf,u.findLastKey=Og,u.floor=rp,u.forEach=ro,u.forEachRight=io,u.forIn=Mg,u.forInRight=bg,u.forOwn=Wg,u.forOwnRight=Dg,u.get=Ki,u.gt=ng,u.gte=eg,u.has=Ng,u.hasIn=Zi,u.head=jf,u.identity=wn,u.includes=yh,u.indexOf=vc,u.inRange=td,u.invoke=Hg,u.isArguments=Pe,u.isArray=C,u.isArrayBuffer=tg,u.isArrayLike=_n,u.isArrayLikeObject=Y,u.isBoolean=rg,u.isBuffer=xe,u.isDate=ig,u.isElement=ug,u.isEmpty=fg,u.isEqual=og,u.isEqualWith=lg,u.isError=$i,u.isFinite=ag,u.isFunction=ie,u.isInteger=ho,u.isLength=pr,u.isMap=go,u.isMatch=sg,u.isMatchWith=cg,u.isNaN=hg,u.isNative=gg,u.isNil=pg,u.isNull=dg,u.isNumber=po,u.isObject=Z,u.isObjectLike=z,u.isPlainObject=Et,u.isRegExp=qi,u.isSafeInteger=_g,u.isSet=_o,u.isString=_r,u.isSymbol=Tn,u.isTypedArray=tt,u.isUndefined=vg,u.isWeakMap=wg,u.isWeakSet=xg,u.join=yc,u.kebabCase=ld,u.last=Pn,u.lastIndexOf=Ec,u.lowerCase=ad,u.lowerFirst=sd,u.lt=mg,u.lte=Ag,u.max=ip,u.maxBy=up,u.mean=fp,u.meanBy=op,u.min=lp,u.minBy=ap,u.stubArray=Vi,u.stubFalse=ki,u.stubObject=Xd,u.stubString=Jd,u.stubTrue=Qd,u.multiply=sp,u.nth=Ic,u.noConflict=Hd,u.noop=Qi,u.now=hr,u.pad=cd,u.padEnd=hd,u.padStart=gd,u.parseInt=dd,u.random=rd,u.reduce=Lh,u.reduceRight=Sh,u.repeat=pd,u.replace=_d,u.result=Yg,u.round=cp,u.runInContext=s,u.sample=Oh,u.size=Wh,u.snakeCase=vd,u.some=Dh,u.sortedIndex=Mc,u.sortedIndexBy=bc,u.sortedIndexOf=Wc,u.sortedLastIndex=Dc,u.sortedLastIndexBy=Pc,u.sortedLastIndexOf=Bc,u.startCase=xd,u.startsWith=md,u.subtract=hp,u.sum=gp,u.sumBy=dp,u.template=Ad,u.times=Vd,u.toFinite=ue,u.toInteger=L,u.toLength=wo,u.toLower=yd,u.toNumber=Bn,u.toSafeInteger=yg,u.toString=B,u.toUpper=Ed,u.trim=Id,u.trimEnd=Td,u.trimStart=Cd,u.truncate=Ld,u.unescape=Sd,u.uniqueId=jd,u.upperCase=Rd,u.upperFirst=zi,u.each=ro,u.eachRight=io,u.first=jf,Ji(u,function(){var n={};return Jn(u,function(e,t){N.call(u.prototype,t)||(n[t]=e)}),n}(),{chain:!1}),u.VERSION=me,On(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){u[n].placeholder=u}),On(["drop","take"],function(n,e){M.prototype[n]=function(t){t=t===l?1:k(L(t),0);var r=this.__filtered__&&!e?new M(this):this.clone();return r.__filtered__?r.__takeCount__=ln(t,r.__takeCount__):r.__views__.push({size:ln(t,Sn),type:n+(r.__dir__<0?"Right":"")}),r},M.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),On(["filter","map","takeWhile"],function(n,e){var t=e+1,r=t==It||t==Cr;M.prototype[n]=function(i){var f=this.clone();return f.__iteratees__.push({iteratee:A(i,3),type:t}),f.__filtered__=f.__filtered__||r,f}}),On(["head","last"],function(n,e){var t="take"+(e?"Right":"");M.prototype[n]=function(){return this[t](1).value()[0]}}),On(["initial","tail"],function(n,e){var t="drop"+(e?"":"Right");M.prototype[n]=function(){return this.__filtered__?new M(this):this[t](1)}}),M.prototype.compact=function(){return this.filter(wn)},M.prototype.find=function(n){return this.filter(n).head()},M.prototype.findLast=function(n){return this.reverse().find(n)},M.prototype.invokeMap=R(function(n,e){return typeof n=="function"?new M(this):this.map(function(t){return vt(t,n,e)})}),M.prototype.reject=function(n){return this.filter(dr(A(n)))},M.prototype.slice=function(n,e){n=L(n);var t=this;return t.__filtered__&&(n>0||e<0)?new M(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==l&&(e=L(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},M.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},M.prototype.toArray=function(){return this.take(Sn)},Jn(M.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],f=r||/^find/.test(e);!i||(u.prototype[e]=function(){var o=this.__wrapped__,a=r?[1]:arguments,c=o instanceof M,d=a[0],p=c||C(o),_=function(O){var b=i.apply(u,he([O],a));return r&&v?b[0]:b};p&&t&&typeof d=="function"&&d.length!=1&&(c=p=!1);var v=this.__chain__,m=!!this.__actions__.length,y=f&&!v,S=c&&!m;if(!f&&p){o=S?o:new M(this);var E=n.apply(o,a);return E.__actions__.push({func:sr,args:[_],thisArg:l}),new bn(E,v)}return y&&S?n.apply(this,a):(E=this.thru(_),y?r?E.value()[0]:E.value():E)})}),On(["pop","push","shift","sort","splice","unshift"],function(n){var e=Bt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var f=this.value();return e.apply(C(f)?f:[],i)}return this[t](function(o){return e.apply(C(o)?o:[],i)})}}),Jn(M.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";N.call(Ve,r)||(Ve[r]=[]),Ve[r].push({name:e,func:t})}}),Ve[rr(l,T).name]=[{name:"wrapper",func:l}],M.prototype.clone=Sa,M.prototype.reverse=Ra,M.prototype.value=Oa,u.prototype.at=uh,u.prototype.chain=fh,u.prototype.commit=oh,u.prototype.next=lh,u.prototype.plant=sh,u.prototype.reverse=ch,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=hh,u.prototype.first=u.prototype.head,st&&(u.prototype[st]=ah),u},Xe=oa();Le?((Le.exports=Xe)._=Xe,Xr._=Xe):fn._=Xe}).call(it)})(xr,xr.exports);function Wo(dn,Zn){const l=F.ref(),{modelValue:me,originalText:Ae,options:mn,mode:q,theme:ut,autoHeight:Be,offsetLeft:oe,refreshAll:Ne,mouseTargetTypes:zn,editorDecorations:ye,comments:J,addCommentIcon:le,expandCommentIcon:Fe}=F.toRefs(dn);let U,T,nn,en,Nn,sn=[],Yn=new Map,un=[],ae=[],Fn=[],ft=!1;F.watch(ye,Ct,{deep:!0}),F.watch(J,()=>{Lt(),St()},{deep:!0}),F.watch(mn,()=>{Sn(),Sr()},{deep:!0}),F.watch(Ae,Ue),F.watch(ut,Un),F.watch(me,()=>{ft?ft=!1:It()}),F.onBeforeMount(()=>{window.devuiThemeService&&(en=window.devuiThemeService,en.eventBus&&en.eventBus.add("themeChanged",Un))}),F.onMounted(async()=>{wr&&(U=await import("monaco-editor"),Un(),yr(),q.value==="review"&&F.nextTick(()=>{Ct(),Lt(),St()}))});function yr(){q.value==="normal"||q.value==="review"?Er():q.value.includes("diff")&&Ir(),mn.value.theme||U.editor.setTheme(Nn),Xn(),Lr()}function Er(){T||(T=U.editor.create(l.value,mn.value),T.setModel(U.editor.createModel(me.value,mn.value.language)),Zn.emit("afterEditorInit",T),q.value==="review"&&(T.onMouseMove(Rr),T.onMouseLeave(se),T.onMouseDown(He)))}function Ir(){nn||(nn=U.editor.createDiffEditor(l.value,mn.value),nn.setModel({original:U.editor.createModel(Ae.value,mn.value.language),modified:U.editor.createModel(me.value,mn.value.language)}),Zn.emit("afterEditorInit",nn))}function It(){q.value==="normal"||q.value==="review"?Tr():q.value==="diff"&&Cr()}function Tr(){!T||!T.getModel()||T.getModel().setValue(me.value)}function Cr(){var w;!nn||!nn.getModel()||(w=nn.getModel().modified)==null||w.setValue(me.value)}function Un(){mn.value.theme||(ut.value==="light"?Nn=en&&en.currentTheme.isDark?"vs-dark":"vs":ut.value==="dark"&&(Nn=en&&en.currentTheme.isDark?"vs":"vs-dark"),T&&U.editor.setTheme(Nn))}function Xn(){Be.value&&T.onDidChangeModelDecorations(()=>{setTimeout(Tt)})}function Lr(){let w;T?w=T.getModel():nn&&(w=nn.getModel().modified),w==null||w.onDidChangeContent(xr.exports.throttle(()=>{ft=!0,Zn.emit("update:modelValue",w.getValue())},100))}function Ue(){var w;!nn||!nn.getModel()||(w=nn.getModel().original)==null||w.setValue(Ae.value)}function Sn(){const w=mn.value.language;if(T){if(q.value==="normal"||q.value==="review")U.editor.setModelLanguage(T.getModel(),w);else if(q.value==="diff"){const W=nn.getModel();U.editor.setModelLanguage(W.modified,w),U.editor.setModelLanguage(W.original,w)}}}function Sr(){T&&T.updateOptions(ji({},mn.value)),nn&&nn.updateOptions(ji({},mn.value))}function Tt(){var tn;const w=T.getOption(U.editor.EditorOption.lineHeight),W=((tn=T.getModel())==null?void 0:tn.getLineCount())||1,D=T.getTopForLineNumber(W+1)+w;l.value&&(l.value.style.height=`${D}px`),T.layout()}function Rr(w){if(w.target&&w.target.position){const W=w.target.position.lineNumber;if(Ie(W))Fn=T.deltaDecorations(Fn,[]);else{const D=[{range:new U.Range(W,0,W,0),options:{isWholeLine:!0,glyphMarginClassName:`icon-pointer ${le.value}`}}];Fn=T.deltaDecorations(Fn,D)}}}function se(){T.deltaDecorations(Fn,[])}function He(w){zn.value.includes(w.target.type)&&Zn.emit("click",w)}function Ct(){if(ye.value.length>=0&&T){const w=ye.value.map(Ee);setTimeout(()=>{ae=T.deltaDecorations(ae,w)}),Fn=T.deltaDecorations(Fn,[])}}function Ee(w){return{range:new U.Range(w.lineNumber,1,w.lineNumber,1),options:{isWholeLine:!0,className:w.customClasses||"",glyphMarginClassName:`icon-pointer ${w.icon||Fe.value} ${w.glyphClassName||""}`}}}function Ie(w){return ye.value.some(W=>W.lineNumber===w)}function Lt(){T&&T.changeViewZones(w=>{Ge(w),$e(w),Be.value&&Tt()})}function Ge(w){sn.length>0&&(sn.forEach(W=>{w.removeZone(W.id)}),sn=[],Yn=new Map)}function $e(w){J.value&&J.value.length&&J.value.filter(D=>D.isExpanded).forEach(D=>{const tn=w.addZone({afterLineNumber:D.lineNumber,heightInPx:D.heightInPx?D.heightInPx:0,afterColumn:1,domNode:document.createElement("div"),onDomNodeTop:Q=>{ot(D.lineNumber,{top:Q})},onComputedHeight:Q=>{ot(D.lineNumber,{height:Q})}});sn.push({lineNumber:D.lineNumber,id:tn})})}function ot(w,...W){const D=J.value.findIndex(Mr=>Mr.lineNumber===w),tn=T.getLayoutInfo(),Q=An(W,tn,D);Q.height&&Yn.set(D,Q.height),J.value[D].domNode.style.width=`${tn.width-Q.minimapWidth-Q.offsetLeft}px`,Te(Q.top,Q.height,D)}function An(w,W,D){let tn=0;const Q=J.value[D].offsetLeft;return Q?tn=Q:tn=(oe==null?void 0:oe.value)?oe==null?void 0:oe.value:0,{top:w[0].top,height:w[0].height,minimapWidth:W.minimap.minimapWidth,offsetLeft:tn}}function Te(w,W,D){J.value[D].domNode.style.height=`${W}px`,Yn.get(D)===0?J.value[D].domNode.style.top=`-${1e4+w}px`:J.value[D].domNode.style.top=`${w}px`}function St(){T&&Hn()}function Hn(){Ne.value?Or():Rt();const w=J.value.filter(W=>W.isExpanded);w==null||w.forEach(W=>{if(un.findIndex(tn=>tn.lineNumber===W.lineNumber)===-1){const tn=Ce(W);un.push({lineNumber:W.lineNumber,widget:tn}),T.addOverlayWidget(tn)}})}function Rt(){J.value.forEach(w=>{if(!w.isExpanded){const W=un.findIndex(D=>D.lineNumber===w.lineNumber);if(W!==-1){const D=un.splice(W,1)[0];T.removeOverlayWidget(D.widget)}}})}function Or(){un.length>0&&(un.forEach(w=>{T.removeOverlayWidget(w.widget)}),un=[])}function Ce(w){return{getId:()=>`widget-lineNumber${w.lineNumber}`,getDomNode:()=>w.domNode,getPosition:()=>null}}return{editorEl:l}}var wp="",mr=F.defineComponent({name:"DCodeEditor",props:xn,emits:["update:modelValue","afterEditorInit","click"],setup(dn,Zn){const{editorEl:l}=Wo(dn,Zn);return()=>F.createVNode("div",{ref:l,class:"devui-code-editor"},null)}});let Ar;const Do={async mounted(dn){wr&&(Ar=await import("monaco-editor"),Ar.editor.colorizeElement(dn))},updated(dn){wr&&Ar.editor.colorizeElement(dn)}};var Po={title:"Code Editor \u4EE3\u7801\u7F16\u8F91\u5668",category:"\u6F14\u8FDB\u4E2D",status:"100%",install(dn){dn.directive("d-code-highlight",Do),dn.component(mr.name,mr)}};j.CodeEditor=mr,j.codeEditorProps=xn,j.default=Po,Object.defineProperty(j,"__esModule",{value:!0}),j[Symbol.toStringTag]="Module"});
|
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { IconPropsType } from
|
|
1
|
+
import type { IconPropsType } from '../avatar-types';
|
|
2
2
|
export declare const IconBody: (props: IconPropsType) => JSX.Element;
|
|
@@ -51,7 +51,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
51
51
|
type: import("vue").PropType<import("./code-editor-types").Comment[]>;
|
|
52
52
|
default: () => never[];
|
|
53
53
|
};
|
|
54
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "click" | "
|
|
54
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "click" | "update:modelValue" | "afterEditorInit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
55
55
|
modelValue: {
|
|
56
56
|
type: StringConstructor;
|
|
57
57
|
default: string;
|
package/vue-devui.es.js
CHANGED
|
@@ -10614,7 +10614,9 @@ const IconBody = (props) => {
|
|
|
10614
10614
|
"cy": "15",
|
|
10615
10615
|
"r": "15"
|
|
10616
10616
|
}, null), createVNode("path", {
|
|
10617
|
-
"d":
|
|
10617
|
+
"d": `M14.9997866,16 C12.5145053,16 10.4997866,13.9852814 10.4997866, 11.5 C10.4997866,9.01471863 12.5145053,7 14.9997866,7
|
|
10618
|
+
C17.485068, 7 19.4997866,9.01471863 19.4997866,11.5 C19.4997866,13.9852814 17.485068, 16 14.9997866,16 Z M23,23 L7,22.998553
|
|
10619
|
+
C7,19.0122153 10.8892296, 16.5 14.9997866,16.5 C19.1103437,16.5 23,20 23,23 Z`,
|
|
10618
10620
|
"id": "\u5F62\u72B6\u7ED3\u5408",
|
|
10619
10621
|
"fill": "#FFFFFF"
|
|
10620
10622
|
}, null)])]);
|
|
@@ -10662,7 +10664,13 @@ const IconNobody = (props) => {
|
|
|
10662
10664
|
"fill": "none",
|
|
10663
10665
|
"fill-rule": "evenodd"
|
|
10664
10666
|
}, [createVNode("path", {
|
|
10665
|
-
"d":
|
|
10667
|
+
"d": `M22.31,19.2474562 L22.31,21.9974562 L20.81,21.9974562 L20.81, 19.2474562 L18.06,19.2474562 L18.06,17.7474562
|
|
10668
|
+
L20.81,17.7474562 L20.81, 14.9974562 L22.31,14.9974562 L22.31,17.7474562 L25.06,17.7474562 L25.06, 19.2474562
|
|
10669
|
+
L22.31,19.2474562 Z M14.9297866,14.9974562 C12.4445053, 14.9974562 10.4297866,12.9827376 10.4297866,10.4974562
|
|
10670
|
+
C10.4297866, 8.01217483 12.4445053,5.9974562 14.9297866,5.9974562 C17.415068, 5.9974562 19.4297866,8.01217483
|
|
10671
|
+
19.4297866,10.4974562 C19.4297866, 12.9827376 17.415068,14.9974562 14.9297866,14.9974562 Z M19.6797866, 20.2474562
|
|
10672
|
+
L19.6797866,21.9971623 L6.93,21.9960092 C6.93,18.0096715 10.8192296, 15.4974562 14.9297866,15.4974562 C16.4608397,15.4974562
|
|
10673
|
+
17.9612467,15.983021 19.2414296, 16.7474562 L17.06,16.7474562 L17.06,20.2474562 L19.6797866,20.2474562 Z`,
|
|
10666
10674
|
"id": "\u5F62\u72B6\u7ED3\u5408",
|
|
10667
10675
|
"fill": "#959EB2"
|
|
10668
10676
|
}, null), createVNode("path", {
|
|
@@ -13856,9 +13864,9 @@ function useCodeEditor(props, ctx2) {
|
|
|
13856
13864
|
} else if (diffEditor) {
|
|
13857
13865
|
model = diffEditor.getModel().modified;
|
|
13858
13866
|
}
|
|
13859
|
-
model.onDidChangeContent(lodash.exports.throttle(() => {
|
|
13867
|
+
model == null ? void 0 : model.onDidChangeContent(lodash.exports.throttle(() => {
|
|
13860
13868
|
modifyValueFromInner = true;
|
|
13861
|
-
ctx2.emit("update:
|
|
13869
|
+
ctx2.emit("update:modelValue", model.getValue());
|
|
13862
13870
|
}, 100));
|
|
13863
13871
|
}
|
|
13864
13872
|
function setDiffEditorOriginValue() {
|
|
@@ -14079,7 +14087,7 @@ var codeEditor = "";
|
|
|
14079
14087
|
var CodeEditor = defineComponent({
|
|
14080
14088
|
name: "DCodeEditor",
|
|
14081
14089
|
props: codeEditorProps,
|
|
14082
|
-
emits: ["update:
|
|
14090
|
+
emits: ["update:modelValue", "afterEditorInit", "click"],
|
|
14083
14091
|
setup(props, ctx2) {
|
|
14084
14092
|
const {
|
|
14085
14093
|
editorEl
|
|
@@ -42214,7 +42222,7 @@ const installs = [
|
|
|
42214
42222
|
VirtualListInstall
|
|
42215
42223
|
];
|
|
42216
42224
|
var vueDevui = {
|
|
42217
|
-
version: "1.5.7-hotfix.
|
|
42225
|
+
version: "1.5.7-hotfix.3",
|
|
42218
42226
|
install(app) {
|
|
42219
42227
|
installs.forEach((p) => app.use(p));
|
|
42220
42228
|
}
|