vue-mount-plugin 2.1.0 → 2.1.1

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.
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * vue-mount-plugin v2.1.0
2
+ * vue-mount-plugin v2.1.1
3
3
  * A simple and easy to use vue instance extension plugin that supports vue2.0 and vue3.0
4
4
  * (c) 2021-2023 saqqdy <saqqdy@qq.com>
5
5
  * Released under the MIT License.
6
6
  */
7
- this.VueMount = (function (vueDemi) {
7
+ this.VueMount = (function (require$$1) {
8
8
  'use strict';
9
9
 
10
10
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -981,6 +981,8 @@ this.VueMount = (function (vueDemi) {
981
981
  assign: assign
982
982
  });
983
983
 
984
+ var vueDemi = require$$1;
985
+
984
986
  var Mount = function () {
985
987
  function Mount(component, options) {
986
988
  if (options === void 0) {
@@ -1041,6 +1043,8 @@ this.VueMount = (function (vueDemi) {
1041
1043
  return Mount;
1042
1044
  }();
1043
1045
 
1044
- return Mount;
1046
+ var es5 = Mount;
1047
+
1048
+ return es5;
1045
1049
 
1046
1050
  })(VueDemi);
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * vue-mount-plugin v2.1.0
2
+ * vue-mount-plugin v2.1.1
3
3
  * A simple and easy to use vue instance extension plugin that supports vue2.0 and vue3.0
4
4
  * (c) 2021-2023 saqqdy <saqqdy@qq.com>
5
5
  * Released under the MIT License.
6
6
  */
7
- this.VueMount=function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")(),o={},i=function(t){try{return!!t()}catch(t){return!0}},u=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),a=c,f=Function.prototype.call,s=a?f.bind(f):function(){return f.apply(f,arguments)},l={},p={}.propertyIsEnumerable,y=Object.getOwnPropertyDescriptor,b=y&&!p.call({1:2},1);l.f=b?function(t){var e=y(this,t);return!!e&&e.enumerable}:p;var h,g,d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v=c,m=Function.prototype,O=m.call,S=v&&m.bind.bind(O,O),w=v?S:function(t){return function(){return O.apply(t,arguments)}},j=w,P=j({}.toString),E=j("".slice),M=i,N=function(t){return E(P(t),8,-1)},T=Object,x=w("".split),C=M((function(){return!T("z").propertyIsEnumerable(0)}))?function(t){return"String"==N(t)?x(t,""):T(t)}:T,D=function(t){return null==t},I=D,k=TypeError,F=function(t){if(I(t))throw k("Can't call method on "+t);return t},L=C,_=F,V=function(t){return L(_(t))},A="object"==typeof document&&document.all,z={all:A,IS_HTMLDDA:void 0===A&&void 0!==A},R=z.all,$=z.IS_HTMLDDA?function(t){return"function"==typeof t||t===R}:function(t){return"function"==typeof t},q=$,B=z.all,G=z.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:q(t)||t===B}:function(t){return"object"==typeof t?null!==t:q(t)},H=r,W=$,U=function(t){return W(t)?t:void 0},K=function(t,e){return arguments.length<2?U(H[t]):H[t]&&H[t][e]},X=w({}.isPrototypeOf),Y=r,J="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Q=Y.process,Z=Y.Deno,tt=Q&&Q.versions||Z&&Z.version,et=tt&&tt.v8;et&&(g=(h=et.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!g&&J&&(!(h=J.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=J.match(/Chrome\/(\d+)/))&&(g=+h[1]);var nt=g,rt=i,ot=!!Object.getOwnPropertySymbols&&!rt((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&nt&&nt<41})),it=ot&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ut=K,ct=$,at=X,ft=Object,st=it?function(t){return"symbol"==typeof t}:function(t){var e=ut("Symbol");return ct(e)&&at(e.prototype,ft(t))},lt=String,pt=$,yt=function(t){try{return lt(t)}catch(t){return"Object"}},bt=TypeError,ht=function(t){if(pt(t))return t;throw bt(yt(t)+" is not a function")},gt=D,dt=s,vt=$,mt=G,Ot=TypeError,St={},wt={get exports(){return St},set exports(t){St=t}},jt=r,Pt=Object.defineProperty,Et=function(t,e){try{Pt(jt,t,{value:e,configurable:!0,writable:!0})}catch(n){jt[t]=e}return e},Mt=Et,Nt="__core-js_shared__",Tt=r[Nt]||Mt(Nt,{}),xt=Tt;(wt.exports=function(t,e){return xt[t]||(xt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.29.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Ct=F,Dt=Object,It=function(t){return Dt(Ct(t))},kt=It,Ft=w({}.hasOwnProperty),Lt=Object.hasOwn||function(t,e){return Ft(kt(t),e)},_t=w,Vt=0,At=Math.random(),zt=_t(1..toString),Rt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+zt(++Vt+At,36)},$t=St,qt=Lt,Bt=Rt,Gt=ot,Ht=it,Wt=r.Symbol,Ut=$t("wks"),Kt=Ht?Wt.for||Wt:Wt&&Wt.withoutSetter||Bt,Xt=s,Yt=G,Jt=st,Qt=function(t,e){var n=t[e];return gt(n)?void 0:ht(n)},Zt=function(t,e){var n,r;if("string"===e&&vt(n=t.toString)&&!mt(r=dt(n,t)))return r;if(vt(n=t.valueOf)&&!mt(r=dt(n,t)))return r;if("string"!==e&&vt(n=t.toString)&&!mt(r=dt(n,t)))return r;throw Ot("Can't convert object to primitive value")},te=TypeError,ee=function(t){return qt(Ut,t)||(Ut[t]=Gt&&qt(Wt,t)?Wt[t]:Kt("Symbol."+t)),Ut[t]}("toPrimitive"),ne=function(t,e){if(!Yt(t)||Jt(t))return t;var n,r=Qt(t,ee);if(r){if(void 0===e&&(e="default"),n=Xt(r,t,e),!Yt(n)||Jt(n))return n;throw te("Can't convert object to primitive value")}return void 0===e&&(e="number"),Zt(t,e)},re=st,oe=function(t){var e=ne(t,"string");return re(e)?e:e+""},ie=G,ue=r.document,ce=ie(ue)&&ie(ue.createElement),ae=function(t){return ce?ue.createElement(t):{}},fe=!u&&!i((function(){return 7!=Object.defineProperty(ae("div"),"a",{get:function(){return 7}}).a})),se=u,le=s,pe=l,ye=d,be=V,he=oe,ge=Lt,de=fe,ve=Object.getOwnPropertyDescriptor;o.f=se?ve:function(t,e){if(t=be(t),e=he(e),de)try{return ve(t,e)}catch(t){}if(ge(t,e))return ye(!le(pe.f,t,e),t[e])};var me={},Oe=u&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Se=G,we=String,je=TypeError,Pe=function(t){if(Se(t))return t;throw je(we(t)+" is not an object")},Ee=u,Me=fe,Ne=Oe,Te=Pe,xe=oe,Ce=TypeError,De=Object.defineProperty,Ie=Object.getOwnPropertyDescriptor,ke="enumerable",Fe="configurable",Le="writable";me.f=Ee?Ne?function(t,e,n){if(Te(t),e=xe(e),Te(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Le in n&&!n[Le]){var r=Ie(t,e);r&&r[Le]&&(t[e]=n.value,n={configurable:Fe in n?n[Fe]:r[Fe],enumerable:ke in n?n[ke]:r[ke],writable:!1})}return De(t,e,n)}:De:function(t,e,n){if(Te(t),e=xe(e),Te(n),Me)try{return De(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Ce("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var _e=me,Ve=d,Ae=u?function(t,e,n){return _e.f(t,e,Ve(1,n))}:function(t,e,n){return t[e]=n,t},ze={},Re={get exports(){return ze},set exports(t){ze=t}},$e=u,qe=Lt,Be=Function.prototype,Ge=$e&&Object.getOwnPropertyDescriptor,He=qe(Be,"name"),We={EXISTS:He,PROPER:He&&"something"===function(){}.name,CONFIGURABLE:He&&(!$e||$e&&Ge(Be,"name").configurable)},Ue=$,Ke=Tt,Xe=w(Function.toString);Ue(Ke.inspectSource)||(Ke.inspectSource=function(t){return Xe(t)});var Ye,Je,Qe,Ze=Ke.inspectSource,tn=$,en=r.WeakMap,nn=tn(en)&&/native code/.test(String(en)),rn=Rt,on=St("keys"),un={},cn=nn,an=r,fn=G,sn=Ae,ln=Lt,pn=Tt,yn=function(t){return on[t]||(on[t]=rn(t))},bn=un,hn="Object already initialized",gn=an.TypeError,dn=an.WeakMap;if(cn||pn.state){var vn=pn.state||(pn.state=new dn);vn.get=vn.get,vn.has=vn.has,vn.set=vn.set,Ye=function(t,e){if(vn.has(t))throw gn(hn);return e.facade=t,vn.set(t,e),e},Je=function(t){return vn.get(t)||{}},Qe=function(t){return vn.has(t)}}else{var mn=yn("state");bn[mn]=!0,Ye=function(t,e){if(ln(t,mn))throw gn(hn);return e.facade=t,sn(t,mn,e),e},Je=function(t){return ln(t,mn)?t[mn]:{}},Qe=function(t){return ln(t,mn)}}var On={set:Ye,get:Je,has:Qe,enforce:function(t){return Qe(t)?Je(t):Ye(t,{})},getterFor:function(t){return function(e){var n;if(!fn(e)||(n=Je(e)).type!==t)throw gn("Incompatible receiver, "+t+" required");return n}}},Sn=w,wn=i,jn=$,Pn=Lt,En=u,Mn=We.CONFIGURABLE,Nn=Ze,Tn=On.enforce,xn=On.get,Cn=String,Dn=Object.defineProperty,In=Sn("".slice),kn=Sn("".replace),Fn=Sn([].join),Ln=En&&!wn((function(){return 8!==Dn((function(){}),"length",{value:8}).length})),_n=String(String).split("String"),Vn=Re.exports=function(t,e,n){"Symbol("===In(Cn(e),0,7)&&(e="["+kn(Cn(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!Pn(t,"name")||Mn&&t.name!==e)&&(En?Dn(t,"name",{value:e,configurable:!0}):t.name=e),Ln&&n&&Pn(n,"arity")&&t.length!==n.arity&&Dn(t,"length",{value:n.arity});try{n&&Pn(n,"constructor")&&n.constructor?En&&Dn(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=Tn(t);return Pn(r,"source")||(r.source=Fn(_n,"string"==typeof e?e:"")),t};Function.prototype.toString=Vn((function(){return jn(this)&&xn(this).source||Nn(this)}),"toString");var An=$,zn=me,Rn=ze,$n=Et,qn={},Bn=Math.ceil,Gn=Math.floor,Hn=Math.trunc||function(t){var e=+t;return(e>0?Gn:Bn)(e)},Wn=function(t){var e=+t;return e!=e||0===e?0:Hn(e)},Un=Wn,Kn=Math.max,Xn=Math.min,Yn=Wn,Jn=Math.min,Qn=function(t){return t>0?Jn(Yn(t),9007199254740991):0},Zn=V,tr=function(t,e){var n=Un(t);return n<0?Kn(n+e,0):Xn(n,e)},er=function(t){return Qn(t.length)},nr=function(t){return function(e,n,r){var o,i=Zn(e),u=er(i),c=tr(r,u);if(t&&n!=n){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},rr={includes:nr(!0),indexOf:nr(!1)},or=Lt,ir=V,ur=rr.indexOf,cr=un,ar=w([].push),fr=function(t,e){var n,r=ir(t),o=0,i=[];for(n in r)!or(cr,n)&&or(r,n)&&ar(i,n);for(;e.length>o;)or(r,n=e[o++])&&(~ur(i,n)||ar(i,n));return i},sr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],lr=fr,pr=sr.concat("length","prototype");qn.f=Object.getOwnPropertyNames||function(t){return lr(t,pr)};var yr={};yr.f=Object.getOwnPropertySymbols;var br=K,hr=qn,gr=yr,dr=Pe,vr=w([].concat),mr=br("Reflect","ownKeys")||function(t){var e=hr.f(dr(t)),n=gr.f;return n?vr(e,n(t)):e},Or=Lt,Sr=mr,wr=o,jr=me,Pr=i,Er=$,Mr=/#|\.prototype\./,Nr=function(t,e){var n=xr[Tr(t)];return n==Dr||n!=Cr&&(Er(e)?Pr(e):!!e)},Tr=Nr.normalize=function(t){return String(t).replace(Mr,".").toLowerCase()},xr=Nr.data={},Cr=Nr.NATIVE="N",Dr=Nr.POLYFILL="P",Ir=Nr,kr=r,Fr=o.f,Lr=Ae,_r=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(An(n)&&Rn(n,i,r),r.global)o?t[e]=n:$n(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:zn.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},Vr=Et,Ar=function(t,e,n){for(var r=Sr(e),o=jr.f,i=wr.f,u=0;u<r.length;u++){var c=r[u];Or(t,c)||n&&Or(n,c)||o(t,c,i(e,c))}},zr=Ir,Rr=fr,$r=sr,qr=Object.keys||function(t){return Rr(t,$r)},Br=u,Gr=w,Hr=s,Wr=i,Ur=qr,Kr=yr,Xr=l,Yr=It,Jr=C,Qr=Object.assign,Zr=Object.defineProperty,to=Gr([].concat),eo=!Qr||Wr((function(){if(Br&&1!==Qr({b:1},Qr(Zr({},"a",{enumerable:!0,get:function(){Zr(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=Qr({},t)[n]||Ur(Qr({},e)).join("")!=r}))?function(t,e){for(var n=Yr(t),r=arguments.length,o=1,i=Kr.f,u=Xr.f;r>o;)for(var c,a=Jr(arguments[o++]),f=i?to(Ur(a),i(a)):Ur(a),s=f.length,l=0;s>l;)c=f[l++],Br&&!Hr(u,a,c)||(n[c]=a[c]);return n}:Qr,no=eo;return function(t,e){var n,r,o,i,u,c=t.target,a=t.global,f=t.stat;if(n=a?kr:f?kr[c]||Vr(c,{}):(kr[c]||{}).prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(u=Fr(n,r))&&u.value:n[r],!zr(a?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ar(i,o)}(t.sham||o&&o.sham)&&Lr(i,"sham",!0),_r(n,r,i,t)}}({target:"Object",stat:!0,arity:2,forced:Object.assign!==no},{assign:no}),function(){function e(t,e){if(void 0===e&&(e={}),this.vNode=null,this.options={},this.seed=1,"undefined"==typeof document)throw new Error("This plugin works in browser");this.options=e,this.target=("string"==typeof e.target?document.querySelector(e.target):e.target)||document.createElement(e.tagName||"div"),this.vNode=this.createVM(t,e)}return e.prototype.createVM=function(e,n){var r,o=void 0===n?{}:n,i=o.props,u=o.children,c=o.patchFlag,a=o.dynamicProps,f=o.isBlockNode,s=o.app,l=o.context,p=o.parent;return t.isVue2?((r=new(t.Vue2.extend(Object.assign({},l||{},e)))({parent:p,propsData:i})).id="mount-plugin-"+this.seed++,r):(r=t.createVNode(e,i,u,c,a,f),(null==s?void 0:s._context)&&(r.appContext=s._context),r)},e.prototype.mount=function(){!this.options.target&&document.body.appendChild(this.target),t.isVue2?this.vNode&&this.vNode.$mount(this.target):t.render(this.vNode,this.target)},e.prototype.unmount=function(){t.isVue2?(this.vNode.$destroy(),document.body.removeChild(this.vNode.$el)):(t.render(null,this.target),document.body.removeChild(this.target)),this.vNode=null,this.target=null},e}()}(VueDemi);
7
+ this.VueMount=function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")(),o={},i=function(t){try{return!!t()}catch(t){return!0}},u=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),a=c,f=Function.prototype.call,s=a?f.bind(f):function(){return f.apply(f,arguments)},l={},p={}.propertyIsEnumerable,y=Object.getOwnPropertyDescriptor,b=y&&!p.call({1:2},1);l.f=b?function(t){var e=y(this,t);return!!e&&e.enumerable}:p;var h,g,d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v=c,m=Function.prototype,O=m.call,S=v&&m.bind.bind(O,O),w=v?S:function(t){return function(){return O.apply(t,arguments)}},j=w,P=j({}.toString),E=j("".slice),M=i,N=function(t){return E(P(t),8,-1)},T=Object,x=w("".split),C=M((function(){return!T("z").propertyIsEnumerable(0)}))?function(t){return"String"==N(t)?x(t,""):T(t)}:T,D=function(t){return null==t},I=D,k=TypeError,F=function(t){if(I(t))throw k("Can't call method on "+t);return t},L=C,_=F,V=function(t){return L(_(t))},A="object"==typeof document&&document.all,z={all:A,IS_HTMLDDA:void 0===A&&void 0!==A},R=z.all,$=z.IS_HTMLDDA?function(t){return"function"==typeof t||t===R}:function(t){return"function"==typeof t},q=$,B=z.all,G=z.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:q(t)||t===B}:function(t){return"object"==typeof t?null!==t:q(t)},H=r,W=$,U=function(t){return W(t)?t:void 0},K=function(t,e){return arguments.length<2?U(H[t]):H[t]&&H[t][e]},X=w({}.isPrototypeOf),Y=r,J="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Q=Y.process,Z=Y.Deno,tt=Q&&Q.versions||Z&&Z.version,et=tt&&tt.v8;et&&(g=(h=et.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!g&&J&&(!(h=J.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=J.match(/Chrome\/(\d+)/))&&(g=+h[1]);var nt=g,rt=i,ot=!!Object.getOwnPropertySymbols&&!rt((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&nt&&nt<41})),it=ot&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ut=K,ct=$,at=X,ft=Object,st=it?function(t){return"symbol"==typeof t}:function(t){var e=ut("Symbol");return ct(e)&&at(e.prototype,ft(t))},lt=String,pt=$,yt=function(t){try{return lt(t)}catch(t){return"Object"}},bt=TypeError,ht=function(t){if(pt(t))return t;throw bt(yt(t)+" is not a function")},gt=D,dt=s,vt=$,mt=G,Ot=TypeError,St={},wt={get exports(){return St},set exports(t){St=t}},jt=r,Pt=Object.defineProperty,Et=function(t,e){try{Pt(jt,t,{value:e,configurable:!0,writable:!0})}catch(n){jt[t]=e}return e},Mt=Et,Nt="__core-js_shared__",Tt=r[Nt]||Mt(Nt,{}),xt=Tt;(wt.exports=function(t,e){return xt[t]||(xt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.29.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Ct=F,Dt=Object,It=function(t){return Dt(Ct(t))},kt=It,Ft=w({}.hasOwnProperty),Lt=Object.hasOwn||function(t,e){return Ft(kt(t),e)},_t=w,Vt=0,At=Math.random(),zt=_t(1..toString),Rt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+zt(++Vt+At,36)},$t=St,qt=Lt,Bt=Rt,Gt=ot,Ht=it,Wt=r.Symbol,Ut=$t("wks"),Kt=Ht?Wt.for||Wt:Wt&&Wt.withoutSetter||Bt,Xt=s,Yt=G,Jt=st,Qt=function(t,e){var n=t[e];return gt(n)?void 0:ht(n)},Zt=function(t,e){var n,r;if("string"===e&&vt(n=t.toString)&&!mt(r=dt(n,t)))return r;if(vt(n=t.valueOf)&&!mt(r=dt(n,t)))return r;if("string"!==e&&vt(n=t.toString)&&!mt(r=dt(n,t)))return r;throw Ot("Can't convert object to primitive value")},te=TypeError,ee=function(t){return qt(Ut,t)||(Ut[t]=Gt&&qt(Wt,t)?Wt[t]:Kt("Symbol."+t)),Ut[t]}("toPrimitive"),ne=function(t,e){if(!Yt(t)||Jt(t))return t;var n,r=Qt(t,ee);if(r){if(void 0===e&&(e="default"),n=Xt(r,t,e),!Yt(n)||Jt(n))return n;throw te("Can't convert object to primitive value")}return void 0===e&&(e="number"),Zt(t,e)},re=st,oe=function(t){var e=ne(t,"string");return re(e)?e:e+""},ie=G,ue=r.document,ce=ie(ue)&&ie(ue.createElement),ae=function(t){return ce?ue.createElement(t):{}},fe=!u&&!i((function(){return 7!=Object.defineProperty(ae("div"),"a",{get:function(){return 7}}).a})),se=u,le=s,pe=l,ye=d,be=V,he=oe,ge=Lt,de=fe,ve=Object.getOwnPropertyDescriptor;o.f=se?ve:function(t,e){if(t=be(t),e=he(e),de)try{return ve(t,e)}catch(t){}if(ge(t,e))return ye(!le(pe.f,t,e),t[e])};var me={},Oe=u&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Se=G,we=String,je=TypeError,Pe=function(t){if(Se(t))return t;throw je(we(t)+" is not an object")},Ee=u,Me=fe,Ne=Oe,Te=Pe,xe=oe,Ce=TypeError,De=Object.defineProperty,Ie=Object.getOwnPropertyDescriptor,ke="enumerable",Fe="configurable",Le="writable";me.f=Ee?Ne?function(t,e,n){if(Te(t),e=xe(e),Te(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Le in n&&!n[Le]){var r=Ie(t,e);r&&r[Le]&&(t[e]=n.value,n={configurable:Fe in n?n[Fe]:r[Fe],enumerable:ke in n?n[ke]:r[ke],writable:!1})}return De(t,e,n)}:De:function(t,e,n){if(Te(t),e=xe(e),Te(n),Me)try{return De(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Ce("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var _e=me,Ve=d,Ae=u?function(t,e,n){return _e.f(t,e,Ve(1,n))}:function(t,e,n){return t[e]=n,t},ze={},Re={get exports(){return ze},set exports(t){ze=t}},$e=u,qe=Lt,Be=Function.prototype,Ge=$e&&Object.getOwnPropertyDescriptor,He=qe(Be,"name"),We={EXISTS:He,PROPER:He&&"something"===function(){}.name,CONFIGURABLE:He&&(!$e||$e&&Ge(Be,"name").configurable)},Ue=$,Ke=Tt,Xe=w(Function.toString);Ue(Ke.inspectSource)||(Ke.inspectSource=function(t){return Xe(t)});var Ye,Je,Qe,Ze=Ke.inspectSource,tn=$,en=r.WeakMap,nn=tn(en)&&/native code/.test(String(en)),rn=Rt,on=St("keys"),un={},cn=nn,an=r,fn=G,sn=Ae,ln=Lt,pn=Tt,yn=function(t){return on[t]||(on[t]=rn(t))},bn=un,hn="Object already initialized",gn=an.TypeError,dn=an.WeakMap;if(cn||pn.state){var vn=pn.state||(pn.state=new dn);vn.get=vn.get,vn.has=vn.has,vn.set=vn.set,Ye=function(t,e){if(vn.has(t))throw gn(hn);return e.facade=t,vn.set(t,e),e},Je=function(t){return vn.get(t)||{}},Qe=function(t){return vn.has(t)}}else{var mn=yn("state");bn[mn]=!0,Ye=function(t,e){if(ln(t,mn))throw gn(hn);return e.facade=t,sn(t,mn,e),e},Je=function(t){return ln(t,mn)?t[mn]:{}},Qe=function(t){return ln(t,mn)}}var On={set:Ye,get:Je,has:Qe,enforce:function(t){return Qe(t)?Je(t):Ye(t,{})},getterFor:function(t){return function(e){var n;if(!fn(e)||(n=Je(e)).type!==t)throw gn("Incompatible receiver, "+t+" required");return n}}},Sn=w,wn=i,jn=$,Pn=Lt,En=u,Mn=We.CONFIGURABLE,Nn=Ze,Tn=On.enforce,xn=On.get,Cn=String,Dn=Object.defineProperty,In=Sn("".slice),kn=Sn("".replace),Fn=Sn([].join),Ln=En&&!wn((function(){return 8!==Dn((function(){}),"length",{value:8}).length})),_n=String(String).split("String"),Vn=Re.exports=function(t,e,n){"Symbol("===In(Cn(e),0,7)&&(e="["+kn(Cn(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!Pn(t,"name")||Mn&&t.name!==e)&&(En?Dn(t,"name",{value:e,configurable:!0}):t.name=e),Ln&&n&&Pn(n,"arity")&&t.length!==n.arity&&Dn(t,"length",{value:n.arity});try{n&&Pn(n,"constructor")&&n.constructor?En&&Dn(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=Tn(t);return Pn(r,"source")||(r.source=Fn(_n,"string"==typeof e?e:"")),t};Function.prototype.toString=Vn((function(){return jn(this)&&xn(this).source||Nn(this)}),"toString");var An=$,zn=me,Rn=ze,$n=Et,qn={},Bn=Math.ceil,Gn=Math.floor,Hn=Math.trunc||function(t){var e=+t;return(e>0?Gn:Bn)(e)},Wn=function(t){var e=+t;return e!=e||0===e?0:Hn(e)},Un=Wn,Kn=Math.max,Xn=Math.min,Yn=Wn,Jn=Math.min,Qn=function(t){return t>0?Jn(Yn(t),9007199254740991):0},Zn=V,tr=function(t,e){var n=Un(t);return n<0?Kn(n+e,0):Xn(n,e)},er=function(t){return Qn(t.length)},nr=function(t){return function(e,n,r){var o,i=Zn(e),u=er(i),c=tr(r,u);if(t&&n!=n){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},rr={includes:nr(!0),indexOf:nr(!1)},or=Lt,ir=V,ur=rr.indexOf,cr=un,ar=w([].push),fr=function(t,e){var n,r=ir(t),o=0,i=[];for(n in r)!or(cr,n)&&or(r,n)&&ar(i,n);for(;e.length>o;)or(r,n=e[o++])&&(~ur(i,n)||ar(i,n));return i},sr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],lr=fr,pr=sr.concat("length","prototype");qn.f=Object.getOwnPropertyNames||function(t){return lr(t,pr)};var yr={};yr.f=Object.getOwnPropertySymbols;var br=K,hr=qn,gr=yr,dr=Pe,vr=w([].concat),mr=br("Reflect","ownKeys")||function(t){var e=hr.f(dr(t)),n=gr.f;return n?vr(e,n(t)):e},Or=Lt,Sr=mr,wr=o,jr=me,Pr=i,Er=$,Mr=/#|\.prototype\./,Nr=function(t,e){var n=xr[Tr(t)];return n==Dr||n!=Cr&&(Er(e)?Pr(e):!!e)},Tr=Nr.normalize=function(t){return String(t).replace(Mr,".").toLowerCase()},xr=Nr.data={},Cr=Nr.NATIVE="N",Dr=Nr.POLYFILL="P",Ir=Nr,kr=r,Fr=o.f,Lr=Ae,_r=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(An(n)&&Rn(n,i,r),r.global)o?t[e]=n:$n(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:zn.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},Vr=Et,Ar=function(t,e,n){for(var r=Sr(e),o=jr.f,i=wr.f,u=0;u<r.length;u++){var c=r[u];Or(t,c)||n&&Or(n,c)||o(t,c,i(e,c))}},zr=Ir,Rr=fr,$r=sr,qr=Object.keys||function(t){return Rr(t,$r)},Br=u,Gr=w,Hr=s,Wr=i,Ur=qr,Kr=yr,Xr=l,Yr=It,Jr=C,Qr=Object.assign,Zr=Object.defineProperty,to=Gr([].concat),eo=!Qr||Wr((function(){if(Br&&1!==Qr({b:1},Qr(Zr({},"a",{enumerable:!0,get:function(){Zr(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=Qr({},t)[n]||Ur(Qr({},e)).join("")!=r}))?function(t,e){for(var n=Yr(t),r=arguments.length,o=1,i=Kr.f,u=Xr.f;r>o;)for(var c,a=Jr(arguments[o++]),f=i?to(Ur(a),i(a)):Ur(a),s=f.length,l=0;s>l;)c=f[l++],Br&&!Hr(u,a,c)||(n[c]=a[c]);return n}:Qr,no=eo;(function(t,e){var n,r,o,i,u,c=t.target,a=t.global,f=t.stat;if(n=a?kr:f?kr[c]||Vr(c,{}):(kr[c]||{}).prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(u=Fr(n,r))&&u.value:n[r],!zr(a?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ar(i,o)}(t.sham||o&&o.sham)&&Lr(i,"sham",!0),_r(n,r,i,t)}})({target:"Object",stat:!0,arity:2,forced:Object.assign!==no},{assign:no});var ro=t;return function(){function t(t,e){if(void 0===e&&(e={}),this.vNode=null,this.options={},this.seed=1,"undefined"==typeof document)throw new Error("This plugin works in browser");this.options=e,this.target=("string"==typeof e.target?document.querySelector(e.target):e.target)||document.createElement(e.tagName||"div"),this.vNode=this.createVM(t,e)}return t.prototype.createVM=function(t,e){var n,r=void 0===e?{}:e,o=r.props,i=r.children,u=r.patchFlag,c=r.dynamicProps,a=r.isBlockNode,f=r.app,s=r.context,l=r.parent;return ro.isVue2?((n=new(ro.Vue2.extend(Object.assign({},s||{},t)))({parent:l,propsData:o})).id="mount-plugin-"+this.seed++,n):(n=ro.createVNode(t,o,i,u,c,a),(null==f?void 0:f._context)&&(n.appContext=f._context),n)},t.prototype.mount=function(){!this.options.target&&document.body.appendChild(this.target),ro.isVue2?this.vNode&&this.vNode.$mount(this.target):ro.render(this.vNode,this.target)},t.prototype.unmount=function(){ro.isVue2?(this.vNode.$destroy(),document.body.removeChild(this.vNode.$el)):(ro.render(null,this.target),document.body.removeChild(this.target)),this.vNode=null,this.target=null},t}()}(VueDemi);
@@ -1,12 +1,14 @@
1
1
  /*!
2
- * vue-mount-plugin v2.1.0
2
+ * vue-mount-plugin v2.1.1
3
3
  * A simple and easy to use vue instance extension plugin that supports vue2.0 and vue3.0
4
4
  * (c) 2021-2023 saqqdy <saqqdy@qq.com>
5
5
  * Released under the MIT License.
6
6
  */
7
- this.VueMount = (function (vueDemi) {
7
+ this.VueMount = (function (require$$0) {
8
8
  'use strict';
9
9
 
10
+ var vueDemi = require$$0;
11
+
10
12
  var Mount = function () {
11
13
  function Mount(component, options) {
12
14
  if (options === void 0) {
@@ -67,6 +69,8 @@ this.VueMount = (function (vueDemi) {
67
69
  return Mount;
68
70
  }();
69
71
 
70
- return Mount;
72
+ var dist = Mount;
73
+
74
+ return dist;
71
75
 
72
76
  })(VueDemi);
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * vue-mount-plugin v2.1.0
2
+ * vue-mount-plugin v2.1.1
3
3
  * A simple and easy to use vue instance extension plugin that supports vue2.0 and vue3.0
4
4
  * (c) 2021-2023 saqqdy <saqqdy@qq.com>
5
5
  * Released under the MIT License.
6
6
  */
7
- this.VueMount=function(t){"use strict";return function(){function e(t,e){if(void 0===e&&(e={}),this.vNode=null,this.options={},this.seed=1,"undefined"==typeof document)throw new Error("This plugin works in browser");this.options=e,this.target=("string"==typeof e.target?document.querySelector(e.target):e.target)||document.createElement(e.tagName||"div"),this.vNode=this.createVM(t,e)}return e.prototype.createVM=function(e,o){var n,i=void 0===o?{}:o,r=i.props,s=i.children,d=i.patchFlag,u=i.dynamicProps,a=i.isBlockNode,h=i.app,p=i.context,c=i.parent;return t.isVue2?((n=new(t.Vue2.extend(Object.assign({},p||{},e)))({parent:c,propsData:r})).id="mount-plugin-"+this.seed++,n):(n=t.createVNode(e,r,s,d,u,a),(null==h?void 0:h._context)&&(n.appContext=h._context),n)},e.prototype.mount=function(){!this.options.target&&document.body.appendChild(this.target),t.isVue2?this.vNode&&this.vNode.$mount(this.target):t.render(this.vNode,this.target)},e.prototype.unmount=function(){t.isVue2?(this.vNode.$destroy(),document.body.removeChild(this.vNode.$el)):(t.render(null,this.target),document.body.removeChild(this.target)),this.vNode=null,this.target=null},e}()}(VueDemi);
7
+ this.VueMount=function(t){"use strict";var e=VueDemi;return function(){function t(t,e){if(void 0===e&&(e={}),this.vNode=null,this.options={},this.seed=1,"undefined"==typeof document)throw new Error("This plugin works in browser");this.options=e,this.target=("string"==typeof e.target?document.querySelector(e.target):e.target)||document.createElement(e.tagName||"div"),this.vNode=this.createVM(t,e)}return t.prototype.createVM=function(t,o){var n,i=void 0===o?{}:o,r=i.props,s=i.children,d=i.patchFlag,u=i.dynamicProps,a=i.isBlockNode,h=i.app,p=i.context,c=i.parent;return e.isVue2?((n=new(e.Vue2.extend(Object.assign({},p||{},t)))({parent:c,propsData:r})).id="mount-plugin-"+this.seed++,n):(n=e.createVNode(t,r,s,d,u,a),(null==h?void 0:h._context)&&(n.appContext=h._context),n)},t.prototype.mount=function(){!this.options.target&&document.body.appendChild(this.target),e.isVue2?this.vNode&&this.vNode.$mount(this.target):e.render(this.vNode,this.target)},t.prototype.unmount=function(){e.isVue2?(this.vNode.$destroy(),document.body.removeChild(this.vNode.$el)):(e.render(null,this.target),document.body.removeChild(this.target)),this.vNode=null,this.target=null},t}()}();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue-mount-plugin",
3
3
  "description": "A simple and easy to use vue instance extension plugin that supports vue2.0 and vue3.0",
4
- "version": "2.1.0",
4
+ "version": "2.1.1",
5
5
  "packageManager": "pnpm@7.26.1",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.mjs",
@@ -59,7 +59,7 @@
59
59
  "@babel/core": "^7.21.4",
60
60
  "@babel/preset-env": "^7.21.4",
61
61
  "@babel/preset-typescript": "^7.21.4",
62
- "@eslint-sets/eslint-config-ts": "^5.0.2",
62
+ "@eslint-sets/eslint-config-ts": "^5.1.0",
63
63
  "@microsoft/api-extractor": "^7.34.4",
64
64
  "@rollup/plugin-alias": "^4.0.3",
65
65
  "@rollup/plugin-babel": "^6.0.3",
@@ -89,7 +89,7 @@
89
89
  "tsnd": "^1.1.0",
90
90
  "typedoc": "^0.23.28",
91
91
  "typedoc-plugin-markdown": "^3.14.0",
92
- "typescript": "^4.9.5",
92
+ "typescript": "^5.0.3",
93
93
  "vue": "^3.2.47",
94
94
  "vue2": "npm:vue@^2.7.14",
95
95
  "zx": "^7.2.1"