@vue-mini/core 1.0.0-rc.5

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.
@@ -0,0 +1,8 @@
1
+ /*!
2
+ * vue-mini v1.0.0-rc.5
3
+ * https://github.com/vue-mini/vue-mini
4
+ * (c) 2019-present Yang Mingshan
5
+ * @license MIT
6
+ */
7
+ "use strict";
8
+ /*! #__NO_SIDE_EFFECTS__ */function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const t=()=>{},n=Object.assign,s=Object.prototype.hasOwnProperty,i=(e,t)=>s.call(e,t),o=Array.isArray,r=e=>"[object Map]"===l(e),c=e=>"function"==typeof e,_=e=>"symbol"==typeof e,a=e=>null!==e&&"object"==typeof e,h=Object.prototype.toString,l=e=>h.call(e),u=e=>l(e).slice(8,-1),f=e=>"string"==typeof e&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,d=(e,t)=>!Object.is(e,t);let p,O;class E{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=p,!e&&p&&(this.index=(p.scopes||(p.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=p;try{return p=this,e()}finally{p=t}}}on(){p=this}off(){p=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function v(e,t=p){t&&t.active&&t.effects.push(e)}function S(){return p}class N{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,v(this,s)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,b();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(A(t.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),I()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=y,t=O;try{return y=!0,O=this,this._runnings++,R(this),this.fn()}finally{g(this),this._runnings--,O=t,y=e}}stop(){var e;this.active&&(R(this),g(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function A(e){return e.value}function R(e){e._trackId++,e._depsLength=0}function g(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)T(e.deps[t],e);e.deps.length=e._depsLength}}function T(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}let y=!0,m=0;const D=[];function b(){D.push(y),y=!1}function I(){const e=D.pop();y=void 0===e||e}function L(){m++}function H(){for(m--;!m&&x.length;)x.shift()()}function P(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&T(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const x=[];function w(e,t,n){L();for(const n of e.keys()){let s;n._dirtyLevel<t&&(null!=s?s:s=e.get(n)===n._trackId)&&(n._shouldSchedule||(n._shouldSchedule=0===n._dirtyLevel),n._dirtyLevel=t),n._shouldSchedule&&(null!=s?s:s=e.get(n)===n._trackId)&&(n.trigger(),n._runnings&&!n.allowRecurse||2===n._dirtyLevel||(n._shouldSchedule=!1,n.scheduler&&x.push(n.scheduler)))}H()}const C=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},M=new WeakMap,k=Symbol(""),j=Symbol("");function U(e,t,n){if(y&&O){let t=M.get(e);t||M.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=C((()=>t.delete(n)))),P(O,s)}}function V(e,t,n,s,i,c){const a=M.get(e);if(!a)return;let h=[];if("clear"===t)h=[...a.values()];else if("length"===n&&o(e)){const e=Number(s);a.forEach(((t,n)=>{("length"===n||!_(n)&&n>=e)&&h.push(t)}))}else switch(void 0!==n&&h.push(a.get(n)),t){case"add":o(e)?f(n)&&h.push(a.get("length")):(h.push(a.get(k)),r(e)&&h.push(a.get(j)));break;case"delete":o(e)||(h.push(a.get(k)),r(e)&&h.push(a.get(j)));break;case"set":r(e)&&h.push(a.get(k))}L();for(const e of h)e&&w(e,4);H()}const G=e("__proto__,__v_isRef,__isVue"),W=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(_)),F=B();function B(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=xe(this);for(let e=0,t=this.length;e<t;e++)U(n,0,e+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(xe)):s}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){b(),L();const n=xe(this)[t].apply(this,e);return H(),I(),n}})),e}function Y(e){_(e)||(e=String(e));const t=xe(this);return U(t,0,e),t.hasOwnProperty(e)}class z{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(s?r?Te:ge:r?Re:Ae).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const c=o(e);if(!s){if(c&&i(F,t))return Reflect.get(F,t,n);if("hasOwnProperty"===t)return Y}const h=Reflect.get(e,t,n);return(_(t)?W.has(t):G(t))?h:(s||U(e,0,t),r?h:Ue(h)?c&&f(t)?h:h.value:a(h)?s?De(h):ye(h):h)}}class Q extends z{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];if(!this._isShallow){const t=Le(r);if(He(n)||Le(n)||(r=xe(r),n=xe(n)),!o(e)&&Ue(r)&&!Ue(n))return!t&&(r.value=n,!0)}const c=o(e)&&f(t)?Number(t)<e.length:i(e,t),_=Reflect.set(e,t,n,s);return e===xe(s)&&(c?d(n,r)&&V(e,"set",t,n):V(e,"add",t,n)),_}deleteProperty(e,t){const n=i(e,t),s=Reflect.deleteProperty(e,t);return s&&n&&V(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return _(t)&&W.has(t)||U(e,0,t),n}ownKeys(e){return U(e,0,o(e)?"length":k),Reflect.ownKeys(e)}}class X extends z{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const Z=new Q,J=new X,K=new Q(!0),$=new X(!0),q=e=>e,ee=e=>Reflect.getPrototypeOf(e);function te(e,t,n=!1,s=!1){const i=xe(e=e.__v_raw),o=xe(t);n||(d(t,o)&&U(i,0,t),U(i,0,o));const{has:r}=ee(i),c=s?q:n?Ce:we;return r.call(i,t)?c(e.get(t)):r.call(i,o)?c(e.get(o)):void(e!==i&&e.get(t))}function ne(e,t=!1){const n=this.__v_raw,s=xe(n),i=xe(e);return t||(d(e,i)&&U(s,0,e),U(s,0,i)),e===i?n.has(e):n.has(e)||n.has(i)}function se(e,t=!1){return e=e.__v_raw,!t&&U(xe(e),0,k),Reflect.get(e,"size",e)}function ie(e){e=xe(e);const t=xe(this);return ee(t).has.call(t,e)||(t.add(e),V(t,"add",e,e)),this}function oe(e,t){t=xe(t);const n=xe(this),{has:s,get:i}=ee(n);let o=s.call(n,e);o||(e=xe(e),o=s.call(n,e));const r=i.call(n,e);return n.set(e,t),o?d(t,r)&&V(n,"set",e,t):V(n,"add",e,t),this}function re(e){const t=xe(this),{has:n,get:s}=ee(t);let i=n.call(t,e);i||(e=xe(e),i=n.call(t,e)),s&&s.call(t,e);const o=t.delete(e);return i&&V(t,"delete",e,void 0),o}function ce(){const e=xe(this),t=0!==e.size,n=e.clear();return t&&V(e,"clear",void 0,void 0),n}function _e(e,t){return function(n,s){const i=this,o=i.__v_raw,r=xe(o),c=t?q:e?Ce:we;return!e&&U(r,0,k),o.forEach(((e,t)=>n.call(s,c(e),c(t),i)))}}function ae(e,t,n){return function(...s){const i=this.__v_raw,o=xe(i),c=r(o),_="entries"===e||e===Symbol.iterator&&c,a="keys"===e&&c,h=i[e](...s),l=n?q:t?Ce:we;return!t&&U(o,0,a?j:k),{next(){const{value:e,done:t}=h.next();return t?{value:e,done:t}:{value:_?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function he(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function le(){const e={get(e){return te(this,e)},get size(){return se(this)},has:ne,add:ie,set:oe,delete:re,clear:ce,forEach:_e(!1,!1)},t={get(e){return te(this,e,!1,!0)},get size(){return se(this)},has:ne,add:ie,set:oe,delete:re,clear:ce,forEach:_e(!1,!0)},n={get(e){return te(this,e,!0)},get size(){return se(this,!0)},has(e){return ne.call(this,e,!0)},add:he("add"),set:he("set"),delete:he("delete"),clear:he("clear"),forEach:_e(!0,!1)},s={get(e){return te(this,e,!0,!0)},get size(){return se(this,!0)},has(e){return ne.call(this,e,!0)},add:he("add"),set:he("set"),delete:he("delete"),clear:he("clear"),forEach:_e(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{e[i]=ae(i,!1,!1),n[i]=ae(i,!0,!1),t[i]=ae(i,!1,!0),s[i]=ae(i,!0,!0)})),[e,n,t,s]}const[ue,fe,de,pe]=le();function Oe(e,t){const n=t?e?pe:de:e?fe:ue;return(t,s,o)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(i(n,s)&&s in t?n:t,s,o)}const Ee={get:Oe(!1,!1)},ve={get:Oe(!1,!0)},Se={get:Oe(!0,!1)},Ne={get:Oe(!0,!0)},Ae=new WeakMap,Re=new WeakMap,ge=new WeakMap,Te=new WeakMap;function ye(e){return Le(e)?e:be(e,!1,Z,Ee,Ae)}function me(e){return be(e,!1,K,ve,Re)}function De(e){return be(e,!0,J,Se,ge)}function be(e,t,n,s,i){if(!a(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const r=(c=e).__v_skip||!Object.isExtensible(c)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(u(c));var c;if(0===r)return e;const _=new Proxy(e,2===r?s:n);return i.set(e,_),_}function Ie(e){return Le(e)?Ie(e.__v_raw):!(!e||!e.__v_isReactive)}function Le(e){return!(!e||!e.__v_isReadonly)}function He(e){return!(!e||!e.__v_isShallow)}function Pe(e){return!!e&&!!e.__v_raw}function xe(e){const t=e&&e.__v_raw;return t?xe(t):e}const we=e=>a(e)?ye(e):e,Ce=e=>a(e)?De(e):e;class Me{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new N((()=>e(this._value)),(()=>je(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=xe(this);return e._cacheable&&!e.effect.dirty||!d(e._value,e._value=e.effect.run())||je(e,4),ke(e),e.effect._dirtyLevel>=2&&je(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function ke(e){var t;y&&O&&(e=xe(e),P(O,null!=(t=e.dep)?t:e.dep=C((()=>e.dep=void 0),e instanceof Me?e:void 0)))}function je(e,t=4,n){const s=(e=xe(e)).dep;s&&w(s,t)}function Ue(e){return!(!e||!0!==e.__v_isRef)}function Ve(e){return Ge(e,!1)}function Ge(e,t){return Ue(e)?e:new We(e,t)}class We{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:xe(e),this._value=t?e:we(e)}get value(){return ke(this),this._value}set value(e){const t=this.__v_isShallow||He(e)||Le(e);e=t?e:xe(e),d(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:we(e),je(this,4))}}function Fe(e){return Ue(e)?e.value:e}const Be={get:(e,t,n)=>Fe(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const i=e[t];return Ue(i)&&!Ue(n)?(i.value=n,!0):Reflect.set(e,t,n,s)}};class Ye{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>ke(this)),(()=>je(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}class ze{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=xe(this._object),t=this._key,null==(n=M.get(e))?void 0:n.get(t);var e,t,n}}class Qe{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Xe(e,t,n){const s=e[t];return Ue(s)?s:new ze(e,t,n)}const Ze={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"},Je=()=>{},{isArray:Ke}=Array,$e=Object.assign;function qe(e,t){const n={};return Object.keys(e).forEach((s=>{t.includes(s)||(n[s]=e[s])})),n}function et(e){return Object.prototype.toString.call(e).slice(8,-1)}function tt(e){return null!==e&&"object"==typeof e}function nt(e){return"Object"===et(e)}function st(e){return"function"==typeof e}function it(e,t){return e!==t&&(e==e||t==t)}function ot(e){return`__${e}__`}let rt=!1,ct=!1;const _t=[];let at=0;const ht=[];let lt=null,ut=0;const ft=Promise.resolve();let dt=null;function pt(e){0!==_t.length&&_t.includes(e,rt&&e.allowRecurse?at+1:at)||(_t.push(e),rt||ct||(ct=!0,dt=ft.then(Et)))}function Ot(){if(ht.length>0){for(lt=[...new Set(ht)],ht.length=0,ut=0;ut<lt.length;ut++)lt[ut]();lt=null,ut=0}}function Et(e){ct=!1,rt=!0;try{for(at=0;at<_t.length;at++){const e=_t[at];!1!==e.active&&e()}}finally{at=0,_t.length=0,rt=!1,dt=null}}const vt={};function St(e,t,n){return Nt(e,t,n)}function Nt(e,t,{immediate:n,deep:s,flush:i,once:o}={}){if(t&&o){const e=t;t=(...t)=>{e(...t),E()}}const r=e=>!0===s?e:At(e,!1===s?1:void 0);let c,_,a=!1,h=!1;if(Ue(e)?(c=()=>e.value,a=He(e)):Ie(e)?(c=()=>r(e),a=!0):Ke(e)?(h=!0,a=e.some((e=>Ie(e)||He(e))),c=()=>e.map((e=>Ue(e)?e.value:Ie(e)?r(e):st(e)?e():void 0))):c=st(e)?t?()=>e():()=>(_&&_(),e(l)):Je,t&&s){const e=c;c=()=>At(e())}const l=e=>{_=p.onStop=()=>{e(),_=p.onStop=void 0}};let u=h?Array.from({length:e.length}).fill(vt):vt;const f=()=>{if(p.active&&p.dirty)if(t){const e=p.run();(s||a||(h?e.some(((e,t)=>it(e,u[t]))):it(e,u)))&&(_&&_(),t(e,u===vt?void 0:h&&u[0]===vt?[]:u,l),u=e)}else p.run()};let d;f.allowRecurse=Boolean(t),d="sync"===i?f:"post"===i?()=>{!function(e){lt&&lt.includes(e,e.allowRecurse?ut+1:ut)||ht.push(e)}(f)}:()=>{pt(f)};const p=new N(c,Je,d),O=S(),E=()=>{p.stop(),O&&function(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}(O.effects,p)};return t?n?f():u=p.run():p.run(),E}function At(e,t,n=0,s){if(!tt(e)||e[Ze.SKIP])return e;if(t&&t>0){if(n>=t)return e;n++}if((s=s||new Set).has(e))return e;if(s.add(e),Ue(e))At(e.value,t,n,s);else if(Ke(e))for(let i=0;i<e.length;i++)At(e[i],t,n,s);else if("Set"===et(e)||function(e){return"Map"===et(e)}(e))e.forEach((e=>{At(e,t,n,s)}));else if(nt(e))for(const i in e)At(e[i],t,n,s);return e}const Rt=Object.create(null);let gt=null,Tt=null,yt=null;function mt(){return Tt||yt}var Dt,bt,It;function Lt(e,t){const n=e[t];return function(...e){const s=this[ot(t)];s&&s.forEach((t=>t(...e))),void 0!==n&&n.call(this,...e)}}function Ht(e){if(function(e){const t=new Set(["undefined","boolean","number","string"]);return null===e||t.has(typeof e)}(e)||st(e))return e;if(Ue(e))return Ht(e.value);if(Pe(e))return Ht(xe(e));if(Ke(e))return e.map((e=>Ht(e)));if(nt(e)){const t={};return Object.keys(e).forEach((n=>{t[n]=Ht(e[n])})),t}throw new TypeError(`${et(e)} value is not supported`)}function Pt(e,t){tt(t)&&St(Ue(t)?t:()=>t,(()=>{this.setData({[e]:Ht(t)},Ot)}),{deep:!0})}function xt(e,t){const n=e[t];return function(...e){const s=this[ot(t)];s&&s.forEach((t=>t(...e))),void 0!==n&&n.call(this,...e)}}!function(e){e.ON_LAUNCH="onLaunch",e.ON_SHOW="onShow",e.ON_HIDE="onHide",e.ON_ERROR="onError",e.ON_PAGE_NOT_FOUND="onPageNotFound",e.ON_UNHANDLED_REJECTION="onUnhandledRejection",e.ON_THEME_CHANGE="onThemeChange"}(Dt||(Dt={})),function(e){e.ON_LOAD="onLoad",e.ON_SHOW="onShow",e.ON_READY="onReady",e.ON_HIDE="onHide",e.ON_UNLOAD="onUnload",e.ON_ROUTE_DONE="onRouteDone",e.ON_PULL_DOWN_REFRESH="onPullDownRefresh",e.ON_REACH_BOTTOM="onReachBottom",e.ON_PAGE_SCROLL="onPageScroll",e.ON_SHARE_APP_MESSAGE="onShareAppMessage",e.ON_SHARE_TIMELINE="onShareTimeline",e.ON_ADD_TO_FAVORITES="onAddToFavorites",e.ON_RESIZE="onResize",e.ON_TAB_ITEM_TAP="onTabItemTap",e.ON_SAVE_EXIT_STATE="onSaveExitState"}(bt||(bt={})),function(e){e.ATTACHED="attached",e.READY="ready",e.MOVED="moved",e.DETACHED="detached",e.ERROR="error"}(It||(It={}));const wt={[bt.ON_SHOW]:"show",[bt.ON_HIDE]:"hide",[bt.ON_RESIZE]:"resize",[bt.ON_ROUTE_DONE]:"routeDone",[It.READY]:bt.ON_READY};function Ct(e,t){return jt(t,e.lifetimes[t]||e[t])}function Mt(e,t){return jt(t,e.methods[t])}function kt(e,t){return jt(t,e.pageLifetimes[wt[t]])}function jt(e,t){const n=ot(e);return function(...e){const s=this[n];s&&s.forEach((t=>t(...e))),void 0!==t&&t.call(this,...e)}}const Ut=sn(Dt.ON_SHOW),Vt=sn(Dt.ON_HIDE),Gt=sn(Dt.ON_ERROR),Wt=sn(Dt.ON_PAGE_NOT_FOUND),Ft=sn(Dt.ON_UNHANDLED_REJECTION),Bt=sn(Dt.ON_THEME_CHANGE),Yt=on(bt.ON_SHOW),zt=on(bt.ON_HIDE),Qt=on(bt.ON_UNLOAD),Xt=on(bt.ON_ROUTE_DONE),Zt=on(bt.ON_PULL_DOWN_REFRESH),Jt=on(bt.ON_REACH_BOTTOM),Kt=on(bt.ON_RESIZE),$t=on(bt.ON_TAB_ITEM_TAP),qt=rn(bt.ON_LOAD),en=rn(It.MOVED),tn=rn(It.DETACHED),nn=rn(It.ERROR);function sn(e){return t=>{gt&&cn(gt,e,t)}}function on(e){return t=>{const n=mt();n&&cn(n,e,t)}}function rn(e){return t=>{yt&&cn(yt,e,t)}}function cn(e,t,n){const s=ot(t);void 0===e[s]&&(e[s]=[]),e[s].push(n)}exports.EffectScope=E,exports.ReactiveEffect=N,exports.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},exports.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},exports.computed=function(e,n,s=!1){let i,o;const r=c(e);return r?(i=e,o=t):(i=e.get,o=e.set),new Me(i,o,r||!o,s)},exports.createApp=function(e){let t,n;if(st(e))t=e,n={};else{if(void 0===e.setup)return void App(e);t=e.setup,n=qe(e,["setup"])}const s=n[Dt.ON_LAUNCH];n[Dt.ON_LAUNCH]=function(e){gt=this;const n=t(e);void 0!==n&&Object.keys(n).forEach((e=>{this[e]=n[e]})),gt=null,void 0!==s&&s.call(this,e)},n[Dt.ON_SHOW]=Lt(n,Dt.ON_SHOW),n[Dt.ON_HIDE]=Lt(n,Dt.ON_HIDE),n[Dt.ON_ERROR]=Lt(n,Dt.ON_ERROR),n[Dt.ON_PAGE_NOT_FOUND]=Lt(n,Dt.ON_PAGE_NOT_FOUND),n[Dt.ON_UNHANDLED_REJECTION]=Lt(n,Dt.ON_UNHANDLED_REJECTION),n[Dt.ON_THEME_CHANGE]=Lt(n,Dt.ON_THEME_CHANGE),App(n)},exports.customRef=function(e){return new Ye(e)},exports.defineComponent=function(e,t){let n,s;t=$e({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},t);let i=null;if(st(e))n=e,s={};else{if(void 0===e.setup)return Component(e);n=e.setup,s=qe(e,["setup"]),s.properties&&(i=Object.keys(s.properties))}void 0===s.lifetimes&&(s.lifetimes={});const o=s.lifetimes[It.ATTACHED]||s[It.ATTACHED];s.lifetimes[It.ATTACHED]=function(){var e;this.__scope__=new E,yt=e=this,e.__scope__.on();const t={};i&&i.forEach((e=>{t[e]=this.data[e]})),this.__props__=me(t);const s={is:this.is,id:this.id,dataset:this.dataset,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,triggerEvent:this.triggerEvent.bind(this),createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),selectOwnerComponent:this.selectOwnerComponent.bind(this),getRelationNodes:this.getRelationNodes.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this)},r=n(this.__props__,s);void 0!==r&&Object.keys(r).forEach((e=>{const t=r[e];st(t)?this[e]=t:(this.setData({[e]:Ht(t)}),Pt.call(this,e,t))})),yt&&yt.__scope__.off(),yt=null,void 0!==o&&o.call(this)};const r=Ct(s,It.DETACHED);return s.lifetimes[It.DETACHED]=function(){r.call(this),this.__scope__.stop()},s.lifetimes[It.READY]=jt(wt[It.READY],s.lifetimes[It.READY]||s[It.READY]),s.lifetimes[It.MOVED]=Ct(s,It.MOVED),s.lifetimes[It.ERROR]=Ct(s,It.ERROR),void 0===s.methods&&(s.methods={}),(s.methods[bt.ON_PAGE_SCROLL]||t.listenPageScroll)&&(s.methods[bt.ON_PAGE_SCROLL]=Mt(s,bt.ON_PAGE_SCROLL),s.methods.__listenPageScroll__=()=>!0),void 0===s.methods[bt.ON_SHARE_APP_MESSAGE]&&t.canShareToOthers&&(s.methods[bt.ON_SHARE_APP_MESSAGE]=function(e){const t=this[ot(bt.ON_SHARE_APP_MESSAGE)];return t?t(e):{}},s.methods.__isInjectedShareToOthersHook__=()=>!0),void 0===s.methods[bt.ON_SHARE_TIMELINE]&&t.canShareToTimeline&&(s.methods[bt.ON_SHARE_TIMELINE]=function(){const e=this[ot(bt.ON_SHARE_TIMELINE)];return e?e():{}},s.methods.__isInjectedShareToTimelineHook__=()=>!0),void 0===s.methods[bt.ON_ADD_TO_FAVORITES]&&(s.methods[bt.ON_ADD_TO_FAVORITES]=function(e){const t=this[ot(bt.ON_ADD_TO_FAVORITES)];return t?t(e):{}},s.methods.__isInjectedFavoritesHook__=()=>!0),void 0===s.methods[bt.ON_SAVE_EXIT_STATE]&&(s.methods[bt.ON_SAVE_EXIT_STATE]=function(){const e=this[ot(bt.ON_SAVE_EXIT_STATE)];return e?e():{data:void 0}},s.methods.__isInjectedExitStateHook__=()=>!0),s.methods[bt.ON_LOAD]=Mt(s,bt.ON_LOAD),s.methods[bt.ON_PULL_DOWN_REFRESH]=Mt(s,bt.ON_PULL_DOWN_REFRESH),s.methods[bt.ON_REACH_BOTTOM]=Mt(s,bt.ON_REACH_BOTTOM),s.methods[bt.ON_TAB_ITEM_TAP]=Mt(s,bt.ON_TAB_ITEM_TAP),void 0===s.pageLifetimes&&(s.pageLifetimes={}),s.pageLifetimes[wt[bt.ON_SHOW]]=kt(s,bt.ON_SHOW),s.pageLifetimes[wt[bt.ON_HIDE]]=kt(s,bt.ON_HIDE),s.pageLifetimes[wt[bt.ON_RESIZE]]=kt(s,bt.ON_RESIZE),s.pageLifetimes[wt[bt.ON_ROUTE_DONE]]=kt(s,bt.ON_ROUTE_DONE),i&&(void 0===s.observers&&(s.observers={}),i.forEach((e=>{const t=s.observers[e];s.observers[e]=function(n){this.__props__&&(this.__props__[e]=n),void 0!==t&&t.call(this,n)}}))),Component(s)},exports.definePage=function(e,t){let n,s;if(t=$e({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},t),st(e))n=e,s={};else{if(void 0===e.setup)return void Page(e);n=e.setup,s=qe(e,["setup"])}const i=s[bt.ON_LOAD];s[bt.ON_LOAD]=function(e){var t;this.__scope__=new E,Tt=t=this,t.__scope__.on();const s={is:this.is,route:this.route,options:this.options,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this)},o=n(e,s);void 0!==o&&Object.keys(o).forEach((e=>{const t=o[e];st(t)?this[e]=t:(this.setData({[e]:Ht(t)}),Pt.call(this,e,t))})),Tt&&Tt.__scope__.off(),Tt=null,void 0!==i&&i.call(this,e)};const o=xt(s,bt.ON_UNLOAD);s[bt.ON_UNLOAD]=function(){o.call(this),this.__scope__.stop()},(s[bt.ON_PAGE_SCROLL]||t.listenPageScroll)&&(s[bt.ON_PAGE_SCROLL]=xt(s,bt.ON_PAGE_SCROLL),s.__listenPageScroll__=()=>!0),void 0===s[bt.ON_SHARE_APP_MESSAGE]&&t.canShareToOthers&&(s[bt.ON_SHARE_APP_MESSAGE]=function(e){const t=this[ot(bt.ON_SHARE_APP_MESSAGE)];return t?t(e):{}},s.__isInjectedShareToOthersHook__=()=>!0),void 0===s[bt.ON_SHARE_TIMELINE]&&t.canShareToTimeline&&(s[bt.ON_SHARE_TIMELINE]=function(){const e=this[ot(bt.ON_SHARE_TIMELINE)];return e?e():{}},s.__isInjectedShareToTimelineHook__=()=>!0),void 0===s[bt.ON_ADD_TO_FAVORITES]&&(s[bt.ON_ADD_TO_FAVORITES]=function(e){const t=this[ot(bt.ON_ADD_TO_FAVORITES)];return t?t(e):{}},s.__isInjectedFavoritesHook__=()=>!0),void 0===s[bt.ON_SAVE_EXIT_STATE]&&(s[bt.ON_SAVE_EXIT_STATE]=function(){const e=this[ot(bt.ON_SAVE_EXIT_STATE)];return e?e():{data:void 0}},s.__isInjectedExitStateHook__=()=>!0),s[bt.ON_SHOW]=xt(s,bt.ON_SHOW),s[bt.ON_READY]=xt(s,bt.ON_READY),s[bt.ON_HIDE]=xt(s,bt.ON_HIDE),s[bt.ON_ROUTE_DONE]=xt(s,bt.ON_ROUTE_DONE),s[bt.ON_PULL_DOWN_REFRESH]=xt(s,bt.ON_PULL_DOWN_REFRESH),s[bt.ON_REACH_BOTTOM]=xt(s,bt.ON_REACH_BOTTOM),s[bt.ON_RESIZE]=xt(s,bt.ON_RESIZE),s[bt.ON_TAB_ITEM_TAP]=xt(s,bt.ON_TAB_ITEM_TAP),Page(s)},exports.effect=function(e,s){e.effect instanceof N&&(e=e.effect.fn);const i=new N(e,t,(()=>{i.dirty&&i.run()}));s&&(n(i,s),s.scope&&v(i,s.scope)),s&&s.lazy||i.run();const o=i.run.bind(i);return o.effect=i,o},exports.effectScope=function(e){return new E(e)},exports.getCurrentScope=S,exports.inject=function(e,t,n=!1){return e in Rt?Rt[e]:arguments.length>1?n&&st(t)?t():t:void 0},exports.isProxy=Pe,exports.isReactive=Ie,exports.isReadonly=Le,exports.isRef=Ue,exports.isShallow=He,exports.markRaw=function(e){return Object.isExtensible(e)&&((e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})})(e,"__v_skip",!0),e},exports.nextTick=function(e){const t=dt||ft;return e?t.then(e):t},exports.onAddToFavorites=e=>{const t=mt();if(t&&t.__isInjectedFavoritesHook__){const n=ot(bt.ON_ADD_TO_FAVORITES);void 0===t[n]&&(t[n]=e)}},exports.onAppError=Gt,exports.onAppHide=Vt,exports.onAppShow=Ut,exports.onDetach=tn,exports.onError=nn,exports.onHide=zt,exports.onLoad=qt,exports.onMove=en,exports.onPageNotFound=Wt,exports.onPageScroll=e=>{const t=mt();t&&t.__listenPageScroll__&&cn(t,bt.ON_PAGE_SCROLL,e)},exports.onPullDownRefresh=Zt,exports.onReachBottom=Jt,exports.onReady=e=>{const t=mt();t&&cn(t,bt.ON_READY,e)},exports.onResize=Kt,exports.onRouteDone=Xt,exports.onSaveExitState=e=>{const t=mt();if(t&&t.__isInjectedExitStateHook__){const n=ot(bt.ON_SAVE_EXIT_STATE);void 0===t[n]&&(t[n]=e)}},exports.onScopeDispose=function(e){p&&p.cleanups.push(e)},exports.onShareAppMessage=e=>{const t=mt();if(t&&t[bt.ON_SHARE_APP_MESSAGE]&&t.__isInjectedShareToOthersHook__){const n=ot(bt.ON_SHARE_APP_MESSAGE);void 0===t[n]&&(t[n]=e)}},exports.onShareTimeline=e=>{const t=mt();if(t&&t[bt.ON_SHARE_TIMELINE]&&t.__isInjectedShareToTimelineHook__){const n=ot(bt.ON_SHARE_TIMELINE);void 0===t[n]&&(t[n]=e)}},exports.onShow=Yt,exports.onTabItemTap=$t,exports.onThemeChange=Bt,exports.onUnhandledRejection=Ft,exports.onUnload=Qt,exports.provide=function(e,t){Rt[e]=t},exports.proxyRefs=function(e){return Ie(e)?e:new Proxy(e,Be)},exports.reactive=ye,exports.readonly=De,exports.ref=Ve,exports.shallowReactive=me,exports.shallowReadonly=function(e){return be(e,!0,$,Ne,Te)},exports.shallowRef=function(e){return Ge(e,!0)},exports.stop=function(e){e.effect.stop()},exports.toRaw=xe,exports.toRef=function(e,t,n){return Ue(e)?e:c(e)?new Qe(e):a(e)&&arguments.length>1?Xe(e,t,n):Ve(e)},exports.toRefs=function(e){const t=o(e)?new Array(e.length):{};for(const n in e)t[n]=Xe(e,n);return t},exports.toValue=function(e){return c(e)?e():Fe(e)},exports.triggerRef=function(e){je(e,4)},exports.unref=Fe,exports.watch=St,exports.watchEffect=function(e,t){return Nt(e,null,t)},exports.watchPostEffect=function(e,t){return Nt(e,null,{flush:"post"})},exports.watchSyncEffect=function(e,t){return Nt(e,null,{flush:"sync"})};
@@ -0,0 +1,107 @@
1
+ /// <reference types="@vue-mini/miniprogram-api-typings" />
2
+ import { Ref, ComputedRef, DebuggerOptions } from '@vue/reactivity';
3
+ export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, Raw, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WritableComputedOptions, WritableComputedRef, computed, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
4
+
5
+ type WatchEffect = (onCleanup: OnCleanup) => void;
6
+ type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T);
7
+ type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any;
8
+ type MapSources<T, Immediate> = {
9
+ [K in keyof T]: T[K] extends WatchSource<infer V> ? Immediate extends true ? V | undefined : V : T[K] extends object ? Immediate extends true ? T[K] | undefined : T[K] : never;
10
+ };
11
+ type OnCleanup = (cleanupFn: () => void) => void;
12
+ interface WatchOptionsBase extends DebuggerOptions {
13
+ flush?: 'pre' | 'post' | 'sync';
14
+ }
15
+ interface WatchOptions<Immediate = boolean> extends WatchOptionsBase {
16
+ immediate?: Immediate;
17
+ deep?: boolean;
18
+ once?: boolean;
19
+ }
20
+ type WatchStopHandle = () => void;
21
+ declare function watchEffect(effect: WatchEffect, options?: WatchOptionsBase): WatchStopHandle;
22
+ declare function watchPostEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle;
23
+ declare function watchSyncEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle;
24
+ type MultiWatchSources = Array<WatchSource<unknown> | object>;
25
+ declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle;
26
+ declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
27
+ declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
28
+ declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle;
29
+
30
+ declare function nextTick<R = void>(fn?: () => R): Promise<Awaited<R>>;
31
+
32
+ interface InjectionKey<T> extends Symbol {
33
+ }
34
+ declare function provide<T, K = InjectionKey<T> | string>(key: K, value: K extends InjectionKey<infer V> ? V : T): void;
35
+ declare function inject<T>(key: InjectionKey<T> | string): T | undefined;
36
+ declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T, treatDefaultAsFactory?: false): T;
37
+ declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T | (() => T), treatDefaultAsFactory: true): T;
38
+
39
+ type Bindings = Record<string, any> | void;
40
+
41
+ type AppSetup = (this: void, options: WechatMiniprogram.App.LaunchShowOption) => Bindings;
42
+ type AppOptions<T extends WechatMiniprogram.IAnyObject> = {
43
+ setup?: AppSetup;
44
+ } & WechatMiniprogram.App.Options<T>;
45
+ declare function createApp(setup: AppSetup): void;
46
+ declare function createApp<T extends WechatMiniprogram.IAnyObject>(options: AppOptions<T>): void;
47
+
48
+ type Query = Record<string, string | undefined>;
49
+ type PageContext = WechatMiniprogram.Page.InstanceProperties & Omit<WechatMiniprogram.Page.InstanceMethods<Record<string, any>>, 'setData' | 'groupSetData' | 'hasBehavior' | 'triggerEvent' | 'selectOwnerComponent' | 'getRelationNodes'>;
50
+ type PageSetup = (this: void, query: Query, context: PageContext) => Bindings;
51
+ type PageOptions<Data extends WechatMiniprogram.Page.DataOption, Custom extends WechatMiniprogram.Page.CustomOption> = {
52
+ setup?: PageSetup;
53
+ } & WechatMiniprogram.Page.Options<Data, Custom>;
54
+ interface Config {
55
+ listenPageScroll?: boolean;
56
+ canShareToOthers?: boolean;
57
+ canShareToTimeline?: boolean;
58
+ }
59
+ declare function definePage(setup: PageSetup, config?: Config): void;
60
+ declare function definePage<Data extends WechatMiniprogram.Page.DataOption, Custom extends WechatMiniprogram.Page.CustomOption>(options: PageOptions<Data, Custom>, config?: Config): void;
61
+
62
+ type ComponentContext = WechatMiniprogram.Component.InstanceProperties & Omit<WechatMiniprogram.Component.InstanceMethods<Record<string, any>>, 'setData' | 'groupSetData' | 'hasBehavior'>;
63
+ type ComponentSetup<Props extends Record<string, any>> = (this: void, props: Readonly<Props>, context: ComponentContext) => Bindings;
64
+ type ComponentOptionsWithoutProps<Data extends WechatMiniprogram.Component.DataOption, Methods extends WechatMiniprogram.Component.MethodOption> = WechatMiniprogram.Component.Options<Data, WechatMiniprogram.Component.PropertyOption, Methods> & {
65
+ properties?: undefined;
66
+ } & {
67
+ setup?: ComponentSetup<{}>;
68
+ };
69
+ type ComponentOptionsWithProps<Props extends WechatMiniprogram.Component.PropertyOption, Data extends WechatMiniprogram.Component.DataOption, Methods extends WechatMiniprogram.Component.MethodOption> = WechatMiniprogram.Component.Options<Data, Props, Methods> & {
70
+ setup?: ComponentSetup<PropertyOptionToData<Props>>;
71
+ };
72
+ /** * Temporary patch for https://github.com/wechat-miniprogram/api-typings/issues/97 ***/
73
+ type PropertyOptionToData<T extends WechatMiniprogram.Component.PropertyOption> = {
74
+ [Name in keyof T]: PropertyToData<T[Name]>;
75
+ };
76
+ type PropertyToData<T extends WechatMiniprogram.Component.AllProperty> = T extends WechatMiniprogram.Component.PropertyType ? WechatMiniprogram.Component.ValueType<T> : T extends WechatMiniprogram.Component.AllFullProperty ? T['optionalTypes'] extends OptionalTypes<infer Option> ? WechatMiniprogram.Component.ValueType<Option | T['type']> : WechatMiniprogram.Component.ValueType<T['type']> : never;
77
+ type OptionalTypes<T extends WechatMiniprogram.Component.PropertyType> = T[];
78
+ declare function defineComponent(setup: ComponentSetup<{}>, config?: Config): string;
79
+ declare function defineComponent<Data extends WechatMiniprogram.Component.DataOption, Methods extends WechatMiniprogram.Component.MethodOption>(options: ComponentOptionsWithoutProps<Data, Methods>, config?: Config): string;
80
+ declare function defineComponent<Props extends WechatMiniprogram.Component.PropertyOption, Data extends WechatMiniprogram.Component.DataOption, Methods extends WechatMiniprogram.Component.MethodOption>(options: ComponentOptionsWithProps<Props, Data, Methods>, config?: Config): string;
81
+
82
+ declare const onAppShow: (hook: (options: WechatMiniprogram.App.LaunchShowOption) => unknown) => void;
83
+ declare const onAppHide: (hook: () => unknown) => void;
84
+ declare const onAppError: (hook: (error: string) => unknown) => void;
85
+ declare const onPageNotFound: (hook: (options: WechatMiniprogram.App.PageNotFoundOption) => unknown) => void;
86
+ declare const onUnhandledRejection: (hook: (options: WechatMiniprogram.OnUnhandledRejectionListenerResult) => unknown) => void;
87
+ declare const onThemeChange: (hook: (options: WechatMiniprogram.OnThemeChangeListenerResult) => unknown) => void;
88
+ declare const onShow: (hook: () => unknown) => void;
89
+ declare const onHide: (hook: () => unknown) => void;
90
+ declare const onUnload: (hook: () => unknown) => void;
91
+ declare const onRouteDone: (hook: () => unknown) => void;
92
+ declare const onPullDownRefresh: (hook: () => unknown) => void;
93
+ declare const onReachBottom: (hook: () => unknown) => void;
94
+ declare const onResize: (hook: (resize: WechatMiniprogram.Page.IResizeOption) => unknown) => void;
95
+ declare const onTabItemTap: (hook: (tap: WechatMiniprogram.Page.ITabItemTapOption) => unknown) => void;
96
+ declare const onPageScroll: (hook: (scroll: WechatMiniprogram.Page.IPageScrollOption) => unknown) => void;
97
+ declare const onShareAppMessage: (hook: (share: WechatMiniprogram.Page.IShareAppMessageOption) => WechatMiniprogram.Page.ICustomShareContent | WechatMiniprogram.Page.IAsyncCustomShareContent | Promise<WechatMiniprogram.Page.ICustomShareContent> | void | Promise<void>) => void;
98
+ declare const onShareTimeline: (hook: () => WechatMiniprogram.Page.ICustomTimelineContent | void) => void;
99
+ declare const onAddToFavorites: (hook: (share: WechatMiniprogram.Page.IAddToFavoritesOption) => WechatMiniprogram.Page.IAddToFavoritesContent) => void;
100
+ declare const onSaveExitState: (hook: () => WechatMiniprogram.Page.ISaveExitState) => void;
101
+ declare const onReady: (hook: () => unknown) => void;
102
+ declare const onLoad: (hook: (query: Query) => unknown) => void;
103
+ declare const onMove: (hook: () => unknown) => void;
104
+ declare const onDetach: (hook: () => unknown) => void;
105
+ declare const onError: (hook: (error: WechatMiniprogram.Error) => unknown) => void;
106
+
107
+ export { type AppOptions, type AppSetup, type Bindings, type ComponentContext, type ComponentOptionsWithProps, type ComponentOptionsWithoutProps, type ComponentSetup, type Config, type InjectionKey, type PageContext, type PageOptions, type PageSetup, type Query, type WatchCallback, type WatchEffect, type WatchOptions, type WatchOptionsBase, type WatchSource, type WatchStopHandle, createApp, defineComponent, definePage, inject, nextTick, onAddToFavorites, onAppError, onAppHide, onAppShow, onDetach, onError, onHide, onLoad, onMove, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, provide, watch, watchEffect, watchPostEffect, watchSyncEffect };